Date: Fri, 14 Jun 2024 08:35:31 +0200 From: Corvin =?ISO-8859-1?Q?K=F6hne?= <corvink@FreeBSD.org> To: Oleksandr Kryvulia <shuriku@shurik.kiev.ua>, virtualization@freebsd.org Subject: Re: bhyve passthru problem Message-ID: <38c9656c26fc3cee7ba733168c0fa2cdd01209d9.camel@FreeBSD.org> In-Reply-To: <a63589a8-2cb2-4952-83b1-7a97e2f8cd44@shurik.kiev.ua> References: <a63589a8-2cb2-4952-83b1-7a97e2f8cd44@shurik.kiev.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--=-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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38c9656c26fc3cee7ba733168c0fa2cdd01209d9.camel>