diff options
author | George Dunlap <george.dunlap@eu.citrix.com> | 2012-05-01 14:15:20 +0100 |
---|---|---|
committer | George Dunlap <george.dunlap@eu.citrix.com> | 2012-05-01 14:15:20 +0100 |
commit | 995e367681bff48a70d9e39cf568d67ef06b3c04 (patch) | |
tree | cee156b3fa26df6537d5877adfd3182b089e5028 | |
parent | 701b1ae65f434af35334012047686bae16a3b407 (diff) | |
download | xen-995e367681bff48a70d9e39cf568d67ef06b3c04.tar.gz xen-995e367681bff48a70d9e39cf568d67ef06b3c04.tar.bz2 xen-995e367681bff48a70d9e39cf568d67ef06b3c04.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>
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
-rw-r--r-- | xen/arch/x86/hvm/svm/svm.c | 12 | ||||
-rw-r--r-- | xen/include/asm-x86/msr-index.h | 3 |
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 3a51aa418d..faf82ba18d 100644 --- a/xen/arch/x86/hvm/svm/svm.c +++ b/xen/arch/x86/hvm/svm/svm.c @@ -1197,6 +1197,18 @@ static int svm_msr_read_intercept(unsigned int msr, uint64_t *msr_content) if ( rdmsr_safe(msr, *msr_content) == 0 ) break; + 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 + * 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 e4fe602ea9..556217bd4f 100644 --- a/xen/include/asm-x86/msr-index.h +++ b/xen/include/asm-x86/msr-index.h @@ -253,6 +253,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) |