[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH RFC v3 12/14] intel_iommu: do replay when contex
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH RFC v3 12/14] intel_iommu: do replay when context invalidate |
Date: |
Mon, 16 Jan 2017 15:43:59 +0800 |
User-agent: |
Mutt/1.5.24 (2015-08-30) |
On Mon, Jan 16, 2017 at 01:53:54PM +0800, Jason Wang wrote:
>
>
> On 2017年01月13日 11:06, Peter Xu wrote:
> >Before this one we only invalidate context cache when we receive context
> >entry invalidations. However it's possible that the invalidation also
> >contains a domain switch (only if cache-mode is enabled for vIOMMU).
>
> So let's check for CM before replaying?
When CM is not set, there should have no device needs
IOMMU_NOTIFIER_MAP notifies. So IMHO it won't hurt if we replay here
(so the notifier_list will only contain UNMAP notifiers at most, and
sending UNMAP to those devices should not affect them at all).
If we check CM before replay, it'll be faster when guest change iommu
domain for a specific device. But after all this kind of operation is
extremely rare, while if we check CM bit, we have a "assumption" in
the code that MAP is depending on CM. In that case, to make the codes
cleaner, I'd slightly prefer not check it here. How do you think?
Thanks,
-- peterx
- [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback, (continued)
- [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback, Peter Xu, 2017/01/12
- Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback, Jason Wang, 2017/01/13
- Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback, Peter Xu, 2017/01/16
- Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback, Jason Wang, 2017/01/16
- Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback, Peter Xu, 2017/01/16
- Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback, Jason Wang, 2017/01/16
- Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback, Peter Xu, 2017/01/16
- Re: [Qemu-devel] [PATCH RFC v3 11/14] intel_iommu: provide its own replay() callback, Jason Wang, 2017/01/16
[Qemu-devel] [PATCH RFC v3 12/14] intel_iommu: do replay when context invalidate, Peter Xu, 2017/01/12
[Qemu-devel] [PATCH RFC v3 13/14] intel_iommu: allow dynamic switch of IOMMU region, Peter Xu, 2017/01/12