x86/svm: Adjust VMCB comments
PATCH 1/1 x86/svm: Adjust VMCB comments
The Intercept comments provide no value whatsoever. For the VMCB, label the Control area and State Save area, which are the names given by the APM.
No functional change.
Signed-off-by Andrew Cooper <[email protected]>
---
CC: Jan Beulich <[email protected]>
CC: Roger Pau Monné <[email protected]>
CC: Alejandro Vallejo <[email protected]>
--- xen/arch/x86/hvm/svm/vmcb.c | 4 ++++ xen/arch/x86/hvm/svm/vmcb.h | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-)
xen/arch/x86/hvm/svm/vmcb.c +4 -0
@@ -430,9 +430,13 @@ static void __init __maybe_unused build_assertions(void)/* Build-time check of the VMCB layout. */ BUILD_BUG_ON (sizeof (vmcb) !=PAGE_SIZE ); + +/* Control area */ BUILD_BUG_ON (offsetof(typeof (vmcb ), _pause_filter_thresh) !=0x03c );BUILD_BUG_ON (offsetof(typeof (vmcb ), _vintr) !=0x060 );BUILD_BUG_ON (offsetof(typeof (vmcb ), event_inj) !=0x0a8 ); + +/* State Save area */ BUILD_BUG_ON (offsetof(typeof (vmcb ), es) !=0x400 );BUILD_BUG_ON (offsetof(typeof (vmcb ), _cpl) !=0x4cb );BUILD_BUG_ON (offsetof(typeof (vmcb ), _cr4) !=0x548 );
xen/arch/x86/hvm/svm/vmcb.h +2 -6
@@ -8,7 +8,6 @@struct vcpu ; -/* general 1 intercepts */ enum GenericIntercept1bits {GENERAL1_INTERCEPT_INTR =1 <<0 ,
@@ -45,7 +44,6 @@ enum GenericIntercept1bitsGENERAL1_INTERCEPT_SHUTDOWN_EVT =1u <<31 }; -/* general 2 intercepts */ enum GenericIntercept2bits {GENERAL2_INTERCEPT_VMRUN =1 <<0 ,
@@ -65,8 +63,6 @@ enum GenericIntercept2bits GENERAL2_INTERCEPT_RDPRU = 1 << 14, }; - -/* control register intercepts */ enum CRInterceptBits {CR_INTERCEPT_CR0_READ =1 <<0 ,
@@ -103,8 +99,6 @@ enum CRInterceptBits CR_INTERCEPT_CR15_WRITE = 1u << 31, }; - -/* debug register intercepts */ enum DRInterceptBits {DR_INTERCEPT_DR0_READ =1 <<0 ,
@@ -400,6 +394,7 @@ typedef union#define MSRPM_SIZE (8 * 1024)struct vmcb_struct { +/* Control area */ u32 _cr_intercepts;/* offset 0x00 - cleanbit 0 */ u32 _dr_intercepts;/* offset 0x04 - cleanbit 0 */ u32 _exception_intercepts;/* offset 0x08 - cleanbit 0 */
@@ -491,6 +486,7 @@ struct vmcb_struct {u8 guest_ins[15 ];/* offset 0xD1 */ u64 res10a[100 ];/* offset 0xE0 pad to save area */ +/* State Save area */ union {struct segment_register sreg[6 ];struct {
Signature · 1 line
2.39.5
Quoted 6 lines · Andrew Cooper
The Intercept comments provide no value whatsoever. For the VMCB, label the Control area and State Save area, which are the names given by the APM.
No functional change.
Signed-off-by Andrew Cooper <[email protected]>
Acked-by Jan Beulich <[email protected]>