From owner-freebsd-virtualization@freebsd.org Thu Jan 9 01:07:05 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 B2AF4222534 for ; Thu, 9 Jan 2020 01:07:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 47tSd54BGnz4PYP for ; Thu, 9 Jan 2020 01:07:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.nyi.freebsd.org (Postfix) id 8DEA7222533; Thu, 9 Jan 2020 01:07:05 +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 8DAB9222532 for ; Thu, 9 Jan 2020 01:07:05 +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 47tSd53JFXz4PYN for ; Thu, 9 Jan 2020 01:07:05 +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 6CCBD20D5F for ; Thu, 9 Jan 2020 01:07:05 +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 009175hg073128 for ; Thu, 9 Jan 2020 01:07:05 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 0091759N073116 for virtualization@FreeBSD.org; Thu, 9 Jan 2020 01:07:05 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: Thu, 09 Jan 2020 01:07:03 +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: Thu, 09 Jan 2020 01:07:05 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D236922 --- Comment #22 from Tommy P --- (In reply to Bryan Venteicher from comment #13) Hi Bryan, I tried the method you've suggested to use the modules/virtio and dev/virtio from your repo on 12.0-RELEASE-p12 r356482 and encountered the following issues: 1) /usr/src/sys/dev/virtio/random/virtio_random.c:241:6: error: too many arguments to function call, expected 3, have 4 RANDOM_PURE_VIRTIO); ^~~~~~~~~~~~~~~~~~ I changed it from: random_harvest_queue(&value, sizeof(value), sizeof(value) * NBBY / 2, RANDOM_PURE_VIRTIO); to: random_harvest_queue(&value, sizeof(value), RANDOM_PURE_VIRTIO); 2) /usr/src/sys/dev/virtio/pci/virtio_pci.c:54:10: fatal error: 'virtio_pci_if.h' file not found I used sys/tools/makeobjops.awk to generate the missing virtio_pci_if.h from virtio_pci_if.m 3) A lot of "ld: error: undefined symbol" --- kernel --- linking kernel ld: error: undefined symbol: virtio_pci_disable_vq_desc >>> referenced by virtio_pci.c >>> virtio_pci.o:(vtpci_release_child_resources) They appear to all from virtio_pci_if.h 's "extern struct kobjop_desc " --------------------------------------------------------- I also compared the compile object files between your repo and the src r356= 482. I think there are some missing (virtio_pci_if, virtio_pci_legacy, virtio_pci_modern): root@d-build-fbsd12:/usr/obj # ll usr/src_virtio/amd64.amd64/sys/Custom/vir= t* -rw-r--r-- 1 root wheel 11312 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio.o -rw-r--r-- 1 root wheel 12480 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_balloon.o -rw-r--r-- 1 root wheel 24608 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_blk.o -rw-r--r-- 1 root wheel 2232 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_bus_if.c -rw-r--r-- 1 root wheel 7531 Jan 8 06:09 usr/src_virtio/amd64.amd64/sys/Custom/virtio_bus_if.h -rw-r--r-- 1 root wheel 2720 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_bus_if.o -rw-r--r-- 1 root wheel 797 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_if.c -rw-r--r-- 1 root wheel 1226 Jan 8 06:09 usr/src_virtio/amd64.amd64/sys/Custom/virtio_if.h -rw-r--r-- 1 root wheel 1272 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_if.o -rw-r--r-- 1 root wheel 17632 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_pci.o -rw-r--r-- 1 root wheel 1283 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_pci_if.c -rw-r--r-- 1 root wheel 4088 Jan 8 06:09 usr/src_virtio/amd64.amd64/sys/Custom/virtio_pci_if.h -rw-r--r-- 1 root wheel 1792 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_pci_if.o -rw-r--r-- 1 root wheel 15312 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_pci_legacy.o -rw-r--r-- 1 root wheel 26664 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_pci_modern.o -rw-r--r-- 1 root wheel 41248 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtio_scsi.o -rw-r--r-- 1 root wheel 8904 Jan 8 06:11 usr/src_virtio/amd64.amd64/sys/Custom/virtqueue.o root@d-build-fbsd12:/usr/obj # ll usr/src12.0/amd64.amd64/sys/Custom/virt* -rw-r--r-- 1 root wheel 11312 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtio.o -rw-r--r-- 1 root wheel 12480 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtio_balloon.o -rw-r--r-- 1 root wheel 24608 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtio_blk.o -rw-r--r-- 1 root wheel 2229 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtio_bus_if.c -rw-r--r-- 1 root wheel 7528 Jan 8 14:33 usr/src12.0/amd64.amd64/sys/Custom/virtio_bus_if.h -rw-r--r-- 1 root wheel 2720 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtio_bus_if.o -rw-r--r-- 1 root wheel 794 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtio_if.c -rw-r--r-- 1 root wheel 1223 Jan 8 14:33 usr/src12.0/amd64.amd64/sys/Custom/virtio_if.h -rw-r--r-- 1 root wheel 1272 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtio_if.o -rw-r--r-- 1 root wheel 17632 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtio_pci.o -rw-r--r-- 1 root wheel 41248 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtio_scsi.o -rw-r--r-- 1 root wheel 8904 Jan 8 14:34 usr/src12.0/amd64.amd64/sys/Custom/virtqueue.o The module's virtio/pci/Makefile does include those source files but they didn't appear to be compiled: pci/Makefile:25: pci/Makefile:26:.PATH: ${SRCTOP}/sys/dev/virtio/pci pci/Makefile:27: pci/Makefile:28:KMOD=3D virtio_pci pci/Makefile:29:SRCS=3D virtio_pci.c virtio_pci_legacy.c virtio_pci_moder= n.c pci/Makefile:30:SRCS+=3D virtio_pci_if.c virtio_pci_if.h pci/Makefile:31:SRCS+=3D virtio_bus_if.h virtio_if.h pci/Makefile:32:SRCS+=3D bus_if.h device_if.h pci_if.h pci/Makefile:33: pci/Makefile:34:.include Do you have any suggestion to resolve #3 in order to proceed? Thanks. --=20 You are receiving this mail because: You are the assignee for the bug.=