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

From: Bjorn Helgaas
Date: Fri Sep 20 2024 - 19:13:24 EST


On Mon, Jun 03, 2024 at 10:09:32PM -0700, mhkelley58@xxxxxxxxx wrote:
> From: Michael Kelley <mhklinux@xxxxxxxxxxx>
>
> 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@xxxxxxxxxxx>

Seems fine to me.

Acked-by: Bjorn Helgaas <bhelgaas@xxxxxxxxxx>

> ---
> drivers/pci/controller/pci-hyperv.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> 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);
> --
> 2.25.1
>