[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221222230458.3828342-1-vannapurve@google.com>
Date: Thu, 22 Dec 2022 23:04:56 +0000
From: Vishal Annapurve <vannapurve@...gle.com>
To: x86@...nel.org, kvm@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org
Cc: pbonzini@...hat.com, shuah@...nel.org, bgardon@...gle.com,
seanjc@...gle.com, oupton@...gle.com, peterx@...hat.com,
vkuznets@...hat.com, dmatlack@...gle.com, pgonda@...gle.com,
andrew.jones@...ux.dev, Vishal Annapurve <vannapurve@...gle.com>
Subject: [V3 PATCH 0/2] Execute hypercalls from guests according to cpu
Confidential VMs(CVMs) need to execute hypercall instruction as per the CPU
type. Normally KVM emulates the vmcall/vmmcall instruction by patching
the guest code at runtime. Such a guest memory manipulation by KVM is
not allowed with CVMs.
This series adds support of executing hypercall as per the native cpu
type queried using cpuid instruction. CPU vendor type is stored after
one time execution of cpuid instruction to be reused later.
Changes in v3:
1) Guest logic is modified to not rely on host cpu type and instead query
cpu vendor using cpuid instruction.
2) Existing callers of vmmcall/vmcall are not updated to avoid enforcing
native hypercall instruction across all users which are mostly
non-confidential usecases.
v2:
https://lore.kernel.org/all/20220915000448.1674802-1-vannapurve@google.com/
More discussion around this change:
https://lore.kernel.org/lkml/Y1Hhw40H58EmZ6lK@google.com/
Vishal Annapurve (2):
KVM: selftests: x86: Cache the cpu vendor type
KVM: selftests: x86: Add native hypercall support
.../selftests/kvm/include/x86_64/processor.h | 3 ++
.../selftests/kvm/lib/x86_64/processor.c | 51 +++++++++++++++++--
2 files changed, 49 insertions(+), 5 deletions(-)
--
2.39.0.314.g84b9a713c41-goog
Powered by blists - more mailing lists