iommu/vt-d: Make intel-iommu.h private
Subsystems (10)
Lu Baolu
maintainercover iommu/vt-d: Make intel-iommu.h private
Hi folks,
The include/linux/intel-iommu.h should be private to the Intel IOMMU driver. Other drivers or components should interact with the IOMMU drivers through the kAPIs provided by the iommu core.
This series cleanups all includes of intel-iommu.h outside of the Intel IOMMU driver and move this header from include/linux to drivers/iommu/intel/.
No functional changes intended. Please help to review and suggest.
Best regards,
baolu
Lu Baolu (7):
iommu/vt-d: Move trace/events/intel_iommu.h under iommu agp/intel: Use per device iommu check iommu/vt-d: Remove unnecessary exported symbol drm/i915: Remove unnecessary include
KVM: x86: Remove unnecessary include x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU iommu/vt-d: Move include/linux/intel_iommu.h under iommu
include/linux/tboot.h | 2 -- drivers/gpu/drm/i915/i915_drv.h | 1 - .../iommu/intel/iommu.h | 1 - .../iommu/intel/trace.h | 7 +++++- arch/x86/kernel/tboot.c | 15 ------------- arch/x86/kvm/x86.c | 1 - drivers/char/agp/intel-gtt.c | 17 ++++++-------- drivers/gpu/drm/i915/display/intel_display.c | 1 - .../gpu/drm/i915/gem/i915_gem_execbuffer.c | 1 - drivers/iommu/intel/cap_audit.c | 2 +- drivers/iommu/intel/debugfs.c | 2 +- drivers/iommu/intel/dmar.c | 4 ++-- drivers/iommu/intel/iommu.c | 22 +++++++++++++------ drivers/iommu/intel/irq_remapping.c | 2 +- drivers/iommu/intel/pasid.c | 2 +- drivers/iommu/intel/perf.c | 2 +- drivers/iommu/intel/svm.c | 4 ++-- drivers/iommu/intel/trace.c | 2 +- MAINTAINERS | 1 - 19 files changed, 38 insertions(+), 51 deletions(-) rename include/linux/intel-iommu.h => drivers/iommu/intel/iommu.h (99%) rename include/trace/events/intel_iommu.h => drivers/iommu/intel/trace.h (93%)
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Lu Baolu
maintainerPATCH 1/7 iommu/vt-d: Move trace/events/intel_iommu.h under iommu
This header file is private to the Intel IOMMU driver. Move it to the driver folder.
--- .../trace/events/intel_iommu.h => drivers/iommu/intel/trace.h | 4 ++++ drivers/iommu/intel/dmar.c | 2 +- drivers/iommu/intel/svm.c | 2 +- drivers/iommu/intel/trace.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) rename include/trace/events/intel_iommu.h => drivers/iommu/intel/trace.h (94%)
drivers/iommu/intel/trace.h renamed from include/trace/events/intel_iommu.h +4 -0
@@ -91,4 +91,8 @@ TRACE_EVENT(prq_report,#endif /* _TRACE_INTEL_IOMMU_H */ /* This part must be outside protection */ +#undef TRACE_INCLUDE_PATH +#undef TRACE_INCLUDE_FILE +#define TRACE_INCLUDE_PATH ../../drivers/iommu/intel/ +#define TRACE_INCLUDE_FILE trace#include <trace/define_trace.h>
drivers/iommu/intel/dmar.c +1 -1
@@ -31,10 +31,10 @@#include <linux/limits.h> #include <asm/irq_remapping.h> #include <asm/iommu_table.h> -#include <trace/events/intel_iommu.h> #include "../irq_remapping.h" #include "perf.h" +#include "trace.h" typedef int (*dmar_res_handler_t )(struct acpi_dmar_header *,void *);struct dmar_res_callback {
drivers/iommu/intel/svm.c +1 -1
@@ -21,11 +21,11 @@#include <linux/ioasid.h> #include <asm/page.h> #include <asm/fpu/api.h> -#include <trace/events/intel_iommu.h> #include "pasid.h" #include "perf.h" #include "../iommu-sva-lib.h" +#include "trace.h" static irqreturn_t prq_event_thread (int irq,void *d);static void intel_svm_drain_prq (struct device *dev,u32 pasid);
drivers/iommu/intel/trace.c +1 -1
@@ -11,4 +11,4 @@#include <linux/types.h> #define CREATE_TRACE_POINTS -#include <trace/events/intel_iommu.h> +#include "trace.h"
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 1/7] iommu/vt-d: Move trace/events/intel_iommu.h under iommu
Quoted 11 lines · Lu Baolu
This header file is private to the Intel IOMMU driver. Move it to the driver folder.
Signed-off-by Lu Baolu <[email protected]>--- .../trace/events/intel_iommu.h => drivers/iommu/intel/trace.h | 4 ++++ drivers/iommu/intel/dmar.c | 2 +- drivers/iommu/intel/svm.c | 2 +- drivers/iommu/intel/trace.c | 2 +- 4 files changed, 7 insertions(+), 3 deletions(-) rename include/trace/events/intel_iommu.h => drivers/iommu/intel/trace.h (94%)
Jason
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Lu Baolu
maintainerPATCH 2/7 agp/intel: Use per device iommu check
In reply to Lu BaoluThe IOMMU subsystem has already provided an interface to query whether the IOMMU hardware is enabled for a specific device. This changes the check from Intel specific intel_iommu_gfx_mapped (globally exported by the Intel IOMMU driver) to probing the presence of IOMMU on a specific device using the generic device_iommu_mapped().
This follows commit cca084692394a ("drm/i915: Use per device iommu check") which converted drm/i915 driver to use device_iommu_mapped().
--- drivers/char/agp/intel-gtt.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
drivers/char/agp/intel-gtt.c +7 -10
@@ -20,7 +20,7 @@#include <linux/kernel.h> #include <linux/pagemap.h> #include <linux/agp_backend.h> -#include <linux/intel-iommu.h> +#include <linux/iommu.h> #include <linux/delay.h> #include <asm/smp.h> #include "agp.h"
@@ -573,18 +573,15 @@ static void intel_gtt_cleanup(void)*/ static inline int needs_ilk_vtd_wa (void ) { -#ifdef CONFIG_INTEL_IOMMU const unsigned short gpu_devid = intel_private.pcidev->device; -/* Query intel_iommu to see if we need the workaround. Presumably that -* was loaded first. +/* +* Query iommu subsystem to see if we need the workaround. Presumably +* that was loaded first. */ -if ((gpu_devid ==PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG || - gpu_devid ==PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG ) && - intel_iommu_gfx_mapped) -return 1 ; -#endif -return 0 ; +return ((gpu_devid ==PCI_DEVICE_ID_INTEL_IRONLAKE_D_IG || + gpu_devid ==PCI_DEVICE_ID_INTEL_IRONLAKE_M_IG ) && +device_iommu_mapped (&intel_private.pcidev->dev)); }static bool intel_gtt_can_wc (void )
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 2/7] agp/intel: Use per device iommu check
Quoted 6 lines · Lu Baolu
The IOMMU subsystem has already provided an interface to query whether the IOMMU hardware is enabled for a specific device. This changes the check from Intel specific
intel_iommu_gfx_mapped(globally exported by the Intel IOMMU driver) to probing the presence of IOMMU on a specific device using the genericdevice_iommu_mapped().
Quoted 7 lines
This follows commit
cca084692394a("drm/i915: Use per device iommu check") which converted drm/i915 driver to usedevice_iommu_mapped().Signed-off-by Lu Baolu <[email protected]>--- drivers/char/agp/intel-gtt.c | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-)
Jason
Lu Baolu
maintainerPATCH 3/7 iommu/vt-d: Remove unnecessary exported symbol
In reply to Lu BaoluThe exported symbol intel_iommu_gfx_mapped is not used anywhere in the tree. Remove it to avoid dead code.
--- include/linux/intel-iommu.h | 1 - drivers/iommu/intel/iommu.c | 6 ------ 2 files changed, 7 deletions(-)
include/linux/intel-iommu.h +0 -1
@@ -790,7 +790,6 @@ extern int iommu_calculate_agaw(struct intel_iommu *iommu);extern int iommu_calculate_max_sagaw (struct intel_iommu *iommu);extern int dmar_disabled;extern int intel_iommu_enabled; -extern int intel_iommu_gfx_mapped;#else static inline int iommu_calculate_agaw (struct intel_iommu *iommu) {
drivers/iommu/intel/iommu.c +0 -6
@@ -314,9 +314,6 @@ static int iommu_skip_te_disable;#define IDENTMAP_GFX 2#define IDENTMAP_AZALIA 4 -int intel_iommu_gfx_mapped; -EXPORT_SYMBOL_GPL (intel_iommu_gfx_mapped); -DEFINE_SPINLOCK (device_domain_lock);static LIST_HEAD (device_domain_list);
@@ -4117,9 +4114,6 @@ int __init intel_iommu_init(void)if (list_empty (&dmar_satc_units))pr_info ("No SATC found\n" ); -if (dmar_map_gfx) - intel_iommu_gfx_mapped =1 ; -init_no_remapping_devices (); ret =init_dmars ();
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 3/7] iommu/vt-d: Remove unnecessary exported symbol
Quoted 8 lines · Lu Baolu
The exported symbol
intel_iommu_gfx_mappedis not used anywhere in the tree. Remove it to avoid dead code.Signed-off-by Lu Baolu <[email protected]>--- include/linux/intel-iommu.h | 1 - drivers/iommu/intel/iommu.c | 6 ------ 2 files changed, 7 deletions(-)
Maybe could squash to the prior patch
Jason
Lu Baolu
maintainerPATCH 4/7 drm/i915: Remove unnecessary include
In reply to Lu Baoluintel-iommu.h is not needed in drm/i915 anymore. Remove its include.
--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 1 - 3 files changed, 3 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +0 -1
@@ -36,7 +36,6 @@#include <linux/i2c.h> #include <linux/i2c-algo-bit.h> -#include <linux/intel-iommu.h> #include <linux/pm_qos.h> #include <drm/drm_connector.h>
drivers/gpu/drm/i915/display/intel_display.c +0 -1
@@ -27,7 +27,6 @@#include <acpi/video.h> #include <linux/i2c.h> #include <linux/input.h> -#include <linux/intel-iommu.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/dma-resv.h>
drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +0 -1
@@ -4,7 +4,6 @@* Copyright © 2008,2010 Intel Corporation */ -#include <linux/intel-iommu.h> #include <linux/dma-resv.h> #include <linux/sync_file.h> #include <linux/uaccess.h>
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 4/7] drm/i915: Remove unnecessary include
Quoted 1 line · Lu Baolu
intel-iommu.his not needed in drm/i915 anymore. Remove its include.
Thanks for the cleanups. Do you want to keep the patches together or want us to pick this up via drm-intel?
If you want to keep the patches together,
for merging via whichever tree suits you best. Just let us know.
BR,
Jani.
Quoted 44 lines
Signed-off-by Lu Baolu <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 1 - 3 files changed, 3 deletions(-)drivers/gpu/drm/i915/i915_drv.h +0
-1@@ -36,7 +36,6 @@#include <linux/i2c.h> #include <linux/i2c-algo-bit.h> -#include <linux/intel-iommu.h> #include <linux/pm_qos.h> #include <drm/drm_connector.h> drivers/gpu/drm/i915/display/intel_display.c +0
-1@@ -27,7 +27,6 @@#include <acpi/video.h> #include <linux/i2c.h> #include <linux/input.h> -#include <linux/intel-iommu.h> #include <linux/kernel.h> #include <linux/module.h> #include <linux/dma-resv.h> drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c +0
-1@@ -4,7 +4,6 @@* Copyright © 2008,2010 Intel Corporation */ -#include <linux/intel-iommu.h> #include <linux/dma-resv.h> #include <linux/sync_file.h> #include <linux/uaccess.h>
Signature · 5 lines
Jani Nikula, Intel Open Source Graphics Center _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 4/7] drm/i915: Remove unnecessary include
In reply to Lu BaoluQuoted 8 lines · Lu Baolu
intel-iommu.his not needed in drm/i915 anymore. Remove its include.Signed-off-by Lu Baolu <[email protected]>--- drivers/gpu/drm/i915/i915_drv.h | 1 - drivers/gpu/drm/i915/display/intel_display.c | 1 - drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 1 - 3 files changed, 3 deletions(-)
Jason
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Lu Baolu
maintainerPATCH 5/7 KVM: x86: Remove unnecessary include
In reply to Lu Baoluintel-iommu.h is not needed in kvm/x86 anymore. Remove its include.
--- arch/x86/kvm/x86.c | 1 - 1 file changed, 1 deletion(-)
arch/x86/kvm/x86.c +0 -1
@@ -41,7 +41,6 @@#include <linux/mman.h> #include <linux/highmem.h> #include <linux/iommu.h> -#include <linux/intel-iommu.h> #include <linux/cpufreq.h> #include <linux/user-return-notifier.h> #include <linux/srcu.h>
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 5/7] KVM: x86: Remove unnecessary include
Quoted 6 lines · Lu Baolu
intel-iommu.his not needed in kvm/x86 anymore. Remove its include.Signed-off-by Lu Baolu <[email protected]>--- arch/x86/kvm/x86.c | 1 - 1 file changed, 1 deletion(-)
Jason
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Lu Baolu
maintainerPATCH 6/7 x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU
In reply to Lu Baolutboot_force_iommu() is only called by the Intel IOMMU driver. Move the helper into that driver. No functional change intended.
--- include/linux/tboot.h | 2 -- arch/x86/kernel/tboot.c | 15 --------------- drivers/iommu/intel/iommu.c | 14 ++++++++++++++ 3 files changed, 14 insertions(+), 17 deletions(-)
include/linux/tboot.h +0 -2
@@ -126,7 +126,6 @@ extern void tboot_probe(void);extern void tboot_shutdown (u32 shutdown_type);extern struct acpi_table_header *tboot_get_dmar_table (struct acpi_table_header *dmar_tbl); -extern int tboot_force_iommu (void );#else
@@ -136,7 +135,6 @@ extern int tboot_force_iommu(void);#define tboot_sleep (sleep_state, pm1a_control, pm1b_control) \ do { } while (0)#define tboot_get_dmar_table (dmar_tbl) (dmar_tbl) -#define tboot_force_iommu () 0#endif /* !CONFIG_INTEL_TXT */
arch/x86/kernel/tboot.c +0 -15
@@ -6,7 +6,6 @@* Copyright (c) 2006-2009, Intel Corporation */ -#include <linux/intel-iommu.h> #include <linux/init_task.h> #include <linux/spinlock.h> #include <linux/export.h>
@@ -517,17 +516,3 @@ struct acpi_table_header *tboot_get_dmar_table(struct acpi_table_header *dmar_tbreturn dmar_tbl; } - -int tboot_force_iommu (void ) -{ -if (!tboot_enabled ()) -return 0 ; - -if (no_iommu || dmar_disabled) -pr_warn ("Forcing Intel-IOMMU to enabled\n" ); - - dmar_disabled =0 ; - no_iommu =0 ; - -return 1 ; -}
drivers/iommu/intel/iommu.c +14 -0
@@ -4043,6 +4043,20 @@ static int __init probe_acpi_namespace_devices(void)return 0 ; } +static __init int tboot_force_iommu (void ) +{ +if (!tboot_enabled ()) +return 0 ; + +if (no_iommu || dmar_disabled) +pr_warn ("Forcing Intel-IOMMU to enabled\n" ); + + dmar_disabled =0 ; + no_iommu =0 ; + +return 1 ; +} +int __init intel_iommu_init (void ) {int ret = -ENODEV ;
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU
Quoted 9 lines · Lu Baolu
tboot_force_iommu()is only called by the Intel IOMMU driver. Move the helper into that driver. No functional change intended.Signed-off-by Lu Baolu <[email protected]>--- include/linux/tboot.h | 2 -- arch/x86/kernel/tboot.c | 15 --------------- drivers/iommu/intel/iommu.c | 14 ++++++++++++++ 3 files changed, 14 insertions(+), 17 deletions(-)
drivers/iommu/intel/iommu.c static int __init probe_acpi_namespace_devices(void) · line 4052
Quoted 7 lines
drivers/iommu/intel/iommu.c +7
-0+static __init int tboot_force_iommu (void ) +{ +if (!tboot_enabled ()) +return 0 ; + +if (no_iommu || dmar_disabled) +pr_warn ("Forcing Intel-IOMMU to enabled\n" );
Unrelated, but when we are in the special secure IOMMU modes, do we force ATS off? Specifically does the IOMMU reject TLPs that are marked as translated?
Jason
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU
Hi Jason,
Quoted 3 lines · Jason Gunthorpe
Unrelated, but when we are in the special secure IOMMU modes, do we force ATS off? Specifically does the IOMMU reject TLPs that are marked as translated?
Yes, VT-d context entry has a Device TLB Enable bit, if 0, it means "Translation Requests (with or without PASID) and Translated Requests received and processed through this scalable-mode context-entry are blocked."
Thanks,
Jacob
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Baolu Lu
maintainerRe: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU
In reply to Jason GunthorpeHi Jason,
Quoted 10 lines · Jason Gunthorpe
drivers/iommu/intel/iommu.c static int __init probe_acpi_namespace_devices(void) · line 4052
Quoted 7 lines
drivers/iommu/intel/iommu.c +7
-0+static __init int tboot_force_iommu (void ) +{ +if (!tboot_enabled ()) +return 0 ; + +if (no_iommu || dmar_disabled) +pr_warn ("Forcing Intel-IOMMU to enabled\n" );Unrelated, but when we are in the special secure IOMMU modes, do we force ATS off? Specifically does the IOMMU reject TLPs that are marked as translated?
Good question. From IOMMU point of view, I don't see a point to force ATS off, but trust boot involves lots of other things that I am not familiar with. Anybody else could help to answer?
Best regards,
baolu
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU
Quoted 14 lines · Baolu Lu
Hi Jason,
Quoted 10 lines · Jason Gunthorpe
drivers/iommu/intel/iommu.c static int __init probe_acpi_namespace_devices(void) · line 4052
Quoted 7 lines
drivers/iommu/intel/iommu.c +7
-0+static __init int tboot_force_iommu (void ) +{ +if (!tboot_enabled ()) +return 0 ; + +if (no_iommu || dmar_disabled) +pr_warn ("Forcing Intel-IOMMU to enabled\n" );Unrelated, but when we are in the special secure IOMMU modes, do we force ATS off? Specifically does the IOMMU reject TLPs that are marked as translated?
Quoted 3 lines
Good question. From IOMMU point of view, I don't see a point to force ATS off, but trust boot involves lots of other things that I am not familiar with. Anybody else could help to answer?
ATS is inherently not secure, if a rouge device can issue a TLP with the translated bit set then it has unlimited access to host memory.
Many of these trusted iommu scenarios rely on the idea that a rouge device cannot DMA to arbitary system memory.
Jason
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Baolu Lu
maintainerRe: [PATCH 6/7] x86/boot/tboot: Move tboot_force_iommu() to Intel IOMMU
Quoted 15 lines · Jason Gunthorpe
Quoted 14 lines · Baolu Lu
Hi Jason,
Quoted 10 lines · Jason Gunthorpe
drivers/iommu/intel/iommu.c static int __init probe_acpi_namespace_devices(void) · line 4052
Quoted 7 lines
drivers/iommu/intel/iommu.c +7
-0+static __init int tboot_force_iommu (void ) +{ +if (!tboot_enabled ()) +return 0 ; + +if (no_iommu || dmar_disabled) +pr_warn ("Forcing Intel-IOMMU to enabled\n" );Unrelated, but when we are in the special secure IOMMU modes, do we force ATS off? Specifically does the IOMMU reject TLPs that are marked as translated?
Quoted 6 lines
Quoted 3 lines
Good question. From IOMMU point of view, I don't see a point to force ATS off, but trust boot involves lots of other things that I am not familiar with. Anybody else could help to answer?
ATS is inherently not secure, if a rouge device can issue a TLP with the translated bit set then it has unlimited access to host memory.
Agreed. The current logic is that the platform lets the OS know such devices through firmware (ACPI/DT) and OS sets the untrusted flag in their device structures. The IOMMU subsystem will disable ATS on devices with the untrusted flag set.
There is some discussion about allowing the supervisor users to set the trust policy through the sysfs ABI, but I don't think this has happened in upstream kernel.
Quoted 2 lines
Many of these trusted iommu scenarios rely on the idea that a rouge device cannot DMA to arbitary system memory.
I am not sure whether tboot has the same requirement.
Best regards,
baolu
Lu Baolu
maintainerPATCH 7/7 iommu/vt-d: Move include/linux/intel_iommu.h under iommu
In reply to Lu BaoluThis header file is private to the Intel IOMMU driver. Move it to the driver folder.
--- include/linux/intel-iommu.h => drivers/iommu/intel/iommu.h | 0 drivers/iommu/intel/trace.h | 3 ++- drivers/iommu/intel/cap_audit.c | 2 +- drivers/iommu/intel/debugfs.c | 2 +- drivers/iommu/intel/dmar.c | 2 +- drivers/iommu/intel/iommu.c | 2 +- drivers/iommu/intel/irq_remapping.c | 2 +- drivers/iommu/intel/pasid.c | 2 +- drivers/iommu/intel/perf.c | 2 +- drivers/iommu/intel/svm.c | 2 +- MAINTAINERS | 1 - 11 files changed, 10 insertions(+), 10 deletions(-) rename include/linux/intel-iommu.h => drivers/iommu/intel/iommu.h (100%)
drivers/iommu/intel/iommu.h renamed from include/linux/intel-iommu.h +0 -0
drivers/iommu/intel/trace.h +2 -1
@@ -13,7 +13,8 @@#define _TRACE_INTEL_IOMMU_H#include <linux/tracepoint.h> -#include <linux/intel-iommu.h> + +#include "iommu.h" #define MSG_MAX 256
drivers/iommu/intel/cap_audit.c +1 -1
@@ -10,7 +10,7 @@#define pr_fmt (fmt) "DMAR: " fmt -#include <linux/intel-iommu.h> +#include "iommu.h" #include "cap_audit.h" static u64 intel_iommu_cap_sanity;
drivers/iommu/intel/debugfs.c +1 -1
@@ -10,11 +10,11 @@#include <linux/debugfs.h> #include <linux/dmar.h> -#include <linux/intel-iommu.h> #include <linux/pci.h> #include <asm/irq_remapping.h> +#include "iommu.h" #include "pasid.h" #include "perf.h"
drivers/iommu/intel/dmar.c +1 -1
@@ -19,7 +19,6 @@#include <linux/pci.h> #include <linux/dmar.h> #include <linux/iova.h> -#include <linux/intel-iommu.h> #include <linux/timer.h> #include <linux/irq.h> #include <linux/interrupt.h>
@@ -32,6 +31,7 @@#include <asm/irq_remapping.h> #include <asm/iommu_table.h> +#include "iommu.h" #include "../irq_remapping.h" #include "perf.h" #include "trace.h"
drivers/iommu/intel/iommu.c +1 -1
@@ -17,7 +17,6 @@#include <linux/dma-direct.h> #include <linux/dma-iommu.h> #include <linux/dmi.h> -#include <linux/intel-iommu.h> #include <linux/intel-svm.h> #include <linux/memory.h> #include <linux/pci.h>
@@ -26,6 +25,7 @@#include <linux/syscore_ops.h> #include <linux/tboot.h> +#include "iommu.h" #include "../irq_remapping.h" #include "../iommu-sva-lib.h" #include "pasid.h"
drivers/iommu/intel/irq_remapping.c +1 -1
@@ -10,7 +10,6 @@#include <linux/hpet.h> #include <linux/pci.h> #include <linux/irq.h> -#include <linux/intel-iommu.h> #include <linux/acpi.h> #include <linux/irqdomain.h> #include <linux/crash_dump.h>
@@ -21,6 +20,7 @@#include <asm/irq_remapping.h> #include <asm/pci-direct.h> +#include "iommu.h" #include "../irq_remapping.h" #include "cap_audit.h"
drivers/iommu/intel/pasid.c +1 -1
@@ -12,13 +12,13 @@#include <linux/bitops.h> #include <linux/cpufeature.h> #include <linux/dmar.h> -#include <linux/intel-iommu.h> #include <linux/iommu.h> #include <linux/memory.h> #include <linux/pci.h> #include <linux/pci-ats.h> #include <linux/spinlock.h> +#include "iommu.h" #include "pasid.h" /*
drivers/iommu/intel/perf.c +1 -1
@@ -9,8 +9,8 @@*/ #include <linux/spinlock.h> -#include <linux/intel-iommu.h> +#include "iommu.h" #include "perf.h" static DEFINE_SPINLOCK (latency_lock);
drivers/iommu/intel/svm.c +1 -1
@@ -5,7 +5,6 @@* Authors: David Woodhouse <[email protected]> */ -#include <linux/intel-iommu.h> #include <linux/mmu_notifier.h> #include <linux/sched.h> #include <linux/sched/mm.h>
@@ -22,6 +21,7 @@#include <asm/page.h> #include <asm/fpu/api.h> +#include "iommu.h" #include "pasid.h" #include "perf.h" #include "../iommu-sva-lib.h"
MAINTAINERS +0 -1
@@ -9870,7 +9870,6 @@ L: [email protected] S: Supported T: git git://git.kernel.org/pub/scm/linux/kernel/git/joro/iommu.git F: drivers/iommu/intel/ -F: include/linux/intel-iommu.h F: include/linux/intel-svm.h INTEL IOP-ADMA DMA DRIVER
Signature · 6 lines
2.25.1 _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu
Re: [PATCH 7/7] iommu/vt-d: Move include/linux/intel_iommu.h under iommu
Quoted 4 lines · Lu Baolu
This header file is private to the Intel IOMMU driver. Move it to the driver folder.
Signed-off-by Lu Baolu <[email protected]>
Quoted 14 lines
--- include/linux/intel-iommu.h => drivers/iommu/intel/iommu.h | 0 drivers/iommu/intel/trace.h | 3 ++- drivers/iommu/intel/cap_audit.c | 2 +- drivers/iommu/intel/debugfs.c | 2 +- drivers/iommu/intel/dmar.c | 2 +- drivers/iommu/intel/iommu.c | 2 +- drivers/iommu/intel/irq_remapping.c | 2 +- drivers/iommu/intel/pasid.c | 2 +- drivers/iommu/intel/perf.c | 2 +- drivers/iommu/intel/svm.c | 2 +- MAINTAINERS | 1 - 11 files changed, 10 insertions(+), 10 deletions(-) rename include/linux/intel-iommu.h => drivers/iommu/intel/iommu.h (100%)
Jason
Quoted 11 lines · Lu Baolu
Hi folks,
The
include/linux/intel-iommu.hshould be private to the Intel IOMMU driver. Other drivers or components should interact with the IOMMU drivers through the kAPIs provided by the iommu core.This series cleanups all includes of
intel-iommu.houtside of the Intel IOMMU driver and move this header frominclude/linuxtodrivers/iommu/intel/.No functional changes intended. Please help to review and suggest.
Thanks, this was long overdue!
The series looks good to me:
_______________________________________________
iommu mailing list
[email protected]
https://lists.linuxfoundation.org/mailman/listinfo/iommu
Quoted 11 lines · Lu Baolu
Hi folks,
The
include/linux/intel-iommu.hshould be private to the Intel IOMMU driver. Other drivers or components should interact with the IOMMU drivers through the kAPIs provided by the iommu core.This series cleanups all includes of
intel-iommu.houtside of the Intel IOMMU driver and move this header frominclude/linuxtodrivers/iommu/intel/.No functional changes intended. Please help to review and suggest.
I went through and examined the changes as well. These changes make the robots complaint against my patch go away, which is great by me!
Signature · 5 lines
Steve Wahl, Hewlett Packard Enterprise _______________________________________________ iommu mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/iommu