[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v14 15/22] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointe
From: |
Claudio Fontana |
Subject: |
Re: [PATCH v14 15/22] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass |
Date: |
Fri, 29 Jan 2021 10:00:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
On 1/29/21 1:31 AM, Richard Henderson wrote:
> On 1/27/21 11:28 PM, Claudio Fontana wrote:
>> + /*
>> + * NB: this should be covered by CONFIG_TCG, but it is unsafe to do it
>> here,
>> + * as this header is included by both ss_specific and ss_common code,
>> + * leading to potential differences in the data structure between
>> modules.
>> + * We could always keep it last, but it seems safer to just leave this
>> + * pointer NULL for non-TCG.
>> + */
>> + struct TCGCPUOps *tcg_ops;
>
> Sorry, I'm going to unqueue the patch set.
>
> I first thought this was fixing up something done already, fixing an existing
> bug.
>
> But it's something done in patch 1, and therefore the patch set needs to be
> re-worked to use this pointer to begin, for the exact reasons detailed above.
> Otherwise it would appear this breaks bisection.
>
>
> r~
>
Hi Richard,
I made sure that the previous patches actually work in practice,
ie the issue mentioned there does not actually happen in practice,
due to the purposeful placement of the field in the structure that might be
seen by one module
and not the other at the end of the structure, so no problem happens, and
bisection
is actually safe.
The warning and the change is due to the fact that changing things in the way
this patch
suggests makes it safer from _future changes_,
in which someone might add a new field at the end of the structure, after the
conditional fields,
which would actually break things.
Do you think I should redo the series anyway? I would have started this way in
the first place,
but I tried not to redo Eduardo's work.
Let me know what you think,
Thanks,
Claudio
- Re: [PATCH v14 18/22] accel: introduce AccelCPUClass extending CPUClass, (continued)
[PATCH v14 13/22] cpu: move adjust_watchpoint_address to tcg_ops, Claudio Fontana, 2021/01/28
[PATCH v14 21/22] hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn, Claudio Fontana, 2021/01/28
[PATCH v14 22/22] accel: introduce new accessor functions, Claudio Fontana, 2021/01/28
[PATCH v14 19/22] i386: split cpu accelerators from cpu.c, using AccelCPUClass, Claudio Fontana, 2021/01/28
[PATCH v14 17/22] accel: replace struct CpusAccel with AccelOpsClass, Claudio Fontana, 2021/01/28
[PATCH v14 20/22] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn, Claudio Fontana, 2021/01/28
[PATCH v14 15/22] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass, Claudio Fontana, 2021/01/28
- Re: [PATCH v14 15/22] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass, Richard Henderson, 2021/01/28
- Re: [PATCH v14 15/22] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass,
Claudio Fontana <=
- Re: [PATCH v14 15/22] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass, Richard Henderson, 2021/01/29
- Re: [PATCH v14 15/22] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass, Eduardo Habkost, 2021/01/29
- Re: [PATCH v14 15/22] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass, Claudio Fontana, 2021/01/30
Re: [PATCH v14 00/22] i386 cleanup PART 2, Richard Henderson, 2021/01/28