[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <c0b2454c-3945-debf-f991-79139413f370@linux.microsoft.com>
Date: Thu, 6 Apr 2023 11:41:18 +0530
From: Jinank Jain <jinankjain@...ux.microsoft.com>
To: Wei Liu <wei.liu@...nel.org>
Cc: jinankjain@...rosoft.com, kys@...rosoft.com,
haiyangz@...rosoft.com, decui@...rosoft.com, lpieralisi@...nel.org,
kw@...ux.com, robh@...nel.org, bhelgaas@...gle.com,
linux-hyperv@...r.kernel.org, linux-pci@...r.kernel.org,
linux-kernel@...r.kernel.org, nunodasneves@...ux.microsoft.com
Subject: Re: [PATCH] PCI: hv: Use nested hypercall for retargeting interrupts
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@...ux.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
>>
Powered by blists - more mailing lists