|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [RFC PATCH 3/4] x86/public: Expose physaddr_abi through Xen HVM CPUID leaf
The guest needs to know this information before attempting to make a hypercall
(especially ones to fetch XENFEAT_*).
Signed-off-by: Teddy Astie <teddy.astie@xxxxxxxxxx>
---
xen/arch/x86/cpuid.c | 3 +++
xen/include/public/arch-x86/cpuid.h | 2 ++
2 files changed, 5 insertions(+)
diff --git a/xen/arch/x86/cpuid.c b/xen/arch/x86/cpuid.c
index 8dc68945f7..a721499920 100644
--- a/xen/arch/x86/cpuid.c
+++ b/xen/arch/x86/cpuid.c
@@ -153,6 +153,9 @@ static void cpuid_hypervisor_leaves(const struct vcpu *v,
uint32_t leaf,
*/
res->a |= XEN_HVM_CPUID_UPCALL_VECTOR;
+ /* Indicate if the guest uses the physical addresses hypercall ABI. */
+ if ( is_hvm_physaddr_abi(v->domain) )
+ res->a |= XEN_HVM_CPUID_PHYS_ADDR_ABI;
break;
case 5: /* PV-specific parameters */
diff --git a/xen/include/public/arch-x86/cpuid.h
b/xen/include/public/arch-x86/cpuid.h
index 3bb0dd249f..b8ceb833d7 100644
--- a/xen/include/public/arch-x86/cpuid.h
+++ b/xen/include/public/arch-x86/cpuid.h
@@ -106,6 +106,8 @@
* bound to event channels.
*/
#define XEN_HVM_CPUID_UPCALL_VECTOR (1u << 6)
+/* Hypercalls are using physical addresses instead of linear ones. */
+#define XEN_HVM_CPUID_PHYS_ADDR_ABI (1u << 7)
/*
* Leaf 6 (0x40000x05)
--
2.47.2
Teddy Astie | Vates XCP-ng Developer
XCP-ng & Xen Orchestra - Vates solutions
web: https://vates.tech
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |