From nobody Sat Jun 15 10:47: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 4W1XtZ0cf8z5NZk7 for ; Sat, 15 Jun 2024 10:48:22 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pf1-x434.google.com (mail-pf1-x434.google.com [IPv6:2607:f8b0:4864:20::434]) (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 4W1XtY5xxMz40R3 for ; Sat, 15 Jun 2024 10:48:21 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pf1-x434.google.com with SMTP id d2e1a72fcca58-705c0115192so2650073b3a.1 for ; Sat, 15 Jun 2024 03:48:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1718448500; x=1719053300; 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=MvxMjimUJE44Kg30Qv+v0TuMnt84xL1q1AimbJHT4LY=; b=JHMqIzwDdAAHN7ALBu6yJjYUNbaSGLNQdtY3y+0P6WPSlvIDvnC+CCwhsv89IoPZfb 9GgZEJHSgNzf3781FHKI28kmgfP+Y+oXSDPAWVbCPXbFfHaM+eufUNUQn/9CdxtcypMn TZVawHMLWhKfNLpAOJAX/mFHtyM95iPJXjmZTl+EF1nwkACZsfusDLvX5IhlMYDbyv+I k+u29aETSnraN+hVCAhTWNhS51m7Ym3V2xKrIcnFvIKKdYSNB7+dvWzIclgHgSl5bFl4 i1P8KQgdxvdbXK0vm7xl5Ndxt6xklbYB5Ho7ItnEpjNQNWc1ZdAzUuIG74vnsh6Yjp9r GixA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1718448500; x=1719053300; 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=MvxMjimUJE44Kg30Qv+v0TuMnt84xL1q1AimbJHT4LY=; b=RMiO4T/dZ/lcwlf5e8NH3RtUY3u9f9mX07d09nNXyY5ZnsS7OxwSYBDPcr4oAzRt8B TRvEeKFCko47ND3XeKPe+5wGOEAniNwq1X7ZUQcsVvpXfOXgVBvRR+6j+pXhDWGOsT17 l2jYBLCDMk1SS+pE4yfdJjcIYKlxe2U9W9YruI25qnCspw6a8a9bQeH2dDSKkLSJCO9n C7+YmIBCMDFy3iGe5BS5V9bTBYImNFTiR0sdQ0m0Xi9N7ctQw+LPr9/3dO2qgmcL1xE6 nH9fPC44zRWaiHXKR4k/FV+QfYD55an8u1iohSz2y/lacr86Q8u45zQEKx4omJOdyZOZ BsNg== X-Gm-Message-State: AOJu0YzEw6TY6m6pYhLgs5F62HAYsTAYFtIv80iHYdWnSCjCkiqgyR2S 4bWxqpk8iYQG+U6rXi32AES26CrCNXX3/C8KhdlgDUWS7jKCvs1GqEdA/bCz9NrBW5UBPULnL5v 0ZLEGK1qoziQFhvz/2KCjBozt5V3bzzfEPEeEvw== X-Google-Smtp-Source: AGHT+IHdF4GlRpkq1YoFQKNNJi0RK5mkyLoVQq2GXRQPbSrnzwlCWaGhxjyekn2K4KC34RlNoGp8FP/LOQKMYlPXDYk= X-Received: by 2002:a05:6a20:9184:b0:1b5:b214:efb8 with SMTP id adf61e73a8af0-1bae7eba01fmr6238099637.34.1718448500244; Sat, 15 Jun 2024 03:48: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> In-Reply-To: <92b37bf8-7ef9-4abd-8617-af12fbb35e13@shurik.kiev.ua> From: Mario Marietto Date: Sat, 15 Jun 2024 12:47:43 +0200 Message-ID: Subject: Re: bhyve passthru problem To: Oleksandr Kryvulia Cc: virtualization@freebsd.org Content-Type: multipart/alternative; boundary="0000000000006c0d7a061aeb78d2" 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: 4W1XtY5xxMz40R3 --0000000000006c0d7a061aeb78d2 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 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. --0000000000006c0d7a061aeb78d2 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Ciao Oleksandr.

I can't = produce patches,I'm not a programmer. But I conduct experiments every d= ay,changing parameters,system files between different FreeBSD versions,oper= ating systems and tools.=C2=A0

Can't you use v= irtio-net instead of passing through the physical network interface,like th= is for example : -s 13,virtio-net,tap18 \ in your bhyve guest ?
<= br>
You can try these bhyve versions : (try both)
<= br>

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 addi= ng this
>> check is old [1] and doesn't explain it. What bhyve could do i= s
>> rounding up the BAR size to a full page size when allocating memor= y for
>> the BAR.
>>
>> [1] https://github.com/freebsd/freebsd-
>> src/commit/7a902ec0eccc752c9c38533ed123121eaaea1225
>
> =C2=A0At 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.
--0000000000006c0d7a061aeb78d2--