From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsJLS-0003jQ-Ao for qemu-devel@nongnu.org; Thu, 18 Mar 2010 13:17:18 -0400 Received: from [199.232.76.173] (port=56395 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsJLR-0003iI-Qh for qemu-devel@nongnu.org; Thu, 18 Mar 2010 13:17:17 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NsJLQ-0007sE-K1 for qemu-devel@nongnu.org; Thu, 18 Mar 2010 13:17:17 -0400 Received: from mx1.redhat.com ([209.132.183.28]:6968) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NsJLQ-0007s4-7E for qemu-devel@nongnu.org; Thu, 18 Mar 2010 13:17:16 -0400 Received: from int-mx08.intmail.prod.int.phx2.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2IHHFYx005706 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Mar 2010 13:17:15 -0400 Date: Thu, 18 Mar 2010 19:13:50 +0200 From: "Michael S. Tsirkin" Message-ID: <20100318171350.GA27805@redhat.com> References: <20100318064015.GA16973@redhat.com> <20100318074239.GA23474@redhat.com> <20100318090711.GB23649@redhat.com> <20100318123310.GA27286@redhat.com> <20100318134729.GB27478@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: [Qemu-devel] Re: [PATCH 0/9] Virtio cleanups List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Juan Quintela Cc: qemu-devel@nongnu.org On Thu, Mar 18, 2010 at 03:21:59PM +0100, Juan Quintela wrote: > > My patch removes lines of code. It is actually simpler than > > what we had: no casts, no assumptions. > > It is more complex. You need to add a new offset field to be able to > free it in common code. To add insult to injury, you have to do there a > cast (without containeroff) to be able to free it there. And once that > you add the offset, the number of lines argument is also lost. You seem to be looking at version 1 of the patch. Please look at PATCHv2 I posted. No cast, no offset. > >> (Yes, that is paraphrasing yourself in a funny way, pardon for the > >> license ) > >> > >> about vdev & pcidev. I still think that a lot of things would be easier > >> if a vdev device is a pci_device _always_, not just some times. And > >> VirtIOPCIProxy shows it. > >> > >> Later, Juan. > > > > Yes. But we don't always have pci. So the world we model does > > not match single inheritance: a cow is both a mammal and a quadruped, > > even if java programmers prefer it to be a mammal first of all :) > > Look at it this other way, If I assume that I always have pci, how much > I can simplify? > > Later, Juan. Quite a lot. We started this way, BTW. -- MST