summaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm/lapic.h
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2015-04-01 15:06:40 +0200
committerPaolo Bonzini <pbonzini@redhat.com>2015-06-04 16:01:11 +0200
commitf077825a8758d79838a757dafb79adcdd047ef3a (patch)
tree89c7e96e8cd906a2ca9debc123dd84af10ab8b21 /arch/x86/kvm/lapic.h
parenta584539b24b87dc8be83a713006396cabec47833 (diff)
downloadlinux-f077825a8758d79838a757dafb79adcdd047ef3a.tar.gz
linux-f077825a8758d79838a757dafb79adcdd047ef3a.tar.bz2
linux-f077825a8758d79838a757dafb79adcdd047ef3a.zip
KVM: x86: API changes for SMM support
This patch includes changes to the external API for SMM support. Userspace can predicate the availability of the new fields and ioctls on a new capability, KVM_CAP_X86_SMM, which is added at the end of the patch series. Reviewed-by: Radim Krčmář <rkrcmar@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/lapic.h')
-rw-r--r--arch/x86/kvm/lapic.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/x86/kvm/lapic.h b/arch/x86/kvm/lapic.h
index 9d8fcde52027..f2f4e10ab772 100644
--- a/arch/x86/kvm/lapic.h
+++ b/arch/x86/kvm/lapic.h
@@ -159,6 +159,11 @@ static inline bool kvm_lowest_prio_delivery(struct kvm_lapic_irq *irq)
irq->msi_redir_hint);
}
+static inline int kvm_lapic_latched_init(struct kvm_vcpu *vcpu)
+{
+ return kvm_vcpu_has_lapic(vcpu) && test_bit(KVM_APIC_INIT, &vcpu->arch.apic->pending_events);
+}
+
bool kvm_apic_pending_eoi(struct kvm_vcpu *vcpu, int vector);
void wait_lapic_expire(struct kvm_vcpu *vcpu);