[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <28a56c75-9e45-4855-b555-49237cacba3a@linux.ibm.com>
Date: Wed, 17 Sep 2025 10:50:51 -0700
From: Farhan Ali <alifm@...ux.ibm.com>
To: Cédric Le Goater <clg@...hat.com>,
linux-s390@...r.kernel.org, kvm@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org
Cc: alex.williamson@...hat.com, helgaas@...nel.org, schnelle@...ux.ibm.com,
mjrosato@...ux.ibm.com
Subject: Re: [PATCH v3 03/10] PCI: Allow per function PCI slots
On 9/16/2025 11:21 PM, Cédric Le Goater wrote:
> Hi Farhan,
>
>> Hi Cedric,
>>
>> Thanks for pointing this out. I missed that dev->slot could be NULL
>> and so the per_func_slot check should be done after the check for
>> !dev->slot. I tried this change on top of the patch in an x86_64 VM
>> and was able to boot the VM without the oops.
>>
>> diff --git a/drivers/pci/pci.c b/drivers/pci/pci.c
>> index 70296d3b1cfc..3631f7faa0cf 100644
>> --- a/drivers/pci/pci.c
>> +++ b/drivers/pci/pci.c
>> @@ -5061,10 +5061,9 @@ static int pci_reset_hotplug_slot(struct
>> hotplug_slot *hotplug, bool probe)
>>
>> static int pci_dev_reset_slot_function(struct pci_dev *dev, bool
>> probe)
>> {
>> - if (dev->multifunction && !dev->slot->per_func_slot)
>> - return -ENOTTY;
>> if (dev->subordinate || !dev->slot ||
>> - dev->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET)
>> + dev->dev_flags & PCI_DEV_FLAGS_NO_BUS_RESET ||
>> + (dev->multifunction && !dev->slot->per_func_slot))
>> return -ENOTTY;
> All good.
>
> I have pushed the Linux branch I use for vfio :
>
> https://github.com/legoater/linux/commits/vfio/
>
> These commits have small changes :
>
> PCI: Allow per function PCI slots
> vfio-pci/zdev: Add a device feature for error information
>
> Thanks,
>
> C.
>
>
Hi Cedric,
Thanks again for your help in reviewing the patches.
Thanks
Farhan
Powered by blists - more mailing lists