1
A last handful of patches before the rc0. These are all bugfixes
1
v3: really fix the format string nit (oops)
2
so they could equally well go into rc1, but since my pullreq
3
queue is otherwise empty I might as well push them out. The
4
FPSCR bugfix is definitely one I'd like in rc0; the rest are
5
not really user-visible I think.
6
2
7
thanks
3
The following changes since commit eae587e8e3694b1aceab23239493fb4c7e1a80f5:
8
-- PMM
9
4
10
The following changes since commit c4107e8208d0222f9b328691b519aaee4101db87:
5
Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2021-09-13' into staging (2021-09-13 11:00:30 +0100)
11
12
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging (2019-07-08 10:26:18 +0100)
13
6
14
are available in the Git repository at:
7
are available in the Git repository at:
15
8
16
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20190708
9
https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20210913-2
17
10
18
for you to fetch changes up to 85795187f416326f87177cabc39fae1911f04c50:
11
for you to fetch changes up to eec607843ca81eccab238fce86222be9c78b3675:
19
12
20
target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR (2019-07-08 14:11:31 +0100)
13
hw/arm/mps2.c: Mark internal-only I2C buses as 'full' (2021-09-13 19:45:02 +0100)
21
14
22
----------------------------------------------------------------
15
----------------------------------------------------------------
23
target-arm queue:
16
target-arm queue:
24
* tests/migration-test: Fix read off end of aarch64_kernel array
17
* mark MPS2/MPS3 board-internal i2c buses as 'full' so that command
25
* Fix sve_zcr_len_for_el off-by-one error
18
line user-created devices are not plugged into them
26
* hw/arm/sbsa-ref: Silence Coverity nit
19
* Take an exception if PSTATE.IL is set
27
* vfp_helper: Call set_fpscr_to_host before updating to FPSCR
20
* Support an emulated ITS in the virt board
21
* Add support for kudo-bmc board
22
* Probe for KVM_CAP_ARM_VM_IPA_SIZE when creating scratch VM
23
* cadence_uart: Fix clock handling issues that prevented
24
u-boot from running
28
25
29
----------------------------------------------------------------
26
----------------------------------------------------------------
30
Peter Maydell (2):
27
Bin Meng (6):
31
tests/migration-test: Fix read off end of aarch64_kernel array
28
hw/misc: zynq_slcr: Correctly compute output clocks in the reset exit phase
32
hw/arm/sbsa-ref: Remove unnecessary check for secure_sysmem == NULL
29
hw/char: cadence_uart: Disable transmit when input clock is disabled
30
hw/char: cadence_uart: Move clock/reset check to uart_can_receive()
31
hw/char: cadence_uart: Convert to memop_with_attrs() ops
32
hw/char: cadence_uart: Ignore access when unclocked or in reset for uart_{read, write}()
33
hw/char: cadence_uart: Log a guest error when device is unclocked or in reset
33
34
34
Philippe Mathieu-Daudé (1):
35
Chris Rauer (1):
35
target/arm/vfp_helper: Call set_fpscr_to_host before updating to FPSCR
36
hw/arm: Add support for kudo-bmc board.
37
38
Marc Zyngier (1):
39
hw/arm/virt: KVM: Probe for KVM_CAP_ARM_VM_IPA_SIZE when creating scratch VM
40
41
Peter Maydell (5):
42
target/arm: Take an exception if PSTATE.IL is set
43
qdev: Support marking individual buses as 'full'
44
hw/arm/mps2-tz.c: Add extra data parameter to MakeDevFn
45
hw/arm/mps2-tz.c: Mark internal-only I2C buses as 'full'
46
hw/arm/mps2.c: Mark internal-only I2C buses as 'full'
36
47
37
Richard Henderson (1):
48
Richard Henderson (1):
38
target/arm: Fix sve_zcr_len_for_el
49
target/arm: Merge disas_a64_insn into aarch64_tr_translate_insn
39
50
40
hw/arm/sbsa-ref.c | 8 ++------
51
Shashi Mallela (9):
41
target/arm/helper.c | 4 ++--
52
hw/intc: GICv3 ITS initial framework
42
target/arm/vfp_helper.c | 4 ++--
53
hw/intc: GICv3 ITS register definitions added
43
tests/migration-test.c | 22 +++++++---------------
54
hw/intc: GICv3 ITS command queue framework
44
4 files changed, 13 insertions(+), 25 deletions(-)
55
hw/intc: GICv3 ITS Command processing
56
hw/intc: GICv3 ITS Feature enablement
57
hw/intc: GICv3 redistributor ITS processing
58
tests/data/acpi/virt: Add IORT files for ITS
59
hw/arm/virt: add ITS support in virt GIC
60
tests/data/acpi/virt: Update IORT files for ITS
45
61
62
docs/system/arm/nuvoton.rst | 1 +
63
hw/intc/gicv3_internal.h | 188 ++++-
64
include/hw/arm/virt.h | 2 +
65
include/hw/intc/arm_gicv3_common.h | 13 +
66
include/hw/intc/arm_gicv3_its_common.h | 32 +-
67
include/hw/qdev-core.h | 24 +
68
target/arm/cpu.h | 1 +
69
target/arm/kvm_arm.h | 4 +-
70
target/arm/syndrome.h | 5 +
71
target/arm/translate.h | 2 +
72
hw/arm/mps2-tz.c | 92 ++-
73
hw/arm/mps2.c | 12 +-
74
hw/arm/npcm7xx_boards.c | 34 +
75
hw/arm/virt.c | 29 +-
76
hw/char/cadence_uart.c | 61 +-
77
hw/intc/arm_gicv3.c | 14 +
78
hw/intc/arm_gicv3_common.c | 13 +
79
hw/intc/arm_gicv3_cpuif.c | 7 +-
80
hw/intc/arm_gicv3_dist.c | 5 +-
81
hw/intc/arm_gicv3_its.c | 1322 ++++++++++++++++++++++++++++++++
82
hw/intc/arm_gicv3_its_common.c | 7 +-
83
hw/intc/arm_gicv3_its_kvm.c | 2 +-
84
hw/intc/arm_gicv3_redist.c | 153 +++-
85
hw/misc/zynq_slcr.c | 31 +-
86
softmmu/qdev-monitor.c | 7 +-
87
target/arm/helper-a64.c | 1 +
88
target/arm/helper.c | 8 +
89
target/arm/kvm.c | 7 +-
90
target/arm/translate-a64.c | 255 +++---
91
target/arm/translate.c | 21 +
92
hw/intc/meson.build | 1 +
93
tests/data/acpi/virt/IORT | Bin 0 -> 124 bytes
94
tests/data/acpi/virt/IORT.memhp | Bin 0 -> 124 bytes
95
tests/data/acpi/virt/IORT.numamem | Bin 0 -> 124 bytes
96
tests/data/acpi/virt/IORT.pxb | Bin 0 -> 124 bytes
97
35 files changed, 2144 insertions(+), 210 deletions(-)
98
create mode 100644 hw/intc/arm_gicv3_its.c
99
create mode 100644 tests/data/acpi/virt/IORT
100
create mode 100644 tests/data/acpi/virt/IORT.memhp
101
create mode 100644 tests/data/acpi/virt/IORT.numamem
102
create mode 100644 tests/data/acpi/virt/IORT.pxb
103
diff view generated by jsdifflib
Deleted patch
1
From: Richard Henderson <richard.henderson@linaro.org>
2
1
3
Off by one error in the EL2 and EL3 tests. Remove the test
4
against EL3 entirely, since it must always be true.
5
6
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
7
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
8
Message-id: 20190702104732.31154-1-richard.henderson@linaro.org
9
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
10
---
11
target/arm/helper.c | 4 ++--
12
1 file changed, 2 insertions(+), 2 deletions(-)
13
14
diff --git a/target/arm/helper.c b/target/arm/helper.c
15
index XXXXXXX..XXXXXXX 100644
16
--- a/target/arm/helper.c
17
+++ b/target/arm/helper.c
18
@@ -XXX,XX +XXX,XX @@ uint32_t sve_zcr_len_for_el(CPUARMState *env, int el)
19
if (el <= 1) {
20
zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[1]);
21
}
22
- if (el < 2 && arm_feature(env, ARM_FEATURE_EL2)) {
23
+ if (el <= 2 && arm_feature(env, ARM_FEATURE_EL2)) {
24
zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[2]);
25
}
26
- if (el < 3 && arm_feature(env, ARM_FEATURE_EL3)) {
27
+ if (arm_feature(env, ARM_FEATURE_EL3)) {
28
zcr_len = MIN(zcr_len, 0xf & (uint32_t)env->vfp.zcr_el[3]);
29
}
30
return zcr_len;
31
--
32
2.20.1
33
34
diff view generated by jsdifflib
Deleted patch
1
The test aarch64 kernel is in an array defined with
2
unsigned char aarch64_kernel[] = { [...] }
3
1
4
which means it could be any size; currently it's quite small.
5
However we write it to a file using init_bootfile(), which
6
writes exactly 512 bytes to the file. This will break if
7
we ever end up with a kernel larger than that, and will
8
read garbage off the end of the array in the current setup
9
where the kernel is smaller.
10
11
Make init_bootfile() take an argument giving the length of
12
the data to write. This allows us to use it for all architectures
13
(previously s390 had a special-purpose init_bootfile_s390x
14
which hardcoded the file to write so it could write the
15
correct length). We assert that the x86 bootfile really is
16
exactly 512 bytes as it should be (and as we were previously
17
just assuming it was).
18
19
This was detected by the clang-7 asan:
20
==15607==ERROR: AddressSanitizer: global-buffer-overflow on address 0x55a796f51d20 at pc 0x55a796b89c2f bp 0x7ffc58e89160 sp 0x7ffc58e88908
21
READ of size 512 at 0x55a796f51d20 thread T0
22
#0 0x55a796b89c2e in fwrite (/home/petmay01/linaro/qemu-from-laptop/qemu/build/sanitizers/tests/migration-test+0xb0c2e)
23
#1 0x55a796c46492 in init_bootfile /home/petmay01/linaro/qemu-from-laptop/qemu/tests/migration-test.c:99:5
24
#2 0x55a796c46492 in test_migrate_start /home/petmay01/linaro/qemu-from-laptop/qemu/tests/migration-test.c:593
25
#3 0x55a796c44101 in test_baddest /home/petmay01/linaro/qemu-from-laptop/qemu/tests/migration-test.c:854:9
26
#4 0x7f906ffd3cc9 (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72cc9)
27
#5 0x7f906ffd3bfa (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72bfa)
28
#6 0x7f906ffd3bfa (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72bfa)
29
#7 0x7f906ffd3ea1 in g_test_run_suite (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72ea1)
30
#8 0x7f906ffd3ec0 in g_test_run (/usr/lib/x86_64-linux-gnu/libglib-2.0.so.0+0x72ec0)
31
#9 0x55a796c43707 in main /home/petmay01/linaro/qemu-from-laptop/qemu/tests/migration-test.c:1187:11
32
#10 0x7f906e9abb96 in __libc_start_main /build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:310
33
#11 0x55a796b6c2d9 in _start (/home/petmay01/linaro/qemu-from-laptop/qemu/build/sanitizers/tests/migration-test+0x932d9)
34
35
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
36
Reviewed-by: Laurent Vivier <lvivier@redhat.com>
37
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
38
Message-id: 20190702150311.20467-1-peter.maydell@linaro.org
39
---
40
tests/migration-test.c | 22 +++++++---------------
41
1 file changed, 7 insertions(+), 15 deletions(-)
42
43
diff --git a/tests/migration-test.c b/tests/migration-test.c
44
index XXXXXXX..XXXXXXX 100644
45
--- a/tests/migration-test.c
46
+++ b/tests/migration-test.c
47
@@ -XXX,XX +XXX,XX @@ static const char *tmpfs;
48
*/
49
#include "tests/migration/i386/a-b-bootblock.h"
50
#include "tests/migration/aarch64/a-b-kernel.h"
51
-
52
-static void init_bootfile(const char *bootpath, void *content)
53
-{
54
- FILE *bootfile = fopen(bootpath, "wb");
55
-
56
- g_assert_cmpint(fwrite(content, 512, 1, bootfile), ==, 1);
57
- fclose(bootfile);
58
-}
59
-
60
#include "tests/migration/s390x/a-b-bios.h"
61
62
-static void init_bootfile_s390x(const char *bootpath)
63
+static void init_bootfile(const char *bootpath, void *content, size_t len)
64
{
65
FILE *bootfile = fopen(bootpath, "wb");
66
- size_t len = sizeof(s390x_elf);
67
68
- g_assert_cmpint(fwrite(s390x_elf, len, 1, bootfile), ==, 1);
69
+ g_assert_cmpint(fwrite(content, len, 1, bootfile), ==, 1);
70
fclose(bootfile);
71
}
72
73
@@ -XXX,XX +XXX,XX @@ static int test_migrate_start(QTestState **from, QTestState **to,
74
got_stop = false;
75
bootpath = g_strdup_printf("%s/bootsect", tmpfs);
76
if (strcmp(arch, "i386") == 0 || strcmp(arch, "x86_64") == 0) {
77
- init_bootfile(bootpath, x86_bootsect);
78
+ /* the assembled x86 boot sector should be exactly one sector large */
79
+ assert(sizeof(x86_bootsect) == 512);
80
+ init_bootfile(bootpath, x86_bootsect, sizeof(x86_bootsect));
81
extra_opts = use_shmem ? get_shmem_opts("150M", shmem_path) : NULL;
82
cmd_src = g_strdup_printf("-machine accel=%s -m 150M"
83
" -name source,debug-threads=on"
84
@@ -XXX,XX +XXX,XX @@ static int test_migrate_start(QTestState **from, QTestState **to,
85
start_address = X86_TEST_MEM_START;
86
end_address = X86_TEST_MEM_END;
87
} else if (g_str_equal(arch, "s390x")) {
88
- init_bootfile_s390x(bootpath);
89
+ init_bootfile(bootpath, s390x_elf, sizeof(s390x_elf));
90
extra_opts = use_shmem ? get_shmem_opts("128M", shmem_path) : NULL;
91
cmd_src = g_strdup_printf("-machine accel=%s -m 128M"
92
" -name source,debug-threads=on"
93
@@ -XXX,XX +XXX,XX @@ static int test_migrate_start(QTestState **from, QTestState **to,
94
start_address = PPC_TEST_MEM_START;
95
end_address = PPC_TEST_MEM_END;
96
} else if (strcmp(arch, "aarch64") == 0) {
97
- init_bootfile(bootpath, aarch64_kernel);
98
+ init_bootfile(bootpath, aarch64_kernel, sizeof(aarch64_kernel));
99
extra_opts = use_shmem ? get_shmem_opts("150M", shmem_path) : NULL;
100
cmd_src = g_strdup_printf("-machine virt,accel=%s,gic-version=max "
101
"-name vmsource,debug-threads=on -cpu max "
102
--
103
2.20.1
104
105
diff view generated by jsdifflib
Deleted patch
1
In the virt machine, we support TrustZone being either present or
2
absent, and so the code must deal with the secure_sysmem pointer
3
possibly being NULL. In the sbsa-ref machine, TrustZone is always
4
present, but some code and comments copied from virt still treat
5
it as possibly not being present.
6
1
7
This causes Coverity to complain (CID 1407287) that we check
8
secure_sysmem for being NULL after an unconditional dereference.
9
Simplify the code so that instead of initializing the variable
10
to NULL, unconditionally assigning it, and then testing it for NULL,
11
we just initialize it correctly in the variable declaration and
12
then assume it to be non-NULL. We also delete a comment which
13
only applied to the non-TrustZone config.
14
15
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
16
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
17
Message-id: 20190704142004.7150-1-peter.maydell@linaro.org
18
Tested-by: Radosław Biernacki <radoslaw.biernacki@linaro.org>
19
Reviewed-by: Radosław Biernacki <radoslaw.biernacki@linaro.org>
20
---
21
hw/arm/sbsa-ref.c | 8 ++------
22
1 file changed, 2 insertions(+), 6 deletions(-)
23
24
diff --git a/hw/arm/sbsa-ref.c b/hw/arm/sbsa-ref.c
25
index XXXXXXX..XXXXXXX 100644
26
--- a/hw/arm/sbsa-ref.c
27
+++ b/hw/arm/sbsa-ref.c
28
@@ -XXX,XX +XXX,XX @@ static void sbsa_flash_map(SBSAMachineState *sms,
29
* sysmem is the system memory space. secure_sysmem is the secure view
30
* of the system, and the first flash device should be made visible only
31
* there. The second flash device is visible to both secure and nonsecure.
32
- * If sysmem == secure_sysmem this means there is no separate Secure
33
- * address space and both flash devices are generally visible.
34
*/
35
hwaddr flashsize = sbsa_ref_memmap[SBSA_FLASH].size / 2;
36
hwaddr flashbase = sbsa_ref_memmap[SBSA_FLASH].base;
37
@@ -XXX,XX +XXX,XX @@ static void sbsa_ref_init(MachineState *machine)
38
SBSAMachineState *sms = SBSA_MACHINE(machine);
39
MachineClass *mc = MACHINE_GET_CLASS(machine);
40
MemoryRegion *sysmem = get_system_memory();
41
- MemoryRegion *secure_sysmem = NULL;
42
+ MemoryRegion *secure_sysmem = g_new(MemoryRegion, 1);
43
MemoryRegion *ram = g_new(MemoryRegion, 1);
44
bool firmware_loaded;
45
const CPUArchIdList *possible_cpus;
46
@@ -XXX,XX +XXX,XX @@ static void sbsa_ref_init(MachineState *machine)
47
* containing the system memory at low priority; any secure-only
48
* devices go in at higher priority and take precedence.
49
*/
50
- secure_sysmem = g_new(MemoryRegion, 1);
51
memory_region_init(secure_sysmem, OBJECT(machine), "secure-memory",
52
UINT64_MAX);
53
memory_region_add_subregion_overlap(secure_sysmem, 0, sysmem, -1);
54
55
- firmware_loaded = sbsa_firmware_init(sms, sysmem,
56
- secure_sysmem ?: sysmem);
57
+ firmware_loaded = sbsa_firmware_init(sms, sysmem, secure_sysmem);
58
59
if (machine->kernel_filename && firmware_loaded) {
60
error_report("sbsa-ref: No fw_cfg device on this machine, "
61
--
62
2.20.1
63
64
diff view generated by jsdifflib
Deleted patch
1
From: Philippe Mathieu-Daudé <philmd@redhat.com>
2
1
3
In commit e9d652824b0 we extracted the vfp_set_fpscr_to_host()
4
function but failed at calling it in the correct place, we call
5
it after xregs[ARM_VFP_FPSCR] is modified.
6
7
Fix by calling this function before we update FPSCR.
8
9
Reported-by: Laurent Desnogues <laurent.desnogues@gmail.com>
10
Signed-off-by: Philippe Mathieu-Daudé <philmd@redhat.com>
11
Reviewed-by: Laurent Desnogues <laurent.desnogues@gmail.com>
12
Tested-by: Laurent Desnogues <laurent.desnogues@gmail.com>
13
Message-id: 20190705124318.1075-1-philmd@redhat.com
14
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
15
---
16
target/arm/vfp_helper.c | 4 ++--
17
1 file changed, 2 insertions(+), 2 deletions(-)
18
19
diff --git a/target/arm/vfp_helper.c b/target/arm/vfp_helper.c
20
index XXXXXXX..XXXXXXX 100644
21
--- a/target/arm/vfp_helper.c
22
+++ b/target/arm/vfp_helper.c
23
@@ -XXX,XX +XXX,XX @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
24
val &= 0xf7c0009f;
25
}
26
27
+ vfp_set_fpscr_to_host(env, val);
28
+
29
/*
30
* We don't implement trapped exception handling, so the
31
* trap enable bits, IDE|IXE|UFE|OFE|DZE|IOE are all RAZ/WI (not RES0!)
32
@@ -XXX,XX +XXX,XX @@ void HELPER(vfp_set_fpscr)(CPUARMState *env, uint32_t val)
33
env->vfp.qc[1] = 0;
34
env->vfp.qc[2] = 0;
35
env->vfp.qc[3] = 0;
36
-
37
- vfp_set_fpscr_to_host(env, val);
38
}
39
40
void vfp_set_fpscr(CPUARMState *env, uint32_t val)
41
--
42
2.20.1
43
44
diff view generated by jsdifflib