aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/kvm/kvm.h
diff options
context:
space:
mode:
authorEddie Dong <eddie.dong@intel.com>2007-07-18 05:03:39 -0400
committerAvi Kivity <avi@qumranet.com>2007-10-13 04:18:25 -0400
commit1fd4f2a5ed8f80cf6e23d2bdf78554f6a1ac7997 (patch)
treeeb7d79c7f39788547a5dd9844295814085fcccc6 /drivers/kvm/kvm.h
parent97222cc8316328965851ed28d23f6b64b4c912d2 (diff)
KVM: In-kernel I/O APIC model
This allows in-kernel host-side device drivers to raise guest interrupts without going to userspace. [avi: fix level-triggered interrupt redelivery on eoi] [avi: add missing #include] [avi: avoid redelivery of edge-triggered interrupt] [avi: implement polarity] [avi: don't deliver edge-triggered interrupts when unmasking] [avi: fix host oops on invalid guest access] Signed-off-by: Yaozu (Eddie) Dong <eddie.dong@intel.com> Signed-off-by: Avi Kivity <avi@qumranet.com>
Diffstat (limited to 'drivers/kvm/kvm.h')
-rw-r--r--drivers/kvm/kvm.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/kvm/kvm.h b/drivers/kvm/kvm.h
index a5790cb21ffc..8d07a993af94 100644
--- a/drivers/kvm/kvm.h
+++ b/drivers/kvm/kvm.h
@@ -410,6 +410,7 @@ struct kvm {
410 struct kvm_io_bus mmio_bus; 410 struct kvm_io_bus mmio_bus;
411 struct kvm_io_bus pio_bus; 411 struct kvm_io_bus pio_bus;
412 struct kvm_pic *vpic; 412 struct kvm_pic *vpic;
413 struct kvm_ioapic *vioapic;
413}; 414};
414 415
415static inline struct kvm_pic *pic_irqchip(struct kvm *kvm) 416static inline struct kvm_pic *pic_irqchip(struct kvm *kvm)
@@ -417,6 +418,11 @@ static inline struct kvm_pic *pic_irqchip(struct kvm *kvm)
417 return kvm->vpic; 418 return kvm->vpic;
418} 419}
419 420
421static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm)
422{
423 return kvm->vioapic;
424}
425
420static inline int irqchip_in_kernel(struct kvm *kvm) 426static inline int irqchip_in_kernel(struct kvm *kvm)
421{ 427{
422 return pic_irqchip(kvm) != 0; 428 return pic_irqchip(kvm) != 0;