[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notific
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications |
Date: |
Fri, 25 Sep 2015 13:25:55 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.2.0 |
-----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-----
- [Qemu-ppc] [PATCH 0/7] VFIO extensions to allow VFIO devices on spapr-pci-host-bridge, David Gibson, 2015/09/24
- [Qemu-ppc] [PATCH 2/7] vfio: Generalize vfio_listener_region_add failure path, David Gibson, 2015/09/24
- [Qemu-ppc] [PATCH 4/7] vfio: Record host IOMMU's available IO page sizes, David Gibson, 2015/09/24
- [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications, David Gibson, 2015/09/24
- Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications, Paolo Bonzini, 2015/09/25
- Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications, David Gibson, 2015/09/25
- Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications, Paolo Bonzini, 2015/09/25
- Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications, David Gibson, 2015/09/26
- Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications, Paolo Bonzini, 2015/09/28
- Re: [Qemu-ppc] [PATCH 5/7] memory: Allow replay of IOMMU mapping notifications, David Gibson, 2015/09/29
[Qemu-ppc] [PATCH 7/7] vfio: Expose a VFIO PCI device's group for EEH, David Gibson, 2015/09/24
[Qemu-ppc] [PATCH 3/7] vfio: Check guest IOVA ranges against host IOMMU capabilities, David Gibson, 2015/09/24