diff options
author | Mark McLoughlin <markmc@redhat.com> | 2008-12-02 07:16:33 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2008-12-31 09:55:47 -0500 |
commit | defaf1587c5d7dff828f6f11c8941e5bcef00f50 (patch) | |
tree | fe4bcf162e203ee80916a5d168d838ef8aa62d25 /include/linux/kvm_host.h | |
parent | eb64f1e8cd5c3cae912db30a77d062367f7a11a6 (diff) |
KVM: fix handling of ACK from shared guest IRQ
If an assigned device shares a guest irq with an emulated
device then we currently interpret an ack generated by the
emulated device as originating from the assigned device
leading to e.g. "Unbalanced enable for IRQ 4347" from the
enable_irq() in kvm_assigned_dev_ack_irq().
The fix is fairly simple - don't enable the physical device
irq unless it was previously disabled.
Of course, this can still lead to a situation where a
non-assigned device ACK can cause the physical device irq to
be reenabled before the device was serviced. However, being
level sensitive, the interrupt will merely be regenerated.
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'include/linux/kvm_host.h')
-rw-r--r-- | include/linux/kvm_host.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h index 8091a4d90ddf..eafabd5c66b2 100644 --- a/include/linux/kvm_host.h +++ b/include/linux/kvm_host.h | |||
@@ -307,6 +307,7 @@ struct kvm_assigned_dev_kernel { | |||
307 | int host_busnr; | 307 | int host_busnr; |
308 | int host_devfn; | 308 | int host_devfn; |
309 | int host_irq; | 309 | int host_irq; |
310 | bool host_irq_disabled; | ||
310 | int guest_irq; | 311 | int guest_irq; |
311 | struct msi_msg guest_msi; | 312 | struct msi_msg guest_msi; |
312 | #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) | 313 | #define KVM_ASSIGNED_DEV_GUEST_INTX (1 << 0) |