1 | Arm patches for rc3 : just a handful of bug fixes. | 1 | Just a few minor bugfixes, but we might as well get them in |
---|---|---|---|
2 | for rc0 tomorrow. | ||
2 | 3 | ||
3 | thanks | ||
4 | -- PMM | 4 | -- PMM |
5 | 5 | ||
6 | The following changes since commit 787f82407c5056a8b1097e39e53d01dd1abe406b: | ||
6 | 7 | ||
7 | The following changes since commit 4ecc984210ca1bf508a96a550ec8a93a5f833f6c: | 8 | Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20200323' into staging (2020-03-23 15:38:30 +0000) |
8 | |||
9 | Merge remote-tracking branch 'remotes/palmer/tags/riscv-for-master-4.2-rc3' into staging (2019-11-26 12:36:40 +0000) | ||
10 | 9 | ||
11 | are available in the Git repository at: | 10 | are available in the Git repository at: |
12 | 11 | ||
13 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20191126 | 12 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20200323 |
14 | 13 | ||
15 | for you to fetch changes up to 6a4ef4e5d1084ce41fafa7d470a644b0fd3d9317: | 14 | for you to fetch changes up to 550a04893c2bd4442211b353680b9a6408d94dba: |
16 | 15 | ||
17 | target/arm: Honor HCR_EL2.TID3 trapping requirements (2019-11-26 13:55:37 +0000) | 16 | target/arm: Move computation of index in handle_simd_dupe (2020-03-23 17:22:30 +0000) |
18 | 17 | ||
19 | ---------------------------------------------------------------- | 18 | ---------------------------------------------------------------- |
20 | target-arm queue: | 19 | target-arm queue: |
21 | * handle FTYPE flag correctly in v7M exception return | 20 | * target/arm: avoid undefined behaviour shift in watchpoint code |
22 | for v7M CPUs with an FPU (v8M CPUs were already correct) | 21 | * target/arm: avoid undefined behaviour shift in handle_simd_dupe() |
23 | * versal: Add the CRP as unimplemented | 22 | * target/arm: add assert that immh != 0 in disas_simd_shift_imm() |
24 | * Fix ISR_EL1 tracking when executing at EL2 | 23 | * aspeed/smc: Fix DMA support for AST2600 |
25 | * Honor HCR_EL2.TID3 trapping requirements | 24 | * hw/arm/bcm283x: Correct the license text ('and' vs 'or') |
26 | 25 | ||
27 | ---------------------------------------------------------------- | 26 | ---------------------------------------------------------------- |
28 | Edgar E. Iglesias (1): | 27 | Cédric Le Goater (1): |
29 | hw/arm: versal: Add the CRP as unimplemented | 28 | aspeed/smc: Fix DMA support for AST2600 |
30 | 29 | ||
31 | Jean-Hugues Deschênes (1): | 30 | Philippe Mathieu-Daudé (1): |
32 | target/arm: Fix handling of cortex-m FTYPE flag in EXCRET | 31 | hw/arm/bcm283x: Correct the license text |
33 | 32 | ||
34 | Marc Zyngier (2): | 33 | Richard Henderson (3): |
35 | target/arm: Fix ISR_EL1 tracking when executing at EL2 | 34 | target/arm: Rearrange disabled check for watchpoints |
36 | target/arm: Honor HCR_EL2.TID3 trapping requirements | 35 | target/arm: Assert immh != 0 in disas_simd_shift_imm |
36 | target/arm: Move computation of index in handle_simd_dupe | ||
37 | 37 | ||
38 | include/hw/arm/xlnx-versal.h | 3 ++ | 38 | include/hw/arm/bcm2835_peripherals.h | 3 ++- |
39 | hw/arm/xlnx-versal.c | 2 ++ | 39 | include/hw/arm/bcm2836.h | 3 ++- |
40 | target/arm/helper.c | 83 ++++++++++++++++++++++++++++++++++++++++++-- | 40 | include/hw/char/bcm2835_aux.h | 3 ++- |
41 | target/arm/m_helper.c | 7 ++-- | 41 | include/hw/display/bcm2835_fb.h | 3 ++- |
42 | 4 files changed, 89 insertions(+), 6 deletions(-) | 42 | include/hw/dma/bcm2835_dma.h | 4 +++- |
43 | include/hw/intc/bcm2835_ic.h | 4 +++- | ||
44 | include/hw/intc/bcm2836_control.h | 3 ++- | ||
45 | include/hw/misc/bcm2835_mbox.h | 4 +++- | ||
46 | include/hw/misc/bcm2835_mbox_defs.h | 4 +++- | ||
47 | include/hw/misc/bcm2835_property.h | 4 +++- | ||
48 | hw/arm/aspeed_ast2600.c | 6 ++++++ | ||
49 | hw/arm/bcm2835_peripherals.c | 3 ++- | ||
50 | hw/arm/bcm2836.c | 3 ++- | ||
51 | hw/arm/raspi.c | 3 ++- | ||
52 | hw/display/bcm2835_fb.c | 1 - | ||
53 | hw/dma/bcm2835_dma.c | 4 +++- | ||
54 | hw/intc/bcm2835_ic.c | 4 ++-- | ||
55 | hw/intc/bcm2836_control.c | 4 +++- | ||
56 | hw/misc/bcm2835_mbox.c | 4 +++- | ||
57 | hw/misc/bcm2835_property.c | 4 +++- | ||
58 | hw/ssi/aspeed_smc.c | 15 +++++++++++++-- | ||
59 | target/arm/helper.c | 11 ++++++----- | ||
60 | target/arm/translate-a64.c | 6 +++++- | ||
61 | hw/ssi/trace-events | 1 + | ||
62 | 24 files changed, 76 insertions(+), 28 deletions(-) | ||
43 | 63 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | 1 | From: Philippe Mathieu-Daudé <philmd@redhat.com> | |
2 | |||
3 | The license is the 'GNU General Public License v2.0 or later', | ||
4 | not 'and': | ||
5 | |||
6 | This program is free software; you can redistribute it and/ori | ||
7 | modify it under the terms of the GNU General Public License as | ||
8 | published by the Free Software Foundation; either version 2 of | ||
9 | the License, or (at your option) any later version. | ||
10 | |||
11 | Fix the license comment. | ||
12 | |||
13 | Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
14 | Message-id: 20200312213455.15854-1-philmd@redhat.com | ||
15 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
16 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
17 | --- | ||
18 | include/hw/arm/bcm2835_peripherals.h | 3 ++- | ||
19 | include/hw/arm/bcm2836.h | 3 ++- | ||
20 | include/hw/char/bcm2835_aux.h | 3 ++- | ||
21 | include/hw/display/bcm2835_fb.h | 3 ++- | ||
22 | include/hw/dma/bcm2835_dma.h | 4 +++- | ||
23 | include/hw/intc/bcm2835_ic.h | 4 +++- | ||
24 | include/hw/intc/bcm2836_control.h | 3 ++- | ||
25 | include/hw/misc/bcm2835_mbox.h | 4 +++- | ||
26 | include/hw/misc/bcm2835_mbox_defs.h | 4 +++- | ||
27 | include/hw/misc/bcm2835_property.h | 4 +++- | ||
28 | hw/arm/bcm2835_peripherals.c | 3 ++- | ||
29 | hw/arm/bcm2836.c | 3 ++- | ||
30 | hw/arm/raspi.c | 3 ++- | ||
31 | hw/display/bcm2835_fb.c | 1 - | ||
32 | hw/dma/bcm2835_dma.c | 4 +++- | ||
33 | hw/intc/bcm2835_ic.c | 4 ++-- | ||
34 | hw/intc/bcm2836_control.c | 4 +++- | ||
35 | hw/misc/bcm2835_mbox.c | 4 +++- | ||
36 | hw/misc/bcm2835_property.c | 4 +++- | ||
37 | 19 files changed, 45 insertions(+), 20 deletions(-) | ||
38 | |||
39 | diff --git a/include/hw/arm/bcm2835_peripherals.h b/include/hw/arm/bcm2835_peripherals.h | ||
40 | index XXXXXXX..XXXXXXX 100644 | ||
41 | --- a/include/hw/arm/bcm2835_peripherals.h | ||
42 | +++ b/include/hw/arm/bcm2835_peripherals.h | ||
43 | @@ -XXX,XX +XXX,XX @@ | ||
44 | * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft | ||
45 | * Written by Andrew Baumann | ||
46 | * | ||
47 | - * This code is licensed under the GNU GPLv2 and later. | ||
48 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
49 | + * See the COPYING file in the top-level directory. | ||
50 | */ | ||
51 | |||
52 | #ifndef BCM2835_PERIPHERALS_H | ||
53 | diff --git a/include/hw/arm/bcm2836.h b/include/hw/arm/bcm2836.h | ||
54 | index XXXXXXX..XXXXXXX 100644 | ||
55 | --- a/include/hw/arm/bcm2836.h | ||
56 | +++ b/include/hw/arm/bcm2836.h | ||
57 | @@ -XXX,XX +XXX,XX @@ | ||
58 | * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft | ||
59 | * Written by Andrew Baumann | ||
60 | * | ||
61 | - * This code is licensed under the GNU GPLv2 and later. | ||
62 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
63 | + * See the COPYING file in the top-level directory. | ||
64 | */ | ||
65 | |||
66 | #ifndef BCM2836_H | ||
67 | diff --git a/include/hw/char/bcm2835_aux.h b/include/hw/char/bcm2835_aux.h | ||
68 | index XXXXXXX..XXXXXXX 100644 | ||
69 | --- a/include/hw/char/bcm2835_aux.h | ||
70 | +++ b/include/hw/char/bcm2835_aux.h | ||
71 | @@ -XXX,XX +XXX,XX @@ | ||
72 | * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft | ||
73 | * Written by Andrew Baumann | ||
74 | * | ||
75 | - * This code is licensed under the GNU GPLv2 and later. | ||
76 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
77 | + * See the COPYING file in the top-level directory. | ||
78 | */ | ||
79 | |||
80 | #ifndef BCM2835_AUX_H | ||
81 | diff --git a/include/hw/display/bcm2835_fb.h b/include/hw/display/bcm2835_fb.h | ||
82 | index XXXXXXX..XXXXXXX 100644 | ||
83 | --- a/include/hw/display/bcm2835_fb.h | ||
84 | +++ b/include/hw/display/bcm2835_fb.h | ||
85 | @@ -XXX,XX +XXX,XX @@ | ||
86 | * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft | ||
87 | * Written by Andrew Baumann | ||
88 | * | ||
89 | - * This code is licensed under the GNU GPLv2 and later. | ||
90 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
91 | + * See the COPYING file in the top-level directory. | ||
92 | */ | ||
93 | |||
94 | #ifndef BCM2835_FB_H | ||
95 | diff --git a/include/hw/dma/bcm2835_dma.h b/include/hw/dma/bcm2835_dma.h | ||
96 | index XXXXXXX..XXXXXXX 100644 | ||
97 | --- a/include/hw/dma/bcm2835_dma.h | ||
98 | +++ b/include/hw/dma/bcm2835_dma.h | ||
99 | @@ -XXX,XX +XXX,XX @@ | ||
100 | /* | ||
101 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
102 | - * This code is licensed under the GNU GPLv2 and later. | ||
103 | + * | ||
104 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
105 | + * See the COPYING file in the top-level directory. | ||
106 | */ | ||
107 | |||
108 | #ifndef BCM2835_DMA_H | ||
109 | diff --git a/include/hw/intc/bcm2835_ic.h b/include/hw/intc/bcm2835_ic.h | ||
110 | index XXXXXXX..XXXXXXX 100644 | ||
111 | --- a/include/hw/intc/bcm2835_ic.h | ||
112 | +++ b/include/hw/intc/bcm2835_ic.h | ||
113 | @@ -XXX,XX +XXX,XX @@ | ||
114 | /* | ||
115 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
116 | - * This code is licensed under the GNU GPLv2 and later. | ||
117 | + * | ||
118 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
119 | + * See the COPYING file in the top-level directory. | ||
120 | */ | ||
121 | |||
122 | #ifndef BCM2835_IC_H | ||
123 | diff --git a/include/hw/intc/bcm2836_control.h b/include/hw/intc/bcm2836_control.h | ||
124 | index XXXXXXX..XXXXXXX 100644 | ||
125 | --- a/include/hw/intc/bcm2836_control.h | ||
126 | +++ b/include/hw/intc/bcm2836_control.h | ||
127 | @@ -XXX,XX +XXX,XX @@ | ||
128 | * ARM Local Timer IRQ Copyright (c) 2019. Zoltán Baldaszti | ||
129 | * Added basic IRQ_TIMER interrupt support | ||
130 | * | ||
131 | - * This code is licensed under the GNU GPLv2 and later. | ||
132 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
133 | + * See the COPYING file in the top-level directory. | ||
134 | */ | ||
135 | |||
136 | #ifndef BCM2836_CONTROL_H | ||
137 | diff --git a/include/hw/misc/bcm2835_mbox.h b/include/hw/misc/bcm2835_mbox.h | ||
138 | index XXXXXXX..XXXXXXX 100644 | ||
139 | --- a/include/hw/misc/bcm2835_mbox.h | ||
140 | +++ b/include/hw/misc/bcm2835_mbox.h | ||
141 | @@ -XXX,XX +XXX,XX @@ | ||
142 | /* | ||
143 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
144 | - * This code is licensed under the GNU GPLv2 and later. | ||
145 | + * | ||
146 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
147 | + * See the COPYING file in the top-level directory. | ||
148 | */ | ||
149 | |||
150 | #ifndef BCM2835_MBOX_H | ||
151 | diff --git a/include/hw/misc/bcm2835_mbox_defs.h b/include/hw/misc/bcm2835_mbox_defs.h | ||
152 | index XXXXXXX..XXXXXXX 100644 | ||
153 | --- a/include/hw/misc/bcm2835_mbox_defs.h | ||
154 | +++ b/include/hw/misc/bcm2835_mbox_defs.h | ||
155 | @@ -XXX,XX +XXX,XX @@ | ||
156 | /* | ||
157 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
158 | - * This code is licensed under the GNU GPLv2 and later. | ||
159 | + * | ||
160 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
161 | + * See the COPYING file in the top-level directory. | ||
162 | */ | ||
163 | |||
164 | #ifndef BCM2835_MBOX_DEFS_H | ||
165 | diff --git a/include/hw/misc/bcm2835_property.h b/include/hw/misc/bcm2835_property.h | ||
166 | index XXXXXXX..XXXXXXX 100644 | ||
167 | --- a/include/hw/misc/bcm2835_property.h | ||
168 | +++ b/include/hw/misc/bcm2835_property.h | ||
169 | @@ -XXX,XX +XXX,XX @@ | ||
170 | /* | ||
171 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
172 | - * This code is licensed under the GNU GPLv2 and later. | ||
173 | + * | ||
174 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
175 | + * See the COPYING file in the top-level directory. | ||
176 | */ | ||
177 | |||
178 | #ifndef BCM2835_PROPERTY_H | ||
179 | diff --git a/hw/arm/bcm2835_peripherals.c b/hw/arm/bcm2835_peripherals.c | ||
180 | index XXXXXXX..XXXXXXX 100644 | ||
181 | --- a/hw/arm/bcm2835_peripherals.c | ||
182 | +++ b/hw/arm/bcm2835_peripherals.c | ||
183 | @@ -XXX,XX +XXX,XX @@ | ||
184 | * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft | ||
185 | * Written by Andrew Baumann | ||
186 | * | ||
187 | - * This code is licensed under the GNU GPLv2 and later. | ||
188 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
189 | + * See the COPYING file in the top-level directory. | ||
190 | */ | ||
191 | |||
192 | #include "qemu/osdep.h" | ||
193 | diff --git a/hw/arm/bcm2836.c b/hw/arm/bcm2836.c | ||
194 | index XXXXXXX..XXXXXXX 100644 | ||
195 | --- a/hw/arm/bcm2836.c | ||
196 | +++ b/hw/arm/bcm2836.c | ||
197 | @@ -XXX,XX +XXX,XX @@ | ||
198 | * Rasperry Pi 2 emulation and refactoring Copyright (c) 2015, Microsoft | ||
199 | * Written by Andrew Baumann | ||
200 | * | ||
201 | - * This code is licensed under the GNU GPLv2 and later. | ||
202 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
203 | + * See the COPYING file in the top-level directory. | ||
204 | */ | ||
205 | |||
206 | #include "qemu/osdep.h" | ||
207 | diff --git a/hw/arm/raspi.c b/hw/arm/raspi.c | ||
208 | index XXXXXXX..XXXXXXX 100644 | ||
209 | --- a/hw/arm/raspi.c | ||
210 | +++ b/hw/arm/raspi.c | ||
211 | @@ -XXX,XX +XXX,XX @@ | ||
212 | * Raspberry Pi 3 emulation Copyright (c) 2018 Zoltán Baldaszti | ||
213 | * Upstream code cleanup (c) 2018 Pekka Enberg | ||
214 | * | ||
215 | - * This code is licensed under the GNU GPLv2 and later. | ||
216 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
217 | + * See the COPYING file in the top-level directory. | ||
218 | */ | ||
219 | |||
220 | #include "qemu/osdep.h" | ||
221 | diff --git a/hw/display/bcm2835_fb.c b/hw/display/bcm2835_fb.c | ||
222 | index XXXXXXX..XXXXXXX 100644 | ||
223 | --- a/hw/display/bcm2835_fb.c | ||
224 | +++ b/hw/display/bcm2835_fb.c | ||
225 | @@ -XXX,XX +XXX,XX @@ | ||
226 | /* | ||
227 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
228 | * Refactoring for Pi2 Copyright (c) 2015, Microsoft. Written by Andrew Baumann. | ||
229 | - * This code is licensed under the GNU GPLv2 and later. | ||
230 | * | ||
231 | * Heavily based on milkymist-vgafb.c, copyright terms below: | ||
232 | * QEMU model of the Milkymist VGA framebuffer. | ||
233 | diff --git a/hw/dma/bcm2835_dma.c b/hw/dma/bcm2835_dma.c | ||
234 | index XXXXXXX..XXXXXXX 100644 | ||
235 | --- a/hw/dma/bcm2835_dma.c | ||
236 | +++ b/hw/dma/bcm2835_dma.c | ||
237 | @@ -XXX,XX +XXX,XX @@ | ||
238 | /* | ||
239 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
240 | - * This code is licensed under the GNU GPLv2 and later. | ||
241 | + * | ||
242 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
243 | + * See the COPYING file in the top-level directory. | ||
244 | */ | ||
245 | |||
246 | #include "qemu/osdep.h" | ||
247 | diff --git a/hw/intc/bcm2835_ic.c b/hw/intc/bcm2835_ic.c | ||
248 | index XXXXXXX..XXXXXXX 100644 | ||
249 | --- a/hw/intc/bcm2835_ic.c | ||
250 | +++ b/hw/intc/bcm2835_ic.c | ||
251 | @@ -XXX,XX +XXX,XX @@ | ||
252 | /* | ||
253 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
254 | * Refactoring for Pi2 Copyright (c) 2015, Microsoft. Written by Andrew Baumann. | ||
255 | - * This code is licensed under the GNU GPLv2 and later. | ||
256 | * Heavily based on pl190.c, copyright terms below: | ||
257 | * | ||
258 | * Arm PrimeCell PL190 Vector Interrupt Controller | ||
259 | @@ -XXX,XX +XXX,XX @@ | ||
260 | * Copyright (c) 2006 CodeSourcery. | ||
261 | * Written by Paul Brook | ||
262 | * | ||
263 | - * This code is licensed under the GPL. | ||
264 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
265 | + * See the COPYING file in the top-level directory. | ||
266 | */ | ||
267 | |||
268 | #include "qemu/osdep.h" | ||
269 | diff --git a/hw/intc/bcm2836_control.c b/hw/intc/bcm2836_control.c | ||
270 | index XXXXXXX..XXXXXXX 100644 | ||
271 | --- a/hw/intc/bcm2836_control.c | ||
272 | +++ b/hw/intc/bcm2836_control.c | ||
273 | @@ -XXX,XX +XXX,XX @@ | ||
274 | * Written by Andrew Baumann | ||
275 | * | ||
276 | * Based on bcm2835_ic.c (Raspberry Pi emulation) (c) 2012 Gregory Estrade | ||
277 | - * This code is licensed under the GNU GPLv2 and later. | ||
278 | * | ||
279 | * At present, only implements interrupt routing, and mailboxes (i.e., | ||
280 | * not PMU interrupt, or AXI counters). | ||
281 | @@ -XXX,XX +XXX,XX @@ | ||
282 | * | ||
283 | * Ref: | ||
284 | * https://www.raspberrypi.org/documentation/hardware/raspberrypi/bcm2836/QA7_rev3.4.pdf | ||
285 | + * | ||
286 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
287 | + * See the COPYING file in the top-level directory. | ||
288 | */ | ||
289 | |||
290 | #include "qemu/osdep.h" | ||
291 | diff --git a/hw/misc/bcm2835_mbox.c b/hw/misc/bcm2835_mbox.c | ||
292 | index XXXXXXX..XXXXXXX 100644 | ||
293 | --- a/hw/misc/bcm2835_mbox.c | ||
294 | +++ b/hw/misc/bcm2835_mbox.c | ||
295 | @@ -XXX,XX +XXX,XX @@ | ||
296 | /* | ||
297 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
298 | - * This code is licensed under the GNU GPLv2 and later. | ||
299 | * | ||
300 | * This file models the system mailboxes, which are used for | ||
301 | * communication with low-bandwidth GPU peripherals. Refs: | ||
302 | * https://github.com/raspberrypi/firmware/wiki/Mailboxes | ||
303 | * https://github.com/raspberrypi/firmware/wiki/Accessing-mailboxes | ||
304 | + * | ||
305 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
306 | + * See the COPYING file in the top-level directory. | ||
307 | */ | ||
308 | |||
309 | #include "qemu/osdep.h" | ||
310 | diff --git a/hw/misc/bcm2835_property.c b/hw/misc/bcm2835_property.c | ||
311 | index XXXXXXX..XXXXXXX 100644 | ||
312 | --- a/hw/misc/bcm2835_property.c | ||
313 | +++ b/hw/misc/bcm2835_property.c | ||
314 | @@ -XXX,XX +XXX,XX @@ | ||
315 | /* | ||
316 | * Raspberry Pi emulation (c) 2012 Gregory Estrade | ||
317 | - * This code is licensed under the GNU GPLv2 and later. | ||
318 | + * | ||
319 | + * This work is licensed under the terms of the GNU GPL, version 2 or later. | ||
320 | + * See the COPYING file in the top-level directory. | ||
321 | */ | ||
322 | |||
323 | #include "qemu/osdep.h" | ||
324 | -- | ||
325 | 2.20.1 | ||
326 | |||
327 | diff view generated by jsdifflib |
1 | From: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com> | 1 | From: Cédric Le Goater <clg@kaod.org> |
---|---|---|---|
2 | 2 | ||
3 | Add the CRP as unimplemented thus avoiding bus errors when | 3 | Recent firmwares uses SPI DMA transfers in U-Boot to load the |
4 | guests access these registers. | 4 | different images (kernel, initrd, dtb) in the SoC DRAM. The AST2600 |
5 | FMC model is missing the masks to be applied on the DMA registers | ||
6 | which resulted in incorrect values. Fix that and wire the SPI | ||
7 | controllers which have DMA support on the AST2600. | ||
5 | 8 | ||
6 | Signed-off-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> | 9 | Fixes: bcaa8ddd081c ("aspeed/smc: Add AST2600 support") |
7 | Reviewed-by: Alistair Francis <alistair.francis@wdc.com> | 10 | Signed-off-by: Cédric Le Goater <clg@kaod.org> |
8 | Reviewed-by: Luc Michel <luc.michel@greensocs.com> | 11 | Reviewed-by: Joel Stanley <joel@jms.id.au> |
9 | Message-id: 20191115154734.26449-2-edgar.iglesias@gmail.com | 12 | Message-id: 20200320053923.20565-1-clg@kaod.org |
10 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
11 | --- | 14 | --- |
12 | include/hw/arm/xlnx-versal.h | 3 +++ | 15 | hw/arm/aspeed_ast2600.c | 6 ++++++ |
13 | hw/arm/xlnx-versal.c | 2 ++ | 16 | hw/ssi/aspeed_smc.c | 15 +++++++++++++-- |
14 | 2 files changed, 5 insertions(+) | 17 | hw/ssi/trace-events | 1 + |
18 | 3 files changed, 20 insertions(+), 2 deletions(-) | ||
15 | 19 | ||
16 | diff --git a/include/hw/arm/xlnx-versal.h b/include/hw/arm/xlnx-versal.h | 20 | diff --git a/hw/arm/aspeed_ast2600.c b/hw/arm/aspeed_ast2600.c |
17 | index XXXXXXX..XXXXXXX 100644 | 21 | index XXXXXXX..XXXXXXX 100644 |
18 | --- a/include/hw/arm/xlnx-versal.h | 22 | --- a/hw/arm/aspeed_ast2600.c |
19 | +++ b/include/hw/arm/xlnx-versal.h | 23 | +++ b/hw/arm/aspeed_ast2600.c |
20 | @@ -XXX,XX +XXX,XX @@ typedef struct Versal { | 24 | @@ -XXX,XX +XXX,XX @@ static void aspeed_soc_ast2600_realize(DeviceState *dev, Error **errp) |
21 | #define MM_IOU_SCNTRS_SIZE 0x10000 | 25 | |
22 | #define MM_FPD_CRF 0xfd1a0000U | 26 | /* SPI */ |
23 | #define MM_FPD_CRF_SIZE 0x140000 | 27 | for (i = 0; i < sc->spis_num; i++) { |
24 | + | 28 | + object_property_set_link(OBJECT(&s->spi[i]), OBJECT(s->dram_mr), |
25 | +#define MM_PMC_CRP 0xf1260000U | 29 | + "dram", &err); |
26 | +#define MM_PMC_CRP_SIZE 0x10000 | 30 | + if (err) { |
27 | #endif | 31 | + error_propagate(errp, err); |
28 | diff --git a/hw/arm/xlnx-versal.c b/hw/arm/xlnx-versal.c | 32 | + return; |
33 | + } | ||
34 | object_property_set_int(OBJECT(&s->spi[i]), 1, "num-cs", &err); | ||
35 | object_property_set_bool(OBJECT(&s->spi[i]), true, "realized", | ||
36 | &local_err); | ||
37 | diff --git a/hw/ssi/aspeed_smc.c b/hw/ssi/aspeed_smc.c | ||
29 | index XXXXXXX..XXXXXXX 100644 | 38 | index XXXXXXX..XXXXXXX 100644 |
30 | --- a/hw/arm/xlnx-versal.c | 39 | --- a/hw/ssi/aspeed_smc.c |
31 | +++ b/hw/arm/xlnx-versal.c | 40 | +++ b/hw/ssi/aspeed_smc.c |
32 | @@ -XXX,XX +XXX,XX @@ static void versal_unimp(Versal *s) | 41 | @@ -XXX,XX +XXX,XX @@ static const AspeedSMCController controllers[] = { |
33 | MM_CRL, MM_CRL_SIZE); | 42 | .flash_window_base = ASPEED26_SOC_FMC_FLASH_BASE, |
34 | versal_unimp_area(s, "crf", &s->mr_ps, | 43 | .flash_window_size = 0x10000000, |
35 | MM_FPD_CRF, MM_FPD_CRF_SIZE); | 44 | .has_dma = true, |
36 | + versal_unimp_area(s, "crp", &s->mr_ps, | 45 | + .dma_flash_mask = 0x0FFFFFFC, |
37 | + MM_PMC_CRP, MM_PMC_CRP_SIZE); | 46 | + .dma_dram_mask = 0x3FFFFFFC, |
38 | versal_unimp_area(s, "iou-scntr", &s->mr_ps, | 47 | .nregs = ASPEED_SMC_R_MAX, |
39 | MM_IOU_SCNTR, MM_IOU_SCNTR_SIZE); | 48 | .segment_to_reg = aspeed_2600_smc_segment_to_reg, |
40 | versal_unimp_area(s, "iou-scntr-seucre", &s->mr_ps, | 49 | .reg_to_segment = aspeed_2600_smc_reg_to_segment, |
50 | @@ -XXX,XX +XXX,XX @@ static const AspeedSMCController controllers[] = { | ||
51 | .segments = aspeed_segments_ast2600_spi1, | ||
52 | .flash_window_base = ASPEED26_SOC_SPI_FLASH_BASE, | ||
53 | .flash_window_size = 0x10000000, | ||
54 | - .has_dma = false, | ||
55 | + .has_dma = true, | ||
56 | + .dma_flash_mask = 0x0FFFFFFC, | ||
57 | + .dma_dram_mask = 0x3FFFFFFC, | ||
58 | .nregs = ASPEED_SMC_R_MAX, | ||
59 | .segment_to_reg = aspeed_2600_smc_segment_to_reg, | ||
60 | .reg_to_segment = aspeed_2600_smc_reg_to_segment, | ||
61 | @@ -XXX,XX +XXX,XX @@ static const AspeedSMCController controllers[] = { | ||
62 | .segments = aspeed_segments_ast2600_spi2, | ||
63 | .flash_window_base = ASPEED26_SOC_SPI2_FLASH_BASE, | ||
64 | .flash_window_size = 0x10000000, | ||
65 | - .has_dma = false, | ||
66 | + .has_dma = true, | ||
67 | + .dma_flash_mask = 0x0FFFFFFC, | ||
68 | + .dma_dram_mask = 0x3FFFFFFC, | ||
69 | .nregs = ASPEED_SMC_R_MAX, | ||
70 | .segment_to_reg = aspeed_2600_smc_segment_to_reg, | ||
71 | .reg_to_segment = aspeed_2600_smc_reg_to_segment, | ||
72 | @@ -XXX,XX +XXX,XX @@ static void aspeed_smc_dma_rw(AspeedSMCState *s) | ||
73 | MemTxResult result; | ||
74 | uint32_t data; | ||
75 | |||
76 | + trace_aspeed_smc_dma_rw(s->regs[R_DMA_CTRL] & DMA_CTRL_WRITE ? | ||
77 | + "write" : "read", | ||
78 | + s->regs[R_DMA_FLASH_ADDR], | ||
79 | + s->regs[R_DMA_DRAM_ADDR], | ||
80 | + s->regs[R_DMA_LEN]); | ||
81 | while (s->regs[R_DMA_LEN]) { | ||
82 | if (s->regs[R_DMA_CTRL] & DMA_CTRL_WRITE) { | ||
83 | data = address_space_ldl_le(&s->dram_as, s->regs[R_DMA_DRAM_ADDR], | ||
84 | diff --git a/hw/ssi/trace-events b/hw/ssi/trace-events | ||
85 | index XXXXXXX..XXXXXXX 100644 | ||
86 | --- a/hw/ssi/trace-events | ||
87 | +++ b/hw/ssi/trace-events | ||
88 | @@ -XXX,XX +XXX,XX @@ aspeed_smc_do_snoop(int cs, int index, int dummies, int data) "CS%d index:0x%x d | ||
89 | aspeed_smc_flash_write(int cs, uint64_t addr, uint32_t size, uint64_t data, int mode) "CS%d @0x%" PRIx64 " size %u: 0x%" PRIx64" mode:%d" | ||
90 | aspeed_smc_read(uint64_t addr, uint32_t size, uint64_t data) "@0x%" PRIx64 " size %u: 0x%" PRIx64 | ||
91 | aspeed_smc_dma_checksum(uint32_t addr, uint32_t data) "0x%08x: 0x%08x" | ||
92 | +aspeed_smc_dma_rw(const char *dir, uint32_t flash_addr, uint32_t dram_addr, uint32_t size) "%s flash:@0x%08x dram:@0x%08x size:0x%08x" | ||
93 | aspeed_smc_write(uint64_t addr, uint32_t size, uint64_t data) "@0x%" PRIx64 " size %u: 0x%" PRIx64 | ||
94 | aspeed_smc_flash_select(int cs, const char *prefix) "CS%d %sselect" | ||
41 | -- | 95 | -- |
42 | 2.20.1 | 96 | 2.20.1 |
43 | 97 | ||
44 | 98 | diff view generated by jsdifflib |
1 | From: Marc Zyngier <maz@kernel.org> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | HCR_EL2.TID3 mandates that access from EL1 to a long list of id | 3 | Coverity rightly notes that ctz32(bas) on 0 will return 32, |
4 | registers traps to EL2, and QEMU has so far ignored this requirement. | 4 | which makes the len calculation a BAD_SHIFT. |
5 | 5 | ||
6 | This breaks (among other things) KVM guests that have PtrAuth enabled, | 6 | A value of 0 in DBGWCR<n>_EL1.BAS is reserved. Simply move |
7 | while the hypervisor doesn't want to expose the feature to its guest. | 7 | the existing check we have for this case. |
8 | To achieve this, KVM traps the ID registers (ID_AA64ISAR1_EL1 in this | ||
9 | case), and masks out the unsupported feature. | ||
10 | 8 | ||
11 | QEMU not honoring the trap request means that the guest observes | 9 | Reported-by: Coverity (CID 1421964) |
12 | that the feature is present in the HW, starts using it, and dies | 10 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
13 | a horrible death when KVM injects an UNDEF, because the feature | 11 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
14 | *really* isn't supported. | 12 | Message-id: 20200320160622.8040-2-richard.henderson@linaro.org |
15 | |||
16 | Do the right thing by trapping to EL2 if HCR_EL2.TID3 is set. | ||
17 | |||
18 | Note that this change does not include trapping of the MVFR | ||
19 | registers from AArch32 (they are accessed via the VMRS | ||
20 | instruction and need to be handled in a different way). | ||
21 | |||
22 | Reported-by: Will Deacon <will@kernel.org> | ||
23 | Signed-off-by: Marc Zyngier <maz@kernel.org> | ||
24 | Tested-by: Will Deacon <will@kernel.org> | ||
25 | Message-id: 20191123115618.29230-1-maz@kernel.org | ||
26 | [PMM: added missing accessfn line for ID_AA4PFR2_EL1_RESERVED; | ||
27 | changed names of access functions to include _tid3] | ||
28 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 13 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
29 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 14 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
30 | --- | 15 | --- |
31 | target/arm/helper.c | 76 +++++++++++++++++++++++++++++++++++++++++++++ | 16 | target/arm/helper.c | 11 ++++++----- |
32 | 1 file changed, 76 insertions(+) | 17 | 1 file changed, 6 insertions(+), 5 deletions(-) |
33 | 18 | ||
34 | diff --git a/target/arm/helper.c b/target/arm/helper.c | 19 | diff --git a/target/arm/helper.c b/target/arm/helper.c |
35 | index XXXXXXX..XXXXXXX 100644 | 20 | index XXXXXXX..XXXXXXX 100644 |
36 | --- a/target/arm/helper.c | 21 | --- a/target/arm/helper.c |
37 | +++ b/target/arm/helper.c | 22 | +++ b/target/arm/helper.c |
38 | @@ -XXX,XX +XXX,XX @@ static const ARMCPRegInfo predinv_reginfo[] = { | 23 | @@ -XXX,XX +XXX,XX @@ void hw_watchpoint_update(ARMCPU *cpu, int n) |
39 | REGINFO_SENTINEL | 24 | int bas = extract64(wcr, 5, 8); |
40 | }; | 25 | int basstart; |
41 | 26 | ||
42 | +static CPAccessResult access_aa64_tid3(CPUARMState *env, const ARMCPRegInfo *ri, | 27 | - if (bas == 0) { |
43 | + bool isread) | 28 | - /* This must act as if the watchpoint is disabled */ |
44 | +{ | 29 | - return; |
45 | + if ((arm_current_el(env) < 2) && (arm_hcr_el2_eff(env) & HCR_TID3)) { | 30 | - } |
46 | + return CP_ACCESS_TRAP_EL2; | 31 | - |
47 | + } | 32 | if (extract64(wvr, 2, 1)) { |
33 | /* Deprecated case of an only 4-aligned address. BAS[7:4] are | ||
34 | * ignored, and BAS[3:0] define which bytes to watch. | ||
35 | */ | ||
36 | bas &= 0xf; | ||
37 | } | ||
48 | + | 38 | + |
49 | + return CP_ACCESS_OK; | 39 | + if (bas == 0) { |
50 | +} | 40 | + /* This must act as if the watchpoint is disabled */ |
41 | + return; | ||
42 | + } | ||
51 | + | 43 | + |
52 | +static CPAccessResult access_aa32_tid3(CPUARMState *env, const ARMCPRegInfo *ri, | 44 | /* The BAS bits are supposed to be programmed to indicate a contiguous |
53 | + bool isread) | 45 | * range of bytes. Otherwise it is CONSTRAINED UNPREDICTABLE whether |
54 | +{ | 46 | * we fire for each byte in the word/doubleword addressed by the WVR. |
55 | + if (arm_feature(env, ARM_FEATURE_V8)) { | ||
56 | + return access_aa64_tid3(env, ri, isread); | ||
57 | + } | ||
58 | + | ||
59 | + return CP_ACCESS_OK; | ||
60 | +} | ||
61 | + | ||
62 | void register_cp_regs_for_features(ARMCPU *cpu) | ||
63 | { | ||
64 | /* Register all the coprocessor registers based on feature bits */ | ||
65 | @@ -XXX,XX +XXX,XX @@ void register_cp_regs_for_features(ARMCPU *cpu) | ||
66 | { .name = "ID_PFR0", .state = ARM_CP_STATE_BOTH, | ||
67 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 0, | ||
68 | .access = PL1_R, .type = ARM_CP_CONST, | ||
69 | + .accessfn = access_aa32_tid3, | ||
70 | .resetvalue = cpu->id_pfr0 }, | ||
71 | /* ID_PFR1 is not a plain ARM_CP_CONST because we don't know | ||
72 | * the value of the GIC field until after we define these regs. | ||
73 | @@ -XXX,XX +XXX,XX @@ void register_cp_regs_for_features(ARMCPU *cpu) | ||
74 | { .name = "ID_PFR1", .state = ARM_CP_STATE_BOTH, | ||
75 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 1, | ||
76 | .access = PL1_R, .type = ARM_CP_NO_RAW, | ||
77 | + .accessfn = access_aa32_tid3, | ||
78 | .readfn = id_pfr1_read, | ||
79 | .writefn = arm_cp_write_ignore }, | ||
80 | { .name = "ID_DFR0", .state = ARM_CP_STATE_BOTH, | ||
81 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 2, | ||
82 | .access = PL1_R, .type = ARM_CP_CONST, | ||
83 | + .accessfn = access_aa32_tid3, | ||
84 | .resetvalue = cpu->id_dfr0 }, | ||
85 | { .name = "ID_AFR0", .state = ARM_CP_STATE_BOTH, | ||
86 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 3, | ||
87 | .access = PL1_R, .type = ARM_CP_CONST, | ||
88 | + .accessfn = access_aa32_tid3, | ||
89 | .resetvalue = cpu->id_afr0 }, | ||
90 | { .name = "ID_MMFR0", .state = ARM_CP_STATE_BOTH, | ||
91 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 4, | ||
92 | .access = PL1_R, .type = ARM_CP_CONST, | ||
93 | + .accessfn = access_aa32_tid3, | ||
94 | .resetvalue = cpu->id_mmfr0 }, | ||
95 | { .name = "ID_MMFR1", .state = ARM_CP_STATE_BOTH, | ||
96 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 5, | ||
97 | .access = PL1_R, .type = ARM_CP_CONST, | ||
98 | + .accessfn = access_aa32_tid3, | ||
99 | .resetvalue = cpu->id_mmfr1 }, | ||
100 | { .name = "ID_MMFR2", .state = ARM_CP_STATE_BOTH, | ||
101 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 6, | ||
102 | .access = PL1_R, .type = ARM_CP_CONST, | ||
103 | + .accessfn = access_aa32_tid3, | ||
104 | .resetvalue = cpu->id_mmfr2 }, | ||
105 | { .name = "ID_MMFR3", .state = ARM_CP_STATE_BOTH, | ||
106 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 7, | ||
107 | .access = PL1_R, .type = ARM_CP_CONST, | ||
108 | + .accessfn = access_aa32_tid3, | ||
109 | .resetvalue = cpu->id_mmfr3 }, | ||
110 | { .name = "ID_ISAR0", .state = ARM_CP_STATE_BOTH, | ||
111 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 0, | ||
112 | .access = PL1_R, .type = ARM_CP_CONST, | ||
113 | + .accessfn = access_aa32_tid3, | ||
114 | .resetvalue = cpu->isar.id_isar0 }, | ||
115 | { .name = "ID_ISAR1", .state = ARM_CP_STATE_BOTH, | ||
116 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 1, | ||
117 | .access = PL1_R, .type = ARM_CP_CONST, | ||
118 | + .accessfn = access_aa32_tid3, | ||
119 | .resetvalue = cpu->isar.id_isar1 }, | ||
120 | { .name = "ID_ISAR2", .state = ARM_CP_STATE_BOTH, | ||
121 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 2, | ||
122 | .access = PL1_R, .type = ARM_CP_CONST, | ||
123 | + .accessfn = access_aa32_tid3, | ||
124 | .resetvalue = cpu->isar.id_isar2 }, | ||
125 | { .name = "ID_ISAR3", .state = ARM_CP_STATE_BOTH, | ||
126 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 3, | ||
127 | .access = PL1_R, .type = ARM_CP_CONST, | ||
128 | + .accessfn = access_aa32_tid3, | ||
129 | .resetvalue = cpu->isar.id_isar3 }, | ||
130 | { .name = "ID_ISAR4", .state = ARM_CP_STATE_BOTH, | ||
131 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 4, | ||
132 | .access = PL1_R, .type = ARM_CP_CONST, | ||
133 | + .accessfn = access_aa32_tid3, | ||
134 | .resetvalue = cpu->isar.id_isar4 }, | ||
135 | { .name = "ID_ISAR5", .state = ARM_CP_STATE_BOTH, | ||
136 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 5, | ||
137 | .access = PL1_R, .type = ARM_CP_CONST, | ||
138 | + .accessfn = access_aa32_tid3, | ||
139 | .resetvalue = cpu->isar.id_isar5 }, | ||
140 | { .name = "ID_MMFR4", .state = ARM_CP_STATE_BOTH, | ||
141 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 6, | ||
142 | .access = PL1_R, .type = ARM_CP_CONST, | ||
143 | + .accessfn = access_aa32_tid3, | ||
144 | .resetvalue = cpu->id_mmfr4 }, | ||
145 | { .name = "ID_ISAR6", .state = ARM_CP_STATE_BOTH, | ||
146 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 2, .opc2 = 7, | ||
147 | .access = PL1_R, .type = ARM_CP_CONST, | ||
148 | + .accessfn = access_aa32_tid3, | ||
149 | .resetvalue = cpu->isar.id_isar6 }, | ||
150 | REGINFO_SENTINEL | ||
151 | }; | ||
152 | @@ -XXX,XX +XXX,XX @@ void register_cp_regs_for_features(ARMCPU *cpu) | ||
153 | { .name = "ID_AA64PFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
154 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 0, | ||
155 | .access = PL1_R, .type = ARM_CP_NO_RAW, | ||
156 | + .accessfn = access_aa64_tid3, | ||
157 | .readfn = id_aa64pfr0_read, | ||
158 | .writefn = arm_cp_write_ignore }, | ||
159 | { .name = "ID_AA64PFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
160 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 1, | ||
161 | .access = PL1_R, .type = ARM_CP_CONST, | ||
162 | + .accessfn = access_aa64_tid3, | ||
163 | .resetvalue = cpu->isar.id_aa64pfr1}, | ||
164 | { .name = "ID_AA64PFR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
165 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 2, | ||
166 | .access = PL1_R, .type = ARM_CP_CONST, | ||
167 | + .accessfn = access_aa64_tid3, | ||
168 | .resetvalue = 0 }, | ||
169 | { .name = "ID_AA64PFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
170 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 3, | ||
171 | .access = PL1_R, .type = ARM_CP_CONST, | ||
172 | + .accessfn = access_aa64_tid3, | ||
173 | .resetvalue = 0 }, | ||
174 | { .name = "ID_AA64ZFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
175 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 4, | ||
176 | .access = PL1_R, .type = ARM_CP_CONST, | ||
177 | + .accessfn = access_aa64_tid3, | ||
178 | /* At present, only SVEver == 0 is defined anyway. */ | ||
179 | .resetvalue = 0 }, | ||
180 | { .name = "ID_AA64PFR5_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
181 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 5, | ||
182 | .access = PL1_R, .type = ARM_CP_CONST, | ||
183 | + .accessfn = access_aa64_tid3, | ||
184 | .resetvalue = 0 }, | ||
185 | { .name = "ID_AA64PFR6_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
186 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 6, | ||
187 | .access = PL1_R, .type = ARM_CP_CONST, | ||
188 | + .accessfn = access_aa64_tid3, | ||
189 | .resetvalue = 0 }, | ||
190 | { .name = "ID_AA64PFR7_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
191 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 4, .opc2 = 7, | ||
192 | .access = PL1_R, .type = ARM_CP_CONST, | ||
193 | + .accessfn = access_aa64_tid3, | ||
194 | .resetvalue = 0 }, | ||
195 | { .name = "ID_AA64DFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
196 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 0, | ||
197 | .access = PL1_R, .type = ARM_CP_CONST, | ||
198 | + .accessfn = access_aa64_tid3, | ||
199 | .resetvalue = cpu->id_aa64dfr0 }, | ||
200 | { .name = "ID_AA64DFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
201 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 1, | ||
202 | .access = PL1_R, .type = ARM_CP_CONST, | ||
203 | + .accessfn = access_aa64_tid3, | ||
204 | .resetvalue = cpu->id_aa64dfr1 }, | ||
205 | { .name = "ID_AA64DFR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
206 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 2, | ||
207 | .access = PL1_R, .type = ARM_CP_CONST, | ||
208 | + .accessfn = access_aa64_tid3, | ||
209 | .resetvalue = 0 }, | ||
210 | { .name = "ID_AA64DFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
211 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 3, | ||
212 | .access = PL1_R, .type = ARM_CP_CONST, | ||
213 | + .accessfn = access_aa64_tid3, | ||
214 | .resetvalue = 0 }, | ||
215 | { .name = "ID_AA64AFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
216 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 4, | ||
217 | .access = PL1_R, .type = ARM_CP_CONST, | ||
218 | + .accessfn = access_aa64_tid3, | ||
219 | .resetvalue = cpu->id_aa64afr0 }, | ||
220 | { .name = "ID_AA64AFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
221 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 5, | ||
222 | .access = PL1_R, .type = ARM_CP_CONST, | ||
223 | + .accessfn = access_aa64_tid3, | ||
224 | .resetvalue = cpu->id_aa64afr1 }, | ||
225 | { .name = "ID_AA64AFR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
226 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 6, | ||
227 | .access = PL1_R, .type = ARM_CP_CONST, | ||
228 | + .accessfn = access_aa64_tid3, | ||
229 | .resetvalue = 0 }, | ||
230 | { .name = "ID_AA64AFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
231 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 5, .opc2 = 7, | ||
232 | .access = PL1_R, .type = ARM_CP_CONST, | ||
233 | + .accessfn = access_aa64_tid3, | ||
234 | .resetvalue = 0 }, | ||
235 | { .name = "ID_AA64ISAR0_EL1", .state = ARM_CP_STATE_AA64, | ||
236 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 0, | ||
237 | .access = PL1_R, .type = ARM_CP_CONST, | ||
238 | + .accessfn = access_aa64_tid3, | ||
239 | .resetvalue = cpu->isar.id_aa64isar0 }, | ||
240 | { .name = "ID_AA64ISAR1_EL1", .state = ARM_CP_STATE_AA64, | ||
241 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 1, | ||
242 | .access = PL1_R, .type = ARM_CP_CONST, | ||
243 | + .accessfn = access_aa64_tid3, | ||
244 | .resetvalue = cpu->isar.id_aa64isar1 }, | ||
245 | { .name = "ID_AA64ISAR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
246 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 2, | ||
247 | .access = PL1_R, .type = ARM_CP_CONST, | ||
248 | + .accessfn = access_aa64_tid3, | ||
249 | .resetvalue = 0 }, | ||
250 | { .name = "ID_AA64ISAR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
251 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 3, | ||
252 | .access = PL1_R, .type = ARM_CP_CONST, | ||
253 | + .accessfn = access_aa64_tid3, | ||
254 | .resetvalue = 0 }, | ||
255 | { .name = "ID_AA64ISAR4_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
256 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 4, | ||
257 | .access = PL1_R, .type = ARM_CP_CONST, | ||
258 | + .accessfn = access_aa64_tid3, | ||
259 | .resetvalue = 0 }, | ||
260 | { .name = "ID_AA64ISAR5_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
261 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 5, | ||
262 | .access = PL1_R, .type = ARM_CP_CONST, | ||
263 | + .accessfn = access_aa64_tid3, | ||
264 | .resetvalue = 0 }, | ||
265 | { .name = "ID_AA64ISAR6_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
266 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 6, | ||
267 | .access = PL1_R, .type = ARM_CP_CONST, | ||
268 | + .accessfn = access_aa64_tid3, | ||
269 | .resetvalue = 0 }, | ||
270 | { .name = "ID_AA64ISAR7_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
271 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 6, .opc2 = 7, | ||
272 | .access = PL1_R, .type = ARM_CP_CONST, | ||
273 | + .accessfn = access_aa64_tid3, | ||
274 | .resetvalue = 0 }, | ||
275 | { .name = "ID_AA64MMFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
276 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 0, | ||
277 | .access = PL1_R, .type = ARM_CP_CONST, | ||
278 | + .accessfn = access_aa64_tid3, | ||
279 | .resetvalue = cpu->isar.id_aa64mmfr0 }, | ||
280 | { .name = "ID_AA64MMFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
281 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 1, | ||
282 | .access = PL1_R, .type = ARM_CP_CONST, | ||
283 | + .accessfn = access_aa64_tid3, | ||
284 | .resetvalue = cpu->isar.id_aa64mmfr1 }, | ||
285 | { .name = "ID_AA64MMFR2_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
286 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 2, | ||
287 | .access = PL1_R, .type = ARM_CP_CONST, | ||
288 | + .accessfn = access_aa64_tid3, | ||
289 | .resetvalue = 0 }, | ||
290 | { .name = "ID_AA64MMFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
291 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 3, | ||
292 | .access = PL1_R, .type = ARM_CP_CONST, | ||
293 | + .accessfn = access_aa64_tid3, | ||
294 | .resetvalue = 0 }, | ||
295 | { .name = "ID_AA64MMFR4_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
296 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 4, | ||
297 | .access = PL1_R, .type = ARM_CP_CONST, | ||
298 | + .accessfn = access_aa64_tid3, | ||
299 | .resetvalue = 0 }, | ||
300 | { .name = "ID_AA64MMFR5_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
301 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 5, | ||
302 | .access = PL1_R, .type = ARM_CP_CONST, | ||
303 | + .accessfn = access_aa64_tid3, | ||
304 | .resetvalue = 0 }, | ||
305 | { .name = "ID_AA64MMFR6_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
306 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 6, | ||
307 | .access = PL1_R, .type = ARM_CP_CONST, | ||
308 | + .accessfn = access_aa64_tid3, | ||
309 | .resetvalue = 0 }, | ||
310 | { .name = "ID_AA64MMFR7_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
311 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 7, .opc2 = 7, | ||
312 | .access = PL1_R, .type = ARM_CP_CONST, | ||
313 | + .accessfn = access_aa64_tid3, | ||
314 | .resetvalue = 0 }, | ||
315 | { .name = "MVFR0_EL1", .state = ARM_CP_STATE_AA64, | ||
316 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 0, | ||
317 | .access = PL1_R, .type = ARM_CP_CONST, | ||
318 | + .accessfn = access_aa64_tid3, | ||
319 | .resetvalue = cpu->isar.mvfr0 }, | ||
320 | { .name = "MVFR1_EL1", .state = ARM_CP_STATE_AA64, | ||
321 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 1, | ||
322 | .access = PL1_R, .type = ARM_CP_CONST, | ||
323 | + .accessfn = access_aa64_tid3, | ||
324 | .resetvalue = cpu->isar.mvfr1 }, | ||
325 | { .name = "MVFR2_EL1", .state = ARM_CP_STATE_AA64, | ||
326 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 2, | ||
327 | .access = PL1_R, .type = ARM_CP_CONST, | ||
328 | + .accessfn = access_aa64_tid3, | ||
329 | .resetvalue = cpu->isar.mvfr2 }, | ||
330 | { .name = "MVFR3_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
331 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 3, | ||
332 | .access = PL1_R, .type = ARM_CP_CONST, | ||
333 | + .accessfn = access_aa64_tid3, | ||
334 | .resetvalue = 0 }, | ||
335 | { .name = "MVFR4_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
336 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 4, | ||
337 | .access = PL1_R, .type = ARM_CP_CONST, | ||
338 | + .accessfn = access_aa64_tid3, | ||
339 | .resetvalue = 0 }, | ||
340 | { .name = "MVFR5_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
341 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 5, | ||
342 | .access = PL1_R, .type = ARM_CP_CONST, | ||
343 | + .accessfn = access_aa64_tid3, | ||
344 | .resetvalue = 0 }, | ||
345 | { .name = "MVFR6_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
346 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 6, | ||
347 | .access = PL1_R, .type = ARM_CP_CONST, | ||
348 | + .accessfn = access_aa64_tid3, | ||
349 | .resetvalue = 0 }, | ||
350 | { .name = "MVFR7_EL1_RESERVED", .state = ARM_CP_STATE_AA64, | ||
351 | .opc0 = 3, .opc1 = 0, .crn = 0, .crm = 3, .opc2 = 7, | ||
352 | .access = PL1_R, .type = ARM_CP_CONST, | ||
353 | + .accessfn = access_aa64_tid3, | ||
354 | .resetvalue = 0 }, | ||
355 | { .name = "PMCEID0", .state = ARM_CP_STATE_AA32, | ||
356 | .cp = 15, .opc1 = 0, .crn = 9, .crm = 12, .opc2 = 6, | ||
357 | -- | 47 | -- |
358 | 2.20.1 | 48 | 2.20.1 |
359 | 49 | ||
360 | 50 | diff view generated by jsdifflib |
1 | From: Jean-Hugues Deschênes <Jean-Hugues.Deschenes@ossiaco.com> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | According to the PushStack() pseudocode in the armv7m RM, | 3 | Coverity raised a shed-load of errors cascading from inferring |
4 | bit 4 of the LR should be set to NOT(CONTROL.PFCA) when | 4 | that clz32(immh) might yield 32, from immh might be 0. |
5 | an FPU is present. Current implementation is doing it for | ||
6 | armv8, but not for armv7. This patch makes the existing | ||
7 | logic applicable to both code paths. | ||
8 | 5 | ||
9 | Signed-off-by: Jean-Hugues Deschenes <jean-hugues.deschenes@ossiaco.com> | 6 | While immh cannot be 0 from encoding, it is not obvious even to |
7 | a human how we've checked that: via the filtering provided by | ||
8 | data_proc_simd[]. | ||
9 | |||
10 | Reported-by: Coverity (CID 1421923, and more) | ||
11 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
12 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> | ||
13 | Message-id: 20200320160622.8040-3-richard.henderson@linaro.org | ||
10 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 14 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
11 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 15 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
12 | --- | 16 | --- |
13 | target/arm/m_helper.c | 7 +++---- | 17 | target/arm/translate-a64.c | 3 +++ |
14 | 1 file changed, 3 insertions(+), 4 deletions(-) | 18 | 1 file changed, 3 insertions(+) |
15 | 19 | ||
16 | diff --git a/target/arm/m_helper.c b/target/arm/m_helper.c | 20 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c |
17 | index XXXXXXX..XXXXXXX 100644 | 21 | index XXXXXXX..XXXXXXX 100644 |
18 | --- a/target/arm/m_helper.c | 22 | --- a/target/arm/translate-a64.c |
19 | +++ b/target/arm/m_helper.c | 23 | +++ b/target/arm/translate-a64.c |
20 | @@ -XXX,XX +XXX,XX @@ void arm_v7m_cpu_do_interrupt(CPUState *cs) | 24 | @@ -XXX,XX +XXX,XX @@ static void disas_simd_shift_imm(DisasContext *s, uint32_t insn) |
21 | if (env->v7m.secure) { | 25 | bool is_u = extract32(insn, 29, 1); |
22 | lr |= R_V7M_EXCRET_S_MASK; | 26 | bool is_q = extract32(insn, 30, 1); |
23 | } | 27 | |
24 | - if (!(env->v7m.control[M_REG_S] & R_V7M_CONTROL_FPCA_MASK)) { | 28 | + /* data_proc_simd[] has sent immh == 0 to disas_simd_mod_imm. */ |
25 | - lr |= R_V7M_EXCRET_FTYPE_MASK; | 29 | + assert(immh != 0); |
26 | - } | 30 | + |
27 | } else { | 31 | switch (opcode) { |
28 | lr = R_V7M_EXCRET_RES1_MASK | | 32 | case 0x08: /* SRI */ |
29 | R_V7M_EXCRET_S_MASK | | 33 | if (!is_u) { |
30 | R_V7M_EXCRET_DCRS_MASK | | ||
31 | - R_V7M_EXCRET_FTYPE_MASK | | ||
32 | R_V7M_EXCRET_ES_MASK; | ||
33 | if (env->v7m.control[M_REG_NS] & R_V7M_CONTROL_SPSEL_MASK) { | ||
34 | lr |= R_V7M_EXCRET_SPSEL_MASK; | ||
35 | } | ||
36 | } | ||
37 | + if (!(env->v7m.control[M_REG_S] & R_V7M_CONTROL_FPCA_MASK)) { | ||
38 | + lr |= R_V7M_EXCRET_FTYPE_MASK; | ||
39 | + } | ||
40 | if (!arm_v7m_is_handler_mode(env)) { | ||
41 | lr |= R_V7M_EXCRET_MODE_MASK; | ||
42 | } | ||
43 | -- | 34 | -- |
44 | 2.20.1 | 35 | 2.20.1 |
45 | 36 | ||
46 | 37 | diff view generated by jsdifflib |
1 | From: Marc Zyngier <maz@kernel.org> | 1 | From: Richard Henderson <richard.henderson@linaro.org> |
---|---|---|---|
2 | 2 | ||
3 | The ARMv8 ARM states when executing at EL2, EL3 or Secure EL1, | 3 | Coverity reports a BAD_SHIFT with ctz32(imm5), with imm5 == 0. |
4 | ISR_EL1 shows the pending status of the physical IRQ, FIQ, or | 4 | This is an invalid encoding, but we diagnose that just below |
5 | SError interrupts. | 5 | by rejecting size > 3. Avoid the warning by sinking the |
6 | computation of index below the check. | ||
6 | 7 | ||
7 | Unfortunately, QEMU's implementation only considers the HCR_EL2 | 8 | Reported-by: Coverity (CID 1421965) |
8 | bits, and ignores the current exception level. This means a hypervisor | 9 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> |
9 | trying to look at its own interrupt state actually sees the guest | 10 | Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com> |
10 | state, which is unexpected and breaks KVM as of Linux 5.3. | 11 | Message-id: 20200320160622.8040-4-richard.henderson@linaro.org |
11 | |||
12 | Instead, check for the running EL and return the physical bits | ||
13 | if not running in a virtualized context. | ||
14 | |||
15 | Fixes: 636540e9c40b | ||
16 | Cc: qemu-stable@nongnu.org | ||
17 | Reported-by: Quentin Perret <qperret@google.com> | ||
18 | Signed-off-by: Marc Zyngier <maz@kernel.org> | ||
19 | Message-id: 20191122135833.28953-1-maz@kernel.org | ||
20 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | 12 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> |
21 | Reviewed-by: Edgar E. Iglesias <edgar.iglesias@xilinx.com> | ||
22 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | 13 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> |
23 | --- | 14 | --- |
24 | target/arm/helper.c | 7 +++++-- | 15 | target/arm/translate-a64.c | 3 ++- |
25 | 1 file changed, 5 insertions(+), 2 deletions(-) | 16 | 1 file changed, 2 insertions(+), 1 deletion(-) |
26 | 17 | ||
27 | diff --git a/target/arm/helper.c b/target/arm/helper.c | 18 | diff --git a/target/arm/translate-a64.c b/target/arm/translate-a64.c |
28 | index XXXXXXX..XXXXXXX 100644 | 19 | index XXXXXXX..XXXXXXX 100644 |
29 | --- a/target/arm/helper.c | 20 | --- a/target/arm/translate-a64.c |
30 | +++ b/target/arm/helper.c | 21 | +++ b/target/arm/translate-a64.c |
31 | @@ -XXX,XX +XXX,XX @@ static uint64_t isr_read(CPUARMState *env, const ARMCPRegInfo *ri) | 22 | @@ -XXX,XX +XXX,XX @@ static void handle_simd_dupe(DisasContext *s, int is_q, int rd, int rn, |
32 | CPUState *cs = env_cpu(env); | 23 | int imm5) |
33 | uint64_t hcr_el2 = arm_hcr_el2_eff(env); | 24 | { |
34 | uint64_t ret = 0; | 25 | int size = ctz32(imm5); |
35 | + bool allow_virt = (arm_current_el(env) == 1 && | 26 | - int index = imm5 >> (size + 1); |
36 | + (!arm_is_secure_below_el3(env) || | 27 | + int index; |
37 | + (env->cp15.scr_el3 & SCR_EEL2))); | 28 | |
38 | 29 | if (size > 3 || (size == 3 && !is_q)) { | |
39 | - if (hcr_el2 & HCR_IMO) { | 30 | unallocated_encoding(s); |
40 | + if (allow_virt && (hcr_el2 & HCR_IMO)) { | 31 | @@ -XXX,XX +XXX,XX @@ static void handle_simd_dupe(DisasContext *s, int is_q, int rd, int rn, |
41 | if (cs->interrupt_request & CPU_INTERRUPT_VIRQ) { | 32 | return; |
42 | ret |= CPSR_I; | ||
43 | } | ||
44 | @@ -XXX,XX +XXX,XX @@ static uint64_t isr_read(CPUARMState *env, const ARMCPRegInfo *ri) | ||
45 | } | ||
46 | } | 33 | } |
47 | 34 | ||
48 | - if (hcr_el2 & HCR_FMO) { | 35 | + index = imm5 >> (size + 1); |
49 | + if (allow_virt && (hcr_el2 & HCR_FMO)) { | 36 | tcg_gen_gvec_dup_mem(size, vec_full_reg_offset(s, rd), |
50 | if (cs->interrupt_request & CPU_INTERRUPT_VFIQ) { | 37 | vec_reg_offset(s, rn, index, size), |
51 | ret |= CPSR_F; | 38 | is_q ? 16 : 8, vec_full_reg_size(s)); |
52 | } | ||
53 | -- | 39 | -- |
54 | 2.20.1 | 40 | 2.20.1 |
55 | 41 | ||
56 | 42 | diff view generated by jsdifflib |