Skip to contentSkip to conversation

iommu/hyperv: Fix guest IOMMU build issues

PATCH Applied Yu Zhang 4 participants 6 messages Oct 15

Subsystems (3)
lore
Share & tools
lore

Yu Zhang

author
#0 lore raw

cover iommu/hyperv: Fix guest IOMMU build issues

This series address two issues reported by kernel test robot in the recently applied Hyper-V guest IOMMU driver.

The first one adds the missing PCI dependency to prevent a link failure when CONFIG_PCI is disabled. And the second makes hv_iommu_device static to address a sparse warning.

The patches are based on the hyper-v branch of the IOMMU tree.

Yu Zhang (2):
iommu/hyperv: Add missing PCI dependency for the guest IOMMU driver iommu/hyperv: Make hv_iommu_device static

 drivers/iommu/hyperv/Kconfig          | 2 +-
 drivers/iommu/hyperv/hv-iommu-guest.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Signature · 1 line
2.52.0
author
#1 lore raw

PATCH 1/2 iommu/hyperv: Add missing PCI dependency for the guest IOMMU driver

Make HYPERV_PVIOMMU depend on PCI, to fix the possible link failure of pci_request_acs(), if HYPERV_PVIOMMU is enabled yet with PCI disabled. Such configuration shall be prevented.

Fixes 2690d4156b51 ("iommu/hyperv: Add para-virtualized IOMMU support for Hyper-V guest")
---
 drivers/iommu/hyperv/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/hyperv/Kconfig +1 -1
index fe24ed65b6a7..f2f993f647c3 100644
@@ -2,7 +2,7 @@
 # Hyper-V para-virtualized IOMMU driver for Linux guests
 config HYPERV_PVIOMMU
 	bool "Microsoft Hyper-V para-virtualized IOMMU driver for Linux guests"
-	depends on X86_64 && HYPERV
+	depends on X86_64 && HYPERV && PCI
 	select IOMMU_DMA
 	select GENERIC_PT
 	select IOMMU_PT
Signature · 1 line
2.52.0
author
#2 lore raw

PATCH 2/2 iommu/hyperv: Make hv_iommu_device static

In reply to Yu Zhang

Make hv_iommu_device static to give it internal linkage. This pointer is only used within hv-iommu-guest.c, but previously has external linkage without a prior declaration. This causes sparse to warn that the symbol was not declared.

Fixes 2690d4156b51 ("iommu/hyperv: Add para-virtualized IOMMU support for Hyper-V guest")
---
 drivers/iommu/hyperv/hv-iommu-guest.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/iommu/hyperv/hv-iommu-guest.c +1 -1
index fe06bd970621..876a22f21f1e 100644
@@ -22,7 +22,7 @@
 #include "iommu.h"
 #include "../iommu-pages.h"
 
-struct hv_iommu_dev *hv_iommu_device;
+static struct hv_iommu_dev *hv_iommu_device;
 
 /*
  * Identity and blocking domains are static singletons: identity is a 1:1
Signature · 1 line
2.52.0
Reviewed-by on the v1 series
#3 lore raw
In reply to Yu Zhang
Quoted 10 lines · Yu Zhang

iommu/hyperv: Fix guest IOMMU build issues

This series address two issues reported by kernel test robot in the recently applied Hyper-V guest IOMMU driver.

The first one adds the missing PCI dependency to prevent a link failure when CONFIG_PCI is disabled. And the second makes hv_iommu_device static to address a sparse warning.

[...]

Signature · 1 line
Jason
Reviewed-by on the v1 series
#4 lore raw
In reply to Yu Zhang

Hi Yu,

Quoted 9 lines · On Thu, 15 Oct 2026 16:23:49 +0800 Yu Zhang <[email protected]>…

This series address two issues reported by kernel test robot in the recently applied Hyper-V guest IOMMU driver.

The first one adds the missing PCI dependency to prevent a link failure when CONFIG_PCI is disabled. And the second makes hv_iommu_device static to address a sparse warning.

The patches are based on the hyper-v branch of the IOMMU tree.

Quoted 8 lines

Yu Zhang (2):
iommu/hyperv: Add missing PCI dependency for the guest IOMMU driver iommu/hyperv: Make hv_iommu_device static

 drivers/iommu/hyperv/Kconfig          | 2 +-
 drivers/iommu/hyperv/hv-iommu-guest.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
maintainer Applied
#5 lore raw
In reply to Yu Zhang
Quoted 3 lines · Yu Zhang

Yu Zhang (2):
iommu/hyperv: Add missing PCI dependency for the guest IOMMU driver iommu/hyperv: Make hv_iommu_device static

Applied, thanks.