From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NAv13-0006E0-Sp for qemu-devel@nongnu.org; Wed, 18 Nov 2009 19:36:54 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NAv0y-0006C8-NT for qemu-devel@nongnu.org; Wed, 18 Nov 2009 19:36:53 -0500 Received: from [199.232.76.173] (port=59688 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NAv0y-0006C2-D0 for qemu-devel@nongnu.org; Wed, 18 Nov 2009 19:36:48 -0500 Received: from ozlabs.org ([203.10.76.45]:43130) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NAv0x-00048E-Qy for qemu-devel@nongnu.org; Wed, 18 Nov 2009 19:36:48 -0500 From: Rusty Russell Subject: Re: [Qemu-devel] Re: virtio: Add memory statistics reporting to the balloon driver (V2) Date: Thu, 19 Nov 2009 11:06:38 +1030 References: <1258488996.2820.35.camel@aglitke> <200911181200.39971.rusty@rustcorp.com.au> <4B040C82.6070901@codemonkey.ws> In-Reply-To: <4B040C82.6070901@codemonkey.ws> MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <200911191106.38976.rusty@rustcorp.com.au> List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: qemu-devel@nongnu.org, Avi Kivity , virtualization , linux-kernel@vger.kernel.org, Adam Litke On Thu, 19 Nov 2009 01:32:26 am Anthony Liguori wrote: > Rusty Russell wrote: > > The little-endian conversion of the balloon driver is a historical mistake > > (no other driver does this). Let's not extend it to the stats. > > I think the mistake is that the other drivers don't do that. > > We cheat in qemu and assume that the guest is always in a fixed > endianness but this is not always the case for all architectures. Perhaps, but it's documented in the spec. My assertion remains that to do any virtualization you need to know what the guest endian is anyway, so endian converts throughout the drivers just add pain for driver authors. > I think making the interface u64 and byte based would be the best > solution. Making assumptions about page size across guest and host is > another thing we should try to avoid. Yep, just report the raw byte counts as u64. Cheers, Rusty.