diff mbox series

[RFC,04/12] PCI: hv: Annotate the VMBus channel IRQ name

Message ID 20240604050940.859909-5-mhklinux@outlook.com
State New
Headers show
Series Hyper-V guests use Linux IRQs for channel interrupts | expand

Commit Message

Michael Kelley June 4, 2024, 5:09 a.m. UTC
From: Michael Kelley <mhklinux@outlook.com>

In preparation for assigning Linux IRQs to VMBus channels, annotate
the IRQ name in the single VMBus channel used for setup and teardown
of a virtual PCI device in a Hyper-V guest. The annotation adds the
16-bit PCI domain ID that the Hyper-V vPCI driver assigns to the
virtual PCI bus for the device.

Signed-off-by: Michael Kelley <mhklinux@outlook.com>
---
 drivers/pci/controller/pci-hyperv.c | 5 +++++
 1 file changed, 5 insertions(+)
diff mbox series

Patch

diff --git a/drivers/pci/controller/pci-hyperv.c b/drivers/pci/controller/pci-hyperv.c
index 5992280e8110..4f70cddb61dc 100644
--- a/drivers/pci/controller/pci-hyperv.c
+++ b/drivers/pci/controller/pci-hyperv.c
@@ -3705,6 +3705,9 @@  static int hv_pci_probe(struct hv_device *hdev,
 	hdev->channel->request_addr_callback = vmbus_request_addr;
 	hdev->channel->rqstor_size = HV_PCI_RQSTOR_SIZE;
 
+	snprintf(hdev->channel->irq_name, VMBUS_CHAN_IRQ_NAME_MAX,
+				"vpci:%04x", dom);
+
 	ret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,
 			 hv_pci_onchannelcallback, hbus);
 	if (ret)
@@ -4018,6 +4021,8 @@  static int hv_pci_resume(struct hv_device *hdev)
 	hdev->channel->next_request_id_callback = vmbus_next_request_id;
 	hdev->channel->request_addr_callback = vmbus_request_addr;
 	hdev->channel->rqstor_size = HV_PCI_RQSTOR_SIZE;
+	snprintf(hdev->channel->irq_name, VMBUS_CHAN_IRQ_NAME_MAX,
+				"vpci:%04x", hbus->bridge->domain_nr);
 
 	ret = vmbus_open(hdev->channel, pci_ring_size, pci_ring_size, NULL, 0,
 			 hv_pci_onchannelcallback, hbus);