From 80de3e301381abd4e259a67942050caedc276262 Mon Sep 17 00:00:00 2001 From: Zhang Xiantao Date: Tue, 11 Dec 2007 20:36:00 +0800 Subject: [PATCH] --- yaml --- r: 80835 b: refs/heads/master c: 682c59a3f3f211ed555b17144f2d82eb8286a1db h: refs/heads/master i: 80833: 79ca1ae008af99018a77f980d6160eaa0a64957d 80831: 1965621904fcc4141bc047805f81e14079640e80 v: v3 --- [refs] | 2 +- trunk/drivers/kvm/irq.h | 18 ++++++++++++++++-- trunk/drivers/kvm/kvm.h | 18 +++--------------- trunk/drivers/kvm/x86.h | 1 - 4 files changed, 20 insertions(+), 19 deletions(-) diff --git a/[refs] b/[refs] index b551b86577f8..52ecde30dc13 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 2bacc55c7c3c61e356aef06b9a319b4cee90b519 +refs/heads/master: 682c59a3f3f211ed555b17144f2d82eb8286a1db diff --git a/trunk/drivers/kvm/irq.h b/trunk/drivers/kvm/irq.h index 730a87c173e5..e88d93957d24 100644 --- a/trunk/drivers/kvm/irq.h +++ b/trunk/drivers/kvm/irq.h @@ -26,6 +26,7 @@ #include #include #include "iodev.h" +#include "x86.h" struct kvm; struct kvm_vcpu; @@ -63,8 +64,6 @@ struct kvm_pic { struct kvm_pic *kvm_create_pic(struct kvm *kvm); void kvm_pic_set_irq(void *opaque, int irq, int level); int kvm_pic_read_irq(struct kvm_pic *s); -int kvm_cpu_get_interrupt(struct kvm_vcpu *v); -int kvm_cpu_has_interrupt(struct kvm_vcpu *v); void kvm_pic_update_irq(struct kvm_pic *s); #define IOAPIC_NUM_PINS KVM_IOAPIC_NUM_PINS @@ -147,6 +146,21 @@ do { \ #define ASSERT(x) do { } while (0) #endif +static inline struct kvm_pic *pic_irqchip(struct kvm *kvm) +{ + return kvm->vpic; +} + +static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm) +{ + return kvm->vioapic; +} + +static inline int irqchip_in_kernel(struct kvm *kvm) +{ + return pic_irqchip(kvm) != NULL; +} + void kvm_vcpu_kick(struct kvm_vcpu *vcpu); int kvm_apic_has_interrupt(struct kvm_vcpu *vcpu); int kvm_apic_accept_pic_intr(struct kvm_vcpu *vcpu); diff --git a/trunk/drivers/kvm/kvm.h b/trunk/drivers/kvm/kvm.h index ceefb4427dbd..668a8300365d 100644 --- a/trunk/drivers/kvm/kvm.h +++ b/trunk/drivers/kvm/kvm.h @@ -273,21 +273,6 @@ struct kvm { struct kvm_vm_stat stat; }; -static inline struct kvm_pic *pic_irqchip(struct kvm *kvm) -{ - return kvm->vpic; -} - -static inline struct kvm_ioapic *ioapic_irqchip(struct kvm *kvm) -{ - return kvm->vioapic; -} - -static inline int irqchip_in_kernel(struct kvm *kvm) -{ - return pic_irqchip(kvm) != NULL; -} - /* The guest did something we don't support. */ #define pr_unimpl(vcpu, fmt, ...) \ do { \ @@ -417,6 +402,9 @@ void kvm_free_physmem(struct kvm *kvm); struct kvm *kvm_arch_create_vm(void); void kvm_arch_destroy_vm(struct kvm *kvm); +int kvm_cpu_get_interrupt(struct kvm_vcpu *v); +int kvm_cpu_has_interrupt(struct kvm_vcpu *v); + static inline void kvm_guest_enter(void) { account_system_vtime(current); diff --git a/trunk/drivers/kvm/x86.h b/trunk/drivers/kvm/x86.h index 78396d627be0..0fc7020aa1a5 100644 --- a/trunk/drivers/kvm/x86.h +++ b/trunk/drivers/kvm/x86.h @@ -12,7 +12,6 @@ #define KVM_X86_H #include "kvm.h" -#include "irq.h" #include #include