lkml.org 
[lkml]   [2023]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] PCI: hv: Use nested hypercall for retargeting interrupts
Date
In case of nested MSHV, retargeting interrupt hypercall should be sent
to L0 hypervisor instead of L1 hypervisor.

Signed-off-by: Jinank Jain <jinankjain@linux.microsoft.com>
---
drivers/pci/controller/pci-hyperv.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
index f33370b75628..2123f632ecf7 100644
--- a/drivers/pci/controller/pci-hyperv.c
+++ b/drivers/pci/controller/pci-hyperv.c
@@ -704,8 +704,14 @@ static void hv_arch_irq_unmask(struct irq_data *data)
}
}

- res = hv_do_hypercall(HVCALL_RETARGET_INTERRUPT | (var_size << 17),
- params, NULL);
+ if (hv_nested)
+ res = hv_do_nested_hypercall(HVCALL_RETARGET_INTERRUPT |
+ (var_size << 17),
+ params, NULL);
+ else
+ res = hv_do_hypercall(HVCALL_RETARGET_INTERRUPT |
+ (var_size << 17),
+ params, NULL);

exit_unlock:
spin_unlock_irqrestore(&hbus->retarget_msi_interrupt_lock, flags);
--
2.34.1
\
 
 \ /
  Last update: 2023-04-04 13:37    [W:0.936 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site