From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NsB0e-0001Rh-OG for qemu-devel@nongnu.org; Thu, 18 Mar 2010 04:23:16 -0400 Received: from [199.232.76.173] (port=48509 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NsB0d-0001Qs-Us for qemu-devel@nongnu.org; Thu, 18 Mar 2010 04:23:15 -0400 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1NsB0c-0006vk-9D for qemu-devel@nongnu.org; Thu, 18 Mar 2010 04:23:15 -0400 Received: from mx1.redhat.com ([209.132.183.28]:11480) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NsB0b-0006vO-Cn for qemu-devel@nongnu.org; Thu, 18 Mar 2010 04:23:13 -0400 Received: from int-mx04.intmail.prod.int.phx2.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.17]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o2I8NCBJ001280 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 18 Mar 2010 04:23:12 -0400 From: Juan Quintela In-Reply-To: (Michael S. Tsirkin's message of "Thu, 18 Mar 2010 09:21:25 +0200") References: Date: Thu, 18 Mar 2010 09:23:10 +0100 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [Qemu-devel] Re: [PATCH 0/5] virtio: cleanup layout assumptions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: qemu-devel@nongnu.org "Michael S. Tsirkin" wrote: > This patchset helps remove the assumption that vdev must be the 1st > member in any virtio device implementation. Other assumptions (made by > qdev) can be removed in a similar way separately, this patchset does not > do this yet. > Juan, this is an alternative to your 'tell virtio about DO_UPCAST' > patch, pls take a look. Answered in the other series. I don't see what removing that assumption brings us. qdev "requires" that 1st element is a qdev. And that requeriment is not going out anytime soon. I think that this series are "over" engineering, at least until somebody cames with a good use for not being the 1st element. Why do you want this? Notice that rest of qemu has this same assumption for rest of devices. Principle of Least Surprise means use my "cleanup". Furthermore, your VIRTIO_COMMON_INIT() macro is ugly as hell, again to gain us nothing. Without a good reason why we don't want VirtIODevice to be the 1st element, I think that my series are more coherent (but on the other hand, what would you expect from me :) Later, Juan.