From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753152AbdK2SPa (ORCPT ); Wed, 29 Nov 2017 13:15:30 -0500 Received: from emh04.mail.saunalahti.fi ([62.142.5.110]:47064 "EHLO emh04.mail.saunalahti.fi" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752692AbdK2SP1 (ORCPT ); Wed, 29 Nov 2017 13:15:27 -0500 Date: Wed, 29 Nov 2017 20:05:29 +0200 From: Pasi =?iso-8859-1?Q?K=E4rkk=E4inen?= To: Govinda Tatti Cc: Jan Beulich , Konrad Wilk , Juergen Gross , xen-devel@lists.xenproject.org, Boris Ostrovsky , linux-kernel@vger.kernel.org Subject: Re: [Xen-devel] [PATCH] Xen/pciback: Implement PCI slot or bus reset with 'do_flr' SysFS attribute Message-ID: <20171129180529.GQ20756@reaktio.net> References: <20171106174842.20276-1-Govinda.Tatti@Oracle.COM> <5A01D3F3020000780018CE86@prv-mh.provo.novell.com> <8940b38d-715c-9fcb-cc74-46574d416703@oracle.com> <5A041FB9020000780018D6E8@prv-mh.provo.novell.com> <5A1EE1D50200007800193318@prv-mh.provo.novell.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 29, 2017 at 11:25:09AM -0600, Govinda Tatti wrote: > > >>>Furthermore, contrary to what you claim in > >>>your reply to Pasi, I can't see where you try an actual FLR first - > >>>you go straight to pci_probe_reset_{slot,bus}(). If you actually > >>>tried FLR first, only falling back to the other methods as "emulation", > >>>I could certainly agree with the file name chosen. > >>Currently, multiple resets are being invoked (independently) in the context > >>of "xl attach/detach/shutdown/reboot". > >> > >>- pci_reset_function_locked (invoked by pcistub_put_pci_dev()) > >> This function tries various PCI reset methods including FLR. > >>- pcistub_reset_dev (called by toolsstack based on "do_flr" attribute) > >While related in a certain way, I can't really see how this addresses > >the comment. > > pcistub_reset_dev() just tries slot or bus reset but not FLR since it is > being > checked and executed by pci_reset_function_locked() if supported. May be we > can > add FLR reset code to pcistub_reset_dev() and try FLR first before fall-back > to > slot/bus reset. > Hmm.. is the suitable reset method something that can be figured out automatically? I mean if FLR is tried first, but it isn't supported by the device, is it OK to go ahead and do a slot/bus reset automatically? What if there are other devices in the same bus, wouldn't automatic bus reset be a bad thing? Or should the reset-method be configured by the user for the VM / PCI device ? Just thinking out loud here.. > Cheers > GOVINDA > Thanks, -- Pasi