KVM: Remove exception_injected() callback.
authorGleb Natapov <gleb@redhat.com>
Tue, 21 Apr 2009 14:45:02 +0000 (17:45 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:46 +0000 (11:48 +0300)
It always return false for VMX/SVM now.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/include/asm/kvm_host.h
arch/x86/kvm/svm.c
arch/x86/kvm/vmx.c
arch/x86/kvm/x86.c

index 5edae351b5dc1e252b327aa61afe2059819f4ecb..ea3741edbec3e1c580ec228820fe9339e82034b2 100644 (file)
@@ -516,7 +516,6 @@ struct kvm_x86_ops {
        void (*set_irq)(struct kvm_vcpu *vcpu, int vec);
        void (*queue_exception)(struct kvm_vcpu *vcpu, unsigned nr,
                                bool has_error_code, u32 error_code);
-       bool (*exception_injected)(struct kvm_vcpu *vcpu);
        void (*inject_pending_irq)(struct kvm_vcpu *vcpu, struct kvm_run *run);
        void (*inject_pending_vectors)(struct kvm_vcpu *vcpu,
                                       struct kvm_run *run);
index a80ffaa16a940b4feb305419be9344b69a56ed6b..8fa5a0ead6809cc899392bc118f502b3657e2414 100644 (file)
@@ -196,11 +196,6 @@ static void svm_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,
        svm->vmcb->control.event_inj_err = error_code;
 }
 
-static bool svm_exception_injected(struct kvm_vcpu *vcpu)
-{
-       return false;
-}
-
 static int is_external_interrupt(u32 info)
 {
        info &= SVM_EVTINJ_TYPE_MASK | SVM_EVTINJ_VALID;
@@ -2659,7 +2654,6 @@ static struct kvm_x86_ops svm_x86_ops = {
        .get_irq = svm_get_irq,
        .set_irq = svm_set_irq,
        .queue_exception = svm_queue_exception,
-       .exception_injected = svm_exception_injected,
        .inject_pending_irq = svm_intr_assist,
        .inject_pending_vectors = svm_intr_assist,
        .interrupt_allowed = svm_interrupt_allowed,
index 9eb518fb907b083c62a8e380e1db2020a2d918b6..3186fcfcffb5c7cb24545bf5ea85328997c32cce 100644 (file)
@@ -789,11 +789,6 @@ static void vmx_queue_exception(struct kvm_vcpu *vcpu, unsigned nr,
        vmcs_write32(VM_ENTRY_INTR_INFO_FIELD, intr_info);
 }
 
-static bool vmx_exception_injected(struct kvm_vcpu *vcpu)
-{
-       return false;
-}
-
 /*
  * Swap MSR entry in host/guest MSR entry array.
  */
@@ -3697,7 +3692,6 @@ static struct kvm_x86_ops vmx_x86_ops = {
        .get_irq = vmx_get_irq,
        .set_irq = vmx_inject_irq,
        .queue_exception = vmx_queue_exception,
-       .exception_injected = vmx_exception_injected,
        .inject_pending_irq = vmx_intr_assist,
        .inject_pending_vectors = vmx_intr_assist,
        .interrupt_allowed = vmx_interrupt_allowed,
index ae6250b1972671105a94609093d0eacbe49a15c8..b81970b053b98eeb2f142b429450978c8f75f5c5 100644 (file)
@@ -3237,8 +3237,6 @@ static int vcpu_enter_guest(struct kvm_vcpu *vcpu, struct kvm_run *kvm_run)
                profile_hit(KVM_PROFILING, (void *)rip);
        }
 
-       if (vcpu->arch.exception.pending && kvm_x86_ops->exception_injected(vcpu))
-               vcpu->arch.exception.pending = false;
 
        kvm_lapic_sync_from_vapic(vcpu);