[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH] Improve the current FLR logic
Hi, all, The attached patches try to improve the current FLR logic. The idea is: removing the FLR logic from hypervisor and adding the improved logic in Control Panel. The current FLR logic in hypervisor has some issues: 1) Dstate transition is not guaranteed to properly clear the device state; 2) the current code for PCIe FLR is actually buggy: PCI_EXP_DEVSTA_TRPND doesn't mean the completion of FLR; according to the PCIe spec, after issuing FLR, we should wait at least 100ms. To make it easier to improve the FLR logic, and to make the hypervisor thin, I think we might as well move the logic to Control Panel for the time being. In the long run, the essential logic may be implemented in the pciback driver of Dom0 instead. [PATCH1] sysmnt_cleanup.patch: this is only a small cleanup. [PATCH2] remove_FLR_in_xen.patch: remove the FLR logic in Xen. [PATCH3] do_FLR_in_control_panel.patch: the improved FLR logic in Control Panel: 1) If the device is PCIe endpoint and supports PCIe FLR, we use that; 2) Else, if the device is PCIe endpoint, and all functions on the device are assigned to the same guest, we use the immediate parent bus's Secondary Bus Reset to reset all functions of the device (here, actually we require all the functions of the device be assigned to the same guest); 3) Else, if the device is PCI endpoint and is on a host bus (e.g. integrated devices) and if the device supports PCI Advanced Capabilities, we use that for FLR; 4) Else, we use the Secondary Bus Reset (if the PCI device is behind a PCI/PCI-X bridge, then all devices behind the uppermost such PCI/PCI-X bridge above this device must be co-assigned) [PATCH4] list_assignable_devices.patch: a command "xm pci-list-assignable-devices" which can list all the assignable devices in the system. It is useful for end users. I made some tests on my hosts. Looks the patches work well. I'd like to ask for your comments, and test feedbacks. Thank you very much! Thanks, -- Dexuan Attachment:
sysmnt_cleanup.patch Attachment:
remove_FLR_in_xen.patch Attachment:
do_FLR_in_control_panel.patch Attachment:
list_assignable_devices.patch _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |