[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAGtprH_F-U799DT9OkrC=pEQJYt0=Tj2WWuKuczm6z2ftUZuQA@mail.gmail.com>
Date: Tue, 10 Jan 2023 16:18:15 -0800
From: Vishal Annapurve <vannapurve@...gle.com>
To: Sean Christopherson <seanjc@...gle.com>
Cc: x86@...nel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org, pbonzini@...hat.com,
shuah@...nel.org, bgardon@...gle.com, oupton@...gle.com,
peterx@...hat.com, vkuznets@...hat.com, dmatlack@...gle.com
Subject: Re: [V4 PATCH 4/4] KVM: selftests: x86: Invoke kvm hypercall as per
host cpu
On Mon, Jan 9, 2023 at 10:21 AM Sean Christopherson <seanjc@...gle.com> wrote:
>
> KVM: selftests: Use host's native hypercall instruction in kvm_hypercall()
>
> On Wed, Dec 28, 2022, Vishal Annapurve wrote:
> > Invoke vmcall/vmmcall instructions from kvm_hypercall as per host CPU
>
> () for functions, i.e. kvm_hypercall().
>
> > type.
>
> s/type/vendor, "type" is too generic.
>
> > CVMs and current kvm_hyerpcall callers need to execute hypercall
>
> CVM isn't a not ubiquitous acronym. I would avoid it entirely because "CVM"
> doesn't strictly imply memory encryption, e.g. KVM could still patch the guest in
> a pKVM-like implementation.
>
> Use the host CPU's native hypercall instruction, i.e. VMCALL vs. VMMCALL,
> in kvm_hypercall(), as relying on KVM to patch in the native hypercall on
> a #UD for the "wrong" hypercall requires KVM_X86_QUIRK_FIX_HYPERCALL_INSN
> to be enabled and flat out doesn't work if guest memory is encrypted with
> a private key, e.g. for SEV VMs.
Ack, this makes sense.
Powered by blists - more mailing lists