[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v15 15/23] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointe
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v15 15/23] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass |
Date: |
Wed, 3 Feb 2021 15:48:12 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 2/3/21 3:41 PM, Claudio Fontana wrote:
> On 2/3/21 2:23 PM, Alex Bennée wrote:
>> Claudio Fontana <cfontana@suse.de> writes:
...
>> /*
>> modified target/arm/cpu.c
>> @@ -2248,7 +2248,7 @@ static gchar *arm_gdb_arch_name(CPUState *cs)
>> * NB: cannot be const, as some elements are changed for specific
>> * arm cpu classes.
>> */
>> -static struct TCGCPUOps arm_tcg_ops = {
>> +static const struct TCGCPUOps arm_tcg_ops = {
>> .initialize = arm_translate_init,
>> .synchronize_from_tb = arm_cpu_synchronize_from_tb,
>> .cpu_exec_interrupt = arm_cpu_exec_interrupt,
>> --8<---------------cut here---------------end--------------->8---
>>
>> This does later break MIPS jazz:
>>
>> p/hw_mips_jazz.c.o -c ../../hw/mips/jazz.c
>> ../../hw/mips/jazz.c: In function ‘mips_jazz_init’:
>> ../../hw/mips/jazz.c:216:40: error: assignment of member
>> ‘do_transaction_failed’ in read-only object
>> cc->tcg_ops->do_transaction_failed = mips_jazz_do_transaction_failed;
>>
>> which...
>>
>> <snip>
>>>
>>> +#ifdef CONFIG_TCG
>>> +#include "hw/core/tcg-cpu-ops.h"
>>> +/*
>>> + * NB: cannot be const, as some elements are changed for specific
>>> + * mips hardware (see hw/mips/jazz.c).
>>> + */
>>
>> does have a valid comment. So guess keep it as static and just don't
>> claim ARM hacks around with it or find a more elegant solution for the
>> Jazz hack (I'm not sure there is one).
>
> Yep, the ARM claim was true when I started looking at this, but now it's not
> anymore after the changes.
>
> However, I haven't found a way to remove the mips jazz hack.
>
> Maybe Philippe knows?
We need to test the real behavior on real hardware.
Eventually writing the test and asking on linux-mips@vger.kernel.org
if someone can run it?
- [PATCH v15 12/23] physmem: make watchpoint checking code TCG-only, (continued)
- [PATCH v15 12/23] physmem: make watchpoint checking code TCG-only, Claudio Fontana, 2021/02/01
- [PATCH v15 14/23] cpu: move debug_check_watchpoint to tcg_ops, Claudio Fontana, 2021/02/01
- [PATCH v15 16/23] accel: extend AccelState and AccelClass to user-mode, Claudio Fontana, 2021/02/01
- [PATCH v15 22/23] accel: introduce new accessor functions, Claudio Fontana, 2021/02/01
- [PATCH v15 15/23] cpu: tcg_ops: move to tcg-cpu-ops.h, keep a pointer in CPUClass, Claudio Fontana, 2021/02/01
[PATCH v15 21/23] hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn, Claudio Fontana, 2021/02/01
- Re: [PATCH v15 21/23] hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn, Alex Bennée, 2021/02/03
- Re: [PATCH v15 21/23] hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn, Claudio Fontana, 2021/02/04
- Re: [PATCH v15 21/23] hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn, Philippe Mathieu-Daudé, 2021/02/04
- Re: [PATCH v15 21/23] hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn, Claudio Fontana, 2021/02/04
- Re: [PATCH v15 21/23] hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn, Peter Maydell, 2021/02/04
- Re: [PATCH v15 21/23] hw/core/cpu: call qemu_init_vcpu in cpu_common_realizefn, Claudio Fontana, 2021/02/04
[PATCH v15 19/23] i386: split cpu accelerators from cpu.c, using AccelCPUClass, Claudio Fontana, 2021/02/01