mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
KVM: MMU: Don't flush shadow when enabling dirty tracking
Instead, drop large mappings, which were the reason we dropped shadow. Signed-off-by: Avi Kivity <[email protected]> Signed-off-by: Marcelo Tosatti <[email protected]>
This commit is contained in:
parent
054cfaacf8
commit
8234b22e1c
2 changed files with 9 additions and 10 deletions
|
|
@ -621,7 +621,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
|
|||
struct kvm_userspace_memory_region *mem,
|
||||
int user_alloc)
|
||||
{
|
||||
int r, flush_shadow = 0;
|
||||
int r;
|
||||
gfn_t base_gfn;
|
||||
unsigned long npages;
|
||||
unsigned long i;
|
||||
|
|
@ -741,8 +741,6 @@ skip_lpage:
|
|||
if (kvm_create_dirty_bitmap(&new) < 0)
|
||||
goto out_free;
|
||||
/* destroy any largepage mappings for dirty tracking */
|
||||
if (old.npages)
|
||||
flush_shadow = 1;
|
||||
}
|
||||
#else /* not defined CONFIG_S390 */
|
||||
new.user_alloc = user_alloc;
|
||||
|
|
@ -813,9 +811,6 @@ skip_lpage:
|
|||
kvm_free_physmem_slot(&old, &new);
|
||||
kfree(old_memslots);
|
||||
|
||||
if (flush_shadow)
|
||||
kvm_arch_flush_shadow(kvm);
|
||||
|
||||
return 0;
|
||||
|
||||
out_free:
|
||||
|
|
|
|||
Loading…
Reference in a new issue