From owner-freebsd-virtualization@freebsd.org Tue Jan 7 00:17:56 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FAB81D8EB9 for ; Tue, 7 Jan 2020 00:17:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 47sCdJ2sn0z4Rfh for ; Tue, 7 Jan 2020 00:17:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 604D71D8EB8; Tue, 7 Jan 2020 00:17:56 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 601011D8EB6 for ; Tue, 7 Jan 2020 00:17:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 47sCdJ1qf5z4Rfg for ; Tue, 7 Jan 2020 00:17:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A3411E7A5 for ; Tue, 7 Jan 2020 00:17:56 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 0070HueZ095819 for ; Tue, 7 Jan 2020 00:17:56 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0070HusD095809 for virtualization@FreeBSD.org; Tue, 7 Jan 2020 00:17:56 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: virtualization@FreeBSD.org Subject: [Bug 236922] Virtio fails as QEMU-KVM guest with Q35 chipset on Ubuntu 18.04.2 LTS Date: Tue, 07 Jan 2020 00:17:56 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.0-RELEASE X-Bugzilla-Keywords: needs-qa X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: tommyhp2@gmail.com X-Bugzilla-Status: Open X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: virtualization@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jan 2020 00:17:56 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236922 --- Comment #18 from Tommy P --- (In reply to John Hartley from comment #16) Thanks John for the feedback. Are you using the default GENERIC kernel? I didn't have any issues with my custom (trimmed of the GENERIC by removing unused drivers) kernel in conjunction with i440FX chipset. All of the VirtIO (block devices, NIC, memory balloon, etc) work OK. All of the SCSI control= lers (Hypervisor default and VirtIO SCSI models) in addition VirtIO Serial work = OK.=20 It's when I created a VM configuration with Q35 chipset instead of i440FX t= hat none of the VirtIO devices (including the VirtIO Serial & SCSI) are working= as per my previous troubleshooting (comment #5 - #7). Thus, I don't think it's relating the OVMF firmware configuration within KVM-QEMU nor the FreeBSD version. I'm pretty sure it's how the VirtIO devices are detected and load= ed as per FreeBSD's source code /usr/src/sys/dev/virtio/virtio_ids.h. If you compare the pciconf on a working i440FX VM system vs. a non working Q35 VM, you'll notice the matching 'card' ID to virtio_ids.h on the working i440FX = VM while the non-working Q35 VM doesn't have any. For example: none2@pci0:2:0:0: class=3D0x010000 card=3D0x11001af4 chip=3D0x10481af= 4 rev=3D0x01 hdr=3D0x00 vendor =3D 'Red Hat, Inc.' device =3D 'Virtio SCSI' class =3D mass storage subclass =3D SCSI Here are the images of the my config: https://imgur.com/a/rftzjO3 Devices that are loaded and not loaded (no driver attached) root@d-fbsd:~ # ls /dev/*da* /dev/ada0 /dev/ada1 /dev/ada2p1 /dev/ada4 /dev/ada5p1= =20=20=20=20 /dev/da1 /dev/da2p1 /dev/da4 /dev/da5p1 /dev/da6p1 /dev/ada0p1 /dev/ada1p1 /dev/ada3 /dev/ada4p1 /dev/da0=20= =20=20=20=20=20=20 /dev/da1p1 /dev/da3 /dev/da4p1 /dev/da5p2 /dev/da6p2 /dev/ada0p2 /dev/ada2 /dev/ada3p1 /dev/ada5 /dev/da0p1= =20=20=20=20=20 /dev/da2 /dev/da3p1 /dev/da5 /dev/da6 root@d-fbsd:~ # dmesg | egrep -i 'scsi|mass stor|sym' pci2: at device 0.0 (no driver attached) sym0: <895a> port 0xe000-0xe0ff mem 0xfca02000-0xfca023ff,0xfca00000-0xfca0= 1fff irq 22 at device 0.0 on pci4 sym0: No NVRAM, ID 7, Fast-40, LVD, parity checking sym1: <895a> port 0xd000-0xd0ff mem 0xfc802000-0xfc8023ff,0xfc800000-0xfc80= 1fff irq 22 at device 0.0 on pci5 sym1: No NVRAM, ID 7, Fast-40, LVD, parity checking da0 at sym0 bus 0 scbus0 target 0 lun 0 da0: Fixed Direct Access SPC-3 SCSI device pass13: da1 at sym0 bus 0 scbus0 target 1 lun 0 Removable CD-ROM SCSI device da1: Fixed Direct Access SPC-3 SCSI device da2 at sym0 bus 0 scbus0 target 2 lun 0 pass13: 150.000MB/s transfers da2: Fixed Direct Access SPC-3 SCSI device da3 at sym0 bus 0 scbus0 target 3 lun 0 da3: Fixed Direct Access SPC-3 SCSI device da4 at sym0 bus 0 scbus0 target 4 lun 0 da4: Fixed Direct Access SPC-3 SCSI device da5 at sym1 bus 0 scbus1 target 5 lun 0 da5: Fixed Direct Access SPC-3 SCSI device da6 at sym1 bus 0 scbus1 target 6 lun 0 da6: Fixed Direct Access SPC-3 SCSI device root@d-fbsd:~ # uname -a FreeBSD d-fbsd 11.2-RELEASE-p15 FreeBSD 11.2-RELEASE-p15 #0 r356353: Sat Ja= n 4 16:10:17 PST 2020 root@d-fbsd:/usr/obj/usr/src11.2/sys/Custom amd64 Regarding the matrix, from my troubleshooting, everything should work as lo= ng as you use the i440FX. If you decide to use the Q35, do not use anything relating to VirtIO (SCSI and Serial storages, NIC, etc). BTW, if you use s= hell scripts to maintain your VMs, simply changing the configuration of i440FX to Q35 only would still work since the existing VirtIO devices are attached to= the PCI-ISA bus instead of PCIe-PCI (please see https://forums.freebsd.org/threads/freebsd-12-release-guest-in-qemu-kvm.702= 07/ and https://wiki.qemu.org/Features/Q35). --=20 You are receiving this mail because: You are the assignee for the bug.=