From: "Alex Bennée" <alex.bennee@linaro.org>
To: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: "Mathieu Poirier" <mathieu.poirier@linaro.org>,
"Viresh Kumar" <viresh.kumar@linaro.org>, "Wei Liu" <wl@xen.org>,
"rust-vmm@lists.opendev.org" <rust-vmm@lists.opendev.org>,
xen-devel@lists.xenproject.org,
"Stratos Mailing List" <stratos-dev@op-lists.linaro.org>,
"Oleksandr Tyshchenko" <olekstysh@gmail.com>,
"Stefano Stabellini" <stefano.stabellini@xilinx.com>,
"Doug Goldstein" <cardoe@cardoe.com>,
"Demi Marie Obenour" <demi@invisiblethingslab.com>,
"Marek Marczykowski-Górecki" <marmarek@invisiblethingslab.com>
Subject: Re: Is it time to start implementing Xen bindings for rust-vmm?
Date: Tue, 14 Sep 2021 15:44:01 +0100 [thread overview]
Message-ID: <874kanus97.fsf@linaro.org> (raw)
In-Reply-To: <abfa4f44-8c56-af3f-485e-41b58e790d92@citrix.com>
Andrew Cooper <andrew.cooper3@citrix.com> writes:
> On 13/09/2021 13:44, Alex Bennée wrote:
>> Hi,
>>
>> As we consider the next cycle for Project Stratos I would like to make
>> some more progress on hypervisor agnosticism for our virtio backends.
>> While we have implemented a number of virtio vhost-user backends using C
>> we've rapidly switched to using rust-vmm based ones for virtio-i2c,
>> virtio-rng and virtio-gpio. Given the interest in Rust for implementing
>> backends does it make sense to do some enabling work in rust-vmm to
>> support Xen?
>>
>> There are two chunks of work I can think of:
>>
>> 1. Enough of libxl/hypervisor interface to implement an IOREQ end point.
>
> No libxl here at all.
>
> As of Xen 4.15, there are enough stable interfaces to implement simple
> IOERQ servers.
>
> https://github.com/xapi-project/varstored/commit/fde707c59f7a189e1d4e97c1a4ee1a2d0c378ad1
> was the commit where I removed the final unstable interface from
> varstored (terrible name) which is a dom0 backend for UEFI secure
> variable handling. As such, it also serves as a (not totally simple)
> reference of an IOERQ server.
>
>
> There are a few bits and pieces of rust going on within Xen, and a whole
> load of plans. Also, there is a lot of interest from other downstreams
> in being able to write Rust backends.
>
> We've got a placeholder xen and xen-sys crates, and placeholder work for
> supporting cross-compile as x86 PV and PVH stubdomains.
Are these in the rust-vmm project is elsewhere?
> The want to have a simple IOREQ server compiled either as a dom0
> backend, or as a PV or PVH stubdomains influences some of the design
> decisions early on, but they're all no-brainers for the longevity of the
> work.
Just to clarify nomenclature is a PVH stubdomain what I'm referring to
as a bare metal backend, i.e: a unikernel or RTOS image that implements
the backend without having to transition between some sort of userspace
and it's supporting kernel?
> I started work on trying to reimplement varstored entirely in Rust as a
> hackathon project, although ran out of time trying to make hypercall
> buffers work (there is a bug with Box and non-global allocators causing
> rustc to hit an assert(). In the short term, we'll have to implement
> hypercall buffers in a slightly more irritating way).
>
> Furthermore, stick to the stable hypercalls only. Xen's C libraries are
> disaster for cross-version compatibility, and you absolutely do not want
> to recompile your rust program just to run it against a different
> version of the hypervisor. The plan is to start with simple IOREQ
> servers, which are on fully stable interfaces, then stabilise further
> hypercalls as necessary to expand functionality.
Are the hypercalls mediated by a kernel layer or are you making direct
HVC calls (on ARM) to the hypervisor from userspace?
Where would I look in the Xen code to find the hypercalls that are
considered stable and won't change between versions?
> It's high time the Xen Rust working group (which has been talked about
> for several years now) actually forms...
Indeed part of the purpose of this email was to smoke out those who are
interested in the intersection of Xen, Rust and VirtIO ;-)
--
Alex Bennée
next prev parent reply other threads:[~2021-09-14 14:49 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-13 12:44 Is it time to start implementing Xen bindings for rust-vmm? Alex Bennée
2021-09-13 15:32 ` Andrew Cooper
2021-09-14 14:44 ` Alex Bennée [this message]
2021-09-14 18:42 ` Andrew Cooper
2021-09-14 21:17 ` Stefano Stabellini
2021-09-22 12:03 ` David Woodhouse
2021-09-22 17:44 ` Alex Bennée
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=874kanus97.fsf@linaro.org \
--to=alex.bennee@linaro.org \
--cc=andrew.cooper3@citrix.com \
--cc=cardoe@cardoe.com \
--cc=demi@invisiblethingslab.com \
--cc=marmarek@invisiblethingslab.com \
--cc=mathieu.poirier@linaro.org \
--cc=olekstysh@gmail.com \
--cc=rust-vmm@lists.opendev.org \
--cc=stefano.stabellini@xilinx.com \
--cc=stratos-dev@op-lists.linaro.org \
--cc=viresh.kumar@linaro.org \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.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.