]> git.karo-electronics.de Git - linux-beck.git/commit
KVM: PPC: Use RCU for arch.spapr_tce_tables
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 15 Feb 2016 01:55:05 +0000 (12:55 +1100)
committerPaul Mackerras <paulus@samba.org>
Tue, 16 Feb 2016 02:44:26 +0000 (13:44 +1100)
commit366baf28ee3fc22dea504a0bddf8edd1e9bcee70
tree38bee7a88979d6a95093084055619d10bd17fb61
parentfcbb2ce672848481275c1f014ad44ccd1e43a7a2
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>
arch/powerpc/include/asm/kvm_host.h
arch/powerpc/kvm/book3s.c
arch/powerpc/kvm/book3s_64_vio.c
arch/powerpc/kvm/book3s_64_vio_hv.c