From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:36446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z12IN-0006rG-UB for qemu-devel@nongnu.org; Fri, 05 Jun 2015 20:49:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Z12IK-0001ls-Lo for qemu-devel@nongnu.org; Fri, 05 Jun 2015 20:49:07 -0400 Received: from mail-qc0-f177.google.com ([209.85.216.177]:35875) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z12IK-0001lk-Hj for qemu-devel@nongnu.org; Fri, 05 Jun 2015 20:49:04 -0400 Received: by qcxw10 with SMTP id w10so36007430qcx.3 for ; Fri, 05 Jun 2015 17:49:04 -0700 (PDT) MIME-Version: 1.0 Sender: peter.crosthwaite@petalogix.com In-Reply-To: References: <1432814996-13464-1-git-send-email-peter.maydell@linaro.org> <1432814996-13464-5-git-send-email-peter.maydell@linaro.org> Date: Fri, 5 Jun 2015 17:49:03 -0700 Message-ID: From: Peter Crosthwaite Content-Type: text/plain; charset=UTF-8 Subject: Re: [Qemu-devel] [PATCH 4/5] hw/arm/pxa2xx: Convert pxa2xx-ssp to VMState List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "qemu-devel@nongnu.org Developers" , Patch Tracking On Fri, Jun 5, 2015 at 4:32 PM, Peter Maydell wrote: > On 6 June 2015 at 00:18, Peter Crosthwaite wrote: >> On Thu, May 28, 2015 at 5:09 AM, Peter Maydell wrote: >>> The pxa2xx-ssp device is already a QOM device but is still >>> using the old-style register_savevm(); convert to VMState. >>> >>> Signed-off-by: Peter Maydell >>> --- >>> hw/arm/pxa2xx.c | 89 +++++++++++++++++++++------------------------------------ >>> 1 file changed, 33 insertions(+), 56 deletions(-) >>> >>> diff --git a/hw/arm/pxa2xx.c b/hw/arm/pxa2xx.c >>> index 770902f..09401f9 100644 >>> --- a/hw/arm/pxa2xx.c >>> +++ b/hw/arm/pxa2xx.c >>> @@ -457,7 +457,7 @@ typedef struct { >>> >>> MemoryRegion iomem; >>> qemu_irq irq; >>> - int enable; >>> + uint32_t enable; >>> SSIBus *bus; >>> >>> uint32_t sscr[2]; >>> @@ -470,10 +470,39 @@ typedef struct { >>> uint8_t ssacd; >>> >>> uint32_t rx_fifo[16]; >>> - int rx_level; >>> - int rx_start; >>> + uint32_t rx_level; >>> + uint32_t rx_start; >>> } PXA2xxSSPState; >>> >>> +static bool pxa2xx_ssp_vmstate_validate(void *opaque, int version_id) >>> +{ >>> + PXA2xxSSPState *s = opaque; >>> + >>> + return s->rx_start < sizeof(s->rx_fifo); >> >> Does this need to be ARRAY_SIZE to account for unit32_t indexing? > > Yes, good catch. > Ok that's all I found. So otherwise, Reviewed-by: Peter Crosthwaite I assume this is intended to break backwards compat on the VMSD with the conversion from put_byte loop to VMSTATE_UINT32_ARRAY? I'm not sure what our policy is on these old ARM machines and preserving the backwards compat. Regards, Peter > -- PMM >