Skip to contentSkip to conversation

svm: amend c/s 24990:322300fd2ebd (fake BU_CFG MSR on AMD revF)

PATCH In review Jan Beulich 3 participants 3 messages Mar 15, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 svm: amend c/s 24990:322300fd2ebd (fake BU_CFG MSR on AMD revF)

Let's restrict such a hack to the known affected family.

xen/arch/x86/hvm/svm/svm.c +1 -1
@@ -1505,7 +1505,7 @@ static int svm_msr_read_intercept(unsign
         if ( rdmsr_safe(msr, *msr_content) == 0 )
             break;
 
-        if ( msr == MSR_F10_BU_CFG )
+        if ( boot_cpu_data.x86 == 0xf && msr == MSR_F10_BU_CFG )
         {
             /* Win2k8 x64 reads this MSR on revF chips, where it
              * wasn't publically available; it uses a magic constant

svm: amend c/s 24990:322300fd2ebd (fake BU_CFG MSR on AMD revF)

Let's restrict such a hack to the known affected family.

xen/arch/x86/hvm/svm/svm.c +1 -1
@@ -1505,7 +1505,7 @@ static int svm_msr_read_intercept(unsign
         if ( rdmsr_safe(msr, *msr_content) == 0 )
             break;
 
-        if ( msr == MSR_F10_BU_CFG )
+        if ( boot_cpu_data.x86 == 0xf && msr == MSR_F10_BU_CFG )
         {
             /* Win2k8 x64 reads this MSR on revF chips, where it
              * wasn't publically available; it uses a magic constant

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

Acked-by on v1 1/1
#1 lore raw
Quoted 3 lines · Jan Beulich

Let's restrict such a hack to the known affected family.

Quoted 18 lines
xen/arch/x86/hvm/svm/svm.c +1 -1
@@ -1505,7 +1505,7 @@ static int svm_msr_read_intercept(unsign
         if ( rdmsr_safe(msr, *msr_content) == 0 )
             break;
 
-        if ( msr == MSR_F10_BU_CFG )
+        if ( boot_cpu_data.x86 == 0xf && msr == MSR_F10_BU_CFG )
         {
             /* Win2k8 x64 reads this MSR on revF chips, where it
              * wasn't publically available; it uses a magic constant

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

Acked-by on v1 1/1
#2 lore raw
In reply to Jan Beulich
Quoted 3 lines · Jan Beulich

Let's restrict such a hack to the known affected family.

I haven't tested it, but in principle:

Thanks Jan.

I'll see if I can get this back-ported to the XS patchqueue, so we can test to make sure it works on all the hardware we have available.

-George

Quoted 15 lines
xen/arch/x86/hvm/svm/svm.c +1 -1
@@ -1505,7 +1505,7 @@ static int svm_msr_read_intercept(unsign
         if ( rdmsr_safe(msr, *msr_content) == 0 )
             break;
 
-        if ( msr == MSR_F10_BU_CFG )
+        if ( boot_cpu_data.x86 == 0xf && msr == MSR_F10_BU_CFG )
         {
             /* Win2k8 x64 reads this MSR on revF chips, where it
              * wasn't publically available; it uses a magic constant