qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v9 02/10] target/arm: Move 64-bit TCG CPUs into tcg/


From: Peter Maydell
Subject: Re: [PATCH v9 02/10] target/arm: Move 64-bit TCG CPUs into tcg/
Date: Tue, 11 Apr 2023 14:25:53 +0100

On Mon, 13 Mar 2023 at 15:11, Fabiano Rosas <farosas@suse.de> wrote:
>
> Move the 64-bit CPUs that are TCG-only:
> - cortex-a35
> - cortex-a55
> - cortex-a72
> - cortex-a76
> - a64fx
> - neoverse-n1
>
> Keep the CPUs that can be used with KVM:
> - cortex-a57
> - cortex-a53
> - max
> - host
>
> For the special case "max" CPU, there's a nuance that while KVM/HVF
> use the "host" model instead, we still cannot move all of the TCG code
> into the tcg directory because the qtests might reach the !kvm && !hvf
> branch. Keep the cortex_a57_initfn() call to cover that scenario.

> -static void cpu_max_set_sve_max_vq(Object *obj, Visitor *v, const char *name,
> -                                   void *opaque, Error **errp)
> -{
> -    ARMCPU *cpu = ARM_CPU(obj);
> -    uint32_t max_vq;
> -
> -    if (!visit_type_uint32(v, name, &max_vq, errp)) {
> -        return;
> -    }
> -
> -    if (kvm_enabled() && !kvm_arm_sve_supported()) {
> -        error_setg(errp, "cannot set sve-max-vq");
> -        error_append_hint(errp, "SVE not supported by KVM on this host\n");
> -        return;
> -    }
> -
> -    if (max_vq == 0 || max_vq > ARM_MAX_VQ) {
> -        error_setg(errp, "unsupported SVE vector length");
> -        error_append_hint(errp, "Valid sve-max-vq in range [1-%d]\n",
> -                          ARM_MAX_VQ);
> -        return;
> -    }
> -
> -    cpu->sve_max_vq = max_vq;
> -}

The deleted code has 3 if() conditions...

> +static void cpu_max_set_sve_max_vq(Object *obj, Visitor *v, const char *name,
> +                                   void *opaque, Error **errp)
> +{
> +    ARMCPU *cpu = ARM_CPU(obj);
> +    uint32_t max_vq;
> +
> +    if (!visit_type_uint32(v, name, &max_vq, errp)) {
> +        return;
> +    }
> +
> +    if (max_vq == 0 || max_vq > ARM_MAX_VQ) {
> +        error_setg(errp, "unsupported SVE vector length");
> +        error_append_hint(errp, "Valid sve-max-vq in range [1-%d]\n",
> +                          ARM_MAX_VQ);
> +        return;
> +    }
> +
> +    cpu->sve_max_vq = max_vq;
> +}

...but the version of the function moved into the new file
has only 2. What's going on here?

Anyway, this fails to apply to current head of git.
I had a go at trying to sort it out but gave up when I
found this place where what looks like it's basically
just a "move code around" patch is actually also making
code changes.

Please can you rebase your series and rearrange it so
you aren't making code changes in the middle of
+700-700 patches?

thanks
-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]