From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:48824) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFpQF-0008Do-2u for qemu-devel@nongnu.org; Mon, 26 Jan 2015 14:34:08 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YFpQB-0003hw-Np for qemu-devel@nongnu.org; Mon, 26 Jan 2015 14:34:06 -0500 Received: from mail-qc0-f176.google.com ([209.85.216.176]:38129) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YFpQB-0003ho-J4 for qemu-devel@nongnu.org; Mon, 26 Jan 2015 14:34:03 -0500 Received: by mail-qc0-f176.google.com with SMTP id c9so8673360qcz.7 for ; Mon, 26 Jan 2015 11:34:03 -0800 (PST) MIME-Version: 1.0 In-Reply-To: References: <1422037228-5363-1-git-send-email-peter.maydell@linaro.org> <1422037228-5363-6-git-send-email-peter.maydell@linaro.org> Date: Mon, 26 Jan 2015 13:34:02 -0600 Message-ID: From: Greg Bellows Content-Type: multipart/alternative; boundary=001a113a9764840b51050d9338f2 Subject: Re: [Qemu-devel] [PATCH 05/11] target-arm: Use correct mmu_idx for unprivileged loads and stores List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Maydell Cc: "Edgar E. Iglesias" , Andrew Jones , =?UTF-8?B?QWxleCBCZW5uw6ll?= , QEMU Developers , Patch Tracking --001a113a9764840b51050d9338f2 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Jan 26, 2015 at 8:56 AM, Peter Maydell wrote: > On 26 January 2015 at 14:40, Greg Bellows wrote= : > > On Fri, Jan 23, 2015 at 12:20 PM, Peter Maydell < > peter.maydell@linaro.org> > > wrote: > >> > >> The MMU index to use for unprivileged loads and stores is more > >> complicated than we currently implement: > >> * for A64, it should be "if at EL1, access as if EL0; otherwise > >> access at current EL" > >> * for A32/T32, it should be "if EL2, UNPREDICTABLE; otherwise > >> access as if at EL0". > >> > > > > The wording between the specs appears to be almost identical, curious w= hy > > the handling is different? > > Because that's what the ARM ARM specifies. Compare C3.2.5 (A64 LDT &c) > with F7.1.95 (A32/T32 LDRT). > =E2=80=8B=E2=80=8B =E2=80=8BI had been comparing the wording of ARMv8 - F1.6.3 and =E2=80=8BAR= Mv7 - A4.6.3. After comparing the LDRT instructions between A64 (C6.6.97) and A32 (F7.1.95), I am still missing the distinction that warrants the following different behavior: - EL2 is unpredictable in both A64 and A32, but in one case we treat it as such and the other we demote it to NS/EL0 to allow it. - EL3 is demoted to S/EL0 in one case but remains EL3 in the other. > > -- PMM > --001a113a9764840b51050d9338f2 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable


On Mon, Jan 26, 2015 at 8:56 AM, Peter Maydell <peter.= maydell@linaro.org> wrote:
= On 26 January 2015 at 14:40, Greg Bellows <greg.bellows@linaro.org> wrote= :
> On Fri, Jan 23, 2015 at 12:20 PM, Peter Maydell <peter.maydell@linaro.org>= ;
> wrote:
>>
>> The MMU index to use for unprivileged loads and stores is more
>> complicated than we currently implement:
>>=C2=A0 * for A64, it should be "if at EL1, access as if EL0; o= therwise
>>=C2=A0 =C2=A0 access at current EL"
>>=C2=A0 * for A32/T32, it should be "if EL2, UNPREDICTABLE; oth= erwise
>>=C2=A0 =C2=A0 access as if at EL0".
>>
>
> The wording between the specs appears to be almost identical, curious = why
> the handling is different?

Because that's what the ARM ARM specifies. Compare C3.2.5 (A64 L= DT &c)
with F7.1.95 (A32/T32 LDRT).
=E2=80=8B=E2=80=8B
=E2=80=8BI had been comparing the wording of ARMv8 - F1= .6.3 and =E2=80=8BARMv7 - A4.6.3.=C2=A0
After comparing the LDRT in= structions between A64 (C6.6.97) and A32 (F7.1.95), I am still missing the = distinction that warrants the following different behavior:

- EL2 is unpredictable in both A64 and A32, but in one case we treat = it as such and the other we demote it to NS/EL0 to allow it.
- EL3 = is demoted to S/EL0 in one case but remains EL3 in the other.
=C2=A0

-- PMM

--001a113a9764840b51050d9338f2--