1
Two bug fixes for 9.0...
1
For some reason the xilinx can bus patches built in my local config
2
but not in the merge-test ones; dropped those.
2
3
3
-- PMM
4
-- PMM
4
5
5
The following changes since commit ce64e6224affb8b4e4b019f76d2950270b391af5:
6
The following changes since commit a68694cd1f3e5448cca814ff39b871f9ebd71ed5:
6
7
7
Merge tag 'qemu-sparc-20240404' of https://github.com/mcayland/qemu into staging (2024-04-04 15:28:06 +0100)
8
Merge remote-tracking branch 'remotes/philmd-gitlab/tags/edk2-next-20200914' into staging (2020-09-14 12:18:58 +0100)
8
9
9
are available in the Git repository at:
10
are available in the Git repository at:
10
11
11
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20240408
12
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20200914-1
12
13
13
for you to fetch changes up to 19b254e86a900dc5ee332e3ac0baf9c521301abf:
14
for you to fetch changes up to 4fe986dd4480308ecf07200cfbd3c3d494a0f639:
14
15
15
target/arm: Use correct SecuritySpace for AArch64 AT ops at EL3 (2024-04-08 15:38:53 +0100)
16
tests/acceptance: console boot tests for quanta-gsj (2020-09-14 14:24:59 +0100)
16
17
17
----------------------------------------------------------------
18
----------------------------------------------------------------
18
target-arm:
19
* hw/misc/a9scu: Do not allow invalid CPU count
19
* Use correct SecuritySpace for AArch64 AT ops at EL3
20
* hw/misc/a9scu: Minor cleanups
20
* Fix CNTPOFF_EL2 trap to missing EL3
21
* hw/timer/armv7m_systick: assert that board code set system_clock_scale
22
* decodetree: Improve identifier matching
23
* target/arm: Clean up neon fp insn size field decode
24
* target/arm: Remove KVM support for 32-bit Arm hosts
25
* hw/arm/mps2: New board models mps2-an386, mps2-an500
26
* Deprecate Unicore32 port
27
* Deprecate lm32 port
28
* target/arm: Count PMU events when MDCR.SPME is set
29
* hw/arm: versal-virt: Correct the tx/rx GEM clocks
30
* New Nuvoton iBMC board models npcm750-evb, quanta-gsj
21
31
22
----------------------------------------------------------------
32
----------------------------------------------------------------
23
Peter Maydell (1):
33
Aaron Lindsay (1):
24
target/arm: Use correct SecuritySpace for AArch64 AT ops at EL3
34
target/arm: Count PMU events when MDCR.SPME is set
25
35
26
Pierre-Clément Tosi (1):
36
Edgar E. Iglesias (1):
27
target/arm: Fix CNTPOFF_EL2 trap to missing EL3
37
hw/arm: versal-virt: Correct the tx/rx GEM clocks
28
38
29
target/arm/helper.c | 10 +++++++---
39
Havard Skinnemoen (14):
30
1 file changed, 7 insertions(+), 3 deletions(-)
40
hw/misc: Add NPCM7xx System Global Control Registers device model
41
hw/misc: Add NPCM7xx Clock Controller device model
42
hw/timer: Add NPCM7xx Timer device model
43
hw/arm: Add NPCM730 and NPCM750 SoC models
44
hw/arm: Add two NPCM7xx-based machines
45
roms: Add virtual Boot ROM for NPCM7xx SoCs
46
hw/arm: Load -bios image as a boot ROM for npcm7xx
47
hw/nvram: NPCM7xx OTP device model
48
hw/mem: Stubbed out NPCM7xx Memory Controller model
49
hw/ssi: NPCM7xx Flash Interface Unit device model
50
hw/arm: Wire up BMC boot flash for npcm750-evb and quanta-gsj
51
hw/arm/npcm7xx: add board setup stub for CPU and UART clocks
52
docs/system: Add Nuvoton machine documentation
53
tests/acceptance: console boot tests for quanta-gsj
31
54
55
Peter Maydell (11):
56
hw/timer/armv7m_systick: assert that board code set system_clock_scale
57
target/arm: Convert Neon 3-same-fp size field to MO_* in decode
58
target/arm: Convert Neon VCVT fp size field to MO_* in decode
59
target/arm: Convert VCMLA, VCADD size field to MO_* in decode
60
target/arm: Remove KVM support for 32-bit Arm hosts
61
target/arm: Remove no-longer-reachable 32-bit KVM code
62
hw/arm/mps2: New board model mps2-an386
63
hw/arm/mps2: New board model mps2-an500
64
docs/system/arm/mps2.rst: Make board list consistent
65
Deprecate Unicore32 port
66
Deprecate lm32 port
67
68
Philippe Mathieu-Daudé (4):
69
hw/misc/a9scu: Do not allow invalid CPU count
70
hw/misc/a9scu: Simplify setting MemoryRegionOps::valid fields
71
hw/misc/a9scu: Simplify setting MemoryRegionOps::impl fields
72
hw/misc/a9scu: Report unimplemented accesses with qemu_log_mask(UNIMP)
73
74
Richard Henderson (1):
75
decodetree: Improve identifier matching
76
77
docs/system/arm/mps2.rst | 20 +-
78
docs/system/arm/nuvoton.rst | 92 +++++
79
docs/system/deprecated.rst | 32 +-
80
docs/system/target-arm.rst | 1 +
81
configure | 2 +-
82
default-configs/arm-softmmu.mak | 1 +
83
include/hw/arm/npcm7xx.h | 112 +++++++
84
include/hw/mem/npcm7xx_mc.h | 36 ++
85
include/hw/misc/npcm7xx_clk.h | 48 +++
86
include/hw/misc/npcm7xx_gcr.h | 43 +++
87
include/hw/nvram/npcm7xx_otp.h | 79 +++++
88
include/hw/ssi/npcm7xx_fiu.h | 73 ++++
89
include/hw/timer/npcm7xx_timer.h | 78 +++++
90
target/arm/kvm-consts.h | 7 -
91
target/arm/kvm_arm.h | 6 -
92
target/arm/neon-dp.decode | 18 +-
93
target/arm/neon-shared.decode | 18 +-
94
tests/decode/succ_ident1.decode | 7 +
95
hw/arm/mps2.c | 97 +++++-
96
hw/arm/npcm7xx.c | 532 +++++++++++++++++++++++++++++
97
hw/arm/npcm7xx_boards.c | 197 +++++++++++
98
hw/arm/xlnx-versal-virt.c | 2 +-
99
hw/mem/npcm7xx_mc.c | 84 +++++
100
hw/misc/a9scu.c | 59 ++--
101
hw/misc/npcm7xx_clk.c | 266 +++++++++++++++
102
hw/misc/npcm7xx_gcr.c | 269 +++++++++++++++
103
hw/nvram/npcm7xx_otp.c | 440 ++++++++++++++++++++++++
104
hw/ssi/npcm7xx_fiu.c | 572 +++++++++++++++++++++++++++++++
105
hw/timer/armv7m_systick.c | 8 +
106
hw/timer/npcm7xx_timer.c | 543 ++++++++++++++++++++++++++++++
107
target/arm/cpu.c | 101 +++---
108
target/arm/helper.c | 2 +-
109
target/arm/kvm.c | 7 -
110
target/arm/kvm32.c | 595 ---------------------------------
111
.gitmodules | 3 +
112
MAINTAINERS | 10 +
113
hw/arm/Kconfig | 9 +
114
hw/arm/meson.build | 1 +
115
hw/mem/meson.build | 1 +
116
hw/misc/meson.build | 4 +
117
hw/misc/trace-events | 8 +
118
hw/nvram/meson.build | 1 +
119
hw/ssi/meson.build | 1 +
120
hw/ssi/trace-events | 11 +
121
hw/timer/meson.build | 1 +
122
hw/timer/trace-events | 5 +
123
pc-bios/README | 6 +
124
pc-bios/meson.build | 1 +
125
pc-bios/npcm7xx_bootrom.bin | Bin 0 -> 768 bytes
126
roms/Makefile | 7 +
127
roms/vbootrom | 1 +
128
scripts/decodetree.py | 46 ++-
129
target/arm/meson.build | 5 +-
130
target/arm/translate-neon.c.inc | 42 ++-
131
tests/acceptance/boot_linux_console.py | 83 +++++
132
55 files changed, 3910 insertions(+), 783 deletions(-)
133
create mode 100644 docs/system/arm/nuvoton.rst
134
create mode 100644 include/hw/arm/npcm7xx.h
135
create mode 100644 include/hw/mem/npcm7xx_mc.h
136
create mode 100644 include/hw/misc/npcm7xx_clk.h
137
create mode 100644 include/hw/misc/npcm7xx_gcr.h
138
create mode 100644 include/hw/nvram/npcm7xx_otp.h
139
create mode 100644 include/hw/ssi/npcm7xx_fiu.h
140
create mode 100644 include/hw/timer/npcm7xx_timer.h
141
create mode 100644 tests/decode/succ_ident1.decode
142
create mode 100644 hw/arm/npcm7xx.c
143
create mode 100644 hw/arm/npcm7xx_boards.c
144
create mode 100644 hw/mem/npcm7xx_mc.c
145
create mode 100644 hw/misc/npcm7xx_clk.c
146
create mode 100644 hw/misc/npcm7xx_gcr.c
147
create mode 100644 hw/nvram/npcm7xx_otp.c
148
create mode 100644 hw/ssi/npcm7xx_fiu.c
149
create mode 100644 hw/timer/npcm7xx_timer.c
150
delete mode 100644 target/arm/kvm32.c
151
create mode 100644 pc-bios/npcm7xx_bootrom.bin
152
create mode 160000 roms/vbootrom
153
diff view generated by jsdifflib
Deleted patch
1
From: Pierre-Clément Tosi <ptosi@google.com>
2
1
3
EL2 accesses to CNTPOFF_EL2 should only ever trap to EL3 if EL3 is
4
present, as described by the reference manual (for MRS):
5
6
/* ... */
7
elsif PSTATE.EL == EL2 then
8
if Halted() && HaveEL(EL3) && /*...*/ then
9
UNDEFINED;
10
elsif HaveEL(EL3) && SCR_EL3.ECVEn == '0' then
11
/* ... */
12
else
13
X[t, 64] = CNTPOFF_EL2;
14
15
However, the existing implementation of gt_cntpoff_access() always
16
returns CP_ACCESS_TRAP_EL3 for EL2 accesses with SCR_EL3.ECVEn unset. In
17
pseudo-code terminology, this corresponds to assuming that HaveEL(EL3)
18
is always true, which is wrong. As a result, QEMU panics in
19
access_check_cp_reg() when started without EL3 and running EL2 code
20
accessing the register (e.g. any recent KVM booting a guest).
21
22
Therefore, add the HaveEL(EL3) check to gt_cntpoff_access().
23
24
Fixes: 2808d3b38a52 ("target/arm: Implement FEAT_ECV CNTPOFF_EL2 handling")
25
Signed-off-by: Pierre-Clément Tosi <ptosi@google.com>
26
Message-id: m3al6amhdkmsiy2f62w72ufth6dzn45xg5cz6xljceyibphnf4@ezmmpwk4tnhl
27
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
28
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
29
---
30
target/arm/helper.c | 3 ++-
31
1 file changed, 2 insertions(+), 1 deletion(-)
32
33
diff --git a/target/arm/helper.c b/target/arm/helper.c
34
index XXXXXXX..XXXXXXX 100644
35
--- a/target/arm/helper.c
36
+++ b/target/arm/helper.c
37
@@ -XXX,XX +XXX,XX @@ static CPAccessResult gt_cntpoff_access(CPUARMState *env,
38
const ARMCPRegInfo *ri,
39
bool isread)
40
{
41
- if (arm_current_el(env) == 2 && !(env->cp15.scr_el3 & SCR_ECVEN)) {
42
+ if (arm_current_el(env) == 2 && arm_feature(env, ARM_FEATURE_EL3) &&
43
+ !(env->cp15.scr_el3 & SCR_ECVEN)) {
44
return CP_ACCESS_TRAP_EL3;
45
}
46
return CP_ACCESS_OK;
47
--
48
2.34.1
49
50
diff view generated by jsdifflib
Deleted patch
1
When we do an AT address translation operation, the page table walk
2
is supposed to be performed in the context of the EL we're doing the
3
walk for, so for instance an AT S1E2R walk is done for EL2. In the
4
pseudocode an EL is passed to AArch64.AT(), which calls
5
SecurityStateAtEL() to find the security state that we should be
6
doing the walk with.
7
1
8
In ats_write64() we get this wrong, instead using the current
9
security space always. This is fine for AT operations performed from
10
EL1 and EL2, because there the current security state and the
11
security state for the lower EL are the same. But for AT operations
12
performed from EL3, the current security state is always either
13
Secure or Root, whereas we want to use the security state defined by
14
SCR_EL3.{NS,NSE} for the walk. This affects not just guests using
15
FEAT_RME but also ones where EL3 is Secure state and the EL3 code
16
is trying to do an AT for a NonSecure EL2 or EL1.
17
18
Use arm_security_space_below_el3() to get the SecuritySpace to
19
pass to do_ats_write() for all AT operations except the
20
AT S1E3* operations.
21
22
Cc: qemu-stable@nongnu.org
23
Fixes: e1ee56ec2383 ("target/arm: Pass security space rather than flag for AT instructions")
24
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2250
25
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
26
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
27
Message-id: 20240405180232.3570066-1-peter.maydell@linaro.org
28
---
29
target/arm/helper.c | 7 +++++--
30
1 file changed, 5 insertions(+), 2 deletions(-)
31
32
diff --git a/target/arm/helper.c b/target/arm/helper.c
33
index XXXXXXX..XXXXXXX 100644
34
--- a/target/arm/helper.c
35
+++ b/target/arm/helper.c
36
@@ -XXX,XX +XXX,XX @@ static void ats_write64(CPUARMState *env, const ARMCPRegInfo *ri,
37
ARMMMUIdx mmu_idx;
38
uint64_t hcr_el2 = arm_hcr_el2_eff(env);
39
bool regime_e20 = (hcr_el2 & (HCR_E2H | HCR_TGE)) == (HCR_E2H | HCR_TGE);
40
+ bool for_el3 = false;
41
+ ARMSecuritySpace ss;
42
43
switch (ri->opc2 & 6) {
44
case 0:
45
@@ -XXX,XX +XXX,XX @@ static void ats_write64(CPUARMState *env, const ARMCPRegInfo *ri,
46
break;
47
case 6: /* AT S1E3R, AT S1E3W */
48
mmu_idx = ARMMMUIdx_E3;
49
+ for_el3 = true;
50
break;
51
default:
52
g_assert_not_reached();
53
@@ -XXX,XX +XXX,XX @@ static void ats_write64(CPUARMState *env, const ARMCPRegInfo *ri,
54
g_assert_not_reached();
55
}
56
57
- env->cp15.par_el[1] = do_ats_write(env, value, access_type,
58
- mmu_idx, arm_security_space(env));
59
+ ss = for_el3 ? arm_security_space(env) : arm_security_space_below_el3(env);
60
+ env->cp15.par_el[1] = do_ats_write(env, value, access_type, mmu_idx, ss);
61
#else
62
/* Handled by hardware accelerator. */
63
g_assert_not_reached();
64
--
65
2.34.1
diff view generated by jsdifflib