|
From: | Richard Henderson |
Subject: | Re: [RFC v12 50/65] target/arm: cpu-sve: new module |
Date: | Sun, 28 Mar 2021 12:05:49 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 |
On 3/26/21 1:36 PM, Claudio Fontana wrote:
extract the SVE-related cpu object properties and functions, and move them to a separate module. Disentangle SVE from pauth that is a separate, TCG-only feature.
Nit: pauth is not tcg-only, but the properties selecting the pauth hash are tcg only. For kvm, you get whatever the hardware implements.
#ifdef TARGET_AARCH64 # define ARM_MAX_VQ 16 -void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp); -void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp); #else # define ARM_MAX_VQ 1 -static inline void arm_cpu_sve_finalize(ARMCPU *cpu, Error **errp) { } -static inline void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp) { } -#endif +#endif /* TARGET_AARCH64 */typedef struct ARMVectorReg {uint64_t d[2 * ARM_MAX_VQ] QEMU_ALIGNED(16); @@ -219,10 +216,13 @@ typedef struct ARMPredicateReg { uint64_t p[DIV_ROUND_UP(2 * ARM_MAX_VQ, 8)] QEMU_ALIGNED(16); } ARMPredicateReg;+void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp);/* In AArch32 mode, PAC keys do not exist at all. */ typedef struct ARMPACKey { uint64_t lo, hi; } ARMPACKey; +#else +static inline void arm_cpu_pauth_finalize(ARMCPU *cpu, Error **errp) { } #endif
Also: you have not in fact disentangled anything.You've merely moved the entanglement from one aarch64 block containing sve and pauth stuff, to another aarch64 block containing sve and pauth stuff.
+void cpu_sve_finalize_features(ARMCPU *cpu, Error **errp)
Again with the move+rename in the same patch. Don't. r~
[Prev in Thread] | Current Thread | [Next in Thread] |