From mboxrd@z Thu Jan 1 00:00:00 1970 From: Yosuke Iwamatsu Subject: Re: [PATCH] Improve the current FLR logic Date: Tue, 15 Jul 2008 13:05:54 +0900 Message-ID: <487C2222.5030703@ab.jp.nec.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "Cui, Dexuan" Cc: xen-devel@lists.xensource.com, Keir Fraser List-Id: xen-devel@lists.xenproject.org Hi, Cui, Dexuan wrote: > [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) In case 2) or 4), I think multfunction devices or sibling devices need not be actually assigned to the same guest, if they are just owned by pciback and not used by other guests. > [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. It looks like xm_pci_list_assignable_devices() directly accesses to sysfs and invokes hypercall without going through xend. Since xm commands can be executed by a remote server through xmlrpc, most of this function should be implemented in xend. Also please note that test_assign_device() excludes the case of non-iommu device assignment for pv. Thanks, -- Yosuke Iwamatsu