On 21/09/15 03:37, David Gibson wrote: > On Fri, Sep 18, 2015 at 08:57:28AM +0200, Thomas Huth wrote: >> Access to the kvm->buses (like with the kvm_io_bus_read() and -write() >> functions) has to be protected via the kvm->srcu lock. >> The kvmppc_h_logical_ci_load() and -store() functions are missing >> this lock so far, so let's add it there, too. >> This fixes the problem that the kernel reports "suspicious RCU usage" >> when lock debugging is enabled. >> >> Fixes: 99342cf8044420eebdf9297ca03a14cb6a7085a1 >> Signed-off-by: Thomas Huth <thuth@xxxxxxxxxx> > > Nice catch. Looks like I missed this because the places > kvm_io_bus_{read,write}() are called on x86 are buried about 5 layers > below where the srcu lock is taken :/. AFAIK the philosophy for taking the srcu lock is completely different between powerpc and x86. On powerpc it is only taken when needed (and released immediately afterwards), while the x86 code tries to hold it the whole time while not being in the guest and not being in userspace. See vcpu_enter_guest() in the x86 code for example, the lock is dropped before entering the guest, and taken again before leaving this function. Thomas
Attachment:
signature.asc
Description: OpenPGP digital signature