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

From: Mukesh R

Date: Tue Jun 02 2026 - 15:21:10 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?

We can remove the x86 restriction, make sure it builds on arm. Then
during arm patch, I can help decide whether to fork or just add ifdefs
in the file. I'll submit V2 with x86 restriction removed.

Thanks,
-Mukesh