mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
KVM: set_memory_region: Refactor prepare_memory_region()
This patch drops the parameter old, a copy of the old memory slot, and adds a new parameter named change to know the change being requested. This not only cleans up the code but also removes extra copying of the memory slot structure. Signed-off-by: Takuya Yoshikawa <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
This commit is contained in:
parent
74d0727cb7
commit
7b6195a91d
7 changed files with 15 additions and 17 deletions
|
|
@ -856,7 +856,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
|
|||
slots = old_memslots;
|
||||
}
|
||||
|
||||
r = kvm_arch_prepare_memory_region(kvm, &new, old, mem);
|
||||
r = kvm_arch_prepare_memory_region(kvm, &new, mem, change);
|
||||
if (r)
|
||||
goto out_slots;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue