RE: [PATCH v2] PCI: hv: Fix hibernation in case interrupts are not re-created

From: Dexuan Cui
Date: Mon Sep 21 2020 - 13:02:07 EST


> From: Dexuan Cui <decui@xxxxxxxxxxxxx>
> Sent: Tuesday, September 8, 2020 4:18 PM
>
> Hyper-V doesn't trap and emulate the accesses to the MSI/MSI-X registers,
> and we must use hv_compose_msi_msg() to ask Hyper-V to create the IOMMU
> Interrupt Remapping Table Entries. This is not an issue for a lot of
> PCI device drivers (e.g. NVMe driver, Mellanox NIC drivers), which
> destroy and re-create the interrupts across hibernation, so
> hv_compose_msi_msg() is called automatically. However, some other PCI
> device drivers (e.g. the Nvidia driver) may not destroy and re-create
> the interrupts across hibernation, so hv_pci_resume() has to call
> hv_compose_msi_msg(), otherwise the PCI device drivers can no longer
> receive MSI/MSI-X interrupts after hibernation.
>
> Fixes: ac82fc832708 ("PCI: hv: Add hibernation support")
> Signed-off-by: Dexuan Cui <decui@xxxxxxxxxxxxx>
> Reviewed-by: Jake Oshins <jakeo@xxxxxxxxxxxxx>
>
> ---
>
> Changes in v2:
> Fixed a typo in the comment in hv_irq_unmask. Thanks to Michael!
> Added Jake's Reviewed-by.
>
> drivers/pci/controller/pci-hyperv.c | 44 +++++++++++++++++++++++++++++
> 1 file changed, 44 insertions(+)

Hi Lorenzo, Bjorn,
Can you please take a look at this patch?
I hope it still could have a chance to be in 5.9. :-)

Thanks,
-- Dexuan