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

[Xen-devel] [PATCH cargo-cult-version] For linux-4.19.x . Xen/PCIback: Implement PCI flr/slot/bus reset with 'reset' SysFS attribute




Den 23.10.2018 20:40, skrev Håkon Alstadheim:

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.

Without some kind of fix, my whole server (dom0) goes down whenever a domu with pci passed through is re-started.

NOTE: I am not a programmer. I have no idea what I am doing.

The patch I have as a starting-point does not compile correctly when applied to kernel version 4.19.x. I get implicit declarations of  pci_try_reset_slot() and pci_try_reset_bus(). Replacing those with  pci_reset_bus(dev) gives me the attached patch which applies cleanly to gentoo-sources-4.19.2, compiles without warnings, and works to let me restart a domU with pci-passthrough (modulo changing do_flr to reset in  xen libxl).

I hope a dev will adopt these and give them proper care :-) .



Attachment: pci_brute_reset-home-hack.patch
Description: Text Data

Attachment: do_flr-to-reset.patch
Description: Text Data

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel

 


Rackspace

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