Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7Zj6-0002je-Iw for qemu-devel@nongnu.org; Mon, 09 Nov 2009 14:16:32 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7Zj1-0002XC-Fp for qemu-devel@nongnu.org; Mon, 09 Nov 2009 14:16:31 -0500 Received: from [199.232.76.173] (port=47176 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7Zj0-0002Wr-IP for qemu-devel@nongnu.org; Mon, 09 Nov 2009 14:16:26 -0500 Received: from e37.co.us.ibm.com ([32.97.110.158]:39311) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N7Ziz-00024Z-Oh for qemu-devel@nongnu.org; Mon, 09 Nov 2009 14:16:26 -0500 Received: from d03relay03.boulder.ibm.com (d03relay03.boulder.ibm.com [9.17.195.228]) by e37.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id nA9JFCN3012907 for ; Mon, 9 Nov 2009 12:15:12 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nA9JGH5N184816 for ; Mon, 9 Nov 2009 12:16:17 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nA9CBqbG018486 for ; Mon, 9 Nov 2009 05:11:52 -0700 Subject: Re: [Qemu-devel] [RFC] virtio: Report new guest memory statistics pertinent to memory ballooning (V2) From: Adam Litke In-Reply-To: <20091109190001.GA3808@shareable.org> References: <1257782838.2835.5.camel@aglitke> <20091109190001.GA3808@shareable.org> Content-Type: text/plain; charset="UTF-8" Date: Mon, 09 Nov 2009 13:16:14 -0600 Message-ID: <1257794174.2835.22.camel@aglitke> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: Anthony Liguori , qemu-devel@nongnu.org, Avi Kivity On Mon, 2009-11-09 at 19:00 +0000, Jamie Lokier wrote: > Adam Litke wrote: > > + s->stats.pswapin = has_feature(dev, VIRTIO_BALLOON_F_RPT_SWAP_OUT) ? > > + dev->stats.pswapin : -1; > > (etc.) > > Why not simply have the guest fill in the unused fields with -1, and > say that's how "no meaningful value" is represented in the ABI? > > All guests have to know about all those fields anyway, for the > structure layout. Is there any benefit to specifying feature bits in > advance over simply storing -1 there? This holds true for fields that exist but might not be supported by a guest, but what about the case where we add a new field? In that case, qemu and the guest may disagree on the structure layout. -- Thanks, Adam