xen/public: Correct the documentation of where the Xen cpuid leaves can be found
PATCH 1/1 xen/public: Correct the documentation of where the Xen cpuid leaves can be found
Signed-off-by Andrew Cooper <[email protected]>
CC Boris Ostrovsky <[email protected]>
CC Keir Fraser <[email protected]>
CC Jan Beulich <[email protected]>
CC Tim Deegan <[email protected]>
CC Ian Campbell <[email protected]>
CC Ian Jackson <[email protected]>
--- xen/include/public/arch-x86/cpuid.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)
xen/include/public/arch-x86/cpuid.h +13 -5
@@ -30,12 +30,20 @@#ifndef __XEN_PUBLIC_ARCH_X86_CPUID_H__#define __XEN_PUBLIC_ARCH_X86_CPUID_H__ -/* Xen identification leaves start at 0x40000000. */ +/* +* For compatibility with other hypervisor interfaces, the Xen cpuid leaves +* can be found at the first otherwise unused 0x100 aligned boundary starting +* from 0x40000000. +* +* e.g If viridian extensions are enabled for an HVM domain, the Xen cpuid +* leaves will start at 0x40000100 +*/ +#define XEN_CPUID_FIRST_LEAF 0x40000000#define XEN_CPUID_LEAF (i) (XEN_CPUID_FIRST_LEAF + (i))/* -* Leaf 1 (0x40000000) +* Leaf 1 (0x40000x00) * EAX: Largest Xen-information leaf. All leaves up to an including @EAX * are supported by the Xen host. * EBX-EDX: "XenVMMXenVMM" signature, allowing positive identification
@@ -46,14 +54,14 @@#define XEN_CPUID_SIGNATURE_EDX 0x4d4d566e/* "nVMM" */ /* -* Leaf 2 (0x40000001) +* Leaf 2 (0x40000x01) * EAX[31:16]: Xen major version. * EAX[15: 0]: Xen minor version. * EBX-EDX: Reserved (currently all zeroes). */ /* -* Leaf 3 (0x40000002) +* Leaf 3 (0x40000x02) * EAX: Number of hypercall transfer pages. This register is always guaranteed * to specify one hypercall page. * EBX: Base address of Xen-specific MSRs.
@@ -66,7 +74,7 @@#define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD (1u<<0)/* -* Leaf 5 (0x40000004) +* Leaf 5 (0x40000x04) * HVM-specific features */
Signature · 1 line
1.7.10.4
Quoted 7 lines · Andrew Cooper
Signed-off-by Andrew Cooper <[email protected]>CC Boris Ostrovsky <[email protected]>CC Keir Fraser <[email protected]>CC Jan Beulich <[email protected]>CC Tim Deegan <[email protected]>CC Ian Campbell <[email protected]>CC Ian Jackson <[email protected]>
Reviewed-by Boris Ostrovsky <[email protected]>
Quoted 57 lines
--- xen/include/public/arch-x86/cpuid.h | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-)xen/include/public/arch-x86/cpuid.h +13
-5@@ -30,12 +30,20 @@#ifndef __XEN_PUBLIC_ARCH_X86_CPUID_H__#define __XEN_PUBLIC_ARCH_X86_CPUID_H__ -/* Xen identification leaves start at 0x40000000. */ +/* +* For compatibility with other hypervisor interfaces, the Xen cpuid leaves +* can be found at the first otherwise unused 0x100 aligned boundary starting +* from 0x40000000. +* +* e.g If viridian extensions are enabled for an HVM domain, the Xen cpuid +* leaves will start at 0x40000100 +*/ +#define XEN_CPUID_FIRST_LEAF 0x40000000#define XEN_CPUID_LEAF (i) (XEN_CPUID_FIRST_LEAF + (i))/* -* Leaf 1 (0x40000000) +* Leaf 1 (0x40000x00) * EAX: Largest Xen-information leaf. All leaves up to an including @EAX * are supported by the Xen host. * EBX-EDX: "XenVMMXenVMM" signature, allowing positive identification @@ -46,14 +54,14 @@#define XEN_CPUID_SIGNATURE_EDX 0x4d4d566e/* "nVMM" */ /* -* Leaf 2 (0x40000001) +* Leaf 2 (0x40000x01) * EAX[31:16]: Xen major version. * EAX[15: 0]: Xen minor version. * EBX-EDX: Reserved (currently all zeroes). */ /* -* Leaf 3 (0x40000002) +* Leaf 3 (0x40000x02) * EAX: Number of hypercall transfer pages. This register is always guaranteed * to specify one hypercall page. * EBX: Base address of Xen-specific MSRs. @@ -66,7 +74,7 @@#define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD (1u<<0)/* -* Leaf 5 (0x40000004) +* Leaf 5 (0x40000x04) * HVM-specific features */