summaryrefslogtreecommitdiff
path: root/arch/powerpc/include/asm/kvm_host.h
diff options
context:
space:
mode:
authorAlexey Kardashevskiy <aik@ozlabs.ru>2016-02-15 04:55:05 +0300
committerPaul Mackerras <paulus@samba.org>2016-02-16 05:44:26 +0300
commit366baf28ee3fc22dea504a0bddf8edd1e9bcee70 (patch)
tree38bee7a88979d6a95093084055619d10bd17fb61 /arch/powerpc/include/asm/kvm_host.h
parentfcbb2ce672848481275c1f014ad44ccd1e43a7a2 (diff)
downloadlinux-366baf28ee3fc22dea504a0bddf8edd1e9bcee70.tar.xz
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/include/asm/kvm_host.h')
-rw-r--r--arch/powerpc/include/asm/kvm_host.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/kvm_host.h b/arch/powerpc/include/asm/kvm_host.h
index 9d08d8cbed1a..ffdbc2dc18f9 100644
--- a/arch/powerpc/include/asm/kvm_host.h
+++ b/arch/powerpc/include/asm/kvm_host.h
@@ -183,6 +183,7 @@ struct kvmppc_spapr_tce_table {
struct kvm *kvm;
u64 liobn;
u32 window_size;
+ struct rcu_head rcu;
struct page *pages[0];
};