From patchwork Fri Feb 27 09:11:37 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 45212 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 8BB40204BC for ; Fri, 27 Feb 2015 09:13:47 +0000 (UTC) Received: by labge10 with SMTP id ge10sf13147556lab.3 for ; Fri, 27 Feb 2015 01:13:46 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version :content-type:content-transfer-encoding:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list; bh=UcOsGGkDYDqRr+88ezmrXzmJ5lOGXmFk547wpwx+oBI=; b=MJ0N4usWPtrNUV/eR/ZGfWnDYA3pQh/XwP1iFsyJG9SbkCYOQhqsz9SncMDCbXSxjf OeHnpt84bUMk18nYUmzqz/6jwn6utIYmc/vrg9Pl6i9gb+i/9+Mo08gI9ScmFVtzOu2u gtfQT82I12BJfg4J/KmcUJJScW0KeS9qw+E3dMCMM0QkKGQI+XxI6V6XFkuW0yjctKy2 mwJxWmDSVDyOImiJHI8/s9o5bYPCrG7HfIpDd4+YWShBv4WAoe9Gtc1sfp5tmvzFLz45 umyJBU2eOP5XWkK6gs5KDQf7WS44lATRWdQyb0Iux5cczletDNI9O49NhF5NKQlv3THT zj1g== X-Gm-Message-State: ALoCoQnc/lCMZQVqW1aG+oilLJuyOI5QTzuzmm2UlOWwujJdujOiNPqmHXi9Y78ZrEgES52F2I3o X-Received: by 10.112.40.81 with SMTP id v17mr1896440lbk.5.1425028426367; Fri, 27 Feb 2015 01:13:46 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.115.207 with SMTP id jq15ls142386lab.107.gmail; Fri, 27 Feb 2015 01:13:46 -0800 (PST) X-Received: by 10.112.211.200 with SMTP id ne8mr11316441lbc.73.1425028426079; Fri, 27 Feb 2015 01:13:46 -0800 (PST) Received: from mail-la0-f48.google.com (mail-la0-f48.google.com. [209.85.215.48]) by mx.google.com with ESMTPS id d1si2497397lag.45.2015.02.27.01.13.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 01:13:46 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) client-ip=209.85.215.48; Received: by labge10 with SMTP id ge10so16200828lab.12 for ; Fri, 27 Feb 2015 01:13:46 -0800 (PST) X-Received: by 10.152.43.51 with SMTP id t19mr11313909lal.73.1425028425949; Fri, 27 Feb 2015 01:13:45 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.35.133 with SMTP id h5csp3811403lbj; Fri, 27 Feb 2015 01:13:44 -0800 (PST) X-Received: by 10.66.102.4 with SMTP id fk4mr22022652pab.111.1425028422688; Fri, 27 Feb 2015 01:13:42 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id iw9si4529934pac.200.2015.02.27.01.13.41 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 27 Feb 2015 01:13:42 -0800 (PST) Received-SPF: none (google.com: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org does not designate permitted sender hosts) client-ip=2001:1868:205::9; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YRGyF-0006No-MQ; Fri, 27 Feb 2015 09:12:31 +0000 Received: from mail-we0-f169.google.com ([74.125.82.169]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YRGxu-00065h-Kk for linux-arm-kernel@lists.infradead.org; Fri, 27 Feb 2015 09:12:11 +0000 Received: by wevk48 with SMTP id k48so18606446wev.3 for ; Fri, 27 Feb 2015 01:11:48 -0800 (PST) X-Received: by 10.180.198.110 with SMTP id jb14mr4316500wic.57.1425028308395; Fri, 27 Feb 2015 01:11:48 -0800 (PST) Received: from ards-macbook-pro.lan (bl11-65-113.dsl.telepac.pt. [85.244.65.113]) by mx.google.com with ESMTPSA id er13sm5045603wjc.11.2015.02.27.01.11.46 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 27 Feb 2015 01:11:47 -0800 (PST) From: Ard Biesheuvel To: marc.zyngier@arm.com, christoffer.dall@linaro.org, linux@arm.linux.org.uk, linux-arm-kernel@lists.infradead.org, kvmarm@lists.cs.columbia.edu Subject: [PATCH resend 1/2] ARM: KVM: avoid "HYP init code too big" error Date: Fri, 27 Feb 2015 09:11:37 +0000 Message-Id: <1425028298-17289-2-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1425028298-17289-1-git-send-email-ard.biesheuvel@linaro.org> References: <1425028298-17289-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150227_011210_833854_8DF8C8C2 X-CRM114-Status: UNSURE ( 8.73 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.7 (/) X-Spam-Report: SpamAssassin version 3.4.0 on bombadil.infradead.org summary: Content analysis details: (-0.7 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low trust [74.125.82.169 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.169 listed in wl.mailspike.net] -0.0 RCVD_IN_MSPIKE_WL Mailspike good senders Cc: will.deacon@arm.com, arnd@arndb.de, Ard Biesheuvel X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ard.biesheuvel@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.48 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 From: Arnd Bergmann When building large kernels, the linker will emit lots of veneers into the .hyp.idmap.text section, which causes it to grow beyond one page, and that triggers the build error. This moves the section into .rodata instead, which avoids the veneers and is safe because the code is not executed directly but remapped by the hypervisor into its own executable address space. Signed-off-by: Arnd Bergmann [ardb: move the ALIGN() to .rodata as well, update log s/copied/remapped/] Signed-off-by: Ard Biesheuvel --- arch/arm/kernel/vmlinux.lds.S | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S index b31aa73e8076..2787eb8d3616 100644 --- a/arch/arm/kernel/vmlinux.lds.S +++ b/arch/arm/kernel/vmlinux.lds.S @@ -22,11 +22,15 @@ ALIGN_FUNCTION(); \ VMLINUX_SYMBOL(__idmap_text_start) = .; \ *(.idmap.text) \ - VMLINUX_SYMBOL(__idmap_text_end) = .; \ + VMLINUX_SYMBOL(__idmap_text_end) = .; + +#define IDMAP_RODATA \ + .rodata : { \ . = ALIGN(32); \ VMLINUX_SYMBOL(__hyp_idmap_text_start) = .; \ *(.hyp.idmap.text) \ - VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; + VMLINUX_SYMBOL(__hyp_idmap_text_end) = .; \ + } #ifdef CONFIG_HOTPLUG_CPU #define ARM_CPU_DISCARD(x) @@ -124,6 +128,7 @@ SECTIONS . = ALIGN(1<