[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock
From: |
Peter Xu |
Subject: |
Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock |
Date: |
Sat, 28 Apr 2018 11:14:13 +0800 |
User-agent: |
Mutt/1.9.1 (2017-09-22) |
On Sat, Apr 28, 2018 at 10:42:11AM +0800, Jason Wang wrote:
[...]
> Well, it's not about BQL specifically, it's about whether we have or need a
> generic thread safety solution for all IOMMUs.
>
> We have more IOMMUs than just AMD, s390 and ppc:
>
> # git grep imrc-\>translate\ =
> hw/alpha/typhoon.c: imrc->translate = typhoon_translate_iommu;
> hw/dma/rc4030.c: imrc->translate = rc4030_dma_translate;
> hw/i386/amd_iommu.c: imrc->translate = amdvi_translate;
> hw/i386/intel_iommu.c: imrc->translate = vtd_iommu_translate;
> hw/ppc/spapr_iommu.c: imrc->translate = spapr_tce_translate_iommu;
> hw/s390x/s390-pci-bus.c: imrc->translate = s390_translate_iommu;
> hw/sparc/sun4m_iommu.c: imrc->translate = sun4m_translate_iommu;
> hw/sparc64/sun4u_iommu.c: imrc->translate = sun4u_translate_iommu;
Sorry I didn't notice this one. This point is valid. But again, we
need to know whether they are thread-safe already. For VT-d, it never
hurt to have this patch to fix its own problem, so above is not a
reason to not have current patch, since it solves different problems.
Basically I'll see the solution of above problem as a separate patch
as current one.
Meanwhile, even if we want to provide a general protection on that,
again I would prefer not using BQL but use some common and new
iommu-lock. BQL can be a nightmare sometimes.
Thanks,
--
Peter Xu
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, (continued)
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Jason Wang, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Peter Xu, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Tian, Kevin, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Peter Xu, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Tian, Kevin, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Jason Wang, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Peter Xu, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Jason Wang, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Peter Xu, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Jason Wang, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock,
Peter Xu <=
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Jason Wang, 2018/04/27
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Paolo Bonzini, 2018/04/30
- Re: [Qemu-devel] [PATCH 03/10] intel-iommu: add iommu lock, Paolo Bonzini, 2018/04/30
[Qemu-devel] [PATCH 05/10] intel-iommu: introduce vtd_page_walk_info, Peter Xu, 2018/04/25
[Qemu-devel] [PATCH 06/10] intel-iommu: pass in address space when page walk, Peter Xu, 2018/04/25
[Qemu-devel] [PATCH 04/10] intel-iommu: only do page walk for MAP notifiers, Peter Xu, 2018/04/25
[Qemu-devel] [PATCH 07/10] util: implement simple interval tree logic, Peter Xu, 2018/04/25
[Qemu-devel] [PATCH 08/10] intel-iommu: maintain per-device iova ranges, Peter Xu, 2018/04/25