From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:54100) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1drYPz-0003rq-DW for qemu-devel@nongnu.org; Mon, 11 Sep 2017 19:47:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1drYPy-0006a9-NS for qemu-devel@nongnu.org; Mon, 11 Sep 2017 19:47:07 -0400 References: <20170911172022.4738-1-eblake@redhat.com> <20170911172022.4738-9-eblake@redhat.com> From: John Snow Message-ID: <217d9771-dba2-7ab1-3d52-4863ae74fe56@redhat.com> Date: Mon, 11 Sep 2017 19:46:56 -0400 MIME-Version: 1.0 In-Reply-To: <20170911172022.4738-9-eblake@redhat.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v7 08/38] libqos: Track QTestState with QPCIBus List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Eric Blake , qemu-devel@nongnu.org Cc: thuth@redhat.com, "open list:IDE" , armbru@redhat.com, Alexander Graf , "open list:sPAPR" , Gerd Hoffmann , pbonzini@redhat.com, David Gibson On 09/11/2017 01:19 PM, Eric Blake wrote: > When initializing a QPCIBus, track which QTestState the bus is > associated with (so that a later patch can then explicitly use > that test state for all communication on the bus, rather than > blindly relying on global_qtest). Update the initialization > functions to take another parameter, and update all callers to > pass in state (for now, most callers get away with passing the > current global_qtest as the current state, although this required > fixing the order of initialization to ensure qtest_start() is > called before qpci_init*() in rtl8139-test, and provided an > opportunity to pass in the allocator in e1000e-test). > > Touch up some allocations to use g_new0() rather than g_malloc() > while in the area, and simplify some code (all implementations > of QOSOps provide a .init_allocator() that never fails). > > Signed-off-by: Eric Blake Reviewed-by: John Snow