Hi Stefan,
I applied the patch and it boots properly now. Thank you!
Courtney
On 9/18/24 1:52 AM, Stefan Fritsch wrote:
Hi,
On Tue, 17 Sep 2024, Courtney wrote:
I'm trying to sysupgrade current in 2 VMs running on bhyve on SmartOS.
I was able sysupgrade these VMs until recently. One VM is
GENERIC.MP#242 and the other GENERIC.MP#272.
When I sysupgrade, I hit this error in bhyve
https://github.com/TritonDataCenter/illumos-joyent/blob/master/usr/src/cmd/bhyve/pci_virtio_viona.c#L1016-L1025
And the last messages I get in dmesg are setting up vio0 before bhyve core
dumps.
One of the recent changes introduced an off-by-one. Can you try
recompiling the kernel with the diff below and test if that fixes the
issue? bhyve should not crash in this case, but then we would not have
found the issue.
If the patch does not help, I would be interested in the boot output of a
kernel with VIRTIO_DEBUG set to 1 in sys/dev/pv/virtiovar.h .
Cheers,
Stefan
diff --git a/sys/dev/pci/virtio_pci.c b/sys/dev/pci/virtio_pci.c
index 4a0c9037cf7..fb74bf98601 100644
--- a/sys/dev/pci/virtio_pci.c
+++ b/sys/dev/pci/virtio_pci.c
@@ -284,7 +284,7 @@ virtio_pci_setup_intrs(struct virtio_softc *vsc)
if (sc->sc_irq_type == IRQ_NO_MSIX)
return;
- for (i = 0; i <= vsc->sc_nvqs; i++) {
+ for (i = 0; i < vsc->sc_nvqs; i++) {
unsigned vec = vsc->sc_vqs[i].vq_intr_vec;
virtio_pci_set_msix_queue_vector(sc, i, vec);
}