Date: Mon, 01 Apr 2019 06:54:44 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 236922] Virtio fails as QEMU-KVM guest with Q35 chipset on Ubuntu 18.04.2 LTS Message-ID: <bug-236922-227-bvpePxqShk@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-236922-227@https.bugs.freebsd.org/bugzilla/> References: <bug-236922-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236922 --- Comment #5 from Tommy P <tommyhp2@gmail.com> --- I think I may found the bug... Please correct me if I'm wrong since it's been a very long time since I've dealt with C/C++ :( File src/sys/dev/virtio/pci/virtio_pci.h has this: /* VirtIO PCI vendor/device ID. */ #define VIRTIO_PCI_VENDORID 0x1AF4 #define VIRTIO_PCI_DEVICEID_MIN 0x1000 #define VIRTIO_PCI_DEVICEID_MAX 0x103F When the detected device ID is as follow for 12.0-RELEASE when booted with Q35 chipset: VirtIO SCSI: 0x1048 VirtIO console: 0x1043 VirtIO memory balloon: 0x1045 VirtIO network device: 0x1041 VirtIO block device: 0x1042 All those IDs are beyond the defined range. Thus, the controllers are detected since they match the vendor ID but the drivers are not loaded. As verification, I've modified the source code to: #define VIRTIO_PCI_DEVICEID_MAX 0x104F and rebuilt the kernel. The drivers still didn't load. Here's the pciconf for the SCSI when boot with i440FX chipset: virtio_pci2@pci0:0:7:0: class=0x010000 card=0x00081af4 chip=0x10041af4 rev=0x00 hdr=0x00 vendor = 'Red Hat, Inc.' device = 'Virtio SCSI' class = mass storage subclass = SCSI cap 11[98] = MSI-X supports 4 messages, enabled Table in map 0x14[0x0], PBA in map 0x14[0x800] cap 09[84] = vendor (length 20) cap 09[70] = vendor (length 20) cap 09[60] = vendor (length 16) cap 09[50] = vendor (length 16) cap 09[40] = vendor (length 16) and when boot with Q35 chipset: none1@pci0:1:0:0: class=0x010000 card=0x11001af4 chip=0x10481af4 rev=0x01 hdr=0x00 vendor = 'Red Hat, Inc.' device = 'Virtio SCSI' class = mass storage subclass = SCSI cap 11[dc] = MSI-X supports 4 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) Aside from the device ID changes, looks like there's a revision (?) change from 0x00 to 0x01. Both match the Windows' SCSI INF driver definition: %RHELScsi.DeviceDesc% = rhelscsi_inst, PCI\VEN_1AF4&DEV_1004&SUBSYS_00081AF4&REV_00 %RHELScsi.DeviceDesc% = rhelscsi_inst, PCI\VEN_1AF4&DEV_1048&SUBSYS_11001AF4&REV_01 from the virtio driver 0.1.126. -- You are receiving this mail because: You are the assignee for the bug.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-236922-227-bvpePxqShk>
