On Mon, Sep 13, 2021 at 3:41 PM Stefano Stabellini <[email protected]>
wrote:
> Hi all,
>
> This email is for anybody interested in using Argo with Dom0less setups
> for domain-to-domain communications.
>
> Argo is a secure VM-to-VM communication mechanism based on hypercalls
> [1]. It is a good fit for Dom0less setups because Argo is lightweight
> and doesn't make use of PV frontends, backends, and xenstore. Thus, it
> is easier to enable in simple Dom0less setups where VMs are booting in
> parallel, backends cannot be assumed to be already up and running, and
> the goal is just to get two VMs to talk to each others.
>
Excellent - I am very happy to see interest in Argo for this
>
> Argo makes use of event channels for notifications. Dom0less VMs don't
> have event channels support yet, although it is work-in-progress. The
> attached patch for Linux (not ready for upstreaming) enables the
> necessary event channels initialization.
>
> In addition, you also need to add the following to the DomU device tree
> (see xen/arch/arm/domain_build.c:prepare_dtb_domU):
>
> event-channel {
> compatible = "xen,xen-4.15", "xen,xen";
> interrupts = <0x01 0x0f 0xf08>;
> interrupt-parent = <0xfde8>;
> };
>
>
> The final pieces to enable Argo are:
> - CONFIG_ARGO in the Xen build
> - the Argo Linux kernel module
> https://github.com/OpenXT/linux-xen-argo
This is an important pointer. The argo-linux directory in the repo contains
the source for the current best Linux Argo driver, which has been in use
and actively maintained in OpenXT for an extended period. It is derived
from the original XenClient v4v driver -- Nicolas Tsirakis did great work
porting all the OpenXT v4v software over to this Argo driver and the
libargo userspace component when we migrated. Jason Andryuk has recently
just completed some strong modernization work that advances this Argo
driver's use of Linux synchronization primitives.
For the curious, an alternative Linux Argo driver written by Eric Chanudet
is in also the same repository in the vsock-argo directory: it explores a
different approach for Linux to use the Argo primitives under the Vsock
address family to allow socket communication between Xen domains. A third
code base that could be of interest for developing a new Linux driver for
Argo would be a port of the HP uxen hypervisor's v4v driver, which has a
good modular structure, to Argo on Xen. The code for the starting point
(for a fairly adventurous project) is here:
https://github.com/uxen-virt/uxen/tree/ascara/vm-support/linux
> - the Yocto recipe was based on
> https://github.com/dozylynx/meta-argo-linux
Ack - this Yocto layer shows recipes for the several components involved
with building an Argo-enabled system.
>
> - pass dom0less_domU to the domU kernel command line
>
> Then you are good to go for using Argo in your Dom0less VMs, e.g.:
>
> From receiver domain: streamTest -domid 5 -port 8022 -file test.txt
> -receive
> From sender domain: streamTest -domid 4 -port 8022 -file test.txt -send
> -connect
>
> Many thanks to Alec Kwapis from DornerWorks for all the information and
> the patch!
>
Thanks, Alec, for exploring Argo with dom0less and for developing the patch
-- excellent work! I am certain that it will be helpful.
Christopher
>
> Cheers,
>
> Stefano
>
>
> [1]
> https://wiki.xenproject.org/wiki/Argo:_Hypervisor-Mediated_Exchange_(HMX)_for_Xen