]> xenbits.xensource.com Git - xen.git/commitdiff
svm: Fake out the Bus Unit Config MSR on revF AMD CPUs
authorGeorge Dunlap <george.dunlap@eu.citrix.com>
Tue, 1 May 2012 13:18:46 +0000 (14:18 +0100)
committerGeorge Dunlap <george.dunlap@eu.citrix.com>
Tue, 1 May 2012 13:18:46 +0000 (14:18 +0100)
Win2k8 x64 reads this MSR on revF chips, where it wasn't publically
available; it uses a magic constant in %rdi as a password, which we
don't have in rdmsr_safe().  Since we'll ignore the later writes, just
use a plausible value here (the reset value from rev10h chips) if the
real CPU didn't provide one.

Signed-off-by: George Dunlap <george.dunlap@eu.citrix.com>
Committed-by: Keir Fraser <keir@xen.org>
xen-unstable changeset:   24990:322300fd2ebd
xen-unstable date:        Thu Mar 08 09:17:21 2012 +0000

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

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

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Keir Fraser <keir@xen.org>
Acked-by: George Dunlap <george.dunlap@eu.citrix.com>
xen-unstable changeset:   25058:f47d91cb0faa
xen-unstable date:        Thu Mar 15 15:09:18 2012 +0100

xen/arch/x86/hvm/svm/svm.c
xen/include/asm-x86/msr-index.h

index f175216a288ab53517b571ef79ec235f5d30132a..134b8ebaaa204c38c56bb837e7ba0d10d4843f9c 100644 (file)
@@ -1070,6 +1070,18 @@ static int svm_msr_read_intercept(struct cpu_user_regs *regs)
             break;
         }
 
+        if ( boot_cpu_data.x86 == 0xf && ecx == MSR_F10_BU_CFG )
+        {
+            /* Win2k8 x64 reads this MSR on revF chips, where it
+             * wasn't publically available; it uses a magic constant
+             * in %rdi as a password, which we don't have in
+             * rdmsr_safe().  Since we'll ignore the later writes,
+             * just use a plausible value here (the reset value from
+             * rev10h chips) if the real CPU didn't provide one. */
+            msr_content = 0x0000000010200020ull;
+            break;
+        }
+
         goto gpf;
     }
 
index 3d54e2ca240e0a417e7eee8549a2130ef0abc3f2..5f4d00693eced1f1d0657ace0b3649d3de84d73d 100644 (file)
 #define MSR_F10_MC4_MISC2              0xc0000409
 #define MSR_F10_MC4_MISC3              0xc000040A
 
+/* AMD Family10h MMU control MSRs */
+#define MSR_F10_BU_CFG                  0xc0011023
+
 /* Other AMD Fam10h MSRs */
 #define MSR_FAM10H_MMIO_CONF_BASE      0xc0010058
 #define FAM10H_MMIO_CONF_ENABLE         (1<<0)