mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 02:01:24 +01:00
VMX: correct error handling in vmx_create_vmcs()
With the addition of vmx_add_msr() calls to construct_vmcs() there are now cases where simply freeing the VMCS isn't enough: The MSR bitmap page as well as one of the MSR area ones (if it's the 2nd vmx_add_msr() which fails) may also need freeing. Switch to using vmx_destroy_vmcs() instead. Fixes:3bd36952da("x86/spec-ctrl: Introduce an option to control L1D_FLUSH for HVM HAP guests") Fixes:53a570b285("x86/spec-ctrl: Support IBPB-on-entry") Reported-by: Andrew Cooper <andrew.cooper3@citrix.com> Signed-off-by: Jan Beulich <jbeulich@suse.com> Reviewed-by: Kevin Tian <kevin.tian@intel.com> master commit:448d28309fmaster date: 2022-10-12 17:57:56 +0200
This commit is contained in:
1 parent
f8915cd5db
commit
3885fa4234
1 file changed
+1
-1
@@ -1831,7 +1831,7 @@ int vmx_create_vmcs(struct vcpu *v)
|
||||
|
||||
if ( (rc = construct_vmcs(v)) != 0 )
|
||||
{
|
||||
vmx_free_vmcs(vmx->vmcs_pa);
|
||||
vmx_destroy_vmcs(v);
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||