ARM: HCR.TVM traps are not implemented

Bug #1855072 reported by Julien Freche on 2019-12-04
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
QEMU
Undecided
Richard Henderson

Bug Description

On AARCH64, setting HCR.TVM to 1 is supposed to trap all writes to CTLR_EL1, TTBR0_EL1, TTBR1_EL1, TCR_EL1, ESR_EL1, FAR_EL1, AFSR0_EL1, AFSR1_EL1, MAIR_EL1, AMAIR_EL1, and CONTEXTIDR_EL1. However, it currently has no effect (QEMU emulator version 4.1.1).

It is also likely that TRVM will not trap, but, I didn't verify this.

Richard Henderson (rth) wrote :

Yes to both.

Changed in qemu:
status: New → In Progress
assignee: nobody → Richard Henderson (rth)
Richard Henderson (rth) wrote :

Patch posted:
https://lists.nongnu.org/archive/html/qemu-devel/2020-02/msg04401.html

If you could help testing, that would be appreciated.

Julien Freche (jfreche) wrote :

Thank you for the patch! I am happy to test this for you. I will apply the patch/compile/test and get back to you.

Julien Freche (jfreche) wrote :

I tested in AArch64 mode and it worked for me. Looking at the patch, we might be missing trapping for "TTBCR"in AA32 though.

Richard Henderson (rth) wrote :

Oops. Thanks for the review. Posted v2 with ttbcr included.

Julien Freche (jfreche) wrote :

Thank you! I also tested AArch32 and the code works. Ship it!

Laurent Vivier (laurent-vivier) wrote :
Changed in qemu:
status: In Progress → Fix Committed
Changed in qemu:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers