Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Jun 2024 11:12:50 +0300
From:      Oleksandr Kryvulia <shuriku@shurik.kiev.ua>
To:        virtualization@freebsd.org
Subject:   Re: bhyve passthru problem
Message-ID:  <86822716-b32d-4663-9b73-87d7c977b70a@shurik.kiev.ua>
In-Reply-To: <CA%2B1FSiiw3Y3Po=MiCPYM3a4-738uOO3daX0XNybQ9gBhwTB0OQ@mail.gmail.com>
References:  <a63589a8-2cb2-4952-83b1-7a97e2f8cd44@shurik.kiev.ua> <38c9656c26fc3cee7ba733168c0fa2cdd01209d9.camel@FreeBSD.org> <c8c87fc3-2665-44c3-a8cf-6dcbd6525c38@freebsd.org> <92b37bf8-7ef9-4abd-8617-af12fbb35e13@shurik.kiev.ua> <CA%2B1FSiiw3Y3Po=MiCPYM3a4-738uOO3daX0XNybQ9gBhwTB0OQ@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
This is a multi-part message in MIME format.
--------------7snt0nwRoQ10iL18xHBQ35Vc
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit

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=sharing
>
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 AM 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/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.

--------------7snt0nwRoQ10iL18xHBQ35Vc
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 8bit

<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    15.06.24 13:47, Mario Marietto:<br>
    <blockquote type="cite"
cite="mid:CA+1FSiiw3Y3Po=MiCPYM3a4-738uOO3daX0XNybQ9gBhwTB0OQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">
        <div>Ciao Oleksandr.</div>
        <div><br>
        </div>
        <div>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. </div>
        <div><br>
        </div>
        <div>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 ?</div>
        <div><br>
        </div>
        <div>You can try these bhyve versions : (try both)<br>
        </div>
        <div><br>
        </div>
        <div><a
href="https://drive.google.com/drive/folders/14OMOjdyS5NPQ75ISatcpCWegU0udzG0r?usp=sharing"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://drive.google.com/drive/folders/14OMOjdyS5NPQ75ISatcpCWegU0udzG0r?usp=sharing</a></div>;
      </div>
      <br>
    </blockquote>
    <span class="HwtZe" lang="en"><span class="jCAhz JxVs2d ChMk0b"><span
          class="ryNqvb">Unfortunately</span></span></span> both of your
    vmm.ko modules fail to load on my system:<br>
    <br>
    KLD vmm.ko: depends on kernel - not available or version mismatch <br>
    <br>
    <blockquote type="cite"
cite="mid:CA+1FSiiw3Y3Po=MiCPYM3a4-738uOO3daX0XNybQ9gBhwTB0OQ@mail.gmail.com">
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Sat, Jun 15, 2024 at
          9:17 AM Oleksandr Kryvulia &lt;<a
            href="mailto:shuriku@shurik.kiev.ua" moz-do-not-send="true"
            class="moz-txt-link-freetext">shuriku@shurik.kiev.ua</a>&gt;
          wrote:<br>
        </div>
        <blockquote class="gmail_quote"
style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">14.06.24
          10:50, Peter Grehan:<br>
          &gt;&gt; I don't know why bhyve validates the BAR size. The
          commit adding this<br>
          &gt;&gt; check is old [1] and doesn't explain it. What bhyve
          could do is<br>
          &gt;&gt; rounding up the BAR size to a full page size when
          allocating memory for<br>
          &gt;&gt; the BAR.<br>
          &gt;&gt;<br>
          &gt;&gt; [1] <a href="https://github.com/freebsd/freebsd-"
            rel="noreferrer" target="_blank" moz-do-not-send="true"
            class="moz-txt-link-freetext">https://github.com/freebsd/freebsd-</a><br>;
          &gt;&gt; src/commit/7a902ec0eccc752c9c38533ed123121eaaea1225<br>
          &gt;<br>
          &gt;  At the time, BIOSs would often place device BARs of less
          than a page <br>
          &gt; size in the same physical page. Since EPT only gives page
          granularity, <br>
          &gt; this would result in all those devices being available to
          the guest <br>
          &gt; even if they hadn't been passed through.<br>
          &gt;<br>
          Peter, can you explain how can I use this device in a guest
          without <br>
          passing through?<br>
          <br>
          <br>
        </blockquote>
      </div>
      <br clear="all">
      <br>
      <span class="gmail_signature_prefix">-- </span><br>
      <div dir="ltr" class="gmail_signature">Mario.<br>
      </div>
    </blockquote>
    <br>
  </body>
</html>

--------------7snt0nwRoQ10iL18xHBQ35Vc--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86822716-b32d-4663-9b73-87d7c977b70a>