[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Virtio on Xen with Rust
- To: Wei Liu <wl@xxxxxxx>, Viresh Kumar <viresh.kumar@xxxxxxxxxx>
- From: Andrew Cooper <Andrew.Cooper3@xxxxxxxxxx>
- Date: Thu, 14 Apr 2022 12:07:10 +0000
- Accept-language: en-GB, en-US
- Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=citrix.com; dmarc=pass action=none header.from=citrix.com; dkim=pass header.d=citrix.com; arc=none
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KmiJwyoJOj/Acz81QFt4uoGVDQVACfz8D5fVFYKwPfg=; b=QDTCmUGXhw6ihZzoj57nP48BQFVs1RueTnzr9PRJ7dZmrqiubhzbI8zpY0p32D7Vhi94ghhQhxruB9fsWcN1DqPm+x8t+rIkrrVK1973sjxO9JgLMqbqvzzDBuqtHvaYRQvujjmOfJbyEpQdnJzbBx11f5ogdmOT2BiY0qKGhiOmOa0FQcTiJfiQL7TSoj6veb+2fqHMpf+OhjPhlaOA3lCA9nyJ+IJAmZNQKVGFFxfSI+AZ+A37S+A/e53C4gbknIZTKNMO3L5NAS2klTVARBN6Sc0yEpWrFR2cjJqzjE8UOpM78gC+6TZoktYyfEygXIWNLhKbqzoxe7c0YOXijg==
- Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vynw71iQchQxbG4KSRbi97GCUzSmI8joHsJ8n3N/bleS47BBIVZRFVR/CdnrkLNCkDqML3yaB49ulvv+NQ41EH2CnP2WrVNIBw0jnG5FL1Wqbjrkiv6zkzQ6isXjpqV1OPCHD5FvLnoy2PpiLApWgB/JoTsW7BWrfX2CzH73hXdr8pPxQwstBDLKg64HqM2YSZTMgHOs89Cu3Lx8jbCgDXq7G5nY7OS5zzKvEgGgnOnzBA4OrX9KPoXnIZlKblR/Tdk5nYPozx8BoFRg3O8KtPkvFDVA/CRjsWS0fX7apw6JYycpNWhIw1tGanzZE134+8+K8X2QrywoA9S2I1g8Uw==
- Authentication-results: esa5.hc3370-68.iphmx.com; dkim=pass (signature verified) header.i=@citrix.onmicrosoft.com
- Cc: "stratos-dev@xxxxxxxxxxxxxxxxxxx" <stratos-dev@xxxxxxxxxxxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxx>, Alex Bennée <alex.bennee@xxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxx>, Mathieu Poirier <mathieu.poirier@xxxxxxxxxx>, Vincent Guittot <vincent.guittot@xxxxxxxxxx>, Mike Holmes <mike.holmes@xxxxxxxxxx>, Oleksandr Tyshchenko <olekstysh@xxxxxxxxx>, Doug Goldstein <cardoe@xxxxxxxxxx>
- Delivery-date: Thu, 14 Apr 2022 12:07:28 +0000
- Ironport-data: A9a23:bqZgsqwxisRDw3S6s+Z6t+dUwSrEfRIJ4+MujC+fZmUNrF6WrkUCz zZJDW7QOPzYYGHxL4gjYIi2/BhQuJfSydc3TFM5+SAxQypGp/SeCIXCJC8cHc8zwu4v7q5Dx 59DAjUVBJlsFhcwnj/0bv656yMUOZigHtIQMsadUsxKbVIiGX9JZS5LwbZj2NY02IThWmthh PupyyHhEA79s9JLGjp8B5Kr8HuDa9yr5Vv0FnRnDRx6lAe2e0s9VfrzFonoR5fMeaFGH/bSe gr25OrRElU1XfsaIojNfr7TKiXmS1NJVOSEoiI+t6OK2nCuqsGuu0qS2TV1hUp/0l20c95NJ NpllqHvdxkAD6L3pvkUDQRCGHo5Oaka9+qSSZS/mZT7I0zudnLtx7NlDV0sPJ1e8eFyaY1M3 aVGcnZXNEnF3r/ohuLgIgVvrp1LwM3DFYUToHx/ixreCu4rW8vrSKTW/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exPhHPxOj7X5VI3KNGOKhILCFuBfxLqn7zr8GzDvss5xvJ 0QFpSW0eeAbmSSW/yKgjWFLw==
- List-id: Xen developer discussion <xen-devel.lists.xenproject.org>
- Thread-index: AQHYT+F3VJeAyJ3qtUWdcwuAq4aFpazvSqWAgAAF7gA=
- Thread-topic: Virtio on Xen with Rust
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.
~Andrew
|