Skip to content

Commit 94711d3

Browse files
author
Maxim Levitsky
committed
PCI: hv: Allow dynamic MSI-X vector allocation
JIRA: https://issues.redhat.com/browse/RHEL-109583 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 a9e894d commit 94711d3

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
@@ -2063,6 +2063,7 @@ static struct irq_chip hv_msi_irq_chip = {
20632063
static struct msi_domain_ops hv_msi_ops = {
20642064
.msi_prepare = hv_msi_prepare,
20652065
.msi_free = hv_msi_free,
2066+
.prepare_desc = pci_msix_prepare_desc,
20662067
};
20672068

20682069
/**
@@ -2084,7 +2085,7 @@ static int hv_pcie_init_irq_domain(struct hv_pcibus_device *hbus)
20842085
hbus->msi_info.ops = &hv_msi_ops;
20852086
hbus->msi_info.flags = (MSI_FLAG_USE_DEF_DOM_OPS |
20862087
MSI_FLAG_USE_DEF_CHIP_OPS | MSI_FLAG_MULTI_PCI_MSI |
2087-
MSI_FLAG_PCI_MSIX);
2088+
MSI_FLAG_PCI_MSIX | MSI_FLAG_PCI_MSIX_ALLOC_DYN);
20882089
hbus->msi_info.handler = FLOW_HANDLER;
20892090
hbus->msi_info.handler_name = FLOW_NAME;
20902091
hbus->msi_info.data = hbus;

0 commit comments

Comments
 (0)