[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC PATCH 26/34] Wrap target macros in functions
|
From: |
Anton Johansson |
|
Subject: |
Re: [RFC PATCH 26/34] Wrap target macros in functions |
|
Date: |
Tue, 23 Jan 2024 13:12:17 +0100 |
On 23/01/24, Philippe Mathieu-Daudé wrote:
> Hi Anton,
>
> On 19/1/24 15:40, Anton Johansson wrote:
> > Adds wrapper functions around common target specific macros required by
> > accel/tcg.
> >
> > Signed-off-by: Anton Johansson <anjo@rev.ng>
> > ---
> > include/hw/core/cpu.h | 9 +++++++
> > cpu-target.c | 62 +++++++++++++++++++++++++++++++++++++++++++
> > 2 files changed, 71 insertions(+)
> >
> > diff --git a/include/hw/core/cpu.h b/include/hw/core/cpu.h
> > index 57d100c203..a2d65c1d7a 100644
> > --- a/include/hw/core/cpu.h
> > +++ b/include/hw/core/cpu.h
> > @@ -26,6 +26,7 @@
> > #include "exec/vaddr.h"
> > #include "exec/memattrs.h"
> > #include "exec/tlb-common.h"
> > +#include "exec/memop.h"
> > #include "qapi/qapi-types-run-state.h"
> > #include "qemu/bitmap.h"
> > #include "qemu/rcu_queue.h"
> > @@ -1164,6 +1165,14 @@ void cpu_exec_unrealizefn(CPUState *cpu);
> > * what you are doing!
> > */
> > bool target_words_bigendian(void);
> > +bool target_supports_mttcg(void);
> > +bool target_has_precise_smc(void);
> > +int target_long_bits(void);
> > +int target_phys_addr_space_bits(void);
> > +uint8_t target_insn_start_words(void);
> > +uint8_t target_default_memory_order(void);
> > +uint8_t target_tlb_dyn_max_bits(void);
> > +MemOp target_endian_memory_order(void);
>
> None of these helpers take argument. I don't understand
> how they can be called in heterogeneous context.
No you're right, I was focused mostly on getting accel/tcg to compile
with hetrogeneous being a goal downt the line.
I like the idea of moving these fields to a struct filled out per
target, but dispatching would also work.
- Re: [RFC PATCH 13/34] target: Uninline cpu_get_tb_cpu_state(), (continued)
- [RFC PATCH 17/34] hw/core: [CPUTLB] Move target specifics to end of TCGCPUOps, Anton Johansson, 2024/01/19
- [RFC PATCH 12/34] target: Uninline cpu_mmu_index(), Anton Johansson, 2024/01/19
- [RFC PATCH 18/34] accel/stubs: [CPUTLB] Move xen.h stubs to xen-stub.c, Anton Johansson, 2024/01/19
- [RFC PATCH 24/34] accel/tcg: [CPUTLB] Set mo_te in TCGContext, Anton Johansson, 2024/01/19
- [RFC PATCH 26/34] Wrap target macros in functions, Anton Johansson, 2024/01/19
- [RFC PATCH 01/34] target: [PAGE_VARY] Use PAGE_VARY for all softmmu targets, Anton Johansson, 2024/01/19
- [RFC PATCH 03/34] exec: [PAGE_VARY] Move TARGET_PAGE_BITS_VARY to common header, Anton Johansson, 2024/01/19
- [RFC PATCH 15/34] exec: [CPUTLB] Move TLB_*/tlb_*() to common header, Anton Johansson, 2024/01/19
- [RFC PATCH 11/34] [IGNORE] Squash of header code shuffling, Anton Johansson, 2024/01/19
- [RFC PATCH 14/34] exec: [CPUTLB] Move PAGE_* macros to common header, Anton Johansson, 2024/01/19