From nobody Fri Jun 14 06:35:31 2024 X-Original-To: virtualization@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4W0qKP0dlWz5NWfH for ; Fri, 14 Jun 2024 06:35:37 +0000 (UTC) (envelope-from corvink@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W0qKN6bzkz51L7; Fri, 14 Jun 2024 06:35:36 +0000 (UTC) (envelope-from corvink@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718346936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=hxZhAc0XWiHjNFfWuPLhI+pJFBKX7zbMu07QjZdfMhU=; b=elrzmwAxeh1hacwSBBk74WC6GPQsUuzGaAV+2mzXtMNel3KoWrZmdLJNQ/azqKWIGGFIvd ALzR6Ax/Aq9OwwbIY1uv1Yl8hp/tOZ31r70isQVq+5cMG9QJ2dQACdKo0h0XZOfNsXoU3I x4MB/iyAx0uKuFdfD1xD1PgiggSYfu0p/CcXyIYTmG55b8bYNA6bn0kTwZpNqRE5fWr5jl j3AN8z2gauKohBgWSJ4Yp6f+XAEmIJRQ/AllHbiim/SDeQTcz1G8RUvWWjKjWSKNid+bT5 dU46gXSzVa/Ki3RHhR65Y7RXsEz6RCk6p76HGPEZQGN+9nhqC3/3YA+GDMCwEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1718346936; a=rsa-sha256; cv=none; b=rSPPRXBi/+jyreb+rrcYfZawwUvhja33EiyhdE4bFEO2sJKCfMHztQzu/XJr0tKD8uVkF+ gOSiAgJF9H9RwN+MRPi0JCHy+M2qGZ/PriJCDJGyvkIq/yc1BEjB4MLQUgeXyM1ZLsC8ea 7xJ7Q5eEkAaZTKcaGLOzcdpY0vkR0L7LPUmv/cH4j8lWoUFPCnaq63yNSuO4GZ7QS4jmsZ UiNzZnFEmUD4/VLN65EAouqdF1rCWFnC3YH2yolCEnmydLD9g5NAqadmZCL9yqCxizhf1A FLSNND5oZEBPXHXPCF9hGKwoiYBNAFcv8aEjNRRaaerYmx2RQ/r7wfgpqeB3Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1718346936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=hxZhAc0XWiHjNFfWuPLhI+pJFBKX7zbMu07QjZdfMhU=; b=U61LAJUjS26uWd7r3mXK42p3g6El5tGxzjdSJYACQhwjF3FmaLvZpuRvuFUMVmKBpqGq4g /FQAs0WzikxGQp8Jd6qnngReFFFD8liAhdGlrm8fUATaAdOh6N+0lcm7MUikldlW9xyPDC 6KQQp5D3tOE5V6EumOtMGim2q67UmeXMLHsiT2wVFd0bslr0jHC7yWmxksynz39hM9x7iB FE5vBiCo5FP4TM5bpeodZmbSx628wvpQlaKtI4yeuIA9E9Vzhw89KIhdRPG0p1KOozx/70 cE+g9hOi/VCVlbSC9o1zf3le1azyppqBQP3X+LJEFHipFlhDj/CjIG+Zywmm2g== Received: from [172.21.179.142] (unknown [195.226.174.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: corvink) by smtp.freebsd.org (Postfix) with ESMTPSA id 4W0qKN2VPLz10yv; Fri, 14 Jun 2024 06:35:36 +0000 (UTC) (envelope-from corvink@FreeBSD.org) Message-ID: <38c9656c26fc3cee7ba733168c0fa2cdd01209d9.camel@FreeBSD.org> Subject: Re: bhyve passthru problem From: Corvin =?ISO-8859-1?Q?K=F6hne?= To: Oleksandr Kryvulia , virtualization@freebsd.org Date: Fri, 14 Jun 2024 08:35:31 +0200 In-Reply-To: References: Autocrypt: addr=corvink@FreeBSD.org; prefer-encrypt=mutual; keydata=mQINBGNjZaIBEADDTrDNf+0pwiuRPBdClcnZW83dH1UhuOi0u+A1J2SatEBbNaFVtXXAa vewCTuyV/ZbNidjlhq3R/pWyiKjFKvs5dj7PMCw+3z2D5OWpMdHg7TrB+fbdFPOEsu0zQVKNaO+pS KCfN0Re0m7bL3wuvl7PXvBufRwA3Guo1P4j3TXWaEkuso7VupTvE25zVGg9ONHrGOjA9RUy+Yg4Se 3NLgtUdjBgA21SBQTDvRQV4fDmVenlwvWeE0Xm8FcDcpQb6sJTihaDku78mi3Ux1HCk7rTcepVEB0 xIB6qmFxv0sLlDmVv6Z6qg1y/Q5m23Pgz60o3TulMPV4F+3Itm8ifU+wgVSzBZbD29GYkd7LKqMkF bhvfSBk+5db3vbYY5OD//+LTM5AV7e2AhXuXMvG1UNBqXqSJTTSy6KZz+qmPQO0zos0dq46p8o82l KiBEGD2Hu0p+u0OyV+MmRYo1NIBFVbOPXp2MvUVl5II0UIJ3+N9gLBmfGA+HEpVO8PnvdoT/5NQ7m 8JK1rQHzjiDub/iDPAYMqKH4C0eZ/7zO0fuY5FeRNtuNtpH1Bw/+7/5RJH7bcKkfGHHEp15FJUrGH gWNydoDLB9QBprwQc8FEldDXBjzOMXIgh6FGKLNu6DswvIPGy6M3u7DXwDakCXz+c9Ym0oFihLzZx WntrsxdswD/CwARAQABtCdDb3J2aW4gS8O2aG5lIDxjb3J2aW4ua29laG5lQGdtYWlsLmNvbT6JAl QEEwEIAD4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rxPjapKcIk8a7PqZDswNCKR+24LJ5D59mPgEOnsiCCVpik1WE/kgD+rOu9dQx jpjKwuKowf4EJP1KYNkYtoy1HthzyTOqPwqXC3IUl0GVPO3xw6MhUM3irCVFruC+ecVrv85Rd37vr duT6JvgW92xjWegMsamtkDZH8Ik/cmYhH0K/qEc6OZVNea/4PTEZe0uxODJ6pbMd80AJyGqDPPVeA gWJtEIG4k6IS8XyD5v1QJtlpDVpPwP/bbFnVc3h3Oatfn8Etm1KAqYvNwyO+om2PkF1p732uapDZd LwksVmgc9s79+9pSpeP5DbIeMzhrIK Content-Type: multipart/signed; micalg="pgp-sha256"; protocol="application/pgp-signature"; boundary="=-NzY2g6FnHGtj6efu500t" User-Agent: Evolution 3.52.1 List-Id: Discussion List-Archive: https://lists.freebsd.org/archives/freebsd-virtualization List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: freebsd-virtualization@freebsd.org Sender: owner-freebsd-virtualization@FreeBSD.org MIME-Version: 1.0 --=-NzY2g6FnHGtj6efu500t Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2024-06-13 at 10:53 +0300, Oleksandr Kryvulia wrote: > =C2=A0I'm trying to passthru a wwan-adapter to linux guest using > sysutils/vm-bhyve-devel. > =C2=A0 > =C2=A0ppt0@pci0:8:0:0: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0class=3D= 0x0d4000 rev=3D0x01 hdr=3D0x00 > vendor=3D0x8086 device=3D0x7560 subvendor=3D0x1cf8 subdevice=3D0x8654=20 > =C2=A0=C2=A0=C2=A0=C2=A0vendor =C2=A0=C2=A0=C2=A0=C2=A0=3D 'Intel Corpora= tion'=20 > =C2=A0=C2=A0=C2=A0=C2=A0device =C2=A0=C2=A0=C2=A0=C2=A0=3D 'XMM7560 LTE A= dvanced Pro Modem'=20 > =C2=A0=C2=A0=C2=A0=C2=A0class =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=3D wireless = controller=20 > =C2=A0=C2=A0=C2=A0=C2=A0subclass =C2=A0=C2=A0=3D cellular controller/mode= m > =C2=A0 > =C2=A0The guest does not start with an error: > =C2=A0 > =C2=A0bhyve: passthru device 8/0/0 BAR 2: base 0xbc201000 or size 0x100 > not page aligned=20 > =C2=A0bhyve: failed to initialize BARs for PCI 8/0/0=20 > =C2=A0Device emulation initialization error: No such file or directory > =C2=A0 > =C2=A0What I am doing wrong? > =C2=A0=C2=A0 The BAR size of your device is smaller than a page. Unfortunately, you can't change it, so there's nothing you can do right now. I don't know why bhyve validates the BAR size. The commit adding this check is old [1] and doesn't explain it. What bhyve could do is rounding up the BAR size to a full page size when allocating memory for the BAR. [1] https://github.com/freebsd/freebsd- src/commit/7a902ec0eccc752c9c38533ed123121eaaea1225 --=20 Kind regards, Corvin --=-NzY2g6FnHGtj6efu500t Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEgvRSla3m2t/H2U9G2FTaVjFeAmoFAmZr5LMACgkQ2FTaVjFe Amqv1BAAhxkVxkbnXXiBMXJqt/ffFep1kC2pgl6+MUXEDL8omvX1vT5+8NQJ8prZ xNg74NtYPTWrQOGCUuAimKJ0kXGjLjR3ZN54vXJhelq6o57tJg3+dDn5unj6TyHw cp+Gjlmwi4sk9KdXjpOj+JG61gi3GNW3hrcym3WvYgP8TyCrxVEkbOPJ3o2fksXk HWQ8yeqW5e7V7qIk5sPgorYMI+608jLzxgN+5eDwPmGteuNtgaNGD0junoX3v9Gc NgHG4uF0rpXiE8PTeMN36rLirml7ZJoSC6ZIXez0AAgWILPspJgvuC0MRzcMLwem mGMp5ZFiQxMUxdeIqzbs2OoX2zO3+4JDXg6O2vvsyMyNH/q3kgKFn9VPGzaL3Bn6 Imqvihl1fouj1fhNgS+x8pyzwBuUv0RAIWlkjsPlN+Ie5lR/f7CraEWHe2h5yZvc /TRRso4P+Rf7s9gs2JnEUBkjsR/xUCzWzVaLUG65DHBAjQ6wmxgtlrySRgcE6bEr Gr210NHDO0xjt1EwdkFqvB0+NGUDloqBqlwwIPwZ38FCm165bu8pOBkW8VtWDBxG KAfFj0v+WU4c0PdMrhV76J3U4bL6/Z9RVdOS8iZwrS4HJTDtG6ys0DjrdQ+OkzIy tI/PYbG0u8vzPj4QIZWizzfgRiNYKm6waxzNduCksG5xronFqak= =1mhu -----END PGP SIGNATURE----- --=-NzY2g6FnHGtj6efu500t--