From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:41896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2CsO-0000R4-Nl for qemu-devel@nongnu.org; Mon, 16 May 2016 03:23:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b2CsK-000125-LV for qemu-devel@nongnu.org; Mon, 16 May 2016 03:23:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37260) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b2CsK-00011q-GK for qemu-devel@nongnu.org; Mon, 16 May 2016 03:23:36 -0400 Date: Mon, 16 May 2016 15:23:30 +0800 From: Peter Xu Message-ID: <20160516072330.GA17782@pxdev.xzpeter.org> References: <1462948831-931-1-git-send-email-peterx@redhat.com> <20160511065318.GA13293@pxdev.xzpeter.org> <20160512101020-mutt-send-email-mst@redhat.com> <20160512073203.GC4678@pxdev.xzpeter.org> <20160512103734-mutt-send-email-mst@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20160512103734-mutt-send-email-mst@redhat.com> Subject: Re: [Qemu-devel] [PATCH] pci: fix requester id with PCI bridges List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org, rkrcmar@redhat.com, alex.williamson@redhat.com, jan.kiszka@web.de, pbonzini@redhat.com On Thu, May 12, 2016 at 10:51:43AM +0300, Michael S. Tsirkin wrote: > On Thu, May 12, 2016 at 03:32:03PM +0800, Peter Xu wrote: [...] > > > Are there cases where we need the original requester id value? > > > I am guessing not, and if I'm right we should just change the implementation > > > of pci_requester_id to DTRT. > > > > There are two other callers for it (besides the MSI one): > > > > - assigned_device_pci_cap_init() This should use the new interface. > > - do_pcie_aer_inject_error() This should use the old one, which is to get BDF only. > > > > For both the cases, I am not sure whether we can do the replacement. > > > > -- peterx > > Read the specs please. We can't just pile on APIs. IIUC, we may still need to add a new API here, because not all of them are looking for requester IDs. I just posted v2 for this patch. Instead of renaming the new function, I renamed the old one to pci_get_bdf(). Hope that works. Thanks, -- peterx