Skip to content

Commit ccffa58

Browse files
author
Maxim Levitsky
committed
PCI: hv: Allow dynamic MSI-X vector allocation
JIRA: https://issues.redhat.com/browse/RHEL-109580 commit ad518f2 Author: Shradha Gupta <shradhagupta@linux.microsoft.com> Date: Wed Jun 11 07:10:15 2025 -0700 PCI: hv: Allow dynamic MSI-X vector allocation Allow dynamic MSI-X vector allocation for pci_hyperv PCI controller by adding support for the flag MSI_FLAG_PCI_MSIX_ALLOC_DYN and using pci_msix_prepare_desc() to prepare the MSI-X descriptors. Feature support added for both x86 and ARM64 Signed-off-by: Shradha Gupta <shradhagupta@linux.microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Reviewed-by: Saurabh Sengar <ssengar@linux.microsoft.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Maxim Levitsky <mlevitsk@redhat.com>
1 parent 6897f49 commit ccffa58

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/pci/controller/pci-hyperv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2061,6 +2061,7 @@ static struct irq_chip hv_msi_irq_chip = {
20612061
static struct msi_domain_ops hv_msi_ops = {
20622062
.msi_prepare = hv_msi_prepare,
20632063
.msi_free = hv_msi_free,
2064+
.prepare_desc = pci_msix_prepare_desc,
20642065
};
20652066

20662067
/**
@@ -2082,7 +2083,7 @@ static int hv_pcie_init_irq_domain(struct hv_pcibus_device *hbus)
20822083
hbus->msi_info.ops = &hv_msi_ops;
20832084
hbus->msi_info.flags = (MSI_FLAG_USE_DEF_DOM_OPS |
20842085
MSI_FLAG_USE_DEF_CHIP_OPS | MSI_FLAG_MULTI_PCI_MSI |
2085-
MSI_FLAG_PCI_MSIX);
2086+
MSI_FLAG_PCI_MSIX | MSI_FLAG_PCI_MSIX_ALLOC_DYN);
20862087
hbus->msi_info.handler = FLOW_HANDLER;
20872088
hbus->msi_info.handler_name = FLOW_NAME;
20882089
hbus->msi_info.data = hbus;

0 commit comments

Comments
 (0)