提交 0c546725 编写于 作者: P Paolo Bonzini

Merge branch 'kvm-null-pointer-fix' into HEAD

...@@ -224,7 +224,7 @@ static inline void nested_release_evmcs(struct kvm_vcpu *vcpu) ...@@ -224,7 +224,7 @@ static inline void nested_release_evmcs(struct kvm_vcpu *vcpu)
return; return;
kvm_vcpu_unmap(vcpu, &vmx->nested.hv_evmcs_map, true); kvm_vcpu_unmap(vcpu, &vmx->nested.hv_evmcs_map, true);
vmx->nested.hv_evmcs_vmptr = -1ull; vmx->nested.hv_evmcs_vmptr = 0;
vmx->nested.hv_evmcs = NULL; vmx->nested.hv_evmcs = NULL;
} }
...@@ -1922,7 +1922,8 @@ static int nested_vmx_handle_enlightened_vmptrld(struct kvm_vcpu *vcpu, ...@@ -1922,7 +1922,8 @@ static int nested_vmx_handle_enlightened_vmptrld(struct kvm_vcpu *vcpu,
if (!nested_enlightened_vmentry(vcpu, &evmcs_gpa)) if (!nested_enlightened_vmentry(vcpu, &evmcs_gpa))
return 1; return 1;
if (unlikely(evmcs_gpa != vmx->nested.hv_evmcs_vmptr)) { if (unlikely(!vmx->nested.hv_evmcs ||
evmcs_gpa != vmx->nested.hv_evmcs_vmptr)) {
if (!vmx->nested.hv_evmcs) if (!vmx->nested.hv_evmcs)
vmx->nested.current_vmptr = -1ull; vmx->nested.current_vmptr = -1ull;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册