From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDsvV-0007zz-BF for qemu-devel@nongnu.org; Wed, 21 Jan 2015 05:54:22 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YDsvR-0002sh-RU for qemu-devel@nongnu.org; Wed, 21 Jan 2015 05:54:21 -0500 Received: from static.88-198-71-155.clients.your-server.de ([88.198.71.155]:39979 helo=socrates.bennee.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YDsvR-0002sW-Ku for qemu-devel@nongnu.org; Wed, 21 Jan 2015 05:54:17 -0500 References: <1421706621-23731-1-git-send-email-greg.bellows@linaro.org> <1421706621-23731-5-git-send-email-greg.bellows@linaro.org> <87zj9d75l0.fsf@linaro.org> From: Alex =?utf-8?Q?Benn=C3=A9e?= In-reply-to: Date: Wed, 21 Jan 2015 10:54:17 +0000 Message-ID: <87wq4g76au.fsf@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Subject: Re: [Qemu-devel] [PATCH 4/5] target-arm: Add AArch32 guest support to KVM64 List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Greg Bellows Cc: Peter Maydell , QEMU Developers , Christoffer Dall Greg Bellows writes: > On Tue, Jan 20, 2015 at 10:57 AM, Alex Bennée wrote: >> >> Greg Bellows writes: >> >>> Add 32-bit to/from 64-bit register synchronization on register gets and puts. >>> Set EL1_32BIT feature flag passed to KVM >>> >>> Signed-off-by: Greg Bellows >>> } >>> >>> /* Note that KVM thinks pstate is 64 bit but we use a uint32_t */ >>> - val = pstate_read(env); >>> + if (is_a64(env)) { >>> + val = pstate_read(env); >>> + } else { >>> + val = cpsr_read(env); >>> + } >> >> I know why we do this (especially given where my attempt ended up) but >> perhaps we could at list have a single state aware accessor so we don't >> end up duplicating this test all over the place? > > I'd happily add an accessor function, but I only found 1 other > location that does this conditional so I'm not sure it is warranted. The migration/serialisation code? Today one other, tomorrow just one more? -- Alex Bennée