diff options
author | Marc Zyngier <maz@kernel.org> | 2022-01-31 16:02:42 +0000 |
---|---|---|
committer | Will Deacon <will@kernel.org> | 2022-02-16 15:55:32 +0000 |
commit | 2108c86d0623f32d34e4dc43ef76935e110ab1bd (patch) | |
tree | 820ea03bdbb2e41b02aa525dbe87baff4531225c | |
parent | 20b93be583f6cb994f9df05e410ff27e24e76dc2 (diff) | |
download | kvmtool-2108c86d0623f32d34e4dc43ef76935e110ab1bd.tar.gz |
virtio/pci: Signal INTx interrupts as level instead of edge
It appears that the way INTx is emulated is "slightly" out of spec
in kvmtool. We happily inject an edge interrupt, even if the spec
mandates a level.
This doesn't change much for either the guest or userspace (only
KVM will have a bit more work tracking the EOI), but at least
this is correct.
Reported-by: Pierre Gondois <pierre.gondois@arm.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: Sami Mujawar <sami.mujawar@arm.com>
Cc: Will Deacon <will@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Link: https://lore.kernel.org/r/20220131160242.2665191-1-maz@kernel.org
Signed-off-by: Will Deacon <will@kernel.org>
-rw-r--r-- | pci.c | 2 | ||||
-rw-r--r-- | virtio/pci.c | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -61,7 +61,7 @@ int pci__assign_irq(struct pci_device_header *pci_hdr) pci_hdr->irq_line = irq__alloc_line(); if (!pci_hdr->irq_type) - pci_hdr->irq_type = IRQ_TYPE_EDGE_RISING; + pci_hdr->irq_type = IRQ_TYPE_LEVEL_HIGH; return pci_hdr->irq_line; } diff --git a/virtio/pci.c b/virtio/pci.c index 41085291..2777d1c8 100644 --- a/virtio/pci.c +++ b/virtio/pci.c @@ -413,7 +413,7 @@ int virtio_pci__signal_vq(struct kvm *kvm, struct virtio_device *vdev, u32 vq) kvm__irq_trigger(kvm, vpci->gsis[vq]); } else { vpci->isr = VIRTIO_IRQ_HIGH; - kvm__irq_trigger(kvm, vpci->legacy_irq_line); + kvm__irq_line(kvm, vpci->legacy_irq_line, VIRTIO_IRQ_HIGH); } return 0; } |