[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v15 22/23] accel: introduce new accessor functions
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH v15 22/23] accel: introduce new accessor functions |
Date: |
Wed, 3 Feb 2021 15:23:40 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 |
On 2/1/21 11:09 AM, Claudio Fontana wrote:
> avoid open coding the accesses to cpu->accel_cpu interfaces,
> and instead introduce:
>
> accel_cpu_instance_init,
> accel_cpu_realizefn
>
> to be used by the targets/ initfn code,
> and by cpu_exec_realizefn respectively.
>
> Add warnings about the use of target-specific headers.
>
> Signed-off-by: Claudio Fontana <cfontana@suse.de>
> ---
> include/hw/core/accel-cpu.h | 11 +++++++----
> include/qemu/accel.h | 13 +++++++++++++
> accel/accel-common.c | 19 +++++++++++++++++++
> cpu.c | 6 +-----
> target/i386/cpu.c | 9 ++-------
> 5 files changed, 42 insertions(+), 16 deletions(-)
>
> diff --git a/include/hw/core/accel-cpu.h b/include/hw/core/accel-cpu.h
> index c7c137dc9a..24a6697412 100644
> --- a/include/hw/core/accel-cpu.h
> +++ b/include/hw/core/accel-cpu.h
> @@ -1,5 +1,6 @@
> /*
> * Accelerator interface, specializes CPUClass
> + * This header is used only by target-specific code.
> *
> * Copyright 2021 SUSE LLC
> *
> @@ -11,10 +12,12 @@
> #define ACCEL_CPU_H
>
> /*
> - * these defines cannot be in cpu.h, because we are using
> - * CPU_RESOLVING_TYPE here.
> - * Use this header to define your accelerator-specific
> - * cpu-specific accelerator interfaces.
> + * This header is used to define new accelerator-specific target-specific
> + * accelerator cpu subclasses.
> + * It uses CPU_RESOLVING_TYPE, so this is clearly target-specific.
> + *
> + * Do not try to use for any other purpose than the implementation of new
> + * subclasses in target/, or the accel implementation itself in accel/
> */
Squash to patch #18 "accel: introduce AccelCPUClass extending CPUClass"?
- [PATCH v15 10/23] cpu: move cc->transaction_failed to tcg_ops, (continued)
- [PATCH v15 10/23] cpu: move cc->transaction_failed to tcg_ops, Claudio Fontana, 2021/02/01
- [PATCH v15 13/23] cpu: move adjust_watchpoint_address to tcg_ops, Claudio Fontana, 2021/02/01
- [PATCH v15 11/23] cpu: move do_unaligned_access to tcg_ops, Claudio Fontana, 2021/02/01
- [PATCH v15 20/23] cpu: call AccelCPUClass::cpu_realizefn in cpu_exec_realizefn, Claudio Fontana, 2021/02/01
- [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
- Re: [PATCH v15 22/23] accel: introduce new accessor functions,
Philippe Mathieu-Daudé <=
- [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