diff options
author | Alexey Kardashevskiy <aik@ozlabs.ru> | 2016-02-15 12:55:05 +1100 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2016-02-16 13:44:26 +1100 |
commit | 366baf28ee3fc22dea504a0bddf8edd1e9bcee70 (patch) | |
tree | 38bee7a88979d6a95093084055619d10bd17fb61 /arch/powerpc/kvm/book3s.c | |
parent | fcbb2ce672848481275c1f014ad44ccd1e43a7a2 (diff) | |
download | linux-366baf28ee3fc22dea504a0bddf8edd1e9bcee70.tar.bz2 |
KVM: PPC: Use RCU for arch.spapr_tce_tables
At the moment only spapr_tce_tables updates are protected against races
but not lookups. This fixes missing protection by using RCU for the list.
As lookups also happen in real mode, this uses
list_for_each_entry_lockless() (which is expected not to access any
vmalloc'd memory).
This converts release_spapr_tce_table() to a RCU scheduled handler.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'arch/powerpc/kvm/book3s.c')
-rw-r--r-- | arch/powerpc/kvm/book3s.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/powerpc/kvm/book3s.c b/arch/powerpc/kvm/book3s.c index 638c6d9be9e0..b34220d2aa42 100644 --- a/arch/powerpc/kvm/book3s.c +++ b/arch/powerpc/kvm/book3s.c @@ -807,7 +807,7 @@ int kvmppc_core_init_vm(struct kvm *kvm) { #ifdef CONFIG_PPC64 - INIT_LIST_HEAD(&kvm->arch.spapr_tce_tables); + INIT_LIST_HEAD_RCU(&kvm->arch.spapr_tce_tables); INIT_LIST_HEAD(&kvm->arch.rtas_tokens); #endif |