From: Juergen Gross Date: Thu, 28 Sep 2017 10:06:21 +0000 (+0200) Subject: public: add some comments to arch-x86/cpuid.h X-Git-Tag: archive/raspbian/4.11.1-1+rpi1~1^2~66^2~1316 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=b183c24854a0a6324c8dc45fc39e8dbef6f6afea;p=xen.git public: add some comments to arch-x86/cpuid.h Leaf 4 of the Xen-specific CPUID leaves isn't mentioned at all in include/public/arch-x86/cpuid.h, the comments for leaf 5 don't tell anything about the sub-leaf semantics. Add comments to clarify the interface. Signed-off-by: Juergen Gross Acked-by: Jan Beulich --- diff --git a/xen/include/public/arch-x86/cpuid.h b/xen/include/public/arch-x86/cpuid.h index 1c026f7f24..eb76875d0e 100644 --- a/xen/include/public/arch-x86/cpuid.h +++ b/xen/include/public/arch-x86/cpuid.h @@ -73,11 +73,27 @@ #define _XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD 0 #define XEN_CPUID_FEAT1_MMU_PT_UPDATE_PRESERVE_AD (1u<<0) +/* + * Leaf 4 (0x40000x03) + * Sub-leaf 0: EAX: bit 0: emulated tsc + * bit 1: host tsc is known to be reliable + * bit 2: RDTSCP instruction available + * EBX: tsc_mode: 0=default (emulate if necessary), 1=emulate, + * 2=no emulation, 3=no emulation + TSC_AUX support + * ECX: guest tsc frequency in kHz + * EDX: guest tsc incarnation (migration count) + * Sub-leaf 1: EAX: tsc offset low part + * EBX: tsc offset high part + * ECX: multiplicator for tsc->ns conversion + * EDX: shift amount for tsc->ns conversion + * Sub-leaf 2: EAX: host tsc frequency in kHz + */ + /* * Leaf 5 (0x40000x04) * HVM-specific features - * EAX: Features - * EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag) + * Sub-leaf 0: EAX: Features + * Sub-leaf 0: EBX: vcpu id (iff EAX has XEN_HVM_CPUID_VCPU_ID_PRESENT flag) */ #define XEN_HVM_CPUID_APIC_ACCESS_VIRT (1u << 0) /* Virtualized APIC registers */ #define XEN_HVM_CPUID_X2APIC_VIRT (1u << 1) /* Virtualized x2APIC accesses */