From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N7baP-0003yt-Us for qemu-devel@nongnu.org; Mon, 09 Nov 2009 16:15:41 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N7baK-0003qi-Qm for qemu-devel@nongnu.org; Mon, 09 Nov 2009 16:15:41 -0500 Received: from [199.232.76.173] (port=32903 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N7baK-0003qU-Js for qemu-devel@nongnu.org; Mon, 09 Nov 2009 16:15:36 -0500 Received: from e7.ny.us.ibm.com ([32.97.182.137]:58202) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N7baK-0007T8-5g for qemu-devel@nongnu.org; Mon, 09 Nov 2009 16:15:36 -0500 Received: from d01relay06.pok.ibm.com (d01relay06.pok.ibm.com [9.56.227.116]) by e7.ny.us.ibm.com (8.14.3/8.13.1) with ESMTP id nA9LBhJl014590 for ; Mon, 9 Nov 2009 16:11:43 -0500 Received: from d01av04.pok.ibm.com (d01av04.pok.ibm.com [9.56.224.64]) by d01relay06.pok.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nA9LFXNl1306744 for ; Mon, 9 Nov 2009 16:15:33 -0500 Received: from d01av04.pok.ibm.com (loopback [127.0.0.1]) by d01av04.pok.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nA9LFWP9030339 for ; Mon, 9 Nov 2009 16:15:33 -0500 Message-ID: <4AF88672.8080102@us.ibm.com> Date: Mon, 09 Nov 2009 15:15:30 -0600 From: Anthony Liguori MIME-Version: 1.0 Subject: Re: [Qemu-devel] [RFC] virtio: Report new guest memory statistics pertinent to memory ballooning (V2) References: <1257782838.2835.5.camel@aglitke> <20091109190001.GA3808@shareable.org> In-Reply-To: <20091109190001.GA3808@shareable.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: agl@linux.vnet.ibm.com, qemu-devel@nongnu.org, Avi Kivity 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? > Features are negotiated. It lets a host advertise the support of a feature and it lets the guest acknowledge it's support of a feature. Most importantly, why invent a new mechanism when we already have one? -- Regards, Anthony Liguori