[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v2 02/26] armv7m: Undo armv7m.hack
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH v2 02/26] armv7m: Undo armv7m.hack |
Date: |
Mon, 28 Dec 2015 18:27:23 +0000 |
On 28 December 2015 at 01:55, Michael Davidsaver <address@hidden> wrote:
> On 12/17/2015 10:38 AM, Peter Maydell wrote:
>> We could use a comment here (a) explaining what we're doing and (b)
>> mentioning that this isn't architecturally correct -- ideally we should
>> catch these exception exits on execution of the jump insn, not by
>> letting the jump execute and then trapping when we actually try to
>> execute at the magic addresses.
>
> I had an instructive little digression to investigate doing things the
> "right way" (in tcg). I can see how it would be done by adding a
> conditional every time the PC could be updated. To me the unassigned
> handler trick/hack seems simpler (less likely to add a bug) and avoids
> emitting more code for every ldm/pop instruction.
Yes, it's faster, which is why we do it this way. It is however
not what the hardware does (in a way which is visible to guest code
which is specifically looking for the difference), which is why it's
worth commenting on.
thanks
-- PMM
- [Qemu-devel] [PATCH v2 06/26] armv7m: fix I and F flag handling, (continued)
[Qemu-devel] [PATCH v2 02/26] armv7m: Undo armv7m.hack, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 07/26] armv7m: simpler/faster exception start, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 10/26] armv7m: auto-clear FAULTMASK, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 09/26] armv7m: implement CFSR, HFSR, BFAR, and MMFAR, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 11/26] arm: gic: Remove references to NVIC, Michael Davidsaver, 2015/12/02
[Qemu-devel] [PATCH v2 12/26] armv7m: check exception return consistency, Michael Davidsaver, 2015/12/02