qemu-devel
[Top][All Lists]
Advanced

[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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]