From nobody Sun Jun 16 10:56:43 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 4W292V3XlKz5NZ14 for ; Sun, 16 Jun 2024 10:57:22 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pj1-x1034.google.com (mail-pj1-x1034.google.com [IPv6:2607:f8b0:4864:20::1034]) (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 4W292V0Zryz4p4w for ; Sun, 16 Jun 2024 10:57:22 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1034.google.com with SMTP id 98e67ed59e1d1-2c2f6b47621so2483991a91.1 for ; Sun, 16 Jun 2024 03:57:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718535440; x=1719140240; darn=freebsd.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=O+I6mRUXue0CiZJRGszp0j9XbhGBS7WZRQDPsQV5gNc=; b=ai/fYHMzIVL2F7tbq1wkjw/WaB+An2Meevtlv7lYJi2I9NoO8gtGczzRDZRrVn+YaJ XwFM/kbUXXg7l5J9jtCURgEGb1kjt59NVXTIgmMztxN21IZt/nSK8sxcTu8XHRlLU7p3 x6ho+eFrzHxNOizOdkYf1ErIojf8UJEhGfm5xluVLJAi6ErsDxVjGPAXp6q/+ddCtqy5 VsUoHbnP/ocg56czUW+9U7WH+ZeD5Vy5HYbldfl4I4T2DcGFBkTYL6FJj6lwjrY9tAbs 94wECT7Ul41/joVJP5noLpO6E9+e9bUuwhw1/n84RwtfWlnilqgoV9VSVZD9F7MeTuvD IuDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718535440; x=1719140240; h=cc: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=O+I6mRUXue0CiZJRGszp0j9XbhGBS7WZRQDPsQV5gNc=; b=KrZZYUjDKwMTDxQESX2Db3RmhH/+1H27PY/x+11IxPLa6ikNoHitpQ6PHcmOXXZO24 Yc6+MaOCj06uhn84Tgp7TcGEz3L1pX87jkjLRzDCeArf5qov4AzCc/5008WZvGiNFEV8 9F3hI5NEBWV99fIQL3XYHGyD2txH8URazo2orVBUp4JzkWg18VCNGP5aBXZPGpDETeX/ MCX/zaMrf2vhPxOTy+Y+kJ70a//9sVCtcZShTheNOEEDlXPhQTX+qL3Cy9/wQiaDCaTx yBxNag7mLX/AcfZu3qwPwONWKDyc0BfymAw92E2FJKK7yZ+ikkfu+LDx//k+2ZKiQi1Q hpkQ== X-Gm-Message-State: AOJu0YxfEZPpjEq4R7UjzPbkSYtiKDdNbZS6fxUM9d139Oz9Qxz8sWkm 1bB1B25v0Q0YSefCrFgjvoM4DGpMcDlRGc4EKS6ifCXEjfgtEnpz1kZNByUES8E84i3S07KCBuD xwcsUQ266DS8iCMjrs+/e9rXZLmk= X-Google-Smtp-Source: AGHT+IF3zcP6e5gPvzPadidPkSl9QRyJfE6vQisWP7VUnAWrkfFAlY3WFTGOy4tiUckVNYh/lkhHiNU04+P8TGi8ZUY= X-Received: by 2002:a17:90a:ee42:b0:2c2:c6c8:8fc with SMTP id 98e67ed59e1d1-2c4bd6a9a7emr14957159a91.2.1718535440042; Sun, 16 Jun 2024 03:57:20 -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: From: Mario Marietto Date: Sun, 16 Jun 2024 12:56:43 +0200 Message-ID: Subject: Re: Fwd: bhyve passthru problem To: Oleksandr Kryvulia Cc: virtualization@freebsd.org Content-Type: multipart/alternative; boundary="000000000000701546061affb636" 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: 4W292V0Zryz4p4w --000000000000701546061affb636 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable I've realized that using the latest version is not a guarantee of functionality. On Sun, Jun 16, 2024 at 12:41=E2=80=AFPM Oleksandr Kryvulia wrote: > 16.06.24 12:55, Mario Marietto: > > I've zipped and uploaded my boot directory to my google drive > > > https://drive.google.com/file/d/1MIw0G4LqducG86rtwSm9GjEWFyuCA-Vx/view?us= p=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. * > > This explains all. I am using latest current )) > > > 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?= usp=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 f= or >> >> 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? >> >> >> > > -- > Mario. > > > > --=20 Mario. --000000000000701546061affb636 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I've realized that using the latest version is not a g= uarantee of functionality.

On Sun, Jun 16, 2024 at 12:41=E2=80=AFPM Olek= sandr Kryvulia <shuriku@shurik= .kiev.ua> wrote:
=20 =20 =20
16.06.24 12:55, Mario Marietto:
=20
I've zipped and uploaded my boot directory to my google drive


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

This explains all. I am using latest current ))

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.=C2=A0

Can't you use virtio-net instead of passing throug= h 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 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 <shuriku@shu= rik.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. Wha= t bhyve could do is
>> rounding up the BAR size to a full page size when allocating memory for
>> the BAR.
>>
>> [1] https://github.com/free= bsd/freebsd-
>> src/commit/7a902ec0eccc752c9c38533ed123121eaaea1225
>
> =C2=A0At the time, BIOSs would often place device BA= Rs 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?




--
Mario.




--
Mario.
--000000000000701546061affb636--