From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ND3OW-0007uP-KC for qemu-devel@nongnu.org; Tue, 24 Nov 2009 16:57:56 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ND3OS-0007ts-52 for qemu-devel@nongnu.org; Tue, 24 Nov 2009 16:57:56 -0500 Received: from [199.232.76.173] (port=37129 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ND3OS-0007tp-0Z for qemu-devel@nongnu.org; Tue, 24 Nov 2009 16:57:52 -0500 Received: from e2.ny.us.ibm.com ([32.97.182.142]:40139) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1ND3OR-0003Ah-J9 for qemu-devel@nongnu.org; Tue, 24 Nov 2009 16:57:51 -0500 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e2.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id nAOLngk4001863 for ; Tue, 24 Nov 2009 16:49:42 -0500 Received: from d01av01.pok.ibm.com (d01av01.pok.ibm.com [9.56.224.215]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAOLvoOE1872012 for ; Tue, 24 Nov 2009 16:57:50 -0500 Received: from d01av01.pok.ibm.com (loopback [127.0.0.1]) by d01av01.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAOLvo5W026623 for ; Tue, 24 Nov 2009 16:57:50 -0500 Message-ID: <4B0C56DC.4010608@linux.vnet.ibm.com> Date: Tue, 24 Nov 2009 15:57:48 -0600 From: Anthony Liguori MIME-Version: 1.0 References: <20091124194502.GA4250@redhat.com> <4B0C3901.5010100@linux.vnet.ibm.com> <20091124195458.GA4290@redhat.com> <4B0C4A6F.3000305@linux.vnet.ibm.com> <20091124213000.GA4614@redhat.com> In-Reply-To: <20091124213000.GA4614@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH] qemu/virtio-net: remove wrong s/g layout assumptions List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "Michael S. Tsirkin" Cc: Shirley Ma , Rusty Russell , qemu-devel@nongnu.org Michael S. Tsirkin wrote: > It's useful because this way I won't have to maintain the fix, and it > will make it possible for guests to experiment with layouts, without > hacking qemu. If someone wants to make it a product, that's a different > thing. > Advertising a new feature is not hard. It's one line of code in qemu with Rusty's ACK. > Also, it might be a valid thing for a guest to say that host needs to be > fixed. Not everyone might care about running on any possible broken qemu > version. > > Finally - where do we draw the line? Does any bugfix need a feature bit? > This is a spec bug, not a qemu bug IMHO. The kernel drivers have always behaved this way and when this was all written originally, the semantics were never defined. All the userspace implementations relied on this. The fact that the spec claims a different behavior is a result of deciding that it should be different after the fact. Thinking about it more, your patch is broken. If you run it against a really old guest, it will break badly. You assume that the guest header is always a fixed size. It's not, we've added fields as we've added feature bits. You actually have to look at the set of Ack'd features bits to determine how large the header is. Which is why I now remember why this has never changed. It's a PITA :-) I'm not even sure you can do it in a correct way. -- Regards, Anthony Liguori