All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Wei Liu <wl@xen.org>
Cc: Andrew Cooper <Andrew.Cooper3@citrix.com>,
	Viresh Kumar <viresh.kumar@linaro.org>,
	"stratos-dev@op-lists.linaro.org"
	<stratos-dev@op-lists.linaro.org>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	Stefano Stabellini <stefano.stabellini@xilinx.com>,
	Mathieu Poirier <mathieu.poirier@linaro.com>,
	Vincent Guittot <vincent.guittot@linaro.org>,
	Mike Holmes <mike.holmes@linaro.org>,
	Oleksandr Tyshchenko <olekstysh@gmail.com>,
	Doug Goldstein <cardoe@cardoe.com>
Subject: Re: Virtio on Xen with Rust
Date: Thu, 14 Apr 2022 14:36:12 +0100	[thread overview]
Message-ID: <871qxzyecf.fsf@linaro.org> (raw)
In-Reply-To: <20220414125213.6qqn5wcphau5j3i3@liuwe-devbox-debian-v2>


Wei Liu <wl@xen.org> writes:

> On Thu, Apr 14, 2022 at 12:07:10PM +0000, Andrew Cooper wrote:
>> On 14/04/2022 12:45, Wei Liu wrote:
>> > Hi Viresh
>> >
>> > This is very cool.
>> >
>> > On Thu, Apr 14, 2022 at 02:53:58PM +0530, Viresh Kumar wrote:
>> >> +xen-devel
>> >>
>> >> On 14-04-22, 14:45, Viresh Kumar wrote:
>> >>> Hello,
>> >>>
>> >>> We verified our hypervisor-agnostic Rust based vhost-user backends with Qemu
>> >>> based setup earlier, and there was growing concern if they were truly
>> >>> hypervisor-agnostic.
>> >>>
>> >>> In order to prove that, we decided to give it a try with Xen, a type-1
>> >>> bare-metal hypervisor.
>> >>>
>> >>> We are happy to announce that we were able to make progress on that front and
>> >>> have a working setup where we can test our existing Rust based backends, like
>> >>> I2C, GPIO, RNG (though only I2C is tested as of now) over Xen.
>> >>>
>> >>> Key components:
>> >>> --------------
>> >>>
>> >>> - Xen: https://github.com/vireshk/xen
>> >>>
>> >>>   Xen requires MMIO and device specific support in order to populate the
>> >>>   required devices at the guest. This tree contains four patches on the top of
>> >>>   mainline Xen, two from Oleksandr (mmio/disk) and two from me (I2C).
>> >>>
>> >>> - libxen-sys: https://github.com/vireshk/libxen-sys
>> >>>
>> >>>   We currently depend on the userspace tools/libraries provided by Xen, like
>> >>>   xendevicemodel, xenevtchn, xenforeignmemory, etc. This crates provides Rust
>> >>>   wrappers over those calls, generated automatically with help of bindgen
>> >>>   utility in Rust, that allow us to use the installed Xen libraries. Though we
>> >>>   plan to replace this with Rust based "oxerun" (find below) in longer run.
>> >>>
>> >>> - oxerun (WIP): https://gitlab.com/mathieupoirier/oxerun/-/tree/xen-ioctls
>> >>>
>> >>>   This is Rust based implementations for Ioctl and hypercalls to Xen. This is WIP
>> >>>   and should eventually replace "libxen-sys" crate entirely (which are C based
>> >>>   implementation of the same).
>> >>>
>> > I'm curious to learn why there is a need to replace libxen-sys with the
>> > pure Rust implementation. Those libraries (xendevicemodel, xenevtchn,
>> > xenforeignmemory) are very stable and battle tested. Their interfaces
>> > are stable.
>> 
>> Very easy.  The library APIs are mess even if they are technically
>> stable, and violate various commonly-agreed rules of being a libary such
>> as not messing with stdout/stderr behind the applications back, and
>> everything gets more simple when you remove an unnecessary level of C
>> indirection.
>
> You don't have to use the stdio logger FWIW. I don't disagree things can
> be simpler though.

Not directly related to this use case but the Rust API can also be
built to make direct HYP calls which will be useful for building Rust
based unikernels that need to interact with Xen. For example for a
dom0less system running a very minimal heartbeat/healthcheck monitor
written in pure rust.

We would also like to explore unikernel virtio backends but I suspect
currently the rest of the rust-vmm virtio bits assume a degree of POSIX
like userspace to set things up.

-- 
Alex Bennée


  reply	other threads:[~2022-04-14 13:38 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220414091538.jijj4lbrkjiby6el@vireshk-i7>
2022-04-14  9:23 ` Virtio on Xen with Rust Viresh Kumar
2022-04-14 11:45   ` Wei Liu
2022-04-14 12:07     ` Andrew Cooper
2022-04-14 12:52       ` Wei Liu
2022-04-14 13:36         ` Alex Bennée [this message]
2022-04-14 14:10           ` Wei Liu
2022-04-14 15:59             ` Doug Goldstein
2022-04-19  1:10   ` Viresh Kumar
2022-04-28 13:52 ` Oleksandr Tyshchenko
2022-04-29  3:48   ` Viresh Kumar
2022-04-29  3:59     ` Viresh Kumar
2022-04-29 11:14       ` Oleksandr
2022-04-29 10:44     ` Oleksandr
2022-05-05  7:34       ` Viresh Kumar
2022-06-22 11:49   ` Viresh Kumar
2022-06-22 15:05     ` Oleksandr Tyshchenko
2022-06-23  5:48       ` Viresh Kumar
2022-06-23 12:47         ` Oleksandr Tyshchenko
2022-06-24  5:32           ` Viresh Kumar
2022-05-02 11:23 ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=871qxzyecf.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --cc=Andrew.Cooper3@citrix.com \
    --cc=cardoe@cardoe.com \
    --cc=mathieu.poirier@linaro.com \
    --cc=mike.holmes@linaro.org \
    --cc=olekstysh@gmail.com \
    --cc=stefano.stabellini@xilinx.com \
    --cc=stratos-dev@op-lists.linaro.org \
    --cc=vincent.guittot@linaro.org \
    --cc=viresh.kumar@linaro.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.