From patchwork Fri Mar 6 14:34:40 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 45484 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-we0-f200.google.com (mail-we0-f200.google.com [74.125.82.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 162BB204BC for ; Fri, 6 Mar 2015 14:37:45 +0000 (UTC) Received: by wesk11 with SMTP id k11sf44298352wes.3 for ; Fri, 06 Mar 2015 06:37:44 -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=4OV2LYatPo8XhVrBhyWEmIdnBR2S43fNgQf2C52TMyo=; b=eNBUWwgCkxvK7E2KS9qPPgIwpD916ql1fpQVEWkJHob3tAhNAFhrTnpNSmkVyvG5HX Z5bbZUv/M+dTLY+4fSoVh3JawZymevbz7sZdNRvHNQhs+BlvPkI9Pj8pyQMcyYLt09uH IXkuBIzO/sly9P72J0RtV6HnuP4kuN7YE9cg1nL65SERX3zx1VV0eG0jbhF/gDYfG0wM Rogy70eCDzgchLohyjBFRE1sfU7qSJi6VfH82htxCQ3eYhkBUWICGz53W1zmX39S2k+6 EpfO0eAPXRVJtnM3NXpgUU8MWqAvN7L08oTks77FjlfZF7vk6SzOcaNDj9oUqkkWWQKQ alsg== X-Gm-Message-State: ALoCoQnScUtme+twtO2edmYUupiAd3wRV6ttPgsmkMcj0SoU3bVBNok2XeHsQnm6KXyxTedKNg7X X-Received: by 10.180.89.194 with SMTP id bq2mr2823307wib.4.1425652664376; Fri, 06 Mar 2015 06:37:44 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.38 with SMTP id x6ls79739lax.63.gmail; Fri, 06 Mar 2015 06:37:44 -0800 (PST) X-Received: by 10.112.239.38 with SMTP id vp6mr13010143lbc.48.1425652664223; Fri, 06 Mar 2015 06:37:44 -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 ap5si7183788lac.158.2015.03.06.06.37.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2015 06:37:44 -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 labhs14 with SMTP id hs14so57992853lab.4 for ; Fri, 06 Mar 2015 06:37:44 -0800 (PST) X-Received: by 10.152.22.67 with SMTP id b3mr12739175laf.117.1425652664034; Fri, 06 Mar 2015 06:37:44 -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 h5csp1174117lbj; Fri, 6 Mar 2015 06:37:43 -0800 (PST) X-Received: by 10.68.68.202 with SMTP id y10mr25738162pbt.152.1425652658187; Fri, 06 Mar 2015 06:37:38 -0800 (PST) Received: from bombadil.infradead.org (bombadil.infradead.org. [2001:1868:205::9]) by mx.google.com with ESMTPS id f16si15235273pdj.5.2015.03.06.06.37.37 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 06 Mar 2015 06:37:38 -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 1YTtMG-00039r-EG; Fri, 06 Mar 2015 14:36:08 +0000 Received: from mail-wg0-f42.google.com ([74.125.82.42]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YTtLf-0002nL-Lo for linux-arm-kernel@lists.infradead.org; Fri, 06 Mar 2015 14:35:32 +0000 Received: by wghl18 with SMTP id l18so6250385wgh.11 for ; Fri, 06 Mar 2015 06:35:08 -0800 (PST) X-Received: by 10.180.85.103 with SMTP id g7mr75123946wiz.19.1425652508403; Fri, 06 Mar 2015 06:35:08 -0800 (PST) Received: from ards-macbook-pro.local ([213.143.61.133]) by mx.google.com with ESMTPSA id j9sm15200015wjy.18.2015.03.06.06.35.05 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 06 Mar 2015 06:35:07 -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 roundup 2/4] ARM: KVM: avoid "HYP init code too big" error Date: Fri, 6 Mar 2015 15:34:40 +0100 Message-Id: <1425652482-31411-3-git-send-email-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1425652482-31411-1-git-send-email-ard.biesheuvel@linaro.org> References: <1425652482-31411-1-git-send-email-ard.biesheuvel@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150306_063531_904072_EDFA80A0 X-CRM114-Status: UNSURE ( 9.54 ) 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.42 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H3 RBL: Good reputation (+3) [74.125.82.42 listed in wl.mailspike.net] -0.0 SPF_PASS SPF: sender matches SPF record -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/] Tested-by: Marc Zyngier Reviewed-by: Marc Zyngier 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<