diff options
author | Jan Kiszka <jan.kiszka@siemens.com> | 2014-01-24 16:48:44 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2014-01-27 14:39:44 +0100 |
commit | 58cb628dbe24ce21b884729aebe15acb903dbfb5 (patch) | |
tree | 56355ea28e8f76fc0f933ae39d481ecb00a90a0b /arch/x86/kvm/lapic.h | |
parent | b3af1e889ec4909f6b48dabd19a311d9c9f8d58e (diff) | |
download | blackbird-op-linux-58cb628dbe24ce21b884729aebe15acb903dbfb5.tar.gz blackbird-op-linux-58cb628dbe24ce21b884729aebe15acb903dbfb5.zip |
KVM: x86: Validate guest writes to MSR_IA32_APICBASE
Check for invalid state transitions on guest-initiated updates of
MSR_IA32_APICBASE. This address both enabling of the x2APIC when it is
not supported and all invalid transitions as described in SDM section
10.12.5. It also checks that no reserved bit is set in APICBASE by the
guest.
Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
[Use cpuid_maxphyaddr instead of guest_cpuid_get_phys_bits. - Paolo]
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.h')
-rw-r--r-- | arch/x86/kvm/lapic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h index c8b0d0d2da5c..6a11845fd8b9 100644 --- a/arch/x86/kvm/lapic.h +++ b/arch/x86/kvm/lapic.h @@ -65,7 +65,7 @@ bool kvm_irq_delivery_to_apic_fast(struct kvm *kvm, struct kvm_lapic *src, struct kvm_lapic_irq *irq, int *r, unsigned long *dest_map); u64 kvm_get_apic_base(struct kvm_vcpu *vcpu); -void kvm_set_apic_base(struct kvm_vcpu *vcpu, u64 data); +int kvm_set_apic_base(struct kvm_vcpu *vcpu, struct msr_data *msr_info); void kvm_apic_post_state_restore(struct kvm_vcpu *vcpu, struct kvm_lapic_state *s); int kvm_lapic_find_highest_irr(struct kvm_vcpu *vcpu); |