KVM: Do not migrate pending software interrupts.
authorGleb Natapov <gleb@redhat.com>
Mon, 11 May 2009 10:35:53 +0000 (13:35 +0300)
committerAvi Kivity <avi@redhat.com>
Wed, 10 Jun 2009 08:48:59 +0000 (11:48 +0300)
INTn will be re-executed after migration. If we wanted to migrate
pending software interrupt we would need to migrate interrupt type
and instruction length too, but we do not have all required info on
SVM, so SVM->VMX migration would need to re-execute INTn anyway. To
make it simple never migrate pending soft interrupt.

Signed-off-by: Gleb Natapov <gleb@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
arch/x86/kvm/x86.c

index 199426cc1d0e901bbf410c3bae3acb7dd33c5d35..beb806b03a2eeb7f18ffd54b5673566333af323c 100644 (file)
@@ -3579,7 +3579,7 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu,
 
        memset(sregs->interrupt_bitmap, 0, sizeof sregs->interrupt_bitmap);
 
-       if (vcpu->arch.interrupt.pending)
+       if (vcpu->arch.interrupt.pending && !vcpu->arch.interrupt.soft)
                set_bit(vcpu->arch.interrupt.nr,
                        (unsigned long *)sregs->interrupt_bitmap);