[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
Thu Jan 9 03:18:56 UTC 2020


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

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

Hi John,

Good news!  After some debugging, I was able to get VirtIO to work with Q35
with OVMF for 12.0-RELEASE-p12 r356438M and without OVMF for 12.0-RELEASE-p12
r356535M!
Please see my bug report
(https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236922) for the attachment
and caution regarding netmap.  Here's the pciconf output for the VirtIO:

vtpcim0 at pci0:1:0:0:     class=0x020000 card=0x11001af4 chip=0x10411af4 rev=0x01
hdr=0x00
    vendor     = 'Red Hat, Inc.'
    device     = 'Virtio network device'
    class      = network
    subclass   = ethernet
    bar   [14] = type Memory, range 32, base 0x98e00000, size 4096, enabled
    bar   [20] = type Prefetchable Memory, range 64, base 0x800000000, size
16384, enabled
    cap 11[dc] = MSI-X supports 3 messages, enabled
                 Table in map 0x14[0x0], PBA in map 0x14[0x800]
    cap 09[c8] = vendor (length 20)
    cap 09[b4] = vendor (length 20)
    cap 09[a4] = vendor (length 16)
    cap 09[94] = vendor (length 16)
    cap 09[84] = vendor (length 16)
    cap 01[7c] = powerspec 3  supports D0 D3  current D0
    cap 10[40] = PCI-Express 2 endpoint max data 128(128)
                 link x1(x1) speed 2.5(2.5) ASPM disabled(L0s)
sym0 at pci0:2:0:0:        class=0x010000 card=0x10000000 chip=0x00121000 rev=0x00
hdr=0x00
    vendor     = 'LSI Logic / Symbios Logic'
    device     = '53c895a'
    class      = mass storage
    subclass   = SCSI
    bar   [10] = type I/O Port, range 32, base 0xb000, size 256, enabled
    bar   [14] = type Memory, range 32, base 0x98c02000, size 1024, enabled
    bar   [18] = type Memory, range 32, base 0x98c00000, size 8192, enabled
vtpcim1 at pci0:3:0:0:     class=0x010000 card=0x11001af4 chip=0x10481af4 rev=0x01
hdr=0x00
    vendor     = 'Red Hat, Inc.'
    device     = 'Virtio SCSI'
    class      = mass storage
    subclass   = SCSI
    bar   [14] = type Memory, range 32, base 0x98a00000, size 4096, enabled
    bar   [20] = type Prefetchable Memory, range 64, base 0x800100000, size
16384, enabled
    cap 11[dc] = MSI-X supports 4 messages, enabled
                 Table in map 0x14[0x0], PBA in map 0x14[0x800]
    cap 09[c8] = vendor (length 20)
    cap 09[b4] = vendor (length 20)
    cap 09[a4] = vendor (length 16)
    cap 09[94] = vendor (length 16)
    cap 09[84] = vendor (length 16)
    cap 01[7c] = powerspec 3  supports D0 D3  current D0
    cap 10[40] = PCI-Express 2 endpoint max data 128(128)
                 link x1(x1) speed 2.5(2.5) ASPM disabled(L0s)
vtpcim2 at pci0:4:0:0:     class=0x078000 card=0x11001af4 chip=0x10431af4 rev=0x01
hdr=0x00
    vendor     = 'Red Hat, Inc.'
    device     = 'Virtio console'
    class      = simple comms
    bar   [14] = type Memory, range 32, base 0x98800000, size 4096, enabled
    bar   [20] = type Prefetchable Memory, range 64, base 0x800200000, size
16384, enabled
    cap 11[dc] = MSI-X supports 2 messages
                 Table in map 0x14[0x0], PBA in map 0x14[0x800]
    cap 09[c8] = vendor (length 20)
    cap 09[b4] = vendor (length 20)
    cap 09[a4] = vendor (length 16)
    cap 09[94] = vendor (length 16)
    cap 09[84] = vendor (length 16)
    cap 01[7c] = powerspec 3  supports D0 D3  current D0
    cap 10[40] = PCI-Express 2 endpoint max data 128(128)
                 link x1(x1) speed 2.5(2.5) ASPM disabled(L0s)


Note that previously it was none#@pci now it's vtpcim#@pci.  It also seems to
support booting from both SATA and VirtIO Serial:

root at fbsd12-ovmf:~ # ls /dev/{da,ada,vtbd}*
/dev/vtbd0      /dev/vtbd0p1    /dev/vtbd0p2

root at fbsd12-ovmf:~ # ifconfig
vtnet0: flags=8802<BROADCAST,SIMPLEX,MULTICAST> metric 0 mtu 1500
       
options=4c07bb<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,JUMBO_MTU,VLAN_HWCSUM,TSO4,TSO6,LRO,VLAN_HWTSO,LINKSTATE,TXCSUM_IPV6>
        ether ...
        media: Ethernet autoselect (10Gbase-T <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
em0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
       
options=81209b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,WOL_MAGIC,VLAN_HWFILTER>
        ether ...
        inet ... netmask 0xffffff00 broadcast 10.100.0.255
        media: Ethernet autoselect (1000baseT <full-duplex>)
        status: active
        nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
        options=680003<RXCSUM,TXCSUM,LINKSTATE,RXCSUM_IPV6,TXCSUM_IPV6>
        inet6 ::1 prefixlen 128
        inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
        inet 127.0.0.1 netmask 0xff000000
        groups: lo
        nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>

This was a fresh install of 12.0-RELEASE onto SATA.  After replacing and
patching /usr/src in addition to kernel rebuild, it now boots as VirtIO Serial!

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


More information about the freebsd-virtualization mailing list