diff options
author | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-08-30 17:55:31 +0100 |
---|---|---|
committer | Dongxiao Xu <dongxiao.xu@intel.com> | 2012-08-30 17:55:31 +0100 |
commit | a5ba0ff7c7527aa58dce32e6db8c9ee63e1560ca (patch) | |
tree | c9f7ff4c4f12562075c1439a6640518ffc70a853 /xen/include/asm-x86/hvm/vmx | |
parent | 4eae16a077bb6d30a499efe78170b521e6e5e879 (diff) | |
download | xen-a5ba0ff7c7527aa58dce32e6db8c9ee63e1560ca.tar.gz xen-a5ba0ff7c7527aa58dce32e6db8c9ee63e1560ca.tar.bz2 xen-a5ba0ff7c7527aa58dce32e6db8c9ee63e1560ca.zip |
nvmx: fix resource relinquish for nested VMX
The previous order of relinquish resource is:
relinquish_domain_resources() -> vcpu_destroy() ->
nvmx_vcpu_destroy(). However some L1 resources like nv_vvmcx and
io_bitmaps are free in nvmx_vcpu_destroy(), therefore the
relinquish_domain_resources() will not reduce the refcnt of the domain
to 0, therefore the latter vcpu release functions will not be called.
To fix this issue, we need to release the nv_vvmcx and io_bitmaps in
relinquish_domain_resources().
Besides, after destroy the nested vcpu, we need to switch the
vmx->vmcs back to the L1 and let the vcpu_destroy() logic to free the
L1 VMCS page.
Signed-off-by: Dongxiao Xu <dongxiao.xu@intel.com>
Committed-by: Keir Fraser <keir@xen.org>
Diffstat (limited to 'xen/include/asm-x86/hvm/vmx')
-rw-r--r-- | xen/include/asm-x86/hvm/vmx/vvmx.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/xen/include/asm-x86/hvm/vmx/vvmx.h b/xen/include/asm-x86/hvm/vmx/vvmx.h index 995f9f4ff4..bbc34e7831 100644 --- a/xen/include/asm-x86/hvm/vmx/vvmx.h +++ b/xen/include/asm-x86/hvm/vmx/vvmx.h @@ -96,6 +96,7 @@ uint32_t nvmx_vcpu_asid(struct vcpu *v); enum hvm_intblk nvmx_intr_blocked(struct vcpu *v); int nvmx_intercepts_exception(struct vcpu *v, unsigned int trap, int error_code); +void nvmx_domain_relinquish_resources(struct domain *d); int nvmx_handle_vmxon(struct cpu_user_regs *regs); int nvmx_handle_vmxoff(struct cpu_user_regs *regs); |