From nobody Sun Jun 16 09:55:15 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 4W27gZ48ffz5NSXY for ; Sun, 16 Jun 2024 09:55:54 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pg1-x52f.google.com (mail-pg1-x52f.google.com [IPv6:2607:f8b0:4864:20::52f]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4W27gZ24Tkz4jcF for ; Sun, 16 Jun 2024 09:55:54 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x52f.google.com with SMTP id 41be03b00d2f7-6eab07ae82bso2592768a12.3 for ; Sun, 16 Jun 2024 02:55:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718531752; x=1719136552; darn=freebsd.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=aZ6YiaxoDJ++ed5pG6Djn5mZnhjmU5sr3fwn1jTSnEE=; b=H/HVfhl3RNmwpotlWm/rL5/+77YiaAdY8gbVxwEmLzA53vgkcxTzkA5w815RG1Ezgp 2MIOdm3UZdMOguNkYWSvSuJTYamInSnqfTnC334fnoSGosO0QjZyuBzesrGxSRiRM5DG D/kTOOrMTm6mXB4rzCnH1MwIAxmByB9SWcYMMYsd2CRi2H6wbzvqageVohs1DMnFPxYQ axOp3LaQgjXkFhFpnz6YOg4hHZ6BB+zypph2aB1Klt5CVUJo5E0JE+RFs/TsYXThELgZ 901E+dNwTPloO9LIA2S3RW1paNvzWa4FYWfLQT4zu9mlA1GLECNSz4tJlXASaqV4oYu2 99EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718531752; x=1719136552; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aZ6YiaxoDJ++ed5pG6Djn5mZnhjmU5sr3fwn1jTSnEE=; b=w7WEzlfXbKlbHxTM/OfSHp35GHZC6e6ivjZfZbIEwEO8L9z/fplVJCi/9ZLJ99hMJk 2X4WEsYmdy664j0o7feItI5Ih0wKzNiTDwVygw/xXVhOvlcHoYRvNydKYEpflt6mOSvA 4+JzcQ20Fw1/VzVgcyPf5IslzRkIfk2ER/NNSXkNBSQiWf74fKfFUx6aZ4fENQoJkTaI s0apihBa2eNl1jgZBiMiOHJ9CJsG5RdrAWW3XWCGJ85t1ZzPn69SSRHsnVUNylJfjpEx ho+Gr/NBH0qgt5F93zrciaczo6Z7Z1ITKYAhj9ocgtkoHCFFndH1/wwXwJkX6yHxI+aO lr7Q== X-Forwarded-Encrypted: i=1; AJvYcCWTnhWvVYpYqKGyLEWfJYu7TYI1o7rmq4Wx1L/9OGz3F6q4FBPgG1JPdzPkea2l9xrwLhsgd9NOYYbmjlKJe/MGXck+z3EhL2aVNw== X-Gm-Message-State: AOJu0YxMhm3RqSjZPsfUEk1CbhoB7kqHmtV4bfQHMY+6h/CDZq999mDB XPkXU8z2EiwZDLbEaGMvB5sEm2tfvn5iDNdCBbZPxAVowUUsoxGxCzRW1aKtR26d+gWIErvc1W5 8IFUyLf8XC5clPVo1LG3hApoCEGdmGio5tGuYqg== X-Google-Smtp-Source: AGHT+IGI6LuaTrKwfuuHNI1qax3dFdsSkvyjoVpOjnZUHBGD+kZ2xMKuTdupPgWTfmDseglc0KfYoKWTY0UTTM1wVPI= X-Received: by 2002:a05:6a20:a11d:b0:1b8:a226:9a8 with SMTP id adf61e73a8af0-1bae7e22630mr7187265637.13.1718531751631; Sun, 16 Jun 2024 02:55:51 -0700 (PDT) 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 References: <38c9656c26fc3cee7ba733168c0fa2cdd01209d9.camel@FreeBSD.org> <92b37bf8-7ef9-4abd-8617-af12fbb35e13@shurik.kiev.ua> <86822716-b32d-4663-9b73-87d7c977b70a@shurik.kiev.ua> In-Reply-To: <86822716-b32d-4663-9b73-87d7c977b70a@shurik.kiev.ua> From: Mario Marietto Date: Sun, 16 Jun 2024 11:55:15 +0200 Message-ID: Subject: Fwd: bhyve passthru problem To: Oleksandr Kryvulia , virtualization@freebsd.org Content-Type: multipart/alternative; boundary="00000000000097663f061afeda46" X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US] X-Rspamd-Queue-Id: 4W27gZ24Tkz4jcF --00000000000097663f061afeda46 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I've zipped and uploaded my boot directory to my google drive https://drive.google.com/file/d/1MIw0G4LqducG86rtwSm9GjEWFyuCA-Vx/view?usp= =3Dsharing Try to exchange your boot files with those files. Anyway I'm using the kernel of FreeBSD 14.0--RELEASE p6 for my cpu *Intel*=C2=AE *Core*=E2=84=A2= *i9*-*9900K + GPU =3D Nvidia RTX 2080 ti. You can try the default kernel shipped with FreeBSD 14.0-RELEASE p6 to make it easier. * ---------- Forwarded message --------- Da: Oleksandr Kryvulia Date: dom 16 giu 2024, 10:13 Subject: Re: bhyve passthru problem To: 15.06.24 13:47, Mario Marietto: Ciao Oleksandr. I can't produce patches,I'm not a programmer. But I conduct experiments every day,changing parameters,system files between different FreeBSD versions,operating systems and tools. Can't you use virtio-net instead of passing through the physical network interface,like this for example : -s 13,virtio-net,tap18 \ in your bhyve guest ? You can try these bhyve versions : (try both) https://drive.google.com/drive/folders/14OMOjdyS5NPQ75ISatcpCWegU0udzG0r?us= p=3Dsharing Unfortunately both of your vmm.ko modules fail to load on my system: KLD vmm.ko: depends on kernel - not available or version mismatch On Sat, Jun 15, 2024 at 9:17=E2=80=AFAM Oleksandr Kryvulia wrote: > 14.06.24 10:50, Peter Grehan: > >> 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 fo= r > >> the BAR. > >> > >> [1] https://github.com/freebsd/freebsd- > >> src/commit/7a902ec0eccc752c9c38533ed123121eaaea1225 > > > > At the time, BIOSs would often place device BARs of less than a page > > size in the same physical page. Since EPT only gives page granularity, > > this would result in all those devices being available to the guest > > even if they hadn't been passed through. > > > Peter, can you explain how can I use this device in a guest without > passing through? > > > --=20 Mario. --00000000000097663f061afeda46 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I've zipped and uploaded my boot directory to my = google drive

https://drive.g= oogle.com/file/d/1MIw0G4LqducG86rtwSm9GjEWFyuCA-Vx/view?usp=3Dsharing

Try to exchange your boot files with those files. A= nyway I'm using the kernel of FreeBSD 14.0--RELEASE p6 for my cpu Intel=C2=AE Core=E2=84=A2 i9-9900K=C2=A0+ GPU =3D = Nvidia RTX 2080 ti. You can try the default kernel shipped with FreeBSD 14.= 0-RELEASE p6 to make it easier.=C2=A0

---------- Forw= arded message ---------
Da: O= leksandr Kryvulia <shuriku@shurik.kiev.ua>
Date= : dom 16 giu 2024, 10:13
Subject: Re: bhyve passthru problem
To: <= ;virtualiza= tion@freebsd.org>


=20 =20 =20
15.06.24 13:47, Mario Marietto:
=20
Ciao Oleksandr.

I can't produce patches,I'm not a programmer. But I co= nduct experiments every day,changing parameters,system files between different FreeBSD versions,operating systems and tools.=C2=A0

Can't you use virtio-net instead of passing through the physical network interface,like this for example : -s 13,virtio-net,tap18 \ in your bhyve guest ?

You can try these bhyve versions : (try both)


Unfortunately both o= f your vmm.ko modules fail to load on my system:

KLD vmm.ko: depends on kernel - not available or version mismatch

On Sat, Jun 15, 2024 at 9:17=E2=80=AFAM Oleksandr Kryvulia <shuriku@shurik.kiev.ua= > wrote:
14.06.24 10:50, Peter Grehan:
>> 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/fre= ebsd-
>> src/commit/7a902ec0eccc752c9c38533ed123121eaaea1225
>
> =C2=A0At the time, BIOSs would often place device BARs of le= ss than a page
> size in the same physical page. Since EPT only gives page granularity,
> this would result in all those devices being available to the guest
> even if they hadn't been passed through.
>
Peter, can you explain how can I use this device in a guest without
passing through?




--
Mario.

--00000000000097663f061afeda46--