From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34001) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vj6Ue-0007bD-HJ for qemu-devel@nongnu.org; Wed, 20 Nov 2013 07:02:58 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vj6UY-0005xL-Iq for qemu-devel@nongnu.org; Wed, 20 Nov 2013 07:02:52 -0500 Received: from mx1.redhat.com ([209.132.183.28]:8020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vj6UY-0005xE-BQ for qemu-devel@nongnu.org; Wed, 20 Nov 2013 07:02:46 -0500 Message-ID: <1384948961.2005.99.camel@nilsson.home.kraxel.org> From: Gerd Hoffmann Date: Wed, 20 Nov 2013 13:02:41 +0100 In-Reply-To: <1384926761-9962-8-git-send-email-airlied@gmail.com> References: <1384926761-9962-1-git-send-email-airlied@gmail.com> <1384926761-9962-8-git-send-email-airlied@gmail.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 7/8] virtio-vga: v1 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Dave Airlie Cc: qemu-devel@nongnu.org On Mi, 2013-11-20 at 15:52 +1000, Dave Airlie wrote: > From: Dave Airlie > > This is a virtio-vga device built on top of the virtio-gpu device. Ah, I see what you use the wrapping for. Hmm. I think you should use a common base class instead, i.e. something like virtio-gpu-base which holds all the common stuff. Both virtio-gpu and virtio-vga can use that as TypeInfo->parent then. This way virtio-vga doesn't have to muck with virtio-gpu internals. virtio-gpu-base can be tagged as abstract class (using .abstract = true) so it will not be instantiated directly. cheers, Gerd