[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PULL 04/11] target/arm/cpu64: max cpu: Introduce sve<N> properties
From: |
Peter Maydell |
Subject: |
Re: [PULL 04/11] target/arm/cpu64: max cpu: Introduce sve<N> properties |
Date: |
Tue, 12 Nov 2019 10:23:38 +0000 |
On Fri, 1 Nov 2019 at 08:51, Peter Maydell <address@hidden> wrote:
>
> From: Andrew Jones <address@hidden>
>
> Introduce cpu properties to give fine control over SVE vector lengths.
> We introduce a property for each valid length up to the current
> maximum supported, which is 2048-bits. The properties are named, e.g.
> sve128, sve256, sve384, sve512, ..., where the number is the number of
> bits. See the updates to docs/arm-cpu-features.rst for a description
> of the semantics and for example uses.
>
Hi; Coverity complains (CID 1407217) about an "overflowed return value":
> +static uint32_t sve_zcr_get_valid_len(ARMCPU *cpu, uint32_t start_len)
> +{
> + uint32_t start_vq = (start_len & 0xf) + 1;
> +
> + return arm_cpu_vq_map_next_smaller(cpu, start_vq + 1) - 1;
"Subtract operation overflows on operands
arm_cpu_vq_map_next_smaller(cpu, start_vq + 1U) and 1U"
Certainly it looks as if arm_cpu_vq_map_next_smaller() can
return 0, and claiming the valid length to be UINT_MAX
seems a bit odd in that case.
thanks
-- PMM
- [PULL 02/11] tests: arm: Introduce cpu feature tests, (continued)
- [PULL 02/11] tests: arm: Introduce cpu feature tests, Peter Maydell, 2019/11/01
- [PULL 03/11] target/arm: Allow SVE to be disabled via a CPU property, Peter Maydell, 2019/11/01
- [PULL 05/11] target/arm/kvm64: Add kvm_arch_get/put_sve, Peter Maydell, 2019/11/01
- [PULL 10/11] hw/arm/boot: Rebuild hflags when modifying CPUState at boot, Peter Maydell, 2019/11/01
- [PULL 06/11] target/arm/kvm64: max cpu: Enable SVE when available, Peter Maydell, 2019/11/01
- [PULL 09/11] target/arm/kvm: host cpu: Add support for sve<N> properties, Peter Maydell, 2019/11/01
- [PULL 01/11] target/arm/monitor: Introduce qmp_query_cpu_model_expansion, Peter Maydell, 2019/11/01
- [PULL 11/11] target/arm: Allow reading flags from FPSCR for M-profile, Peter Maydell, 2019/11/01
- [PULL 07/11] target/arm/kvm: scratch vcpu: Preserve input kvm_vcpu_init features, Peter Maydell, 2019/11/01
- [PULL 04/11] target/arm/cpu64: max cpu: Introduce sve<N> properties, Peter Maydell, 2019/11/01
- Re: [PULL 04/11] target/arm/cpu64: max cpu: Introduce sve<N> properties,
Peter Maydell <=
[PULL 08/11] target/arm/cpu64: max cpu: Support sve properties with KVM, Peter Maydell, 2019/11/01
Re: [PULL 00/11] target-arm queue, Peter Maydell, 2019/11/01