[Bug 241774] FreeBSD 11.3 & 12.0 has broken SCSI & Networking on KVM/QEMU Q35 with OVMF

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Jan 8 04:56:48 UTC 2020


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241774

--- Comment #13 from Tommy P <tommyhp2 at gmail.com> ---
(In reply to John Hartley from comment #12)

Hi John,

If you look again at the pciconf output:

none1 at pci0:1:0:0

Implies that no driver were loaded for that pci device at slot 0:1:0:0 since
FreeBSD's VirtIO drivers currently does not support PCI-E bus.  The rest of the
pciconf are for debugging driver.  For the other output such as:

sym0 at pci0:2:0:0

Implies that FreeBSD's LSI/Symbios SCSI (sym) were loaded successfully.  Thus,
any HDD attached to that controller would work.  Unfortunately, I don't think
this SCSI controller supports UEFI boot.

Here are the details of pciconf, from my understanding, of how FreeBSD's VirtIO
drivers work:

none1 at pci0:1:0:0:       class=0x020000 card=0x11001af4 chip=0x10411af4 rev=0x01
hdr=0x00

*) rev=0x01 implies PCI-E bus while rev=0x00 implies PCI bus
*) last 4 digits of card/chip implies the vendor ID: 0x1af4 (per
/usr/src/sys/dev/virtio/pci/virtio_pci.h)
*) if device is on PCI bus, the first 4 digits of 'card' imply device type (per
/usr/src/sys/dev/virtio/virtio_ids.h)
*) if device is on PCI-E bus, the first 4 digits of 'chip' - 0x1040 should
match device type from /usr/src/sys/dev/virtio/virtio_ids.h.

Thus, 0x1041 - 0x1040 = 0x1 which is VirtIO NIC per pciconf's verbose output:
   #define VIRTIO_ID_NETWORK       1

And 0x1048 - 0x1040 = 0x8 which is VirtIO SCSI:
   #define VIRTIO_ID_SCSI          8

The current VirtIO drivers does not have the necessary codes to detect the
device ID connected to the PCI-E bus nor have the correct memory address to
attach the driver for that same bus.

As for non VirtIO not working, my fresh install of 12.0 using OVMF works OK for
both sym SCSI and em NIC.  I don't have 11.2 OVMF to test upgrade.  But all of
my non OVMF VMs work OK too except where Q35 + VirtIO are concerned as per my
bug report.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-virtualization mailing list