[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH V3 2/2] Xen/PCIback: Implement PCI flr/slot/bus reset with 'reset' SysFS attribute


On Tue, Oct 23, 2018 at 08:40:29PM +0200, Håkon Alstadheim wrote:
> Den 08. okt. 2018 16:32, skrev Boris Ostrovsky:
> >
> > Are these two patches still needed? ISTR they were  written originally
> > to deal with guest trying to use device that was previously assigned to
> > another guest. But pcistub_put_pci_dev() calls
> > __pci_reset_function_locked() which first tries FLR, and it looks like
> > it was added relatively recently.
> >
> >
> Sorry for the late reply, but I just now booted xen staging-4.11
> (94fba9f438a2c36ad9bf3a481a6013ddc7cf8cd9), with gentoo-sources-4.19.0
> as dom0. Shut down and started again a VM that has a secondary GPU
> passed through, and the whole  machine hung. I haven't had time to look
> more closely into this, other than that my old "do_flr" patch no longer
> applies to gentoo-sources (i.e. the linux kernel sources) . "do_flr"
> worked for me on linux-4.18.? , with appropriate patch to the linux kernel.
> So, something is definitely needed. No "reset" , or "do_flr" is present
> in linux-4.19.0, viz:
> <code>
> $ cd /usr/src/linux/drivers/xen/xen-pciback
> $ grep DRIVER *
> pci_stub.c:#define PCISTUB_DRIVER_NAME "pciback"
> pci_stub.c:          !strcmp(dev->driver_override, PCISTUB_DRIVER_NAME)) ||
> pci_stub.c:     .name = PCISTUB_DRIVER_NAME,
> pci_stub.c:static DRIVER_ATTR_WO(new_slot);
> pci_stub.c:static DRIVER_ATTR_WO(remove_slot);
> pci_stub.c:static DRIVER_ATTR_RO(slots);
> pci_stub.c:static DRIVER_ATTR_RO(irq_handlers);
> pci_stub.c:static DRIVER_ATTR_WO(irq_handler_state);
> pci_stub.c:static DRIVER_ATTR_RW(quirks);
> pci_stub.c:static DRIVER_ATTR_RW(permissive);
> pci_stub.c:     if (action != BUS_NOTIFY_UNBIND_DRIVER)
> $
> </code>
> I'd be happy to test patches. Seems I only got one corrupt file from my
> test this morning :-D .

Håkon: Please do test the patches and report how it works for you!
Here are the links:

Linux kernel xen-pciback 'reset' patches:

        "[PATCH V3 0/2] Xen/PCIback: PCI reset using 'reset' SysFS attribute":

        (Patch 1/2 is not needed anymore in upstream Linux kernel, as 
pcie_has_flr() is already exported meanwhile)

        "[PATCH V3 2/2] Xen/PCIback: Implement PCI flr/slot/bus reset with 
'reset' SysFS attribute":

Xen libxl 'reset' patches:
        "[PATCH V1 0/1] Xen/Tools: PCI reset using 'reset' SysFS attribute":

        "[PATCH V1 1/1] Xen/libxl: Perform PCI reset using 'reset' SysFS 


-- Pasi

Xen-devel mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.