diff options
Diffstat (limited to 'arch/x86/kvm/vmx/nested.c')
-rw-r--r-- | arch/x86/kvm/vmx/nested.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/x86/kvm/vmx/nested.c b/arch/x86/kvm/vmx/nested.c index 0f1378789bd0..ced9fba32598 100644 --- a/arch/x86/kvm/vmx/nested.c +++ b/arch/x86/kvm/vmx/nested.c | |||
@@ -220,6 +220,8 @@ static void free_nested(struct kvm_vcpu *vcpu) | |||
220 | if (!vmx->nested.vmxon && !vmx->nested.smm.vmxon) | 220 | if (!vmx->nested.vmxon && !vmx->nested.smm.vmxon) |
221 | return; | 221 | return; |
222 | 222 | ||
223 | kvm_clear_request(KVM_REQ_GET_VMCS12_PAGES, vcpu); | ||
224 | |||
223 | vmx->nested.vmxon = false; | 225 | vmx->nested.vmxon = false; |
224 | vmx->nested.smm.vmxon = false; | 226 | vmx->nested.smm.vmxon = false; |
225 | free_vpid(vmx->nested.vpid02); | 227 | free_vpid(vmx->nested.vpid02); |
@@ -232,7 +234,9 @@ static void free_nested(struct kvm_vcpu *vcpu) | |||
232 | vmx->vmcs01.shadow_vmcs = NULL; | 234 | vmx->vmcs01.shadow_vmcs = NULL; |
233 | } | 235 | } |
234 | kfree(vmx->nested.cached_vmcs12); | 236 | kfree(vmx->nested.cached_vmcs12); |
237 | vmx->nested.cached_vmcs12 = NULL; | ||
235 | kfree(vmx->nested.cached_shadow_vmcs12); | 238 | kfree(vmx->nested.cached_shadow_vmcs12); |
239 | vmx->nested.cached_shadow_vmcs12 = NULL; | ||
236 | /* Unpin physical memory we referred to in the vmcs02 */ | 240 | /* Unpin physical memory we referred to in the vmcs02 */ |
237 | if (vmx->nested.apic_access_page) { | 241 | if (vmx->nested.apic_access_page) { |
238 | kvm_release_page_dirty(vmx->nested.apic_access_page); | 242 | kvm_release_page_dirty(vmx->nested.apic_access_page); |