From nobody Fri May 31 12:34:15 2024 X-Original-To: freebsd-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 4VrMyP5Y7Fz5Mq5X for ; Fri, 31 May 2024 12:34:53 +0000 (UTC) (envelope-from marietto2008@gmail.com) Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) (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 4VrMyN6z2Pz4mkD for ; Fri, 31 May 2024 12:34:52 +0000 (UTC) (envelope-from marietto2008@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-6bd8b845116so1548194a12.0 for ; Fri, 31 May 2024 05:34:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1717158892; x=1717763692; 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=uF57tQf/apFC0LRo4Wo99ImcNoRwfYnLnR4kWxVEjiE=; b=aWJOrqFiRRnsjES7H4mXkxKG9H5K5KWIggYbHbDFkSBElImnuCKSm6xrc2gb3LXHZM K/WdG44b6ZY1Po5Wuf5+kTUCIr8W76Tp6Okh5m83g0XdXQ/mvqaBDs5vR6g7kfgmEQKP zTdtj3NiFjuL4sPNWgqJ8wTvcjS/dTeFn21R7wfDTpsNtH44fk5oVgPY5nLXvLq6KbcL JsGiZ0/CmtLldWoQW4Mv5NtdFEh7nfQTMo2wgioUO0IMSJLYjDuh4vnJqTOvPgGNHPSo BIG760LyBZ9tWlQWAWh9VlzqDOXN59KR0xYxIBAyd6NFcpo7Tmg0xZeLpuInGbKvr263 diog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717158892; x=1717763692; 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=uF57tQf/apFC0LRo4Wo99ImcNoRwfYnLnR4kWxVEjiE=; b=SL87KPiybyN7Zo9LhHYKm8fLbJO76++lzWS9W9Fzo4u3Ra8aIZlmE/8FqwCPHY6Mid 8WqJn27QPhqcNMyZpcD4IBmNev06Q48zr+CK5UOn+NxwJCSy6VHjUB4mwfRoN7hPw8Xw e8e0j0gHrX1CQ5X85tqRsYZkYaZe77DMmetHGE5jyqRFC2aBGju9moT3jqPc4n9KtjAP LMg6AyMVJ0+42bVQRImjo36P7tCrH9OxKHRoflRB/49fUb5ppqa9PlDXonrUnQeBBbGV jckYMvyvUHNi0YrMLwpCLz5QdrZ+xJvQWK4iJGTLn+WYTKu4enTBEKZpB6epoJa34QaG nzBg== X-Forwarded-Encrypted: i=1; AJvYcCUvuUshbgm4ChRrQ0Mpp7WdWMgbE8TrL30qyE367ikr0oRrIlJXqyyWjRpODa66Ln4FeewlMoUwMwhjePzUJtfbPE+5DeqLATR5ZAiQwWN8Wsk7 X-Gm-Message-State: AOJu0YzG8ePAJ6yjsruLbQWitpab99v322zAG3Pti384YddlRqgWiPGF NUAdmyg/juwdb0UBkLj3ssGr/Yqll0H07KKcT2iMvlvf5fmCKS1zrDxpNglG/qsEnioKg+7OMSb BJBczO4b7OQGjIoHxcOS1EkgFsc8DcVyx X-Google-Smtp-Source: AGHT+IGTgEAQtkXVkYEvEZR/JYTLAaEeGALQBncaQ4YVuMb9OcA+Oszp/jMCrLwbFU1IJU4sLK116Gs4DSYhUPGdcKw= X-Received: by 2002:a17:90a:f083:b0:2b1:b6f:e297 with SMTP id 98e67ed59e1d1-2c1dc5c8effmr1704858a91.36.1717158891471; Fri, 31 May 2024 05:34: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: In-Reply-To: From: Mario Marietto Date: Fri, 31 May 2024 14:34:15 +0200 Message-ID: Subject: Re: [RFC] virtio testing framework To: Emil Tsalapatis Cc: Tomek CEDRO , Virtualisation on FreeBSD Content-Type: multipart/alternative; boundary="000000000000bfcc080619bf3571" 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: 4VrMyN6z2Pz4mkD --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 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 > 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 = 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 >>> 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 ], >>>> and an overview of the design [here >>>> ]. 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
I mean,what's the purpose of using "NuttX RTOS on= RV in a web browser using TinyEMU + VirtIO" ?

On Fri, May 31, 202= 4 at 6:07=E2=80=AFAM Emil Tsalapatis <emil@etsalapatis.com> wrote:
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.

--Emil

On Thu, May 30, 2024 at 6:19=E2=80=AFPM Mario Marietto <marietto2008@gmail.com= > wrote:
=
Can someone explain to me wh= at the purpose of what you are talking about ?


On Thu, May 30, 2024 at 10:38=E2=80=AFPM Tomek CEDRO &l= t;tomek@cedro.info> wrote:
Awesome!! Congrats :-)

Here is some example of running NuttX RTOS on RV in a we= b browser using TinyEMU + VirtIO :-)


--
CeDeROM, SQ7MHZ, http://www.tomek.cedro.info

On Thu, May 30, 2024, 22= :16 Emil Tsalapatis <emil@etsalapatis.com> wrote:
Hi everyone,

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

I have uploaded the WIP code [here], and an o= verview of the design [here]. 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.

= --Emil


--
Mario.


--
Mario.
--000000000000bfcc080619bf3571--