From: Jinank Jain <jinankjain@linux.microsoft.com>
To: Wei Liu <wei.liu@kernel.org>
Cc: jinankjain@microsoft.com, kys@microsoft.com,
haiyangz@microsoft.com, decui@microsoft.com,
lpieralisi@kernel.org, kw@linux.com, robh@kernel.org,
bhelgaas@google.com, linux-hyperv@vger.kernel.org,
linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org,
nunodasneves@linux.microsoft.com
Subject: Re: [PATCH] PCI: hv: Use nested hypercall for retargeting interrupts
Date: Thu, 6 Apr 2023 11:41:18 +0530 [thread overview]
Message-ID: <c0b2454c-3945-debf-f991-79139413f370@linux.microsoft.com> (raw)
In-Reply-To: <ZC4BlSo0D1uNliFk@liuwe-devbox-debian-v2>
This was observed while testing pass-through PCI devices on the nested
MSHV setup.
Regards,
Jinank
On 4/6/2023 4:47 AM, Wei Liu wrote:
> On Tue, Apr 04, 2023 at 11:35:46AM +0000, Jinank Jain wrote:
>> 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>
> While I think this is a sensible change -- how did you discover this?
> Can you provide a bit more information?
>
>> ---
>> 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 prev parent reply other threads:[~2023-04-06 6:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-04 11:35 [PATCH] PCI: hv: Use nested hypercall for retargeting interrupts Jinank Jain
2023-04-04 17:00 ` Nuno Das Neves
2023-04-05 23:17 ` Wei Liu
2023-04-06 6:11 ` Jinank Jain [this message]
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=c0b2454c-3945-debf-f991-79139413f370@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