All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Alex Bennée" <alex.bennee@linaro.org>
To: Mathieu Poirier <mathieu.poirier@linaro.org>,
	Viresh Kumar <viresh.kumar@linaro.org>, Wei Liu <wl@xen.org>
Cc: "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>
Subject: Is it time to start implementing Xen bindings for rust-vmm?
Date: Mon, 13 Sep 2021 13:44:55 +0100	[thread overview]
Message-ID: <87lf40vay1.fsf@linaro.org> (raw)

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.

  This would require supporting enough of the hypervisor interface to
  support the implementation of an IOREQ server. We would also need to
  think about how we would map the IOREQ view of the world into the
  existing vhost-user interface so we can re-use the current vhost-user
  backends code base. The two approaches I can think of are:

    a) implement a vhost-user master that speaks IOREQ to the hypervisor
    and vhost-user to the vhost-user slave. In this case the bridge
    would be standing in for something like QEMU.

    b) implement some variants of the vhost-user slave traits that can
    talk directly to the hypervisor to get/send the equivalent
    kick/notify events. I don't know if this might be too complex as the
    impedance matching between the two interfaces might be too great.

  This assumes most of the setup is done by the existing toolstack, so
  the existing libxl tools are used to create, connect and configure the
  domains before the backend is launched.

which leads to:

  2. The rest of the libxl/hypervisor interface.

  This would be the rest of the interface to allow rust-vmm tools to be
  written that could create, configure and manage Xen domains with pure
  rust tools. My main concern about this is how rust-vmm's current model
  (which is very much KVM influenced) will be able to handle the
  differences for a type-1 hypervisor. Wei's pointed me to the Linux
  support that was added to expose a Hyper-V control interface via the
  Linux kernel. While I can see support has been merged on other rust
  based projects I think the rust-vmm crate is still outstanding:

    https://github.com/rust-vmm/community/issues/50

  and I guess this would need revisiting for Xen to see if the proposed
  abstraction would scale across other hypervisors.

Finally there is the question of how/if any of this would relate to the
concept of bare-metal rust backends? We've talked about bare metal
backends before but I wonder if the programming model for them is going
to be outside the scope of rust-vmm? Would be program just be hardwired
to IRQs and be presented a doorbell port to kick or would we want to
have at least some of the higher level rust-vmm abstractions for dealing
with navigating the virtqueues and responding and filling in data?

Thoughts?

-- 
Alex Bennée


             reply	other threads:[~2021-09-13 13:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-13 12:44 Alex Bennée [this message]
2021-09-13 15:32 ` Is it time to start implementing Xen bindings for rust-vmm? Andrew Cooper
2021-09-14 14:44   ` Alex Bennée
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=87lf40vay1.fsf@linaro.org \
    --to=alex.bennee@linaro.org \
    --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.