Skip to contentSkip to conversation

nestedsvm: fix HSAVE_PA MSR

PATCH Applied Christoph Egger 2 participants 2 messages Oct 11, 2011 – Oct 13, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 nestedsvm: fix HSAVE_PA MSR

Accessing HSAVE_PA MSR does not require SVM to be enabled nor any special guest paging mode.
But accessing HSAVE_PA MSR requires the address to be 4k aligned.

Signature · 6 lines
---to satisfy European Law for business letters:
Advanced Micro Devices GmbH
Einsteinring 24, 85689 Dornach b. Muenchen
Geschaeftsfuehrer: Alberto Bozzo, Andrew Bowd
Sitz: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632
xen/arch/x86/hvm/svm/nestedsvm.c +2 -1
diff -r a1fcb77b2ccb xen/arch/x86/hvm/svm/nestedsvm.c
@@ -51,7 +51,8 @@ nestedsvm_vcpu_stgi(struct vcpu *v)
 static int
 nestedsvm_vmcb_isvalid(struct vcpu *v, uint64_t vmcxaddr)
 {
-    if ( !hvm_svm_enabled(v) || hvm_guest_x86_mode(v) < 2 )
+    /* Address must be 4k aligned */
+    if ( (vmcxaddr & ~PAGE_MASK) != 0 )
         return 0;
 
     /* Maximum valid physical address.

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Applied
#1 lore raw
Quoted 5 lines · Christoph Egger

Accessing HSAVE_PA MSR does not require SVM to be enabled nor any special guest paging mode.
But accessing HSAVE_PA MSR requires the address to be 4k aligned.

Applied, thanks.

Tim.