diff options
Diffstat (limited to 'arch/x86/kvm/x86.c')
-rw-r--r-- | arch/x86/kvm/x86.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/arch/x86/kvm/x86.c b/arch/x86/kvm/x86.c index 96e995c1dd76..63917216a051 100644 --- a/arch/x86/kvm/x86.c +++ b/arch/x86/kvm/x86.c | |||
@@ -3566,17 +3566,17 @@ int kvm_arch_vcpu_ioctl_get_sregs(struct kvm_vcpu *vcpu, | |||
3566 | sregs->efer = vcpu->arch.shadow_efer; | 3566 | sregs->efer = vcpu->arch.shadow_efer; |
3567 | sregs->apic_base = kvm_get_apic_base(vcpu); | 3567 | sregs->apic_base = kvm_get_apic_base(vcpu); |
3568 | 3568 | ||
3569 | if (irqchip_in_kernel(vcpu->kvm)) { | 3569 | if (irqchip_in_kernel(vcpu->kvm)) |
3570 | memset(sregs->interrupt_bitmap, 0, | 3570 | memset(sregs->interrupt_bitmap, 0, |
3571 | sizeof sregs->interrupt_bitmap); | 3571 | sizeof sregs->interrupt_bitmap); |
3572 | pending_vec = kvm_x86_ops->get_irq(vcpu); | 3572 | else |
3573 | if (pending_vec >= 0) | ||
3574 | set_bit(pending_vec, | ||
3575 | (unsigned long *)sregs->interrupt_bitmap); | ||
3576 | } else | ||
3577 | memcpy(sregs->interrupt_bitmap, vcpu->arch.irq_pending, | 3573 | memcpy(sregs->interrupt_bitmap, vcpu->arch.irq_pending, |
3578 | sizeof sregs->interrupt_bitmap); | 3574 | sizeof sregs->interrupt_bitmap); |
3579 | 3575 | ||
3576 | pending_vec = kvm_x86_ops->get_irq(vcpu); | ||
3577 | if (pending_vec >= 0) | ||
3578 | set_bit(pending_vec, (unsigned long *)sregs->interrupt_bitmap); | ||
3579 | |||
3580 | vcpu_put(vcpu); | 3580 | vcpu_put(vcpu); |
3581 | 3581 | ||
3582 | return 0; | 3582 | return 0; |