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>
This commit is contained in:

committed by
Paul Mackerras

parent
fcbb2ce672
commit
366baf28ee
@@ -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];
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user