[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] memory.h: Improve IOMMU related documentation
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH] memory.h: Improve IOMMU related documentation |
Date: |
Mon, 30 Apr 2018 17:01:29 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 30/04/2018 15:34, Peter Maydell wrote:
>> */
>> IOMMUTLBEntry (*translate)(IOMMUMemoryRegion *iommu, hwaddr addr,
>> IOMMUAccessFlags flag);
> A question I just thought of -- how long is the IOMMUTLBEntry I get
> back guaranteed to be valid for? For instance if I'm in an RCU
> critical section can I assume it won't become invalid before I
> leave the critical section? Or must I always register an IOMMU
> notifier before I call translate? I'm guessing not the latter
> because flatview_do_translate() does not, but is the guarantee
> only RCU-critical section or while-holding-big-QEMU-lock or
> something else?
The only pointer inside is to the target AddressSpace, which (see
address_space_destroy) is safe to access inside either of those
condition. In practice we use the former.
Paolo
Re: [Qemu-devel] [PATCH] memory.h: Improve IOMMU related documentation, Peter Maydell, 2018/04/30
- Re: [Qemu-devel] [PATCH] memory.h: Improve IOMMU related documentation,
Paolo Bonzini <=