From: Laszlo Ersek <lersek@redhat.com>
To: Ard Biesheuvel <ard.biesheuvel@linaro.org>,
edk2-devel@lists.01.org, leif.lindholm@linaro.org,
julien.grall@arm.com
Subject: Re: [PATCH] OvmfPkg/XenHypercallLib: enable virt extensions for ARM
Date: Thu, 16 Nov 2017 22:42:38 +0100 [thread overview]
Message-ID: <04b93643-9ba5-b6df-a5c7-20bda35bbd2f@redhat.com> (raw)
In-Reply-To: <20171116165620.30523-1-ard.biesheuvel@linaro.org>
On 11/16/17 17:56, Ard Biesheuvel wrote:
> 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 <ard.biesheuvel@linaro.org>
> ---
> 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/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 <IndustryStandard/Xen/arch-arm/xen.h>
>
> .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
>
Acked-by: Laszlo Ersek <lersek@redhat.com>
next prev parent reply other threads:[~2017-11-16 21:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-16 16:56 [PATCH] OvmfPkg/XenHypercallLib: enable virt extensions for ARM Ard Biesheuvel
2017-11-16 17:18 ` Ard Biesheuvel
2017-11-16 21:42 ` Laszlo Ersek [this message]
2017-11-17 10:06 ` Ard Biesheuvel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-list from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=04b93643-9ba5-b6df-a5c7-20bda35bbd2f@redhat.com \
--to=devel@edk2.groups.io \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox