mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
KVM: perform an invalid memslot step for gpa base change
commit 12d6e7538e
upstream.
PPC must flush all translations before the new memory slot
is visible.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Signed-off-by: Avi Kivity <avi@redhat.com>
Cc: Luis Henriques <luis.henriques@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
1fefeae758
commit
9af88f0e8b
1 changed files with 3 additions and 3 deletions
|
@ -774,7 +774,7 @@ int __kvm_set_memory_region(struct kvm *kvm,
|
|||
/* destroy any largepage mappings for dirty tracking */
|
||||
}
|
||||
|
||||
if (!npages) {
|
||||
if (!npages || base_gfn != old.base_gfn) {
|
||||
struct kvm_memory_slot *slot;
|
||||
|
||||
r = -ENOMEM;
|
||||
|
@ -790,8 +790,8 @@ int __kvm_set_memory_region(struct kvm *kvm,
|
|||
old_memslots = kvm->memslots;
|
||||
rcu_assign_pointer(kvm->memslots, slots);
|
||||
synchronize_srcu_expedited(&kvm->srcu);
|
||||
/* From this point no new shadow pages pointing to a deleted
|
||||
* memslot will be created.
|
||||
/* From this point no new shadow pages pointing to a deleted,
|
||||
* or moved, memslot will be created.
|
||||
*
|
||||
* validation of sp->gfn happens in:
|
||||
* - gfn_to_hva (kvm_read_guest, gfn_to_pfn)
|
||||
|
|
Loading…
Reference in a new issue