Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 31 May 2024 14:34:15 +0200
From:      Mario Marietto <marietto2008@gmail.com>
To:        Emil Tsalapatis <emil@etsalapatis.com>
Cc:        Tomek CEDRO <tomek@cedro.info>,  Virtualisation on FreeBSD <freebsd-virtualization@freebsd.org>
Subject:   Re: [RFC] virtio testing framework
Message-ID:  <CA%2B1FSijZC=_b4mOocias-%2B9M9oS-F4-jwh9jKaozmFHTMkbpyw@mail.gmail.com>
In-Reply-To: <CABFh=a7okvB1J8atzP1hKjVqQim%2BNmk2hk0C58ECZoS9R19V-w@mail.gmail.com>
References:  <CABFh=a7-v_c_x6pGW86z1AX95FmcCWEuWciNxPmAOWs31V=s5Q@mail.gmail.com> <CAFYkXj=xnnYMk9PUe3j6BA1Z6mt_-Q=1XgpzfZ0bBpnagVXpoA@mail.gmail.com> <CA%2B1FSiiJkQtdqtK0%2BuvGqzmZYC_b_9U6eA6TRpZ6S47Jpwtaqw@mail.gmail.com> <CABFh=a7okvB1J8atzP1hKjVqQim%2BNmk2hk0C58ECZoS9R19V-w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000bfcc080619bf3571
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

I mean,what's the purpose of using "NuttX RTOS on RV in a web browser using
TinyEMU + VirtIO" ?

On Fri, May 31, 2024 at 6:07=E2=80=AFAM Emil Tsalapatis <emil@etsalapatis.c=
om>
wrote:

> Not sure about the followup, but the patch I describe in the original pos=
t
> allows us to write and run tests for virtio drivers inside a VM. I
> originally wrote this because we have tests for the virtiofs paravirt
> device where we need to run both the paravirt driver and the device
> emulation in the same machine. The virtio stack is not designed for this =
-
> it expects the virtio driver to be running in the guest, and device
> emulation to be running in the host. This patchset introduces a way to
> emulate a virtio device in the guest for the purpose of running these
> virtiofs tests. The links in the original email describe the design in mo=
re
> detail, but just to reiterate, the code in this patch makes no functional
> changes to existing code.
>
> --Emil
>
> On Thu, May 30, 2024 at 6:19=E2=80=AFPM Mario Marietto <marietto2008@gmai=
l.com>
> wrote:
>
>> Can someone explain to me what the purpose of what you are talking about
>> ?
>>
>>
>> On Thu, May 30, 2024 at 10:38=E2=80=AFPM Tomek CEDRO <tomek@cedro.info> =
wrote:
>>
>>> Awesome!! Congrats :-)
>>>
>>> Here is some example of running NuttX RTOS on RV in a web browser using
>>> TinyEMU + VirtIO :-)
>>>
>>> https://github.com/lupyuen/nuttx-tinyemu
>>>
>>> --
>>> CeDeROM, SQ7MHZ, http://www.tomek.cedro.info
>>>
>>> On Thu, May 30, 2024, 22:16 Emil Tsalapatis <emil@etsalapatis.com>
>>> wrote:
>>>
>>>> Hi everyone,
>>>>
>>>>     while developing a virtiofs kernel driver I have written a debug
>>>> virtio transport to test virtio drivers inside a VM without requiring
>>>> nested virtualization or support from the host. The transport allows
>>>> paravirt devices to be emulated in local userspace instead of a host, =
so we
>>>> can create paravirt devices and test them as necessary. For virtiofs i=
n
>>>> particular, it allows us to reuse the existing FUSE tests since we can=
 now
>>>> run both the virtiofs driver and the FUSE server (which is normally in=
 the
>>>> host) in a single machine.
>>>>
>>>> I have uploaded the WIP code [here <https://reviews.freebsd.org/D45370=
>],
>>>> and an overview of the design [here
>>>> <https://gist.github.com/etsal/4280b6f16c1815d64ffda7ecce0b66f5>]. The
>>>> patch has a ways to go, and currently only supports virtio-blk device
>>>> emulation as a PoC, but feedback is welcome and appreciated. Please al=
so
>>>> let me know if there is interest in using this for testing other virti=
o
>>>> devices apart from virtiofs.
>>>>
>>>> --Emil
>>>>
>>>
>>
>> --
>> Mario.
>>
>

--=20
Mario.

--000000000000bfcc080619bf3571
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">I mean,what&#39;s the purpose of using &quot;NuttX RTOS on=
 RV in a web browser using TinyEMU + VirtIO&quot; ? <br></div><br><div clas=
s=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, May 31, 202=
4 at 6:07=E2=80=AFAM Emil Tsalapatis &lt;<a href=3D"mailto:emil@etsalapatis=
.com">emil@etsalapatis.com</a>&gt; wrote:<br></div><blockquote class=3D"gma=
il_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,2=
04,204);padding-left:1ex"><div dir=3D"ltr"><div>Not sure about the followup=
, but the patch I describe in the original post allows us to write and run =
tests for virtio drivers inside a VM. I originally wrote this because we ha=
ve tests for the virtiofs paravirt device where we need to run both the par=
avirt driver and the device emulation in the same machine. The virtio stack=
 is not designed for this - it expects the virtio driver to be running in t=
he guest, and device emulation to be running in the host. This patchset int=
roduces a way to emulate a virtio device in the guest for the purpose of ru=
nning these virtiofs tests. The links in the original email describe the de=
sign in more detail, but just to reiterate, the code in this patch makes no=
 functional changes to existing code.<br></div><div><br></div><div>--Emil<b=
r></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmai=
l_attr">On Thu, May 30, 2024 at 6:19=E2=80=AFPM Mario Marietto &lt;<a href=
=3D"mailto:marietto2008@gmail.com" target=3D"_blank">marietto2008@gmail.com=
</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:=
0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">=
<div dir=3D"ltr">Can someone explain to me <span lang=3D"en"><span><span>wh=
at the purpose of what you are talking about ?</span></span></span><span></=
span><div><br></div></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" c=
lass=3D"gmail_attr">On Thu, May 30, 2024 at 10:38=E2=80=AFPM Tomek CEDRO &l=
t;<a href=3D"mailto:tomek@cedro.info" target=3D"_blank">tomek@cedro.info</a=
>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px=
 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><di=
v dir=3D"auto"><div>Awesome!! Congrats :-)</div><div dir=3D"auto"><br></div=
><div dir=3D"auto">Here is some example of running NuttX RTOS on RV in a we=
b browser using TinyEMU + VirtIO :-)</div><div dir=3D"auto"><br></div><div>=
<a href=3D"https://github.com/lupyuen/nuttx-tinyemu" target=3D"_blank">http=
s://github.com/lupyuen/nuttx-tinyemu</a><br></div><div dir=3D"auto"><br></d=
iv><div>--<br>CeDeROM, SQ7MHZ, <a href=3D"http://www.tomek.cedro.info" targ=
et=3D"_blank">http://www.tomek.cedro.info</a></div></div><br><div class=3D"=
gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Thu, May 30, 2024, 22=
:16 Emil Tsalapatis &lt;<a href=3D"mailto:emil@etsalapatis.com" target=3D"_=
blank">emil@etsalapatis.com</a>&gt; wrote:<br></div><blockquote class=3D"gm=
ail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,=
204,204);padding-left:1ex"><div dir=3D"ltr">Hi everyone,<br><br>=C2=A0 =C2=
=A0 while developing a virtiofs kernel driver I have written a debug virtio=
 transport to test virtio drivers inside a VM without requiring nested virt=
ualization or support from=20
the host. The transport allows paravirt devices to be emulated in local=20
userspace instead of a host, so we can create paravirt devices and test=20
them as necessary. For virtiofs in particular, it allows us to reuse the
 existing FUSE tests since we can now run both the virtiofs driver and=20
the FUSE server (which is normally in the host) in a single machine.<br><di=
v><br></div><div>I have uploaded the WIP code [<a href=3D"https://reviews.f=
reebsd.org/D45370" rel=3D"noreferrer" target=3D"_blank">here</a>], and an o=
verview of the design [<a href=3D"https://gist.github.com/etsal/4280b6f16c1=
815d64ffda7ecce0b66f5" rel=3D"noreferrer" target=3D"_blank">here</a>].
 The patch has a ways to go, and currently only supports virtio-blk=20
device emulation as a PoC, but feedback is welcome and appreciated.=20
Please also let me know if there is interest in using this for testing=20
other virtio devices apart from virtiofs.</div><font color=3D"#888888"><br>=
--Emil</font></div>
</blockquote></div>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d=
iv>
</blockquote></div>
</blockquote></div><br clear=3D"all"><br><span class=3D"gmail_signature_pre=
fix">-- </span><br><div dir=3D"ltr" class=3D"gmail_signature">Mario.<br></d=
iv>

--000000000000bfcc080619bf3571--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2B1FSijZC=_b4mOocias-%2B9M9oS-F4-jwh9jKaozmFHTMkbpyw>