diff options
| author | Michael Davidsaver | 2017-01-27 16:20:21 +0100 |
|---|---|---|
| committer | Peter Maydell | 2017-01-27 16:20:21 +0100 |
| commit | abc24d86cc0364f402e438fae3acb14289b40734 (patch) | |
| tree | 911dbdb831c2f2b1da74b3900f7665bf02fd8f71 /include/exec/exec-all.h | |
| parent | hw/registerfields.h: Pull FIELD etc macros out of hw/register.h (diff) | |
| download | qemu-abc24d86cc0364f402e438fae3acb14289b40734.tar.gz qemu-abc24d86cc0364f402e438fae3acb14289b40734.tar.xz qemu-abc24d86cc0364f402e438fae3acb14289b40734.zip | |
armv7m: Fix reads of CONTROL register bit 1
The v7m CONTROL register bit 1 is SPSEL, which indicates
the stack being used. We were storing this information
not in v7m.control but in the separate v7m.other_sp
structure field. Unfortunately, the code handling reads
of the CONTROL register didn't take account of this, and
so if SPSEL was updated by an exception entry or exit then
a subsequent guest read of CONTROL would get the wrong value.
Using a separate structure field doesn't really gain us
anything in efficiency, so drop this unnecessary complexity
in favour of simply storing all the bits in v7m.control.
This is a migration compatibility break for M profile
CPUs only.
Signed-off-by: Michael Davidsaver <mdavidsaver@gmail.com>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
Message-id: 1484937883-1068-6-git-send-email-peter.maydell@linaro.org
[PMM: rewrote commit message;
use deposit32(); use FIELD to define constants for
masking and shifting of CONTROL register fields
]
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'include/exec/exec-all.h')
0 files changed, 0 insertions, 0 deletions
