This patch removes the include of "irq.h" in kvm_main.c, s390 does not have irqs. For that, kvm_cpu_has_interrupt becomes an architecutre specific function which can check for external or I/O interrupts on s390 and for irqs on x86 and others. In order to clarify wording, the function defined by irq.h has been renamed to kvm_cpu_has_irq.
Signed-off-by: Carsten Otte <[EMAIL PROTECTED]> --- irq.c | 4 ++-- irq.h | 2 +- kvm_main.c | 3 +-- svm.c | 2 +- vmx.c | 2 +- x86.c | 4 ++++ x86.h | 2 ++ 7 files changed, 12 insertions(+), 7 deletions(-) Index: kvm/drivers/kvm/irq.c =================================================================== --- kvm.orig/drivers/kvm/irq.c 2007-11-22 15:24:42.000000000 +0100 +++ kvm/drivers/kvm/irq.c 2007-11-22 15:40:40.000000000 +0100 @@ -29,7 +29,7 @@ * check if there is pending interrupt without * intack. */ -int kvm_cpu_has_interrupt(struct kvm_vcpu *v) +int kvm_cpu_has_irq(struct kvm_vcpu *v) { struct kvm_pic *s; @@ -42,7 +42,7 @@ } return 1; } -EXPORT_SYMBOL_GPL(kvm_cpu_has_interrupt); +EXPORT_SYMBOL_GPL(kvm_cpu_has_irq); /* * Read pending interrupt vector and intack. Index: kvm/drivers/kvm/irq.h =================================================================== --- kvm.orig/drivers/kvm/irq.h 2007-11-22 15:24:42.000000000 +0100 +++ kvm/drivers/kvm/irq.h 2007-11-22 15:37:43.000000000 +0100 @@ -58,7 +58,7 @@ 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); +int kvm_cpu_has_irq(struct kvm_vcpu *v); void kvm_pic_update_irq(struct kvm_pic *s); #define IOAPIC_NUM_PINS KVM_IOAPIC_NUM_PINS Index: kvm/drivers/kvm/kvm_main.c =================================================================== --- kvm.orig/drivers/kvm/kvm_main.c 2007-11-22 15:24:43.000000000 +0100 +++ kvm/drivers/kvm/kvm_main.c 2007-11-22 15:44:49.000000000 +0100 @@ -17,7 +17,6 @@ #include "kvm.h" #include "x86.h" -#include "irq.h" #include <linux/kvm.h> #include <linux/module.h> @@ -656,7 +655,7 @@ /* * We will block until either an interrupt or a signal wakes us up */ - while (!kvm_cpu_has_interrupt(vcpu) + while (!kvm_arch_cpu_has_interrupt(vcpu) && !signal_pending(current) && vcpu->mp_state != VCPU_MP_STATE_RUNNABLE && vcpu->mp_state != VCPU_MP_STATE_SIPI_RECEIVED) { Index: kvm/drivers/kvm/svm.c =================================================================== --- kvm.orig/drivers/kvm/svm.c 2007-11-22 15:24:43.000000000 +0100 +++ kvm/drivers/kvm/svm.c 2007-11-22 15:38:52.000000000 +0100 @@ -1338,7 +1338,7 @@ if (vmcb->control.int_ctl & V_IRQ_MASK) return; - if (!kvm_cpu_has_interrupt(vcpu)) + if (!kvm_cpu_has_irq(vcpu)) return; if (!(vmcb->save.rflags & X86_EFLAGS_IF) || Index: kvm/drivers/kvm/vmx.c =================================================================== --- kvm.orig/drivers/kvm/vmx.c 2007-11-22 15:24:43.000000000 +0100 +++ kvm/drivers/kvm/vmx.c 2007-11-22 15:39:44.000000000 +0100 @@ -2244,7 +2244,7 @@ update_tpr_threshold(vcpu); - has_ext_irq = kvm_cpu_has_interrupt(vcpu); + has_ext_irq = kvm_cpu_has_irq(vcpu); intr_info_field = vmcs_read32(VM_ENTRY_INTR_INFO_FIELD); idtv_info_field = vmcs_read32(IDT_VECTORING_INFO_FIELD); if (intr_info_field & INTR_INFO_VALID_MASK) { Index: kvm/drivers/kvm/x86.c =================================================================== --- kvm.orig/drivers/kvm/x86.c 2007-11-22 15:24:43.000000000 +0100 +++ kvm/drivers/kvm/x86.c 2007-11-22 15:37:46.000000000 +0100 @@ -2917,6 +2917,10 @@ return kvm; } +int kvm_arch_cpu_has_interrupt(struct kvm_vcpu *v) { + return kvm_cpu_has_irq(v); +} + static void kvm_unload_vcpu_mmu(struct kvm_vcpu *vcpu) { vcpu_load(vcpu); Index: kvm/drivers/kvm/x86.h =================================================================== --- kvm.orig/drivers/kvm/x86.h 2007-11-22 15:24:43.000000000 +0100 +++ kvm/drivers/kvm/x86.h 2007-11-22 15:37:47.000000000 +0100 @@ -315,6 +315,8 @@ int kvm_mmu_page_fault(struct kvm_vcpu *vcpu, gva_t gva, u32 error_code); +int kvm_arch_cpu_has_interrupt(struct kvm_vcpu *v); + static inline void kvm_mmu_free_some_pages(struct kvm_vcpu *vcpu) { if (unlikely(vcpu->kvm->n_free_mmu_pages < KVM_MIN_FREE_MMU_PAGES)) ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ kvm-devel mailing list kvm-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/kvm-devel