Hey David, On 11/28/20 2:20 PM, David Woodhouse wrote: > From: David Woodhouse <dwmw@xxxxxxxxxxxx> > > For supporting Xen guests we really want to be able to use vmcall/vmmcall > for hypercalls as Xen itself does. Reinstate the KVM_EXIT_HYPERCALL > support that Anthony ripped out in 2007. > > Yes, we *could* make it work with KVM_EXIT_IO if we really had to, but > that makes it guest-visible and makes it distinctly non-trivial to do > live migration from Xen because we'd have to update the hypercall page(s) > (which are at unknown locations) as well as dealing with any guest RIP > which happens to be *in* a hypercall page at the time. > I don't know how far you've gone on your implementation but in the past I had send a series for Xen guests support (and backends/uabi too), hopefully you find that useful and maybe part of that could be repurposed? https://lore.kernel.org/kvm/20190220201609.28290-1-joao.m.martins@xxxxxxxxxx/ (The link above has links towards userland parts albeit you probably don't care about Qemu) While it looks big at the first sight ... in reality out of the 39 patches, only the first 16 patches implement the guest parts [*] while reusing the XEN_HVM_CONFIG for the xen hypercall page MSR. Assuming the userspace VMM does most device emulation including xenbus handling. Also assumes one uses the xen shim for PV guests support. Joao [*] Largely for guest performance as event channel IPIs in userspace with split irqchip weren't the fastest IIRC ... would have to dig the numbers;