lkml.org 
[lkml]   [2021]   [Apr]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] KVM: hyper-v: Add new exit reason HYPERV_OVERLAY
From
Date
On 23/04/21 11:24, Alexander Graf wrote:
> I can see how that may get interesting for other overlay pages later,
> but this one in particular is just an MSR write, no? Is there any reason
> we can't just use the user space MSR handling logic instead?
>
> What's missing then is a way to pull the hcall page contents from KVM.
> But even there I'm not convinced that KVM should be the reference point
> for its contents. Isn't user space in an as good position to assemble it?

In theory userspace doesn't know how KVM wishes to implement the
hypercall page, especially if Xen hypercalls are enabled as well.

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.

Paolo

\
 
 \ /
  Last update: 2021-04-23 11:51    [W:0.070 / U:2.620 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site