summaryrefslogtreecommitdiff
path: root/arch/x86/kvm/ioapic.h
diff options
context:
space:
mode:
authorSteve Rutherford <srutherford@google.com>2015-07-29 23:21:40 -0700
committerPaolo Bonzini <pbonzini@redhat.com>2015-10-01 15:06:26 +0200
commit49df6397edfc5a8ba8ca813b51fb9729d8e94b40 (patch)
treeb5cb29a28fff01c9c85c4f02961164532fa241b2 /arch/x86/kvm/ioapic.h
parent4ca7dd8ce4b24e18f94eed90e80c6eb80fb48c9a (diff)
KVM: x86: Split the APIC from the rest of IRQCHIP.
First patch in a series which enables the relocation of the PIC/IOAPIC to userspace. Adds capability KVM_CAP_SPLIT_IRQCHIP; KVM_CAP_SPLIT_IRQCHIP enables the construction of LAPICs without the rest of the irqchip. Compile tested for x86. Signed-off-by: Steve Rutherford <srutherford@google.com> Suggested-by: Andrew Honig <ahonig@google.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/x86/kvm/ioapic.h')
-rw-r--r--arch/x86/kvm/ioapic.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/x86/kvm/ioapic.h b/arch/x86/kvm/ioapic.h
index bf36d66a1951..a8842c0dee73 100644
--- a/arch/x86/kvm/ioapic.h
+++ b/arch/x86/kvm/ioapic.h
@@ -97,6 +97,14 @@ static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm)
return kvm->arch.vioapic;
}
+static inline int ioapic_in_kernel(struct kvm *kvm)
+{
+ int ret;
+
+ ret = (ioapic_irqchip(kvm) != NULL);
+ return ret;
+}
+
void kvm_rtc_eoi_tracking_restore_one(struct kvm_vcpu *vcpu);
bool kvm_apic_match_dest(struct kvm_vcpu *vcpu, struct kvm_lapic *source,
int short_hand, unsigned int dest, int dest_mode);