From: Julien Freche <1879587@bugs.launchpad.net>
To: qemu-devel@nongnu.org
Subject: [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64
Date: Wed, 20 May 2020 00:32:40 -0000 [thread overview]
Message-ID: <158993476092.21470.14524424949082521060.malone@wampee.canonical.com> (raw)
In-Reply-To: 158993429952.22373.5947926664408541430.malonedeb@wampee.canonical.com
This is with qemu-system-aarch64 - forgot to mention it explicitly. So,
it will only affect qemu for ARM 64-bit.
--
You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.
https://bugs.launchpad.net/bugs/1879587
Title:
Register number in ESR is incorrect for certain banked registers when
switching from AA32 to AA64
Status in QEMU:
New
Bug description:
I am running into a situation where I have:
- A hypervisor running in EL2, AA64
- A guest running in EL1, AA32
We trap certain accesses to special registers such as DACR (via
HCR.TVM). One instruction that is trapped is:
ee03ef10 -> mcr 15, 0, lr, cr3, cr0, {0}
The guest is running in SVC mode. So, LR should refer to LR_svc there.
LR_svc is mapped to X18 in AA64. So, ESR should reflect that. However,
the actual ESR value is: 0xfe00dc0
If we decode the 'rt':
>>> (0xfe00dc0 >> 5) & 0x1f
14
My understanding is that 14 is incorrect in the context of AA64. rt
should be set to 18. The current mode being SVC, LR refers to LR_svc
not LR_usr. In other words, the mapping between registers in AA64 and
AA32 doesn't seem to be accounted for. I've tested this with Qemu
5.0.0
Let me know if that makes sense and if you would like more info. I am also happy to test patches.
Thanks for all the great work on Qemu!
To manage notifications about this bug go to:
https://bugs.launchpad.net/qemu/+bug/1879587/+subscriptions
next prev parent reply other threads:[~2020-05-20 0:41 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-20 0:24 [Bug 1879587] [NEW] Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64 Julien Freche
2020-05-20 0:32 ` Julien Freche [this message]
2020-07-30 11:15 ` [Bug 1879587] " Peter Maydell
2020-08-03 16:59 ` Peter Maydell
2020-08-03 17:58 ` Julien Freche
2020-08-03 18:03 ` Julien Freche
2020-08-04 12:44 ` Peter Maydell
2020-08-04 19:00 ` Julien Freche
2020-08-04 19:17 ` Peter Maydell
2020-08-05 10:55 ` Peter Maydell
2020-08-05 15:05 ` Julien Freche
2020-08-05 15:19 ` Philippe Mathieu-Daudé
2020-08-05 15:27 ` Julien Freche
2020-08-05 16:42 ` Peter Maydell
2020-08-20 15:01 ` Thomas Huth
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=158993476092.21470.14524424949082521060.malone@wampee.canonical.com \
--to=1879587@bugs.launchpad.net \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).