From nobody Mon Apr 29 07:25:28 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1510851394160346.13651665232726; Thu, 16 Nov 2017 08:56:34 -0800 (PST) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 878A92035A7BA; Thu, 16 Nov 2017 08:52:22 -0800 (PST) Received: from mail-wr0-x244.google.com (mail-wr0-x244.google.com [IPv6:2a00:1450:400c:c0c::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 61E692035A7AB for ; Thu, 16 Nov 2017 08:52:21 -0800 (PST) Received: by mail-wr0-x244.google.com with SMTP id 4so23444500wrt.0 for ; Thu, 16 Nov 2017 08:56:31 -0800 (PST) Received: from localhost.localdomain ([160.167.170.128]) by smtp.gmail.com with ESMTPSA id e71sm3033925wma.13.2017.11.16.08.56.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Nov 2017 08:56:28 -0800 (PST) X-Original-To: edk2-devel@lists.01.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:400c:c0c::244; helo=mail-wr0-x244.google.com; envelope-from=ard.biesheuvel@linaro.org; receiver=edk2-devel@lists.01.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=qzsHWeLjdDa82SwjtaIl3Kt22dMOPXfqxX1tCHy3+MY=; b=HsvnzmZ9mo4NMwjkGIz8/ZksTlfaAP62gDCY7PAhI7nkgUHgc7YnDwRLiIZu+u0yMm rMGmp2HgcQbgfSBF6+NEFLTMPnPmrlhb2pFBmogMMdOJNQJHG4cM2DxuXq2LzU3cxLYh CzEu8aUGB5x8PwPdD98dBOnQzxpMrwXThEn2o= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=qzsHWeLjdDa82SwjtaIl3Kt22dMOPXfqxX1tCHy3+MY=; b=Y2p9CGL50gD/3BtmSAUaywcGZiVFeiHnfEhkoXdp7qNcGJRB3kqiX0lj/Gvw40BQf8 ciL2yXmAc+AfYmGYVxXnZ+mGgqKlMW690AMaEJURFb5tVHkdEbKty8SZLDzMIfswVThy AgNkjcnU35wWGY41G3BFZYlig/myzmcRRgXGOc+1HPVjgyJTSndq46YD63cNF7wnLFCC uBu7RSKgV29cdac9ducjPmHCl381Y63cfIOcYX0PtNkr8WcG91N+jAkp9NkyZcqDZCku LpDrAA3qv51vJl/UIqUmyay9jl/ZAK8pQdtFwEg9zs0bElcSUmfNfR+gGliTKsQ0g6J6 ydEA== X-Gm-Message-State: AJaThX6hyllJYLEeko9a7AExC6ZpORAuCE5rwF4JfwqX2NiL9sDKwm9F lYPTA0E9ESdWoT4I+jlIrDCobkUBmXk= X-Google-Smtp-Source: AGs4zMaedMvoe27XNPyTYPY/hy3Q5lXh2yWUI/5RlNbCsmy5aTzfJJD9SNYkz7v9Wq4K3MFoEynVyQ== X-Received: by 10.223.138.182 with SMTP id y51mr2164433wry.273.1510851389420; Thu, 16 Nov 2017 08:56:29 -0800 (PST) From: Ard Biesheuvel To: edk2-devel@lists.01.org, leif.lindholm@linaro.org, lersek@redhat.com, julien.grall@arm.com Date: Thu, 16 Nov 2017 16:56:20 +0000 Message-Id: <20171116165620.30523-1-ard.biesheuvel@linaro.org> X-Mailer: git-send-email 2.11.0 Subject: [edk2] [PATCH] OvmfPkg/XenHypercallLib: enable virt extensions for ARM X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ard Biesheuvel MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" XenHypercallLib uses the 'hvc' instruction, which is not implemented on all ARMv7 CPUs, and so we need to explicitly specify a CPU that has the virtualization extensions. This override used to be set at the platform level, but this was removed in commit 0d36a219c7bdbb27d775b50837823b2a9928147c ('ArmPlatformPkg/PL031RealTimeClockLib: drop ArmPlatformSysConfigLib reference), under the assumption that all users of the 'hvc' instruction had already been fixed. So fix this for GNU binutils by adding the 'virt' arch extension directive, and for RVCT by setting the --cpu command line option to a CPU that is virt capable. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Ard Biesheuvel Acked-by: Laszlo Ersek --- OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S | 2 ++ OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf | 3 +++ 2 files changed, 5 insertions(+) diff --git a/OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S b/OvmfPkg/Libr= ary/XenHypercallLib/Arm/Hypercall.S index c12c8658b729..0adf65840a2f 100644 --- a/OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S +++ b/OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S @@ -16,6 +16,8 @@ #include =20 .text + .arch_extension virt + GCC_ASM_EXPORT(XenHypercall2) =20 ASM_PFX(XenHypercall2): diff --git a/OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf b/OvmfPkg/= Library/XenHypercallLib/XenHypercallLib.inf index f4503a4b01f4..d268e540feca 100644 --- a/OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf +++ b/OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf @@ -64,3 +64,6 @@ [LibraryClasses.IA32, LibraryClasses.X64] =20 [Guids.IA32, Guids.X64] gEfiXenInfoGuid + +[BuildOptions.ARM] + RVCT:*_*_ARM_PLATFORM_FLAGS =3D=3D --cpu Cortex-A15 --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel