diff options
Diffstat (limited to 'virt')
-rw-r--r-- | virt/kvm/kvm_main.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index ef2f03cf42c0..638de47e167d 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -140,7 +140,7 @@ static void kvm_free_assigned_device(struct kvm *kvm, | |||
140 | struct kvm_assigned_dev_kernel | 140 | struct kvm_assigned_dev_kernel |
141 | *assigned_dev) | 141 | *assigned_dev) |
142 | { | 142 | { |
143 | if (irqchip_in_kernel(kvm) && assigned_dev->irq_requested) | 143 | if (irqchip_in_kernel(kvm) && assigned_dev->irq_requested_type) |
144 | free_irq(assigned_dev->host_irq, (void *)assigned_dev); | 144 | free_irq(assigned_dev->host_irq, (void *)assigned_dev); |
145 | 145 | ||
146 | kvm_unregister_irq_ack_notifier(&assigned_dev->ack_notifier); | 146 | kvm_unregister_irq_ack_notifier(&assigned_dev->ack_notifier); |
@@ -180,7 +180,7 @@ static int assigned_device_update_intx(struct kvm *kvm, | |||
180 | struct kvm_assigned_dev_kernel *adev, | 180 | struct kvm_assigned_dev_kernel *adev, |
181 | struct kvm_assigned_irq *airq) | 181 | struct kvm_assigned_irq *airq) |
182 | { | 182 | { |
183 | if (adev->irq_requested) { | 183 | if (adev->irq_requested_type & KVM_ASSIGNED_DEV_GUEST_INTX) { |
184 | adev->guest_irq = airq->guest_irq; | 184 | adev->guest_irq = airq->guest_irq; |
185 | adev->ack_notifier.gsi = airq->guest_irq; | 185 | adev->ack_notifier.gsi = airq->guest_irq; |
186 | return 0; | 186 | return 0; |
@@ -207,7 +207,8 @@ static int assigned_device_update_intx(struct kvm *kvm, | |||
207 | return -EIO; | 207 | return -EIO; |
208 | } | 208 | } |
209 | 209 | ||
210 | adev->irq_requested = true; | 210 | adev->irq_requested_type = KVM_ASSIGNED_DEV_GUEST_INTX | |
211 | KVM_ASSIGNED_DEV_HOST_INTX; | ||
211 | return 0; | 212 | return 0; |
212 | } | 213 | } |
213 | 214 | ||
@@ -227,7 +228,7 @@ static int kvm_vm_ioctl_assign_irq(struct kvm *kvm, | |||
227 | return -EINVAL; | 228 | return -EINVAL; |
228 | } | 229 | } |
229 | 230 | ||
230 | if (!match->irq_requested) { | 231 | if (!match->irq_requested_type) { |
231 | INIT_WORK(&match->interrupt_work, | 232 | INIT_WORK(&match->interrupt_work, |
232 | kvm_assigned_dev_interrupt_work_handler); | 233 | kvm_assigned_dev_interrupt_work_handler); |
233 | if (irqchip_in_kernel(kvm)) { | 234 | if (irqchip_in_kernel(kvm)) { |