In theory userspace doesn't know how KVM wishes to implement the
hypercall page, especially if Xen hypercalls are enabled as well.
I'm not sure I agree with that sentiment :). User space is the one that sets the xen compat mode. All we need to do is declare the ORing as part of the KVM ABI. Which we effectively are doing already, because it's part of the ABI to the guest, no?
But userspace has two plausible ways to get the page contents:
1) add a ioctl to write the hypercall page contents to an arbitrary
userspace address
2) after userspace updates the memslots to add the overlay page at the
right place, use KVM_SET_MSR from userspace (which won't be filtered
because it's host initiated)
The second has the advantage of not needing any new code at all, but
it's a bit more ugly.
The more of all of that hyper-v code we can have live in user space, the happier I am :).