From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7ZTH-0006Bp-WC for qemu-devel@nongnu.org; Mon, 09 Nov 2009 14:00:12 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7ZTC-0006BC-GM for qemu-devel@nongnu.org; Mon, 09 Nov 2009 14:00:10 -0500 Received: from [199.232.76.173] (port=35144 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7ZTC-0006B9-AE for qemu-devel@nongnu.org; Mon, 09 Nov 2009 14:00:06 -0500 Received: from mail2.shareable.org ([80.68.89.115]:47155) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N7ZTB-00078n-QP for qemu-devel@nongnu.org; Mon, 09 Nov 2009 14:00:06 -0500 Date: Mon, 9 Nov 2009 19:00:01 +0000 From: Jamie Lokier Subject: Re: [Qemu-devel] [RFC] virtio: Report new guest memory statistics pertinent to memory ballooning (V2) Message-ID: <20091109190001.GA3808@shareable.org> References: <1257782838.2835.5.camel@aglitke> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1257782838.2835.5.camel@aglitke> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Adam Litke Cc: Anthony Liguori , qemu-devel@nongnu.org, Avi Kivity 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? -- Jamie