From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57520) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Wyd-0003r8-JD for qemu-devel@nongnu.org; Mon, 14 Dec 2015 12:32:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a8Wya-0002rV-Db for qemu-devel@nongnu.org; Mon, 14 Dec 2015 12:31:59 -0500 Received: from mail-wm0-x22d.google.com ([2a00:1450:400c:c09::22d]:35042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a8Wya-0002rK-3J for qemu-devel@nongnu.org; Mon, 14 Dec 2015 12:31:56 -0500 Received: by mail-wm0-x22d.google.com with SMTP id p66so54867230wmp.0 for ; Mon, 14 Dec 2015 09:31:56 -0800 (PST) Date: Mon, 14 Dec 2015 19:31:52 +0200 From: Shmulik Ladkani Message-ID: <20151214193152.139627ef@halley> In-Reply-To: <566EF8FD.3080206@redhat.com> References: <1449994112-7054-1-git-send-email-shmulik.ladkani@ravellosystems.com> <1449994112-7054-6-git-send-email-shmulik.ladkani@ravellosystems.com> <566EF8FD.3080206@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 5/6] vmw_pvscsi: The pvscsi device is a PCIE endpoint List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "Michael S. Tsirkin" , Jason Wang , idan.brown@ravellosystems.com, qemu-devel@nongnu.org, Marcel Apfelbaum , Dmitry Fleytman Hi, On Mon, 14 Dec 2015 18:14:37 +0100 Paolo Bonzini wrote: > On 13/12/2015 09:08, Shmulik Ladkani wrote: > > + pvs_k->parent_dc_realize = dc->realize; > > Marcel, Michael, > > this creates a really nasty dependency on the contents of pci_qdev_realize. > > Can you instead change PCIDeviceClass's pc->is_express to a function > pointer, and provide a sample implementation pci_is_express_true for the > devices that set is_express to true? Thanks Paolo, I like the idea. Indeed repeating the parent_dc_realize hack for various devices seems awkward. If this approach is accepted, I'm okay doing the suggested refactor. Regards, Shmulik