From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:57309) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0CXK-0003dM-Te for qemu-devel@nongnu.org; Wed, 22 Feb 2012 08:47:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0CXF-0000oP-Kj for qemu-devel@nongnu.org; Wed, 22 Feb 2012 08:47:14 -0500 Received: from mx1.redhat.com ([209.132.183.28]:36752) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0CXF-0000oH-AR for qemu-devel@nongnu.org; Wed, 22 Feb 2012 08:47:09 -0500 From: Juan Quintela In-Reply-To: <1329905754-11873-3-git-send-email-i.mitsyanko@samsung.com> (Igor Mitsyanko's message of "Wed, 22 Feb 2012 14:15:51 +0400") References: <1329905754-11873-1-git-send-email-i.mitsyanko@samsung.com> <1329905754-11873-3-git-send-email-i.mitsyanko@samsung.com> Date: Wed, 22 Feb 2012 14:47:03 +0100 Message-ID: <87ty2jugiw.fsf@elfo.elfo> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 2/5] hw/pxa2xx_dma.c: drop VMSTATE_UINTTL usage Reply-To: quintela@redhat.com List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Igor Mitsyanko Cc: peter.maydell@linaro.org, balrog@zabor.org, e.voevodin@samsung.com, qemu-devel@nongnu.org, kyungmin.park@samsung.com, d.solodkiy@samsung.com, m.kozlov@samsung.com, afaerber@suse.de Igor Mitsyanko wrote: > Convert variables descr, src and dest from type target_phys_addr_t to uint32_t, > use VMSTATE_UINT32 instead of VMSTATE_UINTTL for these variables. > We can do it safely because: > 1) pxa2xx has 32-bit physical address; > 2) rest of the code in this file treats these variables as uint32_t; > 3) we shouldn't have used VMSTATE_UINTTL in the first place because this macro > is for target_ulong type (which can be different from target_phys_addr_t). This is an incompatible change, we need to bump the version. Looking at pxa2xx_dma_descriptor_fetch() it looks like your change is enough: uint32_t desc[4]; .... s->chan[ch].descr = desc[DDADR]; s->chan[ch].src = desc[DSADR]; s->chan[ch].dest = desc[DTADR]; s->chan[ch].cmd = desc[DCMD]; i.e. we always asign from a 32bit register. In general change is not valid. As I don't know if this device can appear as 64bit hardware, I don't know if the change is valid and let it to the ARM gurus. Later, Juan.