[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug 1879587] Re: Register number in ESR is incorrect for certain banked
From: |
Peter Maydell |
Subject: |
[Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64 |
Date: |
Wed, 05 Aug 2020 10:55:11 -0000 |
v2 is here https://patches.linaro.org/patch/247434/ -- hoping to put
that in master today...
--
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:
In Progress
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
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Peter Maydell, 2020/08/03
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Julien Freche, 2020/08/03
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Julien Freche, 2020/08/03
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Peter Maydell, 2020/08/04
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Julien Freche, 2020/08/04
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Peter Maydell, 2020/08/04
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64,
Peter Maydell <=
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Julien Freche, 2020/08/05
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Philippe Mathieu-Daudé, 2020/08/05
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Julien Freche, 2020/08/05
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Peter Maydell, 2020/08/05
- [Bug 1879587] Re: Register number in ESR is incorrect for certain banked registers when switching from AA32 to AA64, Thomas Huth, 2020/08/20