1 | Only thing for Arm for rc1 is RTH's fix for the KVM SVE probe code. | 1 | v1->v2 changes: drop the "convert FEATURE_THUMB2EE" patch as |
---|---|---|---|
2 | it broke compilation on arm hosts (conversion of KVM related | ||
3 | code had been forgotten) | ||
2 | 4 | ||
5 | thanks | ||
3 | -- PMM | 6 | -- PMM |
4 | 7 | ||
5 | The following changes since commit 4e06b3fc1b5e1ec03f22190eabe56891dc9c2236: | 8 | The following changes since commit 13399aad4fa87b2878c49d02a5d3bafa6c966ba3: |
6 | 9 | ||
7 | Merge tag 'pull-hex-20220731' of https://github.com/quic/qemu into staging (2022-07-31 21:38:54 -0700) | 10 | Merge remote-tracking branch 'remotes/armbru/tags/pull-error-2018-10-22' into staging (2018-10-23 17:20:23 +0100) |
8 | 11 | ||
9 | are available in the Git repository at: | 12 | are available in the Git repository at: |
10 | 13 | ||
11 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20220801 | 14 | https://git.linaro.org/people/pmaydell/qemu-arm.git tags/pull-target-arm-20181024 |
12 | 15 | ||
13 | for you to fetch changes up to 5265d24c981dfdda8d29b44f7e84a514da75eedc: | 16 | for you to fetch changes up to 93f379b0c43617b1361f742f261479eaed4959cb: |
14 | 17 | ||
15 | target/arm: Move sve probe inside kvm >= 4.15 branch (2022-08-01 16:21:18 +0100) | 18 | target/arm: Only flush tlb if ASID changes (2018-10-24 07:51:37 +0100) |
16 | 19 | ||
17 | ---------------------------------------------------------------- | 20 | ---------------------------------------------------------------- |
18 | target-arm queue: | 21 | target-arm queue: |
19 | * Fix KVM SVE ID register probe code | 22 | * ssi-sd: Make devices picking up backends unavailable with -device |
23 | * Add support for VCPU event states | ||
24 | * Move towards making ID registers the source of truth for | ||
25 | whether a guest CPU implements a feature, rather than having | ||
26 | parallel ID registers and feature bit flags | ||
27 | * Implement various HCR hypervisor trap/config bits | ||
28 | * Get IL bit correct for v7 syndrome values | ||
29 | * Report correct syndrome for FP/SIMD traps to Hyp mode | ||
30 | * hw/arm/boot: Increase compliance with kernel arm64 boot protocol | ||
31 | * Refactor A32 Neon to use generic vector infrastructure | ||
32 | * Fix a bug in A32 VLD2 "(multiple 2-element structures)" insn | ||
33 | * net: cadence_gem: Report features correctly in ID register | ||
34 | * Avoid some unnecessary TLB flushes on TTBR register writes | ||
20 | 35 | ||
21 | ---------------------------------------------------------------- | 36 | ---------------------------------------------------------------- |
22 | Richard Henderson (3): | 37 | Dongjiu Geng (1): |
23 | target/arm: Use kvm_arm_sve_supported in kvm_arm_get_host_cpu_features | 38 | target/arm: Add support for VCPU event states |
24 | target/arm: Set KVM_ARM_VCPU_SVE while probing the host | ||
25 | target/arm: Move sve probe inside kvm >= 4.15 branch | ||
26 | 39 | ||
27 | target/arm/kvm64.c | 45 ++++++++++++++++++++++----------------------- | 40 | Edgar E. Iglesias (2): |
28 | 1 file changed, 22 insertions(+), 23 deletions(-) | 41 | net: cadence_gem: Announce availability of priority queues |
42 | net: cadence_gem: Announce 64bit addressing support | ||
43 | |||
44 | Markus Armbruster (1): | ||
45 | ssi-sd: Make devices picking up backends unavailable with -device | ||
46 | |||
47 | Peter Maydell (10): | ||
48 | target/arm: Improve debug logging of AArch32 exception return | ||
49 | target/arm: Make switch_mode() file-local | ||
50 | target/arm: Implement HCR.FB | ||
51 | target/arm: Implement HCR.DC | ||
52 | target/arm: ISR_EL1 bits track virtual interrupts if IMO/FMO set | ||
53 | target/arm: Implement HCR.VI and VF | ||
54 | target/arm: Implement HCR.PTW | ||
55 | target/arm: New utility function to extract EC from syndrome | ||
56 | target/arm: Get IL bit correct for v7 syndrome values | ||
57 | target/arm: Report correct syndrome for FP/SIMD traps to Hyp mode | ||
58 | |||
59 | Richard Henderson (29): | ||
60 | target/arm: Move some system registers into a substructure | ||
61 | target/arm: V8M should not imply V7VE | ||
62 | target/arm: Convert v8 extensions from feature bits to isar tests | ||
63 | target/arm: Convert division from feature bits to isar0 tests | ||
64 | target/arm: Convert jazelle from feature bit to isar1 test | ||
65 | target/arm: Convert sve from feature bit to aa64pfr0 test | ||
66 | target/arm: Convert v8.2-fp16 from feature bit to aa64pfr0 test | ||
67 | target/arm: Hoist address increment for vector memory ops | ||
68 | target/arm: Don't call tcg_clear_temp_count | ||
69 | target/arm: Use tcg_gen_gvec_dup_i64 for LD[1-4]R | ||
70 | target/arm: Promote consecutive memory ops for aa64 | ||
71 | target/arm: Mark some arrays const | ||
72 | target/arm: Use gvec for NEON VDUP | ||
73 | target/arm: Use gvec for NEON VMOV, VMVN, VBIC & VORR (immediate) | ||
74 | target/arm: Use gvec for NEON_3R_LOGIC insns | ||
75 | target/arm: Use gvec for NEON_3R_VADD_VSUB insns | ||
76 | target/arm: Use gvec for NEON_2RM_VMN, NEON_2RM_VNEG | ||
77 | target/arm: Use gvec for NEON_3R_VMUL | ||
78 | target/arm: Use gvec for VSHR, VSHL | ||
79 | target/arm: Use gvec for VSRA | ||
80 | target/arm: Use gvec for VSRI, VSLI | ||
81 | target/arm: Use gvec for NEON_3R_VML | ||
82 | target/arm: Use gvec for NEON_3R_VTST_VCEQ, NEON_3R_VCGT, NEON_3R_VCGE | ||
83 | target/arm: Use gvec for NEON VLD all lanes | ||
84 | target/arm: Reorg NEON VLD/VST all elements | ||
85 | target/arm: Promote consecutive memory ops for aa32 | ||
86 | target/arm: Reorg NEON VLD/VST single element to one lane | ||
87 | target/arm: Remove writefn from TTBR0_EL3 | ||
88 | target/arm: Only flush tlb if ASID changes | ||
89 | |||
90 | Stewart Hildebrand (1): | ||
91 | hw/arm/boot: Increase compliance with kernel arm64 boot protocol | ||
92 | |||
93 | target/arm/cpu.h | 221 ++++++- | ||
94 | target/arm/internals.h | 45 +- | ||
95 | target/arm/kvm_arm.h | 24 + | ||
96 | target/arm/translate.h | 21 + | ||
97 | hw/arm/boot.c | 18 + | ||
98 | hw/intc/armv7m_nvic.c | 12 +- | ||
99 | hw/net/cadence_gem.c | 9 +- | ||
100 | hw/sd/ssi-sd.c | 2 + | ||
101 | linux-user/aarch64/signal.c | 4 +- | ||
102 | linux-user/elfload.c | 58 +- | ||
103 | linux-user/syscall.c | 10 +- | ||
104 | target/arm/cpu.c | 238 +++---- | ||
105 | target/arm/cpu64.c | 148 +++-- | ||
106 | target/arm/helper.c | 395 ++++++++---- | ||
107 | target/arm/kvm.c | 60 ++ | ||
108 | target/arm/kvm32.c | 13 + | ||
109 | target/arm/kvm64.c | 15 +- | ||
110 | target/arm/machine.c | 25 +- | ||
111 | target/arm/op_helper.c | 2 +- | ||
112 | target/arm/translate-a64.c | 715 ++++----------------- | ||
113 | target/arm/translate.c | 1451 ++++++++++++++++++++++++++++--------------- | ||
114 | 21 files changed, 2013 insertions(+), 1473 deletions(-) | ||
115 | diff view generated by jsdifflib |
Deleted patch | |||
---|---|---|---|
1 | From: Richard Henderson <richard.henderson@linaro.org> | ||
2 | 1 | ||
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 |
Deleted patch | |||
---|---|---|---|
1 | From: Richard Henderson <richard.henderson@linaro.org> | ||
2 | 1 | ||
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 |
Deleted patch | |||
---|---|---|---|
1 | From: Richard Henderson <richard.henderson@linaro.org> | ||
2 | 1 | ||
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 |