mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 14:02:06 -04:00
KVM: selftests: Split off load_evmcs() from load_vmcs()
In preparation to putting Hyper-V specific test pages to a dedicated struct, move eVMCS load logic from load_vmcs(). Tests call load_vmcs() directly and the only one which needs 'enlightened' version is evmcs_test so there's not much gain in having this merged. Temporary pass both GPA and HVA to load_evmcs(). Reviewed-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Message-Id: <20221101145426.251680-42-vkuznets@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
e8f3d23c02
commit
cd8f11bd6b
@@ -256,6 +256,16 @@ static inline int evmcs_vmptrld(uint64_t vmcs_pa, void *vmcs)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline bool load_evmcs(uint64_t enlightened_vmcs_gpa, void *enlightened_vmcs)
|
||||
{
|
||||
if (evmcs_vmptrld(enlightened_vmcs_gpa, enlightened_vmcs))
|
||||
return false;
|
||||
|
||||
current_evmcs->revision_id = EVMCS_VERSION;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static inline int evmcs_vmptrst(uint64_t *value)
|
||||
{
|
||||
*value = current_vp_assist->current_nested_vmcs &
|
||||
|
||||
Reference in New Issue
Block a user