mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
KVM: x86: switch kvm_set_memory_alias to SRCU update
Using a similar two-step procedure as for memslots. Signed-off-by: Marcelo Tosatti <[email protected]>
This commit is contained in:
parent
b050b015ab
commit
a983fb2387
4 changed files with 63 additions and 11 deletions
|
|
@ -859,7 +859,7 @@ int kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn)
|
|||
int i;
|
||||
struct kvm_memslots *slots = rcu_dereference(kvm->memslots);
|
||||
|
||||
gfn = unalias_gfn(kvm, gfn);
|
||||
gfn = unalias_gfn_instantiation(kvm, gfn);
|
||||
for (i = 0; i < KVM_MEMORY_SLOTS; ++i) {
|
||||
struct kvm_memory_slot *memslot = &slots->memslots[i];
|
||||
|
||||
|
|
@ -896,7 +896,7 @@ unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn)
|
|||
{
|
||||
struct kvm_memory_slot *slot;
|
||||
|
||||
gfn = unalias_gfn(kvm, gfn);
|
||||
gfn = unalias_gfn_instantiation(kvm, gfn);
|
||||
slot = gfn_to_memslot_unaliased(kvm, gfn);
|
||||
if (!slot || slot->flags & KVM_MEMSLOT_INVALID)
|
||||
return bad_hva();
|
||||
|
|
|
|||
Loading…
Reference in a new issue