Re: [PATCH v5 3/6] mm: make alloc_contig_range work at pageblock granularity

2022-02-13 Thread Christophe Leroy
Le 11/02/2022 à 17:41, Zi Yan a écrit : > From: Zi Yan > > alloc_contig_range() worked at MAX_ORDER-1 granularity to avoid merging > pageblocks with different migratetypes. It might unnecessarily convert > extra pageblocks at the beginning and at the end of the range. Change > alloc_contig_rang

Re: [PATCH v2 10/11] iommu/vt-d: Use xarray for global device_domain_info

2022-02-13 Thread Christoph Hellwig
> > const struct iommu_ops intel_iommu_ops; > @@ -903,7 +905,8 @@ static void pgtable_walk(struct intel_iommu *iommu, > unsigned long pfn, u8 bus, u > struct dmar_domain *domain; > int offset, level; > > - info = dmar_search_domain_by_dev_info(iommu->segment, bus, devfn); > +

Re: [PATCH v2 09/11] iommu/vt-d: Remove commented code

2022-02-13 Thread Christoph Hellwig
On Mon, Feb 14, 2022 at 10:57:02AM +0800, Lu Baolu wrote: > This removes unnecessary commented code. Removing dead code is always good: Reviewed-by: Christoph Hellwig But someone might really want to take a look if draining makes sense here or not. __

Re: [PATCH v2 08/11] iommu/vt-d: Fix indentation of goto labels

2022-02-13 Thread Christoph Hellwig
On Mon, Feb 14, 2022 at 10:57:01AM +0800, Lu Baolu wrote: > Remove blanks before goto labels. The blanks are still pretty common in parts of the kernel, buf if you want them gone that sounds fine: Reviewed-by: Christoph Hellwig ___ iommu mailing list i

Re: [PATCH v2 07/11] iommu/vt-d: Remove unnecessary prototypes

2022-02-13 Thread Christoph Hellwig
On Mon, Feb 14, 2022 at 10:57:00AM +0800, Lu Baolu wrote: > Some prototypes in iommu.c are unnecessary. Delete them. > > Signed-off-by: Lu Baolu Looks good: Reviewed-by: Christoph Hellwig ___ iommu mailing list iommu@lists.linux-foundation.org https:

Re: [PATCH v2 06/11] iommu/vt-d: Remove unnecessary includes

2022-02-13 Thread Christoph Hellwig
On Mon, Feb 14, 2022 at 10:56:59AM +0800, Lu Baolu wrote: > Remove unnecessary include files and sort the remaining alphabetically. I can't see I like any of the sorting schemes very much, but dropping the unused includes is always good, so: Reviewed-by: Christoph Hellwig ___

Re: [PATCH v2 05/11] iommu/vt-d: Remove DEFER_DEVICE_DOMAIN_INFO

2022-02-13 Thread Christoph Hellwig
Looks good, Reviewed-by: Christoph Hellwig ___ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu

Re: [PATCH v5 3/6] mm: make alloc_contig_range work at pageblock granularity

2022-02-13 Thread Christoph Hellwig
> +int > +isolate_single_pageblock(unsigned long boundary_pfn, gfp_t gfp_flags, int > isolate_before_boundary); Please avoid the completely unreadably long line. i.e. int isolate_single_pageblock(unsigned long boundary_pfn, gfp_t gfp_flags, int isolate_before_boundary); Same in

[PATCH 23/23] ALSA: hda/realtek: Make use of the helper component_compare_dev_name

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Jeremy Szu Cc: Werner Sembach Cc: Hui Wang Cc: Cameron Berkenpas Cc: Kailang Yang Cc: Lucas Tanure Cc: Sami Loone Cc: alsa-de...@alsa-project.org Signed-off-by: Yong Wu --- sound/pci/hda/patch_realtek

[PATCH 22/23] video: omapfb: dss: Make use of the helper component_compare_dev

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Helge Deller Cc: linux-o...@vger.kernel.org Cc: linux-fb...@vger.kernel.org Signed-off-by: Yong Wu --- drivers/video/fbdev/omap2/omapfb/dss/dss.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/video/fbdev/omap

[PATCH 21/23] power: supply: ab8500: Make use of the helper component_compare_dev

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Sebastian Reichel Cc: linux...@vger.kernel.org Signed-off-by: Yong Wu --- drivers/power/supply/ab8500_charger.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/sup

[PATCH 20/23] ASoC: codecs: wcd938x: Make use of the helper component_compare/release_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare/release helpers from component. Cc: Liam Girdwood Cc: Mark Brown Cc: Jaroslav Kysela Cc: Takashi Iwai Cc: Srinivas Kandagatla Cc: Pierre-Louis Bossart Cc: alsa-de...@alsa-project.org Signed-off-by: Yong Wu --- sound/soc/codecs/wcd938x.c | 18 -- 1 fil

[PATCH 19/23] iommu/mediatek: Make use of the helper component_compare/release_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare/release helpers from component. Cc: Joerg Roedel Cc: Will Deacon Cc: Matthias Brugger Cc: Yunfei Wang Cc: Libo Kang Cc: Anan Sun Cc: Mingyuan Ma Cc: Xueqi Zhang Signed-off-by: Yong Wu --- drivers/iommu/mtk_iommu.c| 4 ++-- drivers/iommu/mtk_iommu.h| 10 ---

[PATCH 18/23] drm: of: Make use of the helper component_release_of

2022-02-13 Thread Yong Wu via iommu
Use the common release helper from component. Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Signed-off-by: Yong Wu --- drivers/gpu/drm/drm_of.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 5

[PATCH 17/23] drm/vc4: Make use of the helper component_compare_dev

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Emma Anholt Cc: Maxime Ripard Signed-off-by: Yong Wu --- drivers/gpu/drm/vc4/vc4_drv.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 16abc3a3d601..e

[PATCH 16/23] drm/omap: dss: Make use of the helper component_compare_dev

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Tomi Valkeinen Cc: Cai Huoqing Cc: Arnd Bergmann Cc: Laurent Pinchart Signed-off-by: Yong Wu --- drivers/gpu/drm/omapdrm/dss/dss.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/gpu/drm/omapdrm/dss/dss.c b

[PATCH 15/23] drm/mcde: Make use of the helper component_compare_dev

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Linus Walleij Signed-off-by: Yong Wu --- drivers/gpu/drm/mcde/mcde_drv.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mcde/mcde_drv.c b/drivers/gpu/drm/mcde/mcde_drv.c index 5b5afc6aaf8e..a17bfbb152a2

[PATCH 14/23] drm/exynos: Make use of the helper component_compare_dev

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Inki Dae Cc: Joonyoung Shim Cc: Seung-Woo Kim Cc: Kyungmin Park Cc: Krzysztof Kozlowski Cc: linux-samsung-...@vger.kernel.org Signed-off-by: Yong Wu --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 8 +--- 1 file changed, 1 insertion(+), 7

[PATCH 13/23] drm/rockchip: Make use of the helper component_compare_dev

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Sandy Huang Cc: "Heiko St¨¹bner" Cc: linux-rockc...@lists.infradead.org Signed-off-by: Yong Wu --- drivers/gpu/drm/rockchip/rockchip_drm_drv.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/rockchip/ro

[PATCH 12/23] drm/sun4i: Make use of the helper component_compare_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Maxime Ripard Cc: Chen-Yu Tsai Cc: Jernej Skrabec Cc: linux-su...@lists.linux.dev Signed-off-by: Yong Wu --- drivers/gpu/drm/sun4i/sun4i_drv.c | 11 +-- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/drivers/gpu/drm/sun4

[PATCH 11/23] drm/sti: Make use of the helper component_compare_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Benjamin Gaignard Signed-off-by: Yong Wu --- drivers/gpu/drm/sti/sti_drv.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c index c7efb43b83ee..890c3103f6bd 1

[PATCH 10/23] drm/sprd: Make use of the helper component_compare_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Orson Zhai Cc: Baolin Wang Cc: Chunyan Zhang Cc: Kevin Tang Cc: Maarten Lankhorst Cc: Maxime Ripard Signed-off-by: Yong Wu --- drivers/gpu/drm/sprd/sprd_drm.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers

[PATCH 09/23] drm/msm: Make use of the helper component_compare_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Rob Clark Cc: Sean Paul Cc: Abhinav Kumar Cc: linux-arm-...@vger.kernel.org Cc: freedr...@lists.freedesktop.org Signed-off-by: Yong Wu --- drivers/gpu/drm/msm/msm_drv.c | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) di

[PATCH 08/23] drm/meson: Make use of the helper component_compare_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Neil Armstrong Cc: Kevin Hilman Cc: Jerome Brunet Cc: Martin Blumenstingl Cc: linux-amlo...@lists.infradead.org Signed-off-by: Yong Wu --- drivers/gpu/drm/meson/meson_drv.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff

[PATCH 07/23] drm/mediatek: Make use of the helper component_compare_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Chun-Kuang Hu Cc: Philipp Zabel Signed-off-by: Yong Wu --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_d

[PATCH 06/23] drm/ingenic: Make use of the helper component_compare_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Paul Cercueil Cc: linux-m...@vger.kernel.org Signed-off-by: Yong Wu --- drivers/gpu/drm/ingenic/ingenic-drm-drv.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ingenic/ingenic-drm-drv.c b/drivers/gpu/

[PATCH 05/23] drm/hirin: Make use of the helper component_compare_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: Xinliang Liu Cc: Tian Tao Cc: John Stultz Cc: Xinwei Kong Cc: Chen Feng Cc: Thomas Zimmermann Cc: Laurent Pinchart Cc: Hao Fang Signed-off-by: Yong Wu --- drivers/gpu/drm/hisilicon/kirin/kirin_drm_drv.c | 7 +-- 1 file changed, 1 inse

[PATCH 04/23] drm/etnaviv: Make use of the helper component_compare_of/dev_name

2022-02-13 Thread Yong Wu via iommu
Use the common compare helpers from component. Cc: Lucas Stach Cc: Russell King Cc: Christian Gmeiner Cc: etna...@lists.freedesktop.org Signed-off-by: Yong Wu --- drivers/gpu/drm/etnaviv/etnaviv_drv.c | 16 ++-- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/driver

[PATCH 03/23] drm/armada: Make use of the helper component_compare_of/dev_name

2022-02-13 Thread Yong Wu via iommu
Use the common compare helpers from component. Cc: Russell King Signed-off-by: Yong Wu --- drivers/gpu/drm/armada/armada_drv.c | 17 +++-- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c index

[PATCH 02/23] drm/komeda: Make use of the helper component_compare_of

2022-02-13 Thread Yong Wu via iommu
Use the common compare helper from component. Cc: "James (Qian) Wang" Cc: Liviu Dudau Cc: Mihail Atanassov Cc: Brian Starkey Signed-off-by: Yong Wu --- drivers/gpu/drm/arm/display/komeda/komeda_drv.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/gpu/drm/ar

[PATCH 01/23] component: Add common helper for compare/release functions

2022-02-13 Thread Yong Wu via iommu
The component requires the compare/release functions, there are so many copies in current kernel. Just define four common helpers for them. Cc: Greg Kroah-Hartman Cc: "Rafael J. Wysocki" Signed-off-by: Yong Wu --- I have run "make htmldocs". Due to my poor english, If the grammer is wrong or ne

[PATCH 00/23] component: Add common helpers for compare/release

2022-02-13 Thread Yong Wu via iommu
The component requires the compare/release functions, there are many copies in current kernel. This patchset just defines four common helpers for them. No functional change. Change note: v1: a) Split the original patch into many small patches. b) Use device_match_of_node helper. c) Move th

Re: [PATCH v1 00/10] iommu/vt-d: Some Intel IOMMU cleanups

2022-02-13 Thread Lu Baolu
On 2/7/22 2:41 PM, Lu Baolu wrote: Hi folks, After a long time of evolution, the drivers/iommu/intel/iommu.c becomes fat and a bit messy. This series tries to cleanup and refactor the driver to make it more concise. Your comments are very appreciated. Best regards, baolu Lu Baolu (10): iomm

[PATCH v2 11/11] iommu/vt-d: Use rculist for per-domain device list

2022-02-13 Thread Lu Baolu
Use rculist for list of devices attached by a domain. And use the RCU lock for read/write protection. As both the global device_domain array and per-domain device_domain list are protected by RCU lock now, there is no need to use the spinlock anymore. Cleanup device_domain_lock. Signed-off-by: Lu

[PATCH v2 10/11] iommu/vt-d: Use xarray for global device_domain_info

2022-02-13 Thread Lu Baolu
Replace the existing global device_domain_list with an array so that it could be rapidly searched. The index of the array is composed by the PCI segment, bus and devfn. Use RCU for lock protection. Signed-off-by: Lu Baolu --- include/linux/intel-iommu.h | 1 - drivers/iommu/intel/iommu.c | 72 +

[PATCH v2 09/11] iommu/vt-d: Remove commented code

2022-02-13 Thread Lu Baolu
This removes unnecessary commented code. Signed-off-by: Lu Baolu --- drivers/iommu/intel/iommu.c | 10 +- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index d7fac0a1761d..fb17ed8c08f3 100644 --- a/drivers/iommu/int

[PATCH v2 08/11] iommu/vt-d: Fix indentation of goto labels

2022-02-13 Thread Lu Baolu
Remove blanks before goto labels. Signed-off-by: Lu Baolu --- drivers/iommu/intel/iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index dfd3698406fa..d7fac0a1761d 100644 --- a/drivers/iommu/intel/iommu.c ++

[PATCH v2 07/11] iommu/vt-d: Remove unnecessary prototypes

2022-02-13 Thread Lu Baolu
Some prototypes in iommu.c are unnecessary. Delete them. Signed-off-by: Lu Baolu --- drivers/iommu/intel/iommu.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index b6a6fea8525d..dfd3698406fa 100644 --- a/drivers/iommu/intel/iom

[PATCH v2 06/11] iommu/vt-d: Remove unnecessary includes

2022-02-13 Thread Lu Baolu
Remove unnecessary include files and sort the remaining alphabetically. Signed-off-by: Lu Baolu --- drivers/iommu/intel/iommu.c | 34 +++--- 1 file changed, 7 insertions(+), 27 deletions(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index

[PATCH v2 05/11] iommu/vt-d: Remove DEFER_DEVICE_DOMAIN_INFO

2022-02-13 Thread Lu Baolu
Allocate and set the per-device iommu private data during iommu device probe. This makes the per-device iommu private data always available during iommu_probe_device() and iommu_release_device(). With this changed, the dummy DEFER_DEVICE_DOMAIN_INFO pointer could be removed. The wrappers for gettin

[PATCH v2 04/11] iommu/vt-d: Remove domain and devinfo mempool

2022-02-13 Thread Lu Baolu
The domain and devinfo memory blocks are only allocated during device probe and released during remove. There's no hot-path context, hence no need for memory pools. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig --- drivers/iommu/intel/iommu.c | 104 ++--

[PATCH v2 03/11] iommu/vt-d: Remove iova_cache_get/put()

2022-02-13 Thread Lu Baolu
These have been done in drivers/iommu/dma-iommu.c. Remove this duplicate code. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig --- drivers/iommu/intel/iommu.c | 5 - 1 file changed, 5 deletions(-) diff --git a/drivers/iommu/intel/iommu.c b/drivers/iommu/intel/iommu.c index b30759338

[PATCH v2 01/11] iommu/vt-d: Remove intel_iommu::domains

2022-02-13 Thread Lu Baolu
The "domains" field of the intel_iommu structure keeps the mapping of domain_id to dmar_domain. This information is not used anywhere. Remove and cleanup it to avoid unnecessary memory consumption. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig --- include/linux/intel-iommu.h | 1 - dr

[PATCH v2 02/11] iommu/vt-d: Remove finding domain in dmar_insert_one_dev_info()

2022-02-13 Thread Lu Baolu
The Intel IOMMU driver has already converted to use default domain framework in iommu core. There's no need to find a domain for the device in the domain attaching path. Cleanup that code. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig --- drivers/iommu/intel/iommu.c | 21 --

[PATCH v2 00/11] iommu/vt-d: Some Intel IOMMU cleanups

2022-02-13 Thread Lu Baolu
Hi folks, After a long time of evolution, the drivers/iommu/intel/iommu.c becomes a bit messy. This series tries to cleanup and refactor the driver to make it more concise. It includes, - Remove some unnecessary code, includes and prototypes; - Move creating per-device driver data from domain_at

Re: [PATCH v2 00/10] iommu cleanup and refactoring

2022-02-13 Thread Lu Baolu
On 2/8/22 9:25 AM, Lu Baolu wrote: Hi, The guest pasid and aux-domain related code are dead code in current iommu subtree. As we have reached a consensus that all these features should be based on the new iommufd framework (which is under active development), the first part of this series remove

[PATCH v3 10/10] iommu: Split struct iommu_ops

2022-02-13 Thread Lu Baolu
Move the domain specific operations out of struct iommu_ops into a new structure that only has domain specific operations. This solves the problem of needing to know if the method vector for a given operation needs to be retrieved from the device or the domain. Logically the domain ops are the ones

[PATCH v3 09/10] iommu: Use dev_iommu_ops() helper

2022-02-13 Thread Lu Baolu
This converts all the feasible instances of dev->bus->iommu_ops to dev_iommu_ops() in order to make the operation of obtaining iommu_ops from a device consistent. The dev_iommu_ops() warns on NULL ops, so we don't need to keep the confusing ops check. Suggested-by: Robin Murphy Signed-off-by: Lu

[PATCH v3 08/10] iommu: Remove unused argument in is_attach_deferred

2022-02-13 Thread Lu Baolu
The is_attach_deferred iommu_ops callback is a device op. The domain argument is unnecessary and never used. Remove it to make code clean. Suggested-by: Robin Murphy Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe --- include/linux/iommu.h | 2 +-

[PATCH v3 07/10] iommu: Use right way to retrieve iommu_ops

2022-02-13 Thread Lu Baolu
The common iommu_ops is hooked to both device and domain. When a helper has both device and domain pointer, the way to get the iommu_ops looks messy in iommu core. This sorts out the way to get iommu_ops. The device related helpers go through device pointer, while the domain related ones go through

[PATCH v3 06/10] drm/nouveau/device: Get right pgsize_bitmap of iommu_domain

2022-02-13 Thread Lu Baolu
The supported page sizes of an iommu_domain are saved in the pgsize_bitmap field. Retrieve the value from the right place. Signed-off-by: Lu Baolu Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20211218074546.1772553-1-baolu...@linux.intel.com Reviewed-by: Christoph Hellwig Reviewed

[PATCH v3 05/10] iommu: Remove apply_resv_region

2022-02-13 Thread Lu Baolu
The apply_resv_region callback in iommu_ops was introduced to reserve an IOVA range in the given DMA domain when the IOMMU driver manages the IOVA by itself. As all drivers converted to use dma-iommu in the core, there's no driver using this anymore. Remove it to avoid dead code. Suggested-by: Rob

[PATCH v3 04/10] iommu: Remove aux-domain related interfaces and iommu_ops

2022-02-13 Thread Lu Baolu
The aux-domain related interfaces and iommu_ops are not referenced anywhere in the tree. We've also reached a consensus to redesign it based the new iommufd framework. Remove them to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe --- includ

[PATCH v3 03/10] iommu/vt-d: Remove aux-domain related callbacks

2022-02-13 Thread Lu Baolu
The aux-domain related callbacks are not called in the tree. Remove them to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe --- include/linux/intel-iommu.h | 17 -- drivers/iommu/intel/debugfs.c | 3 +- drivers/iommu/intel/iommu.c | 3

[PATCH v3 02/10] iommu: Remove guest pasid related interfaces and definitions

2022-02-13 Thread Lu Baolu
The guest pasid related uapi interfaces and definitions are not referenced anywhere in the tree. We've also reached a consensus to replace them with a new iommufd design. Remove them to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe --- inc

[PATCH v3 01/10] iommu/vt-d: Remove guest pasid related callbacks

2022-02-13 Thread Lu Baolu
The guest pasid related callbacks are not called in the tree. Remove them to avoid dead code. Signed-off-by: Lu Baolu Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe --- include/linux/intel-iommu.h | 10 -- include/linux/intel-svm.h | 12 --- drivers/iommu/intel/pasid.h | 4 -

[PATCH v3 00/10] iommu cleanup and refactoring

2022-02-13 Thread Lu Baolu
Hi, The guest pasid and aux-domain related code are dead code in current iommu subtree. As we have reached a consensus that all these features should be based on the new iommufd framework (which is under active development), the first part of this series removes and cleanups all the dead code. Th

Re: [PATCH v2 08/10] iommu: Remove unused argument in is_attach_deferred

2022-02-13 Thread Lu Baolu
Hi Robin, On 2/9/22 9:52 PM, Robin Murphy wrote: On 2022-02-08 01:25, Lu Baolu wrote: The is_attach_deferred iommu_ops callback is a device op. The domain argument is unnecessary and never used. Remove it to make code clean. Suggested-by: Robin Murphy Signed-off-by: Lu Baolu ---   include/li

Re: [PATCH] iommu/vt-d: Fix list_add double add when enabling VMD and scalable mode

2022-02-13 Thread Lu Baolu
Hi Adrian, On 2/11/22 10:45 AM, Adrian Huang wrote: From: Adrian Huang When enabling VMD and IOMMU scalable mode, the following kernel panic call trace/kernel log is shown in Eagle Stream platform (Sapphire Rapids CPU) during booting: pci :59:00.5: Adding to iommu group 42 ... vmd :59:

Re: [PATCH v1 00/10] iommu/vt-d: Some Intel IOMMU cleanups

2022-02-13 Thread Lu Baolu
Hi Jason, On 2/11/22 9:01 PM, Jason Gunthorpe wrote: On Mon, Feb 07, 2022 at 02:41:32PM +0800, Lu Baolu wrote: Hi folks, After a long time of evolution, the drivers/iommu/intel/iommu.c becomes fat and a bit messy. This series tries to cleanup and refactor the driver to make it more concise. Yo