From: Paolo Bonzini <pbonzini@redhat.com>
To: Alexander Graf <graf@amazon.com>,
Siddharth Chandrasekaran <sidcha@amazon.de>,
Sean Christopherson <seanjc@google.com>,
Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
Thomas Gleixner <tglx@linutronix.de>,
Ingo Molnar <mingo@redhat.com>, Borislav Petkov <bp@alien8.de>,
x86@kernel.org, "H. Peter Anvin" <hpa@zytor.com>
Cc: Evgeny Iakovlev <eyakovl@amazon.de>,
Liran Alon <liran@amazon.com>,
Ioannis Aslanidis <iaslan@amazon.de>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: hyper-v: Add new exit reason HYPERV_OVERLAY
Date: Fri, 23 Apr 2021 11:50:06 +0200 [thread overview]
Message-ID: <213887af-78b8-03ad-b3f9-c2194cb27b13@redhat.com> (raw)
In-Reply-To: <224d266e-aea3-3b4b-ec25-7bb120c4d98a@amazon.com>
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
next prev parent reply other threads:[~2021-04-23 9:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-23 9:03 [PATCH] KVM: hyper-v: Add new exit reason HYPERV_OVERLAY Siddharth Chandrasekaran
2021-04-23 9:24 ` Alexander Graf
2021-04-23 9:42 ` Siddharth Chandrasekaran
2021-04-23 9:50 ` Paolo Bonzini [this message]
2021-04-23 9:58 ` Alexander Graf
2021-04-23 10:15 ` Paolo Bonzini
2021-04-23 10:18 ` Alexander Graf
2021-04-26 21:41 ` Siddharth Chandrasekaran
2021-04-23 9:36 ` Vitaly Kuznetsov
2021-04-23 10:05 ` Siddharth Chandrasekaran
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=213887af-78b8-03ad-b3f9-c2194cb27b13@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=eyakovl@amazon.de \
--cc=graf@amazon.com \
--cc=hpa@zytor.com \
--cc=iaslan@amazon.de \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liran@amazon.com \
--cc=mingo@redhat.com \
--cc=seanjc@google.com \
--cc=sidcha@amazon.de \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).