[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC v9 18/32] cpu: Move synchronize_from_tb() to tcg_ops
From: |
Claudio Fontana |
Subject: |
Re: [RFC v9 18/32] cpu: Move synchronize_from_tb() to tcg_ops |
Date: |
Wed, 9 Dec 2020 15:33:08 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.12.0 |
Hi Philippe,
On 12/9/20 10:27 AM, Philippe Mathieu-Daudé wrote:
> On 12/8/20 8:48 PM, Claudio Fontana wrote:
>> From: Eduardo Habkost <ehabkost@redhat.com>
>>
>> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
>> [claudio: wrapped in CONFIG_TCG]
>> Signed-off-by: Claudio Fontana <cfontana@suse.de>
>> Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
>> ---
> ...
>> diff --git a/include/hw/core/tcg-cpu-ops.h b/include/hw/core/tcg-cpu-ops.h
>> index 4475ef0996..109291ac52 100644
>> --- a/include/hw/core/tcg-cpu-ops.h
>> +++ b/include/hw/core/tcg-cpu-ops.h
>> @@ -10,9 +10,6 @@
>> #ifndef TCG_CPU_OPS_H
>> #define TCG_CPU_OPS_H
>
> Missing for TranslationBlock:
>
> #include "hw/core/cpu.h"
this file though is only included from hw/core/cpu.h itself under CONFIG_TCG..
>
>>
>> -/**
>> - * struct TcgCpuOperations: TCG operations specific to a CPU class
>> - */
>
> Why remove the comment?
a mistake, will fix.
>
>> typedef struct TcgCpuOperations {
>> /**
>> * @initialize: Initalize TCG state
>> @@ -20,6 +17,17 @@ typedef struct TcgCpuOperations {
>> * Called when the first CPU is realized.
>> */
>> void (*initialize)(void);
>> + /**
>> + * @synchronize_from_tb: Synchronize state from a TCG #TranslationBlock
>> + *
>> + * This is called when we abandon execution of a TB before
>> + * starting it, and must set all parts of the CPU state which
>> + * the previous TB in the chain may not have updated. This
>> + * will need to do more. If this hook is not implemented then
>> + * the default is to call
>> + * @set_pc(tb->pc).
>> + */
>> + void (*synchronize_from_tb)(CPUState *cpu, struct TranslationBlock *tb);
>> } TcgCpuOperations;
> ...
>
>
[RFC v9 19/32] cpu: Move cpu_exec_* to tcg_ops, Claudio Fontana, 2020/12/08
[RFC v9 24/32] cpu: move cc->transaction_failed to tcg_ops, Claudio Fontana, 2020/12/08