diff options
-rw-r--r-- | arch/x86/include/asm/msr-index.h | 1 | ||||
-rw-r--r-- | arch/x86/kvm/x86.c | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/arch/x86/include/asm/msr-index.h b/arch/x86/include/asm/msr-index.h index 823d4822340..fd5a1f365c9 100644 --- a/arch/x86/include/asm/msr-index.h +++ b/arch/x86/include/asm/msr-index.h | |||
@@ -43,6 +43,7 @@ | |||
43 | 43 | ||
44 | #define MSR_MTRRcap 0x000000fe | 44 | #define MSR_MTRRcap 0x000000fe |
45 | #define MSR_IA32_BBL_CR_CTL 0x00000119 | 45 | #define MSR_IA32_BBL_CR_CTL 0x00000119 |
46 | #define MSR_IA32_BBL_CR_CTL3 0x0000011e | ||
46 | 47 | ||
47 | #define MSR_IA32_SYSENTER_CS 0x00000174 | 48 | #define MSR_IA32_SYSENTER_CS 0x00000174 |
48 | #define MSR_IA32_SYSENTER_ESP 0x00000175 | 49 | #define MSR_IA32_SYSENTER_ESP 0x00000175 |
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index a7f65aa6eef..7faf262ab20 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -1592,6 +1592,12 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data) | |||
1592 | } else | 1592 | } else |
1593 | return set_msr_hyperv(vcpu, msr, data); | 1593 | return set_msr_hyperv(vcpu, msr, data); |
1594 | break; | 1594 | break; |
1595 | case MSR_IA32_BBL_CR_CTL3: | ||
1596 | /* Drop writes to this legacy MSR -- see rdmsr | ||
1597 | * counterpart for further detail. | ||
1598 | */ | ||
1599 | pr_unimpl(vcpu, "ignored wrmsr: 0x%x data %llx\n", msr, data); | ||
1600 | break; | ||
1595 | default: | 1601 | default: |
1596 | if (msr && (msr == vcpu->kvm->arch.xen_hvm_config.msr)) | 1602 | if (msr && (msr == vcpu->kvm->arch.xen_hvm_config.msr)) |
1597 | return xen_hvm_config(vcpu, data); | 1603 | return xen_hvm_config(vcpu, data); |
@@ -1846,6 +1852,19 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata) | |||
1846 | } else | 1852 | } else |
1847 | return get_msr_hyperv(vcpu, msr, pdata); | 1853 | return get_msr_hyperv(vcpu, msr, pdata); |
1848 | break; | 1854 | break; |
1855 | case MSR_IA32_BBL_CR_CTL3: | ||
1856 | /* This legacy MSR exists but isn't fully documented in current | ||
1857 | * silicon. It is however accessed by winxp in very narrow | ||
1858 | * scenarios where it sets bit #19, itself documented as | ||
1859 | * a "reserved" bit. Best effort attempt to source coherent | ||
1860 | * read data here should the balance of the register be | ||
1861 | * interpreted by the guest: | ||
1862 | * | ||
1863 | * L2 cache control register 3: 64GB range, 256KB size, | ||
1864 | * enabled, latency 0x1, configured | ||
1865 | */ | ||
1866 | data = 0xbe702111; | ||
1867 | break; | ||
1849 | default: | 1868 | default: |
1850 | if (!ignore_msrs) { | 1869 | if (!ignore_msrs) { |
1851 | pr_unimpl(vcpu, "unhandled rdmsr: 0x%x\n", msr); | 1870 | pr_unimpl(vcpu, "unhandled rdmsr: 0x%x\n", msr); |