Re: [PATCH V1] iommu/hyperv: Create hyperv subdirectory under drivers/iommu

From: Mukesh R

Date: Tue Jun 02 2026 - 13:28:48 EST


On 6/1/26 21:45, Jacob Pan wrote:
Hi Mukesh,

On Mon, 1 Jun 2026 14:23:18 -0700
Mukesh R <mrathor@xxxxxxxxxxxxxxxxxxx> wrote:

diff --git a/drivers/iommu/hyperv/Makefile
b/drivers/iommu/hyperv/Makefile new file mode 100644
index 000000000000..0053e00e08e6
--- /dev/null
+++ b/drivers/iommu/hyperv/Makefile
@@ -0,0 +1,2 @@
+# SPDX-License-Identifier: GPL-2.0
+obj-$(CONFIG_IRQ_REMAP) += hv-irq-remap.o
Should the name be x86 specific? This file will never be built for
ARM because:
CONFIG_IRQ_REMAP depends on:
depends on X86_64 && X86_IO_APIC && PCI_MSI && ACPI

perhaps, hv-x86-irq-remap.c? hv-irq-remap.c sounds like a
generic Hyper-V IRQ-remapping backend and may be misleading once
arm64 Hyper-V IOMMU/interrupt support grows under this directory.

we could, but looking at early version of hyperv-iommu-arm.c, it looks
very similar, and so if there are very few ifdefs, we could just
keep one file rather than replicating bunch of code.

With this patch as is, how could you keep one file for both ARM and X86
where hv-irq-remap.c does not build on ARM?

By removing the x86 restriction from kconfig once arm changes are merged
in and tested by arm folks. So, arm folks do their changes, test on arm,
and if very small delta, just change this file and remove x86 restriction.