RE: [EXTERNAL] [PATCH 1/3] x86/hyperv: export hv_unmap_msi_interrupt()
From: Long Li
Date: Tue Aug 25 2026 - 13:29:47 EST
>
> From: Wei Liu <wei.liu@xxxxxxxxxx>
>
> hv_unmap_msi_interrupt() issues the UNMAP_DEVICE_INTERRUPT hypercall
> that tears down a device-interrupt mapping created by
> hv_map_msi_interrupt().
> The latter is already exported and used by the pci-hyperv driver to map vPCI
> interrupts on a nested root partition; export the unmap counterpart so the
> driver can remove those mappings on teardown.
>
> No functional change.
>
> Signed-off-by: Wei Liu <wei.liu@xxxxxxxxxx>
Reviewed-by: Long Li <longli@xxxxxxxxxxxxx>
> ---
> arch/x86/hyperv/irqdomain.c | 9 +++++----
> arch/x86/include/asm/mshyperv.h | 2 ++
> 2 files changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/arch/x86/hyperv/irqdomain.c b/arch/x86/hyperv/irqdomain.c
> index b3ad50a874dc..ecd18e9a97d8 100644
> --- a/arch/x86/hyperv/irqdomain.c
> +++ b/arch/x86/hyperv/irqdomain.c
> @@ -213,8 +213,8 @@ static void entry_to_msi_msg(struct
> hv_interrupt_entry *entry,
> msg->data = entry->msi_entry.data.as_uint32; }
>
> -static int hv_unmap_msi_interrupt(struct pci_dev *pdev,
> - struct hv_interrupt_entry *irq_entry);
> +int hv_unmap_msi_interrupt(struct pci_dev *pdev,
> + struct hv_interrupt_entry *irq_entry);
>
> static void hv_irq_compose_msi_msg(struct irq_data *data, struct msi_msg
> *msg) { @@ -266,14 +266,15 @@ static void
> hv_irq_compose_msi_msg(struct irq_data *data, struct msi_msg *msg)
> entry_to_msi_msg(data->chip_data, msg); }
>
> -static int hv_unmap_msi_interrupt(struct pci_dev *pdev,
> - struct hv_interrupt_entry *irq_entry)
> +int hv_unmap_msi_interrupt(struct pci_dev *pdev,
> + struct hv_interrupt_entry *irq_entry)
> {
> union hv_device_id hv_devid;
>
> hv_devid = hv_build_devid_type_pci(pdev);
> return hv_unmap_interrupt(hv_devid.as_uint64, irq_entry); }
> +EXPORT_SYMBOL_GPL(hv_unmap_msi_interrupt);
>
> /* NB: during map, hv_interrupt_entry is saved via data->chip_data */ static
> void hv_teardown_msi_irq(struct pci_dev *pdev, struct irq_data *irqd) diff --
> git a/arch/x86/include/asm/mshyperv.h b/arch/x86/include/asm/mshyperv.h
> index f64393e853ee..7c84e27d777b 100644
> --- a/arch/x86/include/asm/mshyperv.h
> +++ b/arch/x86/include/asm/mshyperv.h
> @@ -191,6 +191,8 @@ struct irq_domain *hv_create_pci_msi_domain(void);
>
> int hv_map_msi_interrupt(struct irq_data *data,
> struct hv_interrupt_entry *out_entry);
> +int hv_unmap_msi_interrupt(struct pci_dev *dev,
> + struct hv_interrupt_entry *hvirqe);
> int hv_map_ioapic_interrupt(int ioapic_id, bool level, int vcpu, int vector,
> struct hv_interrupt_entry *entry);
> int hv_unmap_ioapic_interrupt(int ioapic_id, struct hv_interrupt_entry
> *entry);
> --
> 2.53.0