From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:53584) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMApL-0006k9-6C for qemu-devel@nongnu.org; Thu, 11 Oct 2012 00:56:56 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TMApJ-0002bv-UT for qemu-devel@nongnu.org; Thu, 11 Oct 2012 00:56:55 -0400 Received: from e23smtp01.au.ibm.com ([202.81.31.143]:42373) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TMApJ-0002br-Cj for qemu-devel@nongnu.org; Thu, 11 Oct 2012 00:56:53 -0400 Received: from /spool/local by e23smtp01.au.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 11 Oct 2012 14:54:36 +1000 Received: from d23av04.au.ibm.com (d23av04.au.ibm.com [9.190.235.139]) by d23relay05.au.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id q9B4kawH43712736 for ; Thu, 11 Oct 2012 15:46:37 +1100 Received: from d23av04.au.ibm.com (loopback [127.0.0.1]) by d23av04.au.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id q9B4uQhP023531 for ; Thu, 11 Oct 2012 15:56:27 +1100 Date: Thu, 11 Oct 2012 12:57:21 +1100 From: David Gibson Message-ID: <20121011015721.GA25270@truffula.fritz.box> References: <1349758412-5559-1-git-send-email-david@gibson.dropbear.id.au> <1349758412-5559-5-git-send-email-david@gibson.dropbear.id.au> <20121009125317.GD5798@truffula.fritz.box> <20121010001731.GE5798@truffula.fritz.box> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121010001731.GE5798@truffula.fritz.box> Subject: Re: [Qemu-devel] [PATCH 4/7] savevm: Add VMSTATE_ helpers for target_phys_addr_t List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: blauwirbel@gmail.com, aliguori@us.ibm.com, qemu-devel@nongnu.org, quintela@redhat.com On Wed, Oct 10, 2012 at 11:17:31AM +1100, David Gibson wrote: > On Tue, Oct 09, 2012 at 05:24:29PM +0100, Peter Maydell wrote: > > On 9 October 2012 13:53, David Gibson wrote: > > > Well, the place I've used this (in patches yet to be posted) is saving > > > the state of the pseries machine itself. Specifically, I use > > > VMSTATE_TPA_EQUAL to sanity check that the restored machine has the > > > same ram size as the saved machine. > > > > This doesn't sound like the sort of check that should be in > > a specific machine model -- you should be able to rely on > > common qemu code to handle this. (If you can't then we need > > a check in the common code...) > > Hm, true. Very well, I'll drop it, and the VMSTATE_TPA patch as > well. Actually, turns out I had another use of these helpers. That was to store the real page address from the ppcmeb_tlb_t structure. That structure is used to represent TLB entries on a number of different embedded chips, which don't all have the same physical bus width. So target_phys_addr_t does seem like the correct type there. Obviously I could change the type to a fixed uint64_t, but I'm not sure if that's a better idea than bringing in the VMSTATE_TPA helpers. Advice? -- David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson