On 15/07/2015 16:21, Vijay Kilari wrote:
A general question, how do you ensure any concurrent insert to the RB-tree?
Is it taken care by the ITS lock and the caller?

I would be ok to defer the locking for when the PCI passthrough is supported
as all the ITS device are added when Xen is booted.

A TODO would be worth to add. With the TODO and the answer to my questions:

I have added new lock "rb_its_dev_lock" in patch #8 where caller is managing.

It's rather strange to introduce the lock later given that anyone can call these functions (they are exported).

You need to ensure that the caller does take the lock by adding an ASSERT(spin_is_locked(...)) in each function.

Regards,

--
Julien Grall

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to