lkml.org 
[lkml]   [2023]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [V4 PATCH 4/4] KVM: selftests: x86: Invoke kvm hypercall as per host cpu
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.

\
 
 \ /
  Last update: 2023-03-26 23:33    [W:0.067 / U:0.280 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site