Skip to contentSkip to conversation

nested_free_all_saved_vmcss freeing vmx->vmcs01?

DISCUSSION Marcelo Tosatti 2 participants 2 messages Jan 3, 2014 KVM

lore
Share & tools
lore
#0 lore raw

Am i missing something, or should nested_free_all_saved_vmcss not call

        if (vmx->loaded_vmcs != &vmx->vmcs01)
                free_loaded_vmcs(&vmx->vmcs01);

?

#1 lore raw
Quoted 8 lines · Marcelo Tosatti

Am i missing something, or should nested_free_all_saved_vmcss not call

        if (vmx->loaded_vmcs != &vmx->vmcs01)
                free_loaded_vmcs(&vmx->vmcs01);

?

This is relevant if we call nested_free_all_saved_vmcss on cleanup while L2 was still active. In this case, the free_loaded_vmcs(vmx->loaded_vmcs) will free the item's loaded_vmcs we skipped earlier in that function - OK, and now I also understand your patch.

Jan