From: Paolo Bonzini <pbonzini@redhat.com>
To: David Woodhouse <dwmw2@infradead.org>,
Sean Christopherson <seanjc@google.com>
Cc: "kvm@vger.kernel.org" <kvm@vger.kernel.org>,
Joao Martins <joao.m.martins@oracle.com>
Subject: Re: [PATCH] KVM: x86: Reinstate userspace hypercall support
Date: Wed, 2 Dec 2020 10:20:13 +0100 [thread overview]
Message-ID: <56ef38fe-e976-229c-9215-8ddce8d5f9e1@redhat.com> (raw)
In-Reply-To: <64d5fc26a0b5ccb7592f924aa61068e6ee55955f.camel@infradead.org>
On 30/11/20 23:42, David Woodhouse wrote:
> Yes, good point.
>
> Xen*does* allow one hypercall (HVMOP_guest_request_vm_event) from
> !CPL0 so I don't think I can get away with allowing only CPL0 like
> kvm_hv_hypercall() does.
>
> So unless I'm going to do that filtering in kernel (ick) I think we do
> need to capture and pass up the CPL, as you say. Which means it doesn't
> fit in the existing kvm_run->hypercall structure unless I'm prepared to
> rename/abuse the ->hypercall.pad for it.
>
> I'll just use Joao's version of the hypercall support, and add cpl to
> struct kvm_xen_exit.hcall. Userspace can inject the UD# where
> appropriate.
Or you can use sync regs perhaps. For your specific use I don't expect
many exits to userspace other than Xen hypercalls, so it should be okay
to always run with KVM_SYNC_X86_REGS|KVM_SYNC_X86_SREGS in
kvm_run->kvm_valid_regs.
Paolo
next prev parent reply other threads:[~2020-12-02 9:22 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-28 14:20 [PATCH] KVM: x86: Reinstate userspace hypercall support David Woodhouse
2020-11-28 17:50 ` David Woodhouse
2020-11-28 23:16 ` Joao Martins
2020-11-29 2:05 ` David Woodhouse
2020-11-30 18:36 ` Paolo Bonzini
2020-11-30 18:59 ` David Woodhouse
2020-11-30 20:46 ` Sean Christopherson
2020-11-30 22:42 ` David Woodhouse
2020-12-02 9:20 ` Paolo Bonzini [this message]
2020-12-02 14:23 ` Joao Martins
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=56ef38fe-e976-229c-9215-8ddce8d5f9e1@redhat.com \
--to=pbonzini@redhat.com \
--cc=dwmw2@infradead.org \
--cc=joao.m.martins@oracle.com \
--cc=kvm@vger.kernel.org \
--cc=seanjc@google.com \
/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