diff options
author | Marcelo Tosatti <mtosatti@redhat.com> | 2009-12-23 11:35:23 -0500 |
---|---|---|
committer | Marcelo Tosatti <mtosatti@redhat.com> | 2010-03-01 10:35:45 -0500 |
commit | a983fb238728e1123177e8058d4f644b949a7d05 (patch) | |
tree | 55f9b26d8ace10a1233b293dd423eae2d0ff9046 /virt/kvm | |
parent | b050b015abbef8225826eecb6f6b4d4a6dea7b79 (diff) |
KVM: x86: switch kvm_set_memory_alias to SRCU update
Using a similar two-step procedure as for memslots.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'virt/kvm')
-rw-r--r-- | virt/kvm/kvm_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index 2bb24a814fdf..c680f7b64c6f 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c | |||
@@ -859,7 +859,7 @@ int kvm_is_visible_gfn(struct kvm *kvm, gfn_t gfn) | |||
859 | int i; | 859 | int i; |
860 | struct kvm_memslots *slots = rcu_dereference(kvm->memslots); | 860 | struct kvm_memslots *slots = rcu_dereference(kvm->memslots); |
861 | 861 | ||
862 | gfn = unalias_gfn(kvm, gfn); | 862 | gfn = unalias_gfn_instantiation(kvm, gfn); |
863 | for (i = 0; i < KVM_MEMORY_SLOTS; ++i) { | 863 | for (i = 0; i < KVM_MEMORY_SLOTS; ++i) { |
864 | struct kvm_memory_slot *memslot = &slots->memslots[i]; | 864 | struct kvm_memory_slot *memslot = &slots->memslots[i]; |
865 | 865 | ||
@@ -896,7 +896,7 @@ unsigned long gfn_to_hva(struct kvm *kvm, gfn_t gfn) | |||
896 | { | 896 | { |
897 | struct kvm_memory_slot *slot; | 897 | struct kvm_memory_slot *slot; |
898 | 898 | ||
899 | gfn = unalias_gfn(kvm, gfn); | 899 | gfn = unalias_gfn_instantiation(kvm, gfn); |
900 | slot = gfn_to_memslot_unaliased(kvm, gfn); | 900 | slot = gfn_to_memslot_unaliased(kvm, gfn); |
901 | if (!slot || slot->flags & KVM_MEMSLOT_INVALID) | 901 | if (!slot || slot->flags & KVM_MEMSLOT_INVALID) |
902 | return bad_hva(); | 902 | return bad_hva(); |