aboutsummaryrefslogtreecommitdiffstats
path: root/xen
diff options
context:
space:
mode:
authorGeorge Dunlap <george.dunlap@eu.citrix.com>2012-03-08 09:17:21 +0000
committerGeorge Dunlap <george.dunlap@eu.citrix.com>2012-03-08 09:17:21 +0000
commit338db98dd8d2cf1a639951597880d7a2e7f3b3d6 (patch)
tree6367207ecd678c9e4b7819cca6e72780d72793d1 /xen
parent3d9ab2267f3aff4985caf3761887538e61a10c9c (diff)
downloadxen-338db98dd8d2cf1a639951597880d7a2e7f3b3d6.tar.gz
xen-338db98dd8d2cf1a639951597880d7a2e7f3b3d6.tar.bz2
xen-338db98dd8d2cf1a639951597880d7a2e7f3b3d6.zip
svm: Fake out the Bus Unit Config MSR on revF AMD CPUs
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>
Diffstat (limited to 'xen')
-rw-r--r--xen/arch/x86/hvm/svm/svm.c12
-rw-r--r--xen/include/asm-x86/msr-index.h3
2 files changed, 15 insertions, 0 deletions
diff --git a/xen/arch/x86/hvm/svm/svm.c b/xen/arch/x86/hvm/svm/svm.c
index d89b3a2d6d..17b4a152aa 100644
--- a/xen/arch/x86/hvm/svm/svm.c
+++ b/xen/arch/x86/hvm/svm/svm.c
@@ -1505,6 +1505,18 @@ static int svm_msr_read_intercept(unsigned int msr, uint64_t *msr_content)
if ( rdmsr_safe(msr, *msr_content) == 0 )
break;
+ if ( msr == 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;
}
diff --git a/xen/include/asm-x86/msr-index.h b/xen/include/asm-x86/msr-index.h
index 4c773741e8..7d988258ec 100644
--- a/xen/include/asm-x86/msr-index.h
+++ b/xen/include/asm-x86/msr-index.h
@@ -209,6 +209,9 @@
#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)