[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3 2/3] memory: generalize iommu_ops.notify_star
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH v3 2/3] memory: generalize iommu_ops.notify_started to notifier_add |
Date: |
Mon, 12 Sep 2016 13:54:24 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Mon, Sep 12, 2016 at 11:17:37AM +1000, David Gibson wrote:
[...]
> > I think now I understand the point... Then I'd prefer to use David's
> > suggestion. A single notify_changed() looks cleaner. To be more
> > explicit, I would prefer to rename it to notifier_flag_changed(),
> > since notify_changed() looks like to be called every time notifier
> > list changed, but actually it is for monitoring the flags.
>
> That sounds reasonable. I think notifier_flag_changed() should be
> passed both the old and new flags, to save the backend having to keep
> track of the old ones - which flags have changed might affect what the
> callback needs to do.
Agree. That's exactly what v4 was doing. Thanks,
-- peterx
- Re: [Qemu-devel] [PATCH v3 1/3] memory: introduce IOMMUNotifier and its caps, (continued)
[Qemu-devel] [PATCH v3 2/3] memory: generalize iommu_ops.notify_started to notifier_add, Peter Xu, 2016/09/07
[Qemu-devel] [PATCH v3 3/3] intel_iommu: allow invalidation typed notifiers, Peter Xu, 2016/09/07