From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:47829) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSk0B-0002y9-40 for qemu-devel@nongnu.org; Mon, 29 Oct 2012 03:43:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TSk07-0001f3-7j for qemu-devel@nongnu.org; Mon, 29 Oct 2012 03:43:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:33309) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TSk06-0001ez-Vh for qemu-devel@nongnu.org; Mon, 29 Oct 2012 03:43:11 -0400 Message-ID: <508E3389.5080100@redhat.com> Date: Mon, 29 Oct 2012 08:43:05 +0100 From: Gerd Hoffmann MIME-Version: 1.0 References: <16ccd8856bbc63649b8d5bed1123213ac0a05edc.1351229557.git.peter.crosthwaite@xilinx.com> <508A80F8.7070202@redhat.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH v2 05/11] usb/ehci: seperate out PCIisms List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Crosthwaite Cc: vineshp@xilinx.com, peter.maydell@linaro.org, qemu-devel@nongnu.org, john.williams@xilinx.com, edgar.iglesias@gmail.com, afaerber@suse.de Hi, > There still has to be a way to share the Property[] array (currently > contains maxframes). Duplicating the properties array to all > definitions is verbose and fragile. If I want to add a new properties > to EHCI i need to put it in the props array of every subclass. serial > has this problem, with the "chardev" prop appearing in both isa and > pci variants (and the device variant out of tree that Anthony has). If > we decide to add a new prop to serial we have to DEFINE_PROP_FOO it 3 > times. > Whats the real answer here? Can we get the shared init function to add > to properties explicify? Blow away the dc->properties = foo and > replace with code that parses to prop array? Existing practice is to use a #define for that, see DEFINE_NIC_PROPERTIES in net.h for example. Maybe QOM allows us to do something more elegant here. cheers, Gerd