On Mon, 2020-11-30 at 19:36 +0100, Paolo Bonzini wrote: > On 28/11/20 15:20, 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. > > > > We also actively want to *prevent* the KVM hypercalls from suddenly > > becoming available to guests which think they are Xen guests, which > > this achieves too. > > > > Signed-off-by: David Woodhouse <dwmw@xxxxxxxxxxxx> > > --- > > Should this test work OK on AMD? I see a separate test which is > > explicitly testing VMCALL on AMD, which makes me suspect it's expected > > to work as well as VMMCALL? > > Yes, it should (via the #UD intercept instead of the VMMCALL exit). > > > Do we have the test infrastructure for running 32-bit guests easily? > > Nope, unfortunately not, and I'm not going to ask you to port the > selftests infrastructure to 32-bit x86 (though it should not be too hard). OK, thanks. I'll do a v2 with the 32-bit registers fixed as noted. I'll also tweak it a little to make it explicitly Xen-specific, to pave the way for putting Joao's evtchn short-circuit patches on top of it.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature