[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 06/11] target/arm: Reset btype for direct branch
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 06/11] target/arm: Reset btype for direct branches and syscalls |
Date: |
Tue, 29 Jan 2019 14:06:48 +0000 |
On Tue, 29 Jan 2019 at 14:05, Richard Henderson
<address@hidden> wrote:
>
> On 1/29/19 1:57 AM, Peter Maydell wrote:
> >>> The advantage of picking the other choice (SPSR_ELx.BTYPE ==
> >>> PSTATE.BTYPE) is that it means that the behaviour is identical
> >>> for all exceptions (async or sync of any type) and we don't
> >>> do the work of clearing the BTYPE field (which will happen
> >>> potentially in "normal" guest code if we're not in a guarded page,
> >>> I think).
> >>
> >> Well, BTYPE is in the TB flags, so we know it's already zero in that case,
> >> so
> >> there's no extra work.
> >
> > It's not zero if we just did a BR Xn to get to this SVC insn, is it?
>
> I guess I misunderstood what you meant by "extra" work.
> It's not "extra" if btype is known to not be zero...
The architecture doesn't require it to be cleared in that
situation, unless I've misunderstood it. So unless the kernel
is explicitly clearing the BTYPE in the SPSR (which I don't
think it is obliged to do either) then clearing it is
work we don't need to do.
thanks
-- PMM
- Re: [Qemu-devel] [PATCH 04/11] target/arm: Record the GP bit for a page in MemTxAttrs, (continued)
[Qemu-devel] [PATCH 05/11] target/arm: Default handling of BTYPE during translation, Richard Henderson, 2019/01/10
[Qemu-devel] [PATCH 06/11] target/arm: Reset btype for direct branches and syscalls, Richard Henderson, 2019/01/10
[Qemu-devel] [PATCH 07/11] target/arm: Set btype for indirect branches, Richard Henderson, 2019/01/10
[Qemu-devel] [PATCH 08/11] target/arm: Add guarded_pages cpu property for user-only, Richard Henderson, 2019/01/10
[Qemu-devel] [PATCH 09/11] target/arm: Enable BTI for -cpu max, Richard Henderson, 2019/01/10
[Qemu-devel] [PATCH 10/11] linux-user/aarch64: Reset btype for signal handlers, Richard Henderson, 2019/01/10