From patchwork Thu Nov 16 16:56:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ard Biesheuvel X-Patchwork-Id: 119057 Delivered-To: patch@linaro.org Received: by 10.140.22.164 with SMTP id 33csp5816553qgn; Thu, 16 Nov 2017 08:56:33 -0800 (PST) X-Google-Smtp-Source: AGs4zMaGKG0bYLy38f5+d/zAGh8JlvBMkzs00lQum8+cvZe9YBNJNG7XXyia5sdMnhliQvS2K4Ea X-Received: by 10.98.224.7 with SMTP id f7mr2490633pfh.177.1510851393177; Thu, 16 Nov 2017 08:56:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510851393; cv=none; d=google.com; s=arc-20160816; b=NBlw7tSWVRJ8T3QUm/fladk5WropjajZ4OPn/i107XOMslUb4minKC7t8JU2jr61P+ J3NhNIsogZkgVswmxj4YykGr7JNsyYIqiP95yoWGdw6Y+nGKK2ctHljho/VkZc4L4hB+ ltkLUER2MqCUSK9DesCNEBINNBkQDmg0aueW6xW9LyyqiMaFtEhORQUVtZ87JQ9z9TV0 55vEd8ytwiJnJcCi3MJpqVx5Q22sRSW0T2PXApz4m8wT4M/L4cGex0fi5sUMEmqblXJ0 iqRJzIfr3C83Mm6h73fiHG5Sp+FiZZWxUqa15TswmMFBCKynBB8QFzALoAQGUEzZnUqC jt+Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:dkim-signature :delivered-to:arc-authentication-results; bh=RBUvRidLHmPIWZoFeXtvVZ9f2fTZpjeQErcG+z1fXx0=; b=LWUYs2XWj5E+uRW4Nl76RvybCcJWa81UupV8eeVAGZ2ot0LemvCopy6zam6SjKkcV7 dsEJkwfBaB0dy2tJTIPY6cPj3J6dSkHm2tixGgegyv+wSB2Zr6xyDV05oyMEJL7fJmkG x1gZAtcpZ0/xIBhB15Mg5wvp//+35USGGikp8Kx9gZ1l3X6pECzQj2o3DYZy9I5Axwre TDux+CKJR+K4/mFdgpRCmuZk3Xw7HNThxAmtF2VwHvGt3+7E4K+iBXmllyQ/gGiHDPAE tVfDA7YyGMC6jrHoso1ohOAOnJJNrWAfnHKNVqZp8/ef10L+jlreJ4rd+tvRu4nsQO8p T4IQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HsvnzmZ9; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ml01.01.org (ml01.01.org. [2001:19d0:306:5::1]) by mx.google.com with ESMTPS id 9si1165332pla.183.2017.11.16.08.56.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Nov 2017 08:56:33 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) client-ip=2001:19d0:306:5::1; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org header.s=google header.b=HsvnzmZ9; spf=pass (google.com: best guess record for domain of edk2-devel-bounces@lists.01.org designates 2001:19d0:306:5::1 as permitted sender) smtp.mailfrom=edk2-devel-bounces@lists.01.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org 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) X-Original-To: edk2-devel@lists.01.org Delivered-To: edk2-devel@lists.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 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) 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-Received: by 10.223.138.182 with SMTP id y51mr2164433wry.273.1510851389420; Thu, 16 Nov 2017 08:56:29 -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) 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 Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" 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 --- OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S | 2 ++ OvmfPkg/Library/XenHypercallLib/XenHypercallLib.inf | 3 +++ 2 files changed, 5 insertions(+) -- 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel Signed-off-by: Ard Biesheuvel Acked-by: Laszlo Ersek diff --git a/OvmfPkg/Library/XenHypercallLib/Arm/Hypercall.S b/OvmfPkg/Library/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 .text + .arch_extension virt + GCC_ASM_EXPORT(XenHypercall2) 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] [Guids.IA32, Guids.X64] gEfiXenInfoGuid + +[BuildOptions.ARM] + RVCT:*_*_ARM_PLATFORM_FLAGS == --cpu Cortex-A15