* [PATCH v4 04/17] iommu/hyperv: don't setup IRQ remapping when running as root
[not found] <20210106203350.14568-1-wei.liu@kernel.org>
@ 2021-01-06 20:33 ` Wei Liu
0 siblings, 0 replies; only message in thread
From: Wei Liu @ 2021-01-06 20:33 UTC (permalink / raw)
To: Linux on Hyper-V List
Cc: K. Y. Srinivasan, Wei Liu, Joerg Roedel, Stephen Hemminger,
Will Deacon, Haiyang Zhang, Linux Kernel List, Michael Kelley,
open list:IOMMU DRIVERS, Nuno Das Neves, Sunil Muthuswamy,
virtualization, Vineeth Pillai, Vitaly Kuznetsov
The IOMMU code needs more work. We're sure for now the IRQ remapping
hooks are not applicable when Linux is the root partition.
Signed-off-by: Wei Liu <wei.liu@kernel.org>
Acked-by: Joerg Roedel <jroedel@suse.de>
Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
---
drivers/iommu/hyperv-iommu.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/iommu/hyperv-iommu.c b/drivers/iommu/hyperv-iommu.c
index 1d21a0b5f724..b7db6024e65c 100644
--- a/drivers/iommu/hyperv-iommu.c
+++ b/drivers/iommu/hyperv-iommu.c
@@ -20,6 +20,7 @@
#include <asm/io_apic.h>
#include <asm/irq_remapping.h>
#include <asm/hypervisor.h>
+#include <asm/mshyperv.h>
#include "irq_remapping.h"
@@ -122,7 +123,7 @@ static int __init hyperv_prepare_irq_remapping(void)
if (!hypervisor_is_type(X86_HYPER_MS_HYPERV) ||
x86_init.hyper.msi_ext_dest_id() ||
- !x2apic_supported())
+ !x2apic_supported() || hv_root_partition)
return -ENODEV;
fn = irq_domain_alloc_named_id_fwnode("HYPERV-IR", 0);
--
2.20.1
_______________________________________________
iommu mailing list
iommu@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/iommu
^ permalink raw reply related [flat|nested] only message in thread