-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256
On 25/09/2015 07:24, David Gibson wrote: >> When memory_listener_register() replays mappings, it does so on >> an rcu copy of the flatview for each AddressSpace. Here we >> don't seem to have anything protecting against concurrency... do >> we need to worry about that? > > I was assuming that the IOMMU mappings are protected by the BQL. I > _think_ that's the case (for every IOMMU we have so far), but I'm > not really sure how to be sure. Yes, even in listener_add_address_space there's no real need to use address_space_get_flatview because updates to both the memory maps and the MemoryListener list are protected by the BQL. It could just read as->current_map directly. listener_add_address_space plays it a bit safe because QEMU doesn't (yet?) have stuff like rcu_dereference_check. It's sad that we'll have to reinvent so much debugging stuff from Linux... Paolo -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQEcBAEBCAAGBQJWBS9AAAoJEL/70l94x66D5l0H/AxF9flRUf6PaNO6RLpd0N8y z17BXqKuGIIevkGtF66xCRNDTRgfHKlugKkSQjaQIlGlh2k/nKfozcFERiE6/unv QmUS3+c3ryLMhOC4VidU90Krq1ZsXLLNE1Z81aSQwD4Y0LXEp3hFuL1F/K6tDUtY Vzk2KJu/bEaeDhJa4UglBOBLGWIYNRvokIFc2TdoMjdBvKfygLHfjL3rroQOle4U 40/mBO+3J58cyfCBYha0U9DxVTvceaFubj3M72W3ajenXZ15lq75B0M9GCNNujHE oaP8ehQ5wByyiGGmcZkStEXU/ups7J6cMWWjpTak3PqO0O5DVo+j5P4QbvJE57Q= =gQRk -----END PGP SIGNATURE-----