Received: from eggs.gnu.org ([2001:4830:134:3::10]:54896) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmeJb-0002ud-EN for qemu-devel@nongnu.org; Thu, 15 Oct 2015 04:55:13 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZmeJT-0001dh-C8 for qemu-devel@nongnu.org; Thu, 15 Oct 2015 04:55:11 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:42804) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZmeJT-0001ca-2k for qemu-devel@nongnu.org; Thu, 15 Oct 2015 04:55:03 -0400 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NW900L2K7FMAM50@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Thu, 15 Oct 2015 09:54:58 +0100 (BST) From: Pavel Fedin References: <8ab953090af58ac19d240feb48180b7b6f1f39bb.1444835138.git.p.fedin@samsung.com> <20151014190920-mutt-send-email-mst@redhat.com> In-reply-to: <20151014190920-mutt-send-email-mst@redhat.com> Date: Thu, 15 Oct 2015 11:54:57 +0300 Message-id: <00c201d10727$2b9921f0$82cb65d0$@samsung.com> MIME-version: 1.0 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7bit Content-language: ru Subject: Re: [Qemu-devel] [PATCH v4 2/3] hw/pci: Introduce pci_requester_id() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "'Michael S. Tsirkin'" Cc: 'Paolo Bonzini' , qemu-devel@nongnu.org, 'Peter Maydell' Hello! > > diff --git a/stubs/pci.c b/stubs/pci.c > > new file mode 100644 > > index 0000000..3b13000 > > --- /dev/null > > +++ b/stubs/pci.c > > @@ -0,0 +1,16 @@ > > +/* > > + * QEMU architecture-specific PCI functions > > + * > > + * Copyright (c) 2015 Samsung Electronics Co., Ltd. > > + * Written by Pavel Fedin > > + * > > + * This work is licensed under the terms of the GNU GPL, version 2 or later. > > + * See the COPYING file in the top-level directory. > > + * > > + */ > > +#include "hw/pci/pci.h" > > + > > +uint16_t pci_requester_id(PCIDevice *dev) > > +{ > > + return 0; > > +} > > OK this is now wrong. You should move the logic back here > from target-arm. Thank you very much for quick responses and cooperation, but... Could we discuss a little bit, what you actually want as a result? This starts to be very inefficient and time-consuming. Every time i redo the whole thing only to hear that "this single line is now wrong". So far, previously you told me that since requester ID is architecture-specific, if should be moved to arch code. Now you tell me that you want it in stubs... Why? Stubs are something to be replaced. And we won't have the replacement anywhere, because nowadays no architecture except ARM uses it. And probably it will stay this way forever. The function is very small, and even if we add more bits for root complex ID, it will stay very small. Why not to have it as inline in include/hw/pci.h? If we ever need to replace it in future, then we'll move it to stubs and override in target-XXX. And, what with other two patches? Actually, all three are independent, i combined them into one series only because they are part of original bigger series. You didn't have any comments on them, could you ACK them finally in order to simplify things down? Kind regards, Pavel Fedin Expert Engineer Samsung Electronics Research center Russia