On 05/01/2013 07:27:23 PM, Scott Wood wrote:
On 05/01/2013 07:15:53 PM, Marcelo Tosatti wrote:
This is not good practice (codepaths should either hold srcu or not hold
it, unconditionally).

How is it different from moving the srcu lock into individual cases of the switch? I just did it this way to make it easier to add new exception types if necessary (e.g. at the time I thought I'd end up adding exceptions which lead to instruction emulation, but I ended up acquiring the lock further down the path in that case).

Can you give more details of the issue? (not obvious)

ITLB/DTLB miss call things like gfn_to_memslot() which need the lock (but don't grab it themselves -- that seems like the real bad practice here...).

Never mind on the parenthetical -- grabbing it themselves wouldn't work because they return RCU-protected data.

-Scott
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to