[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag |
Date: |
Tue, 6 Sep 2016 09:51:28 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 |
On 06/09/2016 07:27, Peter Xu wrote:
> Maybe I haven't explained the idea very clearly, but device-IOTLB is
> not a "flush" of whole device cache. It still needs a IOMMUTLBEntry,
> and works just like how general IOMMU invalidations. E.g., we can do
> device-IOTLB invalidation for a single 4K page.
Yes, it can be FLUSHED_ENTRY and CHANGED_ENTRY or
INVALIDATE_ENTRY/CHANGE_ENTRY.
> However, I agree with you that the namings are confusing, maybe at
> least we should introduce IOMMU_NOTIFIER_* macros, though instead of a
> _FLUSH one, we can have:
>
> IOMMU_NOTIFIER_NONE = -1,
> IOMMU_NOTIFIER_DEVICE_INVALIDATE = 0,
> IOMMU_NOTIFIER_IOTLB_CHANGED = 1,
I suggest making the names more similar:
- two participles (invalidated/changed) or two imperatives
(invalidate!/change!);
- choose whether to keep the verb first ("invalidate device") or keep
the noun first ("IOTLB changed"), and stick with one convention.
> To clarify that these are two non-overlapped cases.
If they are not overlapping, they really should be using a bitmask or
multiple callbacks in a struct...
Paolo
- [Qemu-devel] [PATCH 0/3] memory: add IOMMU notifier type, Peter Xu, 2016/09/05
- [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Peter Xu, 2016/09/05
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Paolo Bonzini, 2016/09/05
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Peter Xu, 2016/09/05
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Paolo Bonzini, 2016/09/05
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Peter Xu, 2016/09/06
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag,
Paolo Bonzini <=
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Peter Xu, 2016/09/06
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Paolo Bonzini, 2016/09/06
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Peter Xu, 2016/09/06
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, David Gibson, 2016/09/07
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Peter Xu, 2016/09/07
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, David Gibson, 2016/09/07
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Peter Xu, 2016/09/08
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, David Gibson, 2016/09/11
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, Peter Xu, 2016/09/12
- Re: [Qemu-devel] [PATCH 2/3] memory: add iommu_notify_flag, David Gibson, 2016/09/14