[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 08/10] target/arm: Implement the ARMv8.1-LOR
From: |
Richard Henderson |
Subject: |
Re: [Qemu-devel] [PATCH v2 08/10] target/arm: Implement the ARMv8.1-LOR extension |
Date: |
Thu, 6 Dec 2018 10:25:59 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1 |
On 12/6/18 7:49 AM, Peter Maydell wrote:
>> + uint64_t hcr = arm_hcr_el2_eff(env);
>> + if (hcr & HCR_E2H) {
>> + hcr &= HCR_TLOR;
>> + } else {
>> + hcr &= HCR_TGE | HCR_TLOR;
> This doesn't make sense to me
The logic is backward. What I was after was
if (hcr & HCR_E2H) {
hcr &= HCR_TGE | HCR_TLOR;
} else {
hcr &= HCR_TLOR;
}
if (hcr == HCR_TLOR) {
trap to el2.
}
I.e. swap the then and else condition. This takes care of the two rules
-- If (SCR_EL3.NS == 1 || SCR_EL3.EEL2 == 1) && IsUsingAArch64(EL2)
&& HCR_EL2.E2H == 0 && HCR_EL2.TLOR == 1, then
accesses at EL1 are trapped to EL2.
-- If (SCR_EL3.NS == 1 || SCR_EL3.EEL2 == 1) && IsUsingAArch64(EL2)
&& HCR_EL2.E2H == 1 && HCR_EL2.TGE == 0 && HCR_EL2.TLOR == 1,
then accesses at EL1 are trapped to EL2.
r~
- Re: [Qemu-devel] [PATCH v2 06/10] target/arm: Use arm_hcr_el2_eff more places, (continued)
[Qemu-devel] [PATCH v2 09/10] target/arm: Implement the ARMv8.1-HPD extension, Richard Henderson, 2018/12/03
[Qemu-devel] [PATCH v2 07/10] target/arm: Tidy scr_write, Richard Henderson, 2018/12/03
[Qemu-devel] [PATCH v2 10/10] target/arm: Implement the ARMv8.2-AA32HPD extension, Richard Henderson, 2018/12/03
[Qemu-devel] [PATCH v2 08/10] target/arm: Implement the ARMv8.1-LOR extension, Richard Henderson, 2018/12/03
Re: [Qemu-devel] [PATCH v2 00/10] target/arm: LOR, HPD, AA32HPD, Peter Maydell, 2018/12/06