Commit 7bcf732e authored by Vitaly Kuznetsov's avatar Vitaly Kuznetsov Committed by Paolo Bonzini

KVM: selftests: define and use EVMCS_VERSION

KVM allows to use revision_id from MSR_IA32_VMX_BASIC as eVMCS revision_id
to workaround a bug in genuine Hyper-V (see the comment in
nested_vmx_handle_enlightened_vmptrld()), this shouldn't be used by
default. Switch to using KVM_EVMCS_VERSION(1).
Signed-off-by: default avatarVitaly Kuznetsov <vkuznets@redhat.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent b6a0653a
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
#define u32 uint32_t #define u32 uint32_t
#define u64 uint64_t #define u64 uint64_t
#define EVMCS_VERSION 1
extern bool enable_evmcs; extern bool enable_evmcs;
struct hv_vp_assist_page { struct hv_vp_assist_page {
......
...@@ -191,7 +191,7 @@ bool load_vmcs(struct vmx_pages *vmx) ...@@ -191,7 +191,7 @@ bool load_vmcs(struct vmx_pages *vmx)
if (evmcs_vmptrld(vmx->enlightened_vmcs_gpa, if (evmcs_vmptrld(vmx->enlightened_vmcs_gpa,
vmx->enlightened_vmcs)) vmx->enlightened_vmcs))
return false; return false;
current_evmcs->revision_id = vmcs_revision(); current_evmcs->revision_id = EVMCS_VERSION;
} }
return true; return true;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment