[PATCH] aarch64: until MSI-X support becomes functional enable regular PCI interrupt

12 views
Skip to first unread message

Waldemar Kozaczuk

unread,
Jul 4, 2020, 1:18:28 AM7/4/20
to osv...@googlegroups.com, Waldemar Kozaczuk
The PCI MSI-X support for aarch64 is unfortunately not fully
functional (please see arch/aarch64/msi.cc for details). This causes
OSv to hang when running on QEMU in aarch64 emulated mode in both
virtio-blk and virtio-net waiting to receive PCI interrupt from
the hypervisor.

So for now this patch forces OSv to enable regular PCI
interrupt regardless if QEMU advertises a PCI device in MSI-X mode.
This actually makes both virtio-blk and virtio-net function properly
on QEMU with PCI devices. This means that OSv finally gets an IP address
and is able to mount a ROFS disk (ZFS has not been tested yet) and execute
an app from it.

Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>
---
drivers/virtio-pci-device.cc | 6 ++++++
1 file changed, 6 insertions(+)

diff --git a/drivers/virtio-pci-device.cc b/drivers/virtio-pci-device.cc
index 378332ff..c7420747 100644
--- a/drivers/virtio-pci-device.cc
+++ b/drivers/virtio-pci-device.cc
@@ -44,11 +44,17 @@ void virtio_pci_device::init()

void virtio_pci_device::register_interrupt(interrupt_factory irq_factory)
{
+#ifdef AARCH64_PORT_STUB
+ // Currently MSI-X support for aach64 is stubbed (please see arch/aarch64/msi.cc)
+ // so until it becomes functional we register regular PCI interrupt
+ _irq.reset(irq_factory.create_pci_interrupt(*_dev));
+#else
if (irq_factory.register_msi_bindings && _dev->is_msix()) {
irq_factory.register_msi_bindings(_msi);
} else {
_irq.reset(irq_factory.create_pci_interrupt(*_dev));
}
+#endif
}

virtio_legacy_pci_device::virtio_legacy_pci_device(pci::device *dev)
--
2.26.2

Pekka Enberg

unread,
Jul 4, 2020, 1:44:02 AM7/4/20
to Waldemar Kozaczuk, OSv Development
On Sat, Jul 4, 2020 at 8:18 AM Waldemar Kozaczuk <jwkoz...@gmail.com> wrote:
The PCI MSI-X support for aarch64 is unfortunately not fully
functional (please see arch/aarch64/msi.cc for details). This causes
OSv to hang when running on QEMU in aarch64 emulated mode in both
virtio-blk and virtio-net waiting to receive PCI interrupt from
the hypervisor.

Acked-by: Pekka Enberg <pen...@scylladb.com>

Please also open a ticket on osv.git on lack of MSI-X in the AArch64 port. 

Commit Bot

unread,
Jul 6, 2020, 12:54:48 PM7/6/20
to osv...@googlegroups.com, Waldemar Kozaczuk
From: Waldemar Kozaczuk <jwkoz...@gmail.com>
Committer: Waldemar Kozaczuk <jwkoz...@gmail.com>
Branch: master

aarch64: until MSI-X support becomes functional enable regular PCI interrupt

Signed-off-by: Waldemar Kozaczuk <jwkoz...@gmail.com>

---
diff --git a/drivers/virtio-pci-device.cc b/drivers/virtio-pci-device.cc
Reply all
Reply to author
Forward
0 new messages