aboutsummaryrefslogtreecommitdiff
path: root/arch/x86/kvm/x86.c
diff options
context:
space:
mode:
authorGleb Natapov <gleb@redhat.com>2009-05-11 13:35:50 +0300
committerAvi Kivity <avi@redhat.com>2009-06-10 11:48:58 +0300
commit66fd3f7f901f29a557a473af595bf11b270b9ac2 (patch)
tree6adc1e94de39238a357980068f599070428767d8 /arch/x86/kvm/x86.c
parentf629cf8485c9e1063fd8b915fa3bde80917400a1 (diff)
KVM: Do not re-execute INTn instruction.
Re-inject event instead. This is what Intel suggest. Also use correct instruction length when re-injecting soft fault/interrupt. Signed-off-by: Gleb Natapov <gleb@redhat.com> Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r--arch/x86/kvm/x86.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c
index 54eec356548..73cfe87fba1 100644
--- a/arch/x86/kvm/x86.c
+++ b/arch/x86/kvm/x86.c
@@ -1441,7 +1441,7 @@ static int kvm_vcpu_ioctl_interrupt(struct kvm_vcpu *vcpu,
return -ENXIO;
vcpu_load(vcpu);
- kvm_queue_interrupt(vcpu, irq->irq);
+ kvm_queue_interrupt(vcpu, irq->irq, false);
vcpu_put(vcpu);
@@ -3161,7 +3161,7 @@ static void inject_irq(struct kvm_vcpu *vcpu)
}
if (vcpu->arch.interrupt.pending) {
- kvm_x86_ops->set_irq(vcpu, vcpu->arch.interrupt.nr);
+ kvm_x86_ops->set_irq(vcpu);
return;
}
@@ -3174,8 +3174,9 @@ static void inject_irq(struct kvm_vcpu *vcpu)
}
} else if (kvm_cpu_has_interrupt(vcpu)) {
if (kvm_x86_ops->interrupt_allowed(vcpu)) {
- kvm_queue_interrupt(vcpu, kvm_cpu_get_interrupt(vcpu));
- kvm_x86_ops->set_irq(vcpu, vcpu->arch.interrupt.nr);
+ kvm_queue_interrupt(vcpu, kvm_cpu_get_interrupt(vcpu),
+ false);
+ kvm_x86_ops->set_irq(vcpu);
}
}
}
@@ -4098,7 +4099,7 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu,
pending_vec = find_first_bit(
(const unsigned long *)sregs->interrupt_bitmap, max_bits);
if (pending_vec < max_bits) {
- kvm_queue_interrupt(vcpu, pending_vec);
+ kvm_queue_interrupt(vcpu, pending_vec, false);
pr_debug("Set back pending irq %d\n", pending_vec);
if (irqchip_in_kernel(vcpu->kvm))
kvm_pic_clear_isr_ack(vcpu->kvm);