From: Jinank Jain <jinankjain@linux.microsoft.com>
To: jinankjain@microsoft.com, kys@microsoft.com,
haiyangz@microsoft.com, wei.liu@kernel.org, decui@microsoft.com,
lpieralisi@kernel.org, kw@linux.com, robh@kernel.org,
bhelgaas@google.com
Cc: linux-hyperv@vger.kernel.org, linux-pci@vger.kernel.org,
linux-kernel@vger.kernel.org, nunodasneves@linux.microsoft.com
Subject: [PATCH] PCI: hv: Use nested hypercall for retargeting interrupts
Date: Tue, 4 Apr 2023 11:35:46 +0000 [thread overview]
Message-ID: <20230404113546.856813-1-jinankjain@linux.microsoft.com> (raw)
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
next reply other threads:[~2023-04-04 11:36 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 11:35 Jinank Jain [this message]
2023-04-04 17:00 ` [PATCH] PCI: hv: Use nested hypercall for retargeting interrupts Nuno Das Neves
2023-04-05 23:17 ` Wei Liu
2023-04-06 6:11 ` Jinank Jain
2023-04-13 1:22 ` Wei Liu
2023-04-13 3:05 ` Michael Kelley (LINUX)
2023-04-13 15:34 ` Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230404113546.856813-1-jinankjain@linux.microsoft.com \
--to=jinankjain@linux.microsoft.com \
--cc=bhelgaas@google.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=jinankjain@microsoft.com \
--cc=kw@linux.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pci@vger.kernel.org \
--cc=lpieralisi@kernel.org \
--cc=nunodasneves@linux.microsoft.com \
--cc=robh@kernel.org \
--cc=wei.liu@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).