Skip to contentSkip to conversation

hvm: Sync SVM CR4 handling with VMX.

Xen-changelog Petersson, Mats 2 participants 2 messages Jun 28, 2007 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

xen/include/asm-x86/hvm/hvm.h static inline int hvm_event_injection_fa · line 307

Quoted 11 lines

diff -r 5eec9a8825d4 -r 87d34c8c2fe1 xen/include/asm-x86/hvm/hvm.h

xen/include/asm-x86/hvm/hvm.h +1 -1
@@ -302,10 +302,17 @@ static inline int hvm_event_injection_fa
     return hvm_funcs.event_injection_faulted(v);
 }
 
-/* These bits in the CR4 are owned by the host */
+/* These bits in CR4 are owned by the host. */
 #define HVM_CR4_HOST_MASK (mmu_cr4_features & \
     (X86_CR4_VMXE | X86_CR4_PAE | X86_CR4_MCE))

VMXE is only for Intel, so being very picky, it shouldn't be in a HVM environment.

I don't think it's a problem as, I doubt very much that AMD would use this bit for anything in the future, as Intel has "occupied it", and we're using a different way to enable SVM.

--
Mats

#2 lore raw
Quoted 11 lines · Mats

Review

Quoted 4 lines
(quoted diff) +1 -1
-/* These bits in the CR4 are owned by the host */
+/* These bits in CR4 are owned by the host. */
 #define HVM_CR4_HOST_MASK (mmu_cr4_features & \
     (X86_CR4_VMXE | X86_CR4_PAE | X86_CR4_MCE))

VMXE is only for Intel, so being very picky, it shouldn't be in a HVM environment.

I don't think it's a problem as, I doubt very much that AMD would use this bit for anything in the future, as Intel has "occupied it", and we're using a different way to enable SVM.

The code is entirely benign on AMD until that happens *and* we actually make use of it by adding it to mmu_cr4_features. So this is the way of simplest code for now.

-- Keir