qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Richard Henderson <richard.henderson@linaro.org>
To: "Anton Johansson" <anjo@rev.ng>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>
Cc: qemu-devel@nongnu.org, ale@rev.ng
Subject: Re: [RFC PATCH 26/34] Wrap target macros in functions
Date: Wed, 24 Jan 2024 12:50:01 +1000	[thread overview]
Message-ID: <49702a11-d61c-428e-bb6f-e60a6ec2ecea@linaro.org> (raw)
In-Reply-To: <n2u2ifeti6fqzppvojuyi4i4phzrb4xbk3x2rpjhhesnwxwbdy@lmf3m6fqcr7g>

On 1/23/24 22:12, Anton Johansson wrote:
> 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.

All of the bits that you're referencing in TCGContext, outside of compilation, should be 
treated the same way.  Like Phil, I'd prefer to move these once and get the API right.


r~


  reply	other threads:[~2024-01-24  2:51 UTC|newest]

Thread overview: 86+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-19 14:39 [RFC PATCH 00/34] Compile accel/tcg once (partially) Anton Johansson via
2024-01-19 14:39 ` [RFC PATCH 01/34] target: [PAGE_VARY] Use PAGE_VARY for all softmmu targets Anton Johansson via
2024-01-19 16:05   ` Philippe Mathieu-Daudé
2024-01-23 12:09     ` Anton Johansson via
2024-01-19 14:39 ` [RFC PATCH 02/34] target: [PAGE_VARY] Move TARGET_PAGE_BITS_MIN to TargetPageBits Anton Johansson via
2024-01-23 16:33   ` Richard Henderson
2024-01-19 14:39 ` [RFC PATCH 03/34] exec: [PAGE_VARY] Move TARGET_PAGE_BITS_VARY to common header Anton Johansson via
2024-01-23 22:20   ` Richard Henderson
2024-01-19 14:39 ` [RFC PATCH 04/34] exec: [PAGE_VARY] Unpoison TARGET_PAGE_* macros for system mode Anton Johansson via
2024-01-23 22:20   ` Richard Henderson
2024-01-19 14:39 ` [RFC PATCH 05/34] target/tricore: [VADDR] Use target_ulong for EA Anton Johansson via
2024-01-23 22:29   ` Richard Henderson
2024-01-27  8:26   ` Richard Henderson
2024-01-19 14:39 ` [RFC PATCH 06/34] exec: [VADDR] Move vaddr defines to separate file Anton Johansson via
2024-01-23 22:33   ` Richard Henderson
2024-01-27  8:36   ` Richard Henderson
2024-01-27  8:45     ` Richard Henderson
2024-01-19 14:39 ` [RFC PATCH 07/34] hw/core: [VADDR] Include vaddr.h from cpu.h Anton Johansson via
2024-01-23 22:57   ` Richard Henderson
2024-01-27  8:48   ` Richard Henderson
2024-01-19 14:39 ` [RFC PATCH 08/34] target: [VADDR] Use vaddr in gen_intermediate_code Anton Johansson via
2024-01-23 23:13   ` Richard Henderson
2024-01-27  9:05   ` Richard Henderson
2024-01-19 14:39 ` [RFC PATCH 09/34] exec: [VADDR] Use vaddr in DisasContextBase for virtual addresses Anton Johansson via
2024-01-23 23:22   ` Richard Henderson
2024-01-27  9:33   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 10/34] exec: [VADDR] typedef abi_ptr to vaddr Anton Johansson via
2024-01-23 23:29   ` Richard Henderson
2024-01-27  9:42   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 11/34] [IGNORE] Squash of header code shuffling Anton Johansson via
2024-01-19 14:40 ` [RFC PATCH 12/34] target: Uninline cpu_mmu_index() Anton Johansson via
2024-01-23 23:40   ` Richard Henderson
2024-01-27 10:10   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 13/34] target: Uninline cpu_get_tb_cpu_state() Anton Johansson via
2024-01-23 23:53   ` Richard Henderson
2024-01-27 11:21   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 14/34] exec: [CPUTLB] Move PAGE_* macros to common header Anton Johansson via
2024-01-23 23:54   ` Richard Henderson
2024-01-27  7:53     ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 15/34] exec: [CPUTLB] Move TLB_*/tlb_*() " Anton Johansson via
2024-01-24  0:09   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 16/34] exec: [CPUTLB] Move cpu_*()/cpu_env() " Anton Johansson via
2024-01-24  0:15   ` Richard Henderson
2024-01-27 22:14   ` Richard Henderson
2024-01-28  0:15     ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 17/34] hw/core: [CPUTLB] Move target specifics to end of TCGCPUOps Anton Johansson via
2024-01-24  0:43   ` Richard Henderson
2024-01-28  0:37     ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 18/34] accel/stubs: [CPUTLB] Move xen.h stubs to xen-stub.c Anton Johansson via
2024-01-24  1:04   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 19/34] accel/tcg: [CPUTLB] Use TCGContext.addr_type instead of TARGET_LONG_BITS Anton Johansson via
2024-01-24  1:18   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 20/34] accel/tcg: [CPUTLB] Use TCGContext.guest_mo for memory ordering Anton Johansson via
2024-01-24  1:21   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 21/34] accel/tcg: [CPUTLB] Use tcg_ctx->tlb_dyn_max_bits Anton Johansson via
2024-01-24  1:23   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 22/34] accel/tcg: [CPUTLB] Move CPU_TLB_DYN_[DEFAULT|MIN]* to cputlb.c Anton Johansson via
2024-01-24  1:24   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 23/34] tcg: [CPUTLB] Add `mo_te` field to TCGContext Anton Johansson via
2024-01-24  1:50   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 24/34] accel/tcg: [CPUTLB] Set mo_te in TCGContext Anton Johansson via
2024-01-19 14:40 ` [RFC PATCH 25/34] accel/tcg: [CPUTLB] Use tcg_ctx->mo_te instead of MO_TE Anton Johansson via
2024-01-19 14:40 ` [RFC PATCH 26/34] Wrap target macros in functions Anton Johansson via
2024-01-23 11:50   ` Philippe Mathieu-Daudé
2024-01-23 12:12     ` Anton Johansson via
2024-01-24  2:50       ` Richard Henderson [this message]
2024-01-19 14:40 ` [RFC PATCH 27/34] accel/tcg: Make translate-all.c target independent Anton Johansson via
2024-01-24  2:53   ` Richard Henderson
2024-06-13  9:50     ` Anton Johansson via
2024-06-18 15:21       ` Richard Henderson
2024-06-20 18:51         ` Anton Johansson via
2024-01-19 14:40 ` [RFC PATCH 28/34] accel/tcg: Make plugin-gen.c " Anton Johansson via
2024-01-24  3:02   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 29/34] accel/tcg: Make tb-maint.c target indpendent Anton Johansson via
2024-01-24  3:10   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 30/34] accel/tcg: Make tcg-all.c " Anton Johansson via
2024-01-23 11:45   ` Philippe Mathieu-Daudé
2024-01-23 12:03     ` Anton Johansson via
2024-01-24  3:13   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 31/34] accel/tcg: Make tcg-runtime-gvec.c target independent Anton Johansson via
2024-01-24  3:15   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 32/34] accel/tcg: Make tcg-runtime.c " Anton Johansson via
2024-01-24  3:16   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 33/34] accel/tcg: Make translator.c (partially) " Anton Johansson via
2024-01-24  3:30   ` Richard Henderson
2024-01-19 14:40 ` [RFC PATCH 34/34] accel/tcg: Compile (a few files) once for system-mode Anton Johansson via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49702a11-d61c-428e-bb6f-e60a6ec2ecea@linaro.org \
    --to=richard.henderson@linaro.org \
    --cc=ale@rev.ng \
    --cc=anjo@rev.ng \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).