1 | Changes from v1: dropped SVE patchset. | 1 | Only thing for Arm for rc1 is RTH's fix for the KVM SVE probe code. |
---|---|---|---|
2 | 2 | ||
3 | The following changes since commit 58560ad254fbda71d4daa6622d71683190070ee2: | 3 | -- PMM |
4 | 4 | ||
5 | Merge remote-tracking branch 'remotes/dgibson/tags/ppc-for-4.2-20191024' into staging (2019-10-24 16:22:58 +0100) | 5 | The following changes since commit 4e06b3fc1b5e1ec03f22190eabe56891dc9c2236: |
6 | |||
7 | Merge tag 'pull-hex-20220731' of https://github.com/quic/qemu into staging (2022-07-31 21:38:54 -0700) | ||
6 | 8 | ||
7 | are available in the Git repository at: | 9 | are available in the Git repository at: |
8 | 10 | ||
9 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20191025 | 11 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220801 |
10 | 12 | ||
11 | for you to fetch changes up to f9469c1a01c333c08980e083e0ad3417256c8b9c: | 13 | for you to fetch changes up to 5265d24c981dfdda8d29b44f7e84a514da75eedc: |
12 | 14 | ||
13 | hw/arm/highbank: Use AddressSpace when using write_secondary_boot() (2019-10-25 13:09:27 +0100) | 15 | target/arm: Move sve probe inside kvm >= 4.15 branch (2022-08-01 16:21:18 +0100) |
14 | 16 | ||
15 | ---------------------------------------------------------------- | 17 | ---------------------------------------------------------------- |
16 | target-arm queue: | 18 | target-arm queue: |
17 | * raspi boards: some cleanup | 19 | * Fix KVM SVE ID register probe code |
18 | * raspi: implement the bcm2835 system timer device | ||
19 | * raspi: implement a dummy thermal sensor | ||
20 | * misc devices: switch to ptimer transaction API | ||
21 | * cache TB flag state to improve performance of cpu_get_tb_cpu_state | ||
22 | * aspeed: Add an AST2600 eval board | ||
23 | 20 | ||
24 | ---------------------------------------------------------------- | 21 | ---------------------------------------------------------------- |
25 | Cédric Le Goater (2): | 22 | Richard Henderson (3): |
26 | hw/gpio: Fix property accessors of the AST2600 GPIO 1.8V model | 23 | target/arm: Use kvm_arm_sve_supported in kvm_arm_get_host_cpu_features |
27 | aspeed: Add an AST2600 eval board | 24 | target/arm: Set KVM_ARM_VCPU_SVE while probing the host |
25 | target/arm: Move sve probe inside kvm >= 4.15 branch | ||
28 | 26 | ||
29 | Peter Maydell (8): | 27 | target/arm/kvm64.c | 45 ++++++++++++++++++++++----------------------- |
30 | hw/net/fsl_etsec/etsec.c: Switch to transaction-based ptimer API | 28 | 1 file changed, 22 insertions(+), 23 deletions(-) |
31 | hw/timer/xilinx_timer.c: Switch to transaction-based ptimer API | ||
32 | hw/dma/xilinx_axidma.c: Switch to transaction-based ptimer API | ||
33 | hw/timer/slavio_timer: Remove useless check for NULL t->timer | ||
34 | hw/timer/slavio_timer.c: Switch to transaction-based ptimer API | ||
35 | hw/timer/grlib_gptimer.c: Switch to transaction-based ptimer API | ||
36 | hw/m68k/mcf5206.c: Switch to transaction-based ptimer API | ||
37 | hw/watchdog/milkymist-sysctl.c: Switch to transaction-based ptimer API | ||
38 | |||
39 | Philippe Mathieu-Daudé (8): | ||
40 | hw/misc/bcm2835_thermal: Add a dummy BCM2835 thermal sensor | ||
41 | hw/arm/bcm2835_peripherals: Use the thermal sensor block | ||
42 | hw/timer/bcm2835: Add the BCM2835 SYS_timer | ||
43 | hw/arm/bcm2835_peripherals: Use the SYS_timer | ||
44 | hw/arm/bcm2836: Make the SoC code modular | ||
45 | hw/arm/bcm2836: Rename cpus[] as cpu[].core | ||
46 | hw/arm/raspi: Use AddressSpace when using arm_boot::write_secondary_boot | ||
47 | hw/arm/highbank: Use AddressSpace when using write_secondary_boot() | ||
48 | |||
49 | Richard Henderson (24): | ||
50 | target/arm: Split out rebuild_hflags_common | ||
51 | target/arm: Split out rebuild_hflags_a64 | ||
52 | target/arm: Split out rebuild_hflags_common_32 | ||
53 | target/arm: Split arm_cpu_data_is_big_endian | ||
54 | target/arm: Split out rebuild_hflags_m32 | ||
55 | target/arm: Reduce tests vs M-profile in cpu_get_tb_cpu_state | ||
56 | target/arm: Split out rebuild_hflags_a32 | ||
57 | target/arm: Split out rebuild_hflags_aprofile | ||
58 | target/arm: Hoist XSCALE_CPAR, VECLEN, VECSTRIDE in cpu_get_tb_cpu_state | ||
59 | target/arm: Simplify set of PSTATE_SS in cpu_get_tb_cpu_state | ||
60 | target/arm: Hoist computation of TBFLAG_A32.VFPEN | ||
61 | target/arm: Add arm_rebuild_hflags | ||
62 | target/arm: Split out arm_mmu_idx_el | ||
63 | target/arm: Hoist store to cs_base in cpu_get_tb_cpu_state | ||
64 | target/arm: Add HELPER(rebuild_hflags_{a32, a64, m32}) | ||
65 | target/arm: Rebuild hflags at EL changes | ||
66 | target/arm: Rebuild hflags at MSR writes | ||
67 | target/arm: Rebuild hflags at CPSR writes | ||
68 | target/arm: Rebuild hflags at Xscale SCTLR writes | ||
69 | target/arm: Rebuild hflags for M-profile | ||
70 | target/arm: Rebuild hflags for M-profile NVIC | ||
71 | linux-user/aarch64: Rebuild hflags for TARGET_WORDS_BIGENDIAN | ||
72 | linux-user/arm: Rebuild hflags for TARGET_WORDS_BIGENDIAN | ||
73 | target/arm: Rely on hflags correct in cpu_get_tb_cpu_state | ||
74 | |||
75 | hw/misc/Makefile.objs | 1 + | ||
76 | hw/timer/Makefile.objs | 1 + | ||
77 | hw/net/fsl_etsec/etsec.h | 1 - | ||
78 | include/hw/arm/aspeed.h | 1 + | ||
79 | include/hw/arm/bcm2835_peripherals.h | 5 +- | ||
80 | include/hw/arm/bcm2836.h | 4 +- | ||
81 | include/hw/arm/raspi_platform.h | 1 + | ||
82 | include/hw/misc/bcm2835_thermal.h | 27 +++ | ||
83 | include/hw/timer/bcm2835_systmr.h | 33 +++ | ||
84 | target/arm/cpu.h | 84 +++++--- | ||
85 | target/arm/helper.h | 4 + | ||
86 | target/arm/internals.h | 9 + | ||
87 | hw/arm/aspeed.c | 23 ++ | ||
88 | hw/arm/bcm2835_peripherals.c | 30 ++- | ||
89 | hw/arm/bcm2836.c | 44 ++-- | ||
90 | hw/arm/highbank.c | 3 +- | ||
91 | hw/arm/raspi.c | 14 +- | ||
92 | hw/dma/xilinx_axidma.c | 9 +- | ||
93 | hw/gpio/aspeed_gpio.c | 8 +- | ||
94 | hw/intc/armv7m_nvic.c | 22 +- | ||
95 | hw/m68k/mcf5206.c | 15 +- | ||
96 | hw/misc/bcm2835_thermal.c | 135 ++++++++++++ | ||
97 | hw/net/fsl_etsec/etsec.c | 9 +- | ||
98 | hw/timer/bcm2835_systmr.c | 163 +++++++++++++++ | ||
99 | hw/timer/grlib_gptimer.c | 28 ++- | ||
100 | hw/timer/milkymist-sysctl.c | 25 ++- | ||
101 | hw/timer/slavio_timer.c | 32 ++- | ||
102 | hw/timer/xilinx_timer.c | 13 +- | ||
103 | linux-user/aarch64/cpu_loop.c | 1 + | ||
104 | linux-user/arm/cpu_loop.c | 1 + | ||
105 | linux-user/syscall.c | 1 + | ||
106 | target/arm/cpu.c | 1 + | ||
107 | target/arm/helper-a64.c | 3 + | ||
108 | target/arm/helper.c | 393 +++++++++++++++++++++++------------ | ||
109 | target/arm/m_helper.c | 6 + | ||
110 | target/arm/machine.c | 1 + | ||
111 | target/arm/op_helper.c | 4 + | ||
112 | target/arm/translate-a64.c | 13 +- | ||
113 | target/arm/translate.c | 33 ++- | ||
114 | hw/timer/trace-events | 5 + | ||
115 | 40 files changed, 945 insertions(+), 261 deletions(-) | ||
116 | create mode 100644 include/hw/misc/bcm2835_thermal.h | ||
117 | create mode 100644 include/hw/timer/bcm2835_systmr.h | ||
118 | create mode 100644 hw/misc/bcm2835_thermal.c | ||
119 | create mode 100644 hw/timer/bcm2835_systmr.c | ||
120 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Richard Henderson <richard.henderson@linaro.org> | ||
1 | 2 | ||
3 | Indication for support for SVE will not depend on whether we | ||
4 | perform the query on the main kvm_state or the temp vcpu. | ||
5 | |||
6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
7 | Message-id: 20220726045828.53697-2-richard.henderson@linaro.org | ||
8 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
10 | --- | ||
11 | target/arm/kvm64.c | 2 +- | ||
12 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c | ||
15 | index XXXXXXX..XXXXXXX 100644 | ||
16 | --- a/target/arm/kvm64.c | ||
17 | +++ b/target/arm/kvm64.c | ||
18 | @@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) | ||
19 | } | ||
20 | } | ||
21 | |||
22 | - sve_supported = ioctl(fdarray[0], KVM_CHECK_EXTENSION, KVM_CAP_ARM_SVE) > 0; | ||
23 | + sve_supported = kvm_arm_sve_supported(); | ||
24 | |||
25 | /* Add feature bits that can't appear until after VCPU init. */ | ||
26 | if (sve_supported) { | ||
27 | -- | ||
28 | 2.25.1 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Richard Henderson <richard.henderson@linaro.org> | ||
1 | 2 | ||
3 | Because we weren't setting this flag, our probe of ID_AA64ZFR0 | ||
4 | was always returning zero. This also obviates the adjustment | ||
5 | of ID_AA64PFR0, which had sanitized the SVE field. | ||
6 | |||
7 | The effects of the bug are not visible, because the only thing that | ||
8 | ID_AA64ZFR0 is used for within qemu at present is tcg translation. | ||
9 | The other tests for SVE within KVM are via ID_AA64PFR0.SVE. | ||
10 | |||
11 | Reported-by: Zenghui Yu <yuzenghui@huawei.com> | ||
12 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
13 | Message-id: 20220726045828.53697-3-richard.henderson@linaro.org | ||
14 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
15 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
16 | --- | ||
17 | target/arm/kvm64.c | 27 +++++++++++++-------------- | ||
18 | 1 file changed, 13 insertions(+), 14 deletions(-) | ||
19 | |||
20 | diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c | ||
21 | index XXXXXXX..XXXXXXX 100644 | ||
22 | --- a/target/arm/kvm64.c | ||
23 | +++ b/target/arm/kvm64.c | ||
24 | @@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) | ||
25 | bool sve_supported; | ||
26 | bool pmu_supported = false; | ||
27 | uint64_t features = 0; | ||
28 | - uint64_t t; | ||
29 | int err; | ||
30 | |||
31 | /* Old kernels may not know about the PREFERRED_TARGET ioctl: however | ||
32 | @@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) | ||
33 | struct kvm_vcpu_init init = { .target = -1, }; | ||
34 | |||
35 | /* | ||
36 | - * Ask for Pointer Authentication if supported. We can't play the | ||
37 | - * SVE trick of synthesising the ID reg as KVM won't tell us | ||
38 | - * whether we have the architected or IMPDEF version of PAuth, so | ||
39 | - * we have to use the actual ID regs. | ||
40 | + * Ask for SVE if supported, so that we can query ID_AA64ZFR0, | ||
41 | + * which is otherwise RAZ. | ||
42 | + */ | ||
43 | + sve_supported = kvm_arm_sve_supported(); | ||
44 | + if (sve_supported) { | ||
45 | + init.features[0] |= 1 << KVM_ARM_VCPU_SVE; | ||
46 | + } | ||
47 | + | ||
48 | + /* | ||
49 | + * Ask for Pointer Authentication if supported, so that we get | ||
50 | + * the unsanitized field values for AA64ISAR1_EL1. | ||
51 | */ | ||
52 | if (kvm_arm_pauth_supported()) { | ||
53 | init.features[0] |= (1 << KVM_ARM_VCPU_PTRAUTH_ADDRESS | | ||
54 | @@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) | ||
55 | } | ||
56 | } | ||
57 | |||
58 | - sve_supported = kvm_arm_sve_supported(); | ||
59 | - | ||
60 | - /* Add feature bits that can't appear until after VCPU init. */ | ||
61 | if (sve_supported) { | ||
62 | - t = ahcf->isar.id_aa64pfr0; | ||
63 | - t = FIELD_DP64(t, ID_AA64PFR0, SVE, 1); | ||
64 | - ahcf->isar.id_aa64pfr0 = t; | ||
65 | - | ||
66 | /* | ||
67 | * There is a range of kernels between kernel commit 73433762fcae | ||
68 | * and f81cb2c3ad41 which have a bug where the kernel doesn't expose | ||
69 | * SYS_ID_AA64ZFR0_EL1 via the ONE_REG API unless the VM has enabled | ||
70 | - * SVE support, so we only read it here, rather than together with all | ||
71 | - * the other ID registers earlier. | ||
72 | + * SVE support, which resulted in an error rather than RAZ. | ||
73 | + * So only read the register if we set KVM_ARM_VCPU_SVE above. | ||
74 | */ | ||
75 | err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64zfr0, | ||
76 | ARM64_SYS_REG(3, 0, 0, 4, 4)); | ||
77 | -- | ||
78 | 2.25.1 | diff view generated by jsdifflib |
New patch | |||
---|---|---|---|
1 | From: Richard Henderson <richard.henderson@linaro.org> | ||
1 | 2 | ||
3 | The test for the IF block indicates no ID registers are exposed, much | ||
4 | less host support for SVE. Move the SVE probe into the ELSE block. | ||
5 | |||
6 | Signed-off-by: Richard Henderson <richard.henderson@linaro.org> | ||
7 | Message-id: 20220726045828.53697-4-richard.henderson@linaro.org | ||
8 | Reviewed-by: Peter Maydell <peter.maydell@linaro.org> | ||
9 | Signed-off-by: Peter Maydell <peter.maydell@linaro.org> | ||
10 | --- | ||
11 | target/arm/kvm64.c | 22 +++++++++++----------- | ||
12 | 1 file changed, 11 insertions(+), 11 deletions(-) | ||
13 | |||
14 | diff --git a/target/arm/kvm64.c b/target/arm/kvm64.c | ||
15 | index XXXXXXX..XXXXXXX 100644 | ||
16 | --- a/target/arm/kvm64.c | ||
17 | +++ b/target/arm/kvm64.c | ||
18 | @@ -XXX,XX +XXX,XX @@ bool kvm_arm_get_host_cpu_features(ARMHostCPUFeatures *ahcf) | ||
19 | err |= read_sys_reg64(fdarray[2], &ahcf->isar.reset_pmcr_el0, | ||
20 | ARM64_SYS_REG(3, 3, 9, 12, 0)); | ||
21 | } | ||
22 | - } | ||
23 | |||
24 | - if (sve_supported) { | ||
25 | - /* | ||
26 | - * There is a range of kernels between kernel commit 73433762fcae | ||
27 | - * and f81cb2c3ad41 which have a bug where the kernel doesn't expose | ||
28 | - * SYS_ID_AA64ZFR0_EL1 via the ONE_REG API unless the VM has enabled | ||
29 | - * SVE support, which resulted in an error rather than RAZ. | ||
30 | - * So only read the register if we set KVM_ARM_VCPU_SVE above. | ||
31 | - */ | ||
32 | - err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64zfr0, | ||
33 | - ARM64_SYS_REG(3, 0, 0, 4, 4)); | ||
34 | + if (sve_supported) { | ||
35 | + /* | ||
36 | + * There is a range of kernels between kernel commit 73433762fcae | ||
37 | + * and f81cb2c3ad41 which have a bug where the kernel doesn't | ||
38 | + * expose SYS_ID_AA64ZFR0_EL1 via the ONE_REG API unless the VM has | ||
39 | + * enabled SVE support, which resulted in an error rather than RAZ. | ||
40 | + * So only read the register if we set KVM_ARM_VCPU_SVE above. | ||
41 | + */ | ||
42 | + err |= read_sys_reg64(fdarray[2], &ahcf->isar.id_aa64zfr0, | ||
43 | + ARM64_SYS_REG(3, 0, 0, 4, 4)); | ||
44 | + } | ||
45 | } | ||
46 | |||
47 | kvm_arm_destroy_scratch_host_vcpu(fdarray); | ||
48 | -- | ||
49 | 2.25.1 | diff view generated by jsdifflib |