KVM: Lazy guest cr3 switching
Switch guest paging context may require us to allocate memory, which might fail. Instead of wiring up error paths everywhere, make context switching lazy and actually do the switch before the next guest entry, where we can return an error if allocation fails. Signed-off-by: Avi Kivity <avi@qumranet.com>
This commit is contained in:
@@ -1988,6 +1988,10 @@ again:
|
||||
vmx_save_host_state(vcpu);
|
||||
kvm_load_guest_fpu(vcpu);
|
||||
|
||||
r = kvm_mmu_reload(vcpu);
|
||||
if (unlikely(r))
|
||||
goto out;
|
||||
|
||||
/*
|
||||
* Loading guest fpu may have cleared host cr0.ts
|
||||
*/
|
||||
|
Reference in New Issue
Block a user