aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-07-05 10:39:36 -0400
committerAvi Kivity <avi@redhat.com>2009-09-10 01:33:08 -0400
commit0105d1a526404cfc9779552a6198bfd0e5fc937a (patch)
treeedf269da022574fe380b73473daef4b763b25672 /arch/x86/kvm/x86.c
parentfc61b800f9506ca47bf1439342a79847f2353562 (diff)
KVM: x2apic interface to lapic
This patch implements MSR interface to local apic as defines by x2apic Intel specification. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 086f93137e3c..a50c83232e76 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -867,6 +867,8 @@ int kvm_set_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 data)
867 case MSR_IA32_APICBASE: 867 case MSR_IA32_APICBASE:
868 kvm_set_apic_base(vcpu, data); 868 kvm_set_apic_base(vcpu, data);
869 break; 869 break;
870 case APIC_BASE_MSR ... APIC_BASE_MSR + 0x3ff:
871 return kvm_x2apic_msr_write(vcpu, msr, data);
870 case MSR_IA32_MISC_ENABLE: 872 case MSR_IA32_MISC_ENABLE:
871 vcpu->arch.ia32_misc_enable_msr = data; 873 vcpu->arch.ia32_misc_enable_msr = data;
872 break; 874 break;
@@ -1065,6 +1067,9 @@ int kvm_get_msr_common(struct kvm_vcpu *vcpu, u32 msr, u64 *pdata)
1065 case MSR_IA32_APICBASE: 1067 case MSR_IA32_APICBASE:
1066 data = kvm_get_apic_base(vcpu); 1068 data = kvm_get_apic_base(vcpu);
1067 break; 1069 break;
1070 case APIC_BASE_MSR ... APIC_BASE_MSR + 0x3ff:
1071 return kvm_x2apic_msr_read(vcpu, msr, pdata);
1072 break;
1068 case MSR_IA32_MISC_ENABLE: 1073 case MSR_IA32_MISC_ENABLE:
1069 data = vcpu->arch.ia32_misc_enable_msr; 1074 data = vcpu->arch.ia32_misc_enable_msr;
1070 break; 1075 break;
@@ -1469,7 +1474,7 @@ static void do_cpuid_ent(struct kvm_cpuid_entry2 *entry, u32 function,
1469 0 /* TM2 */ | F(SSSE3) | 0 /* CNXT-ID */ | 0 /* Reserved */ | 1474 0 /* TM2 */ | F(SSSE3) | 0 /* CNXT-ID */ | 0 /* Reserved */ |
1470 0 /* Reserved */ | F(CX16) | 0 /* xTPR Update, PDCM */ | 1475 0 /* Reserved */ | F(CX16) | 0 /* xTPR Update, PDCM */ |
1471 0 /* Reserved, DCA */ | F(XMM4_1) | 1476 0 /* Reserved, DCA */ | F(XMM4_1) |
1472 F(XMM4_2) | 0 /* x2APIC */ | F(MOVBE) | F(POPCNT) | 1477 F(XMM4_2) | F(X2APIC) | F(MOVBE) | F(POPCNT) |
1473 0 /* Reserved, XSAVE, OSXSAVE */; 1478 0 /* Reserved, XSAVE, OSXSAVE */;
1474 /* cpuid 0x80000001.ecx */ 1479 /* cpuid 0x80000001.ecx */
1475 const u32 kvm_supported_word6_x86_features = 1480 const u32 kvm_supported_word6_x86_features =