KVM: Reinstall old memslots if arch preparation fails
Reinstall the old memslots if preparing the new memory region fails
after invalidating a to-be-{re}moved memslot.
Remove the superfluous 'old_memslots' variable so that it's somewhat
clear that the error handling path needs to free the unused memslots,
not simply the 'old' memslots.
Fixes: bc6678a3 ("KVM: introduce kvm->srcu and convert kvm_set_memory_region to SRCU update")
Reviewed-by:
Christoffer Dall <christoffer.dall@arm.com>
Reviewed-by:
Peter Xu <peterx@redhat.com>
Signed-off-by:
Sean Christopherson <sean.j.christopherson@intel.com>
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Loading
Please sign in to comment