diff options
author | Gleb Natapov <gleb@redhat.com> | 2009-04-21 10:45:11 -0400 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-06-10 04:48:49 -0400 |
commit | 14d0bc1f7c8226d5088e7182c3b53e0c7e91d1af (patch) | |
tree | 021a440648ed2117a33a4c8c1bcc91dcb22311cf /arch/x86/kvm/x86.c | |
parent | 16d7a191170f0ca48c2c3277017b3e6d275e0711 (diff) |
KVM: Get rid of get_irq() callback
It just returns pending IRQ vector from the queue for VMX/SVM.
Get IRQ directly from the queue before migration and put it back
after.
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.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 63917216a051..0f3e04b74a66 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3536,7 +3536,6 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, | |||
3536 | struct kvm_sregs *sregs) | 3536 | struct kvm_sregs *sregs) |
3537 | { | 3537 | { |
3538 | struct descriptor_table dt; | 3538 | struct descriptor_table dt; |
3539 | int pending_vec; | ||
3540 | 3539 | ||
3541 | vcpu_load(vcpu); | 3540 | vcpu_load(vcpu); |
3542 | 3541 | ||
@@ -3573,9 +3572,9 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, | |||
3573 | memcpy(sregs->interrupt_bitmap, vcpu->arch.irq_pending, | 3572 | memcpy(sregs->interrupt_bitmap, vcpu->arch.irq_pending, |
3574 | sizeof sregs->interrupt_bitmap); | 3573 | sizeof sregs->interrupt_bitmap); |
3575 | 3574 | ||
3576 | pending_vec = kvm_x86_ops->get_irq(vcpu); | 3575 | if (vcpu->arch.interrupt.pending) |
3577 | if (pending_vec >= 0) | 3576 | set_bit(vcpu->arch.interrupt.nr, |
3578 | set_bit(pending_vec, (unsigned long *)sregs->interrupt_bitmap); | 3577 | (unsigned long *)sregs->interrupt_bitmap); |
3579 | 3578 | ||
3580 | vcpu_put(vcpu); | 3579 | vcpu_put(vcpu); |
3581 | 3580 | ||
@@ -4097,9 +4096,8 @@ int kvm_arch_vcpu_ioctl_set_sregs(struct kvm_vcpu *vcpu, | |||
4097 | max_bits); | 4096 | max_bits); |
4098 | /* Only pending external irq is handled here */ | 4097 | /* Only pending external irq is handled here */ |
4099 | if (pending_vec < max_bits) { | 4098 | if (pending_vec < max_bits) { |
4100 | kvm_x86_ops->set_irq(vcpu, pending_vec); | 4099 | kvm_queue_interrupt(vcpu, pending_vec); |
4101 | pr_debug("Set back pending irq %d\n", | 4100 | pr_debug("Set back pending irq %d\n", pending_vec); |
4102 | pending_vec); | ||
4103 | } | 4101 | } |
4104 | kvm_pic_clear_isr_ack(vcpu->kvm); | 4102 | kvm_pic_clear_isr_ack(vcpu->kvm); |
4105 | } | 4103 | } |