From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vv0Ad-0005iJ-C7 for qemu-devel@nongnu.org; Mon, 23 Dec 2013 02:43:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vv0AU-0003CX-Pl for qemu-devel@nongnu.org; Mon, 23 Dec 2013 02:43:23 -0500 Received: from mailout3.w1.samsung.com ([210.118.77.13]:43320) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vv0AU-0003CP-Jm for qemu-devel@nongnu.org; Mon, 23 Dec 2013 02:43:14 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0MY9005TA1FZMK30@mailout3.w1.samsung.com> for qemu-devel@nongnu.org; Mon, 23 Dec 2013 07:43:11 +0000 (GMT) Message-id: <52B7E98E.1000406@samsung.com> Date: Mon, 23 Dec 2013 11:43:10 +0400 From: Fedorov Sergey MIME-version: 1.0 References: <1386060535-15908-1-git-send-email-s.fedorov@samsung.com> <1386060535-15908-19-git-send-email-s.fedorov@samsung.com> <52B29FE5.40705@samsung.com> <52B4504C.7000707@samsung.com> In-reply-to: Content-type: text/plain; charset=UTF-8 Content-transfer-encoding: 7bit Subject: Re: [Qemu-devel] [RFC PATCH 18/21] target-arm: switch banked CP registers List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: Johannes Winter , Peter Crosthwaite , a.basov@samsung.com, "qemu-devel@nongnu.org Developers" On 12/20/2013 06:33 PM, Peter Maydell wrote: > This sounds like it could work, though there are some wrinkles for > registers with readfns/writefns -- do we have extra s vs ns read/write > functions, or just one set of functions which has to look in env->ns to > figure out whether to use the S or NS version? What about defining a separate ARMCPRegInfo for each banked AArch32 system register? I think it would be close to AArch64 concept. It would allow to use separate read/write handlers if necessary or reuse the same handlers otherwise. When the handlers is not used, the translation code would simply lookup the ARMCPRegInfo for corresponding secure state and use the field offset. Best regards, Sergey Fedorov