qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anton Johansson via <qemu-devel@nongnu.org>
To: qemu-devel@nongnu.org
Cc: ale@rev.ng, richard.henderson@linaro.org, pbonzini@redhat.com,
	eduardo@habkost.net, philmd@linaro.org,
	marcel.apfelbaum@gmail.com, wangyanan55@huawei.com
Subject: [PATCH 0/8] Start replacing target_ulong with vaddr
Date: Thu, 20 Apr 2023 23:28:42 +0200	[thread overview]
Message-ID: <20230420212850.20400-1-anjo@rev.ng> (raw)

This is a first patchset in removing target_ulong from non-target/
directories.  As use of target_ulong is spread accross the codebase we
are attempting to target as few maintainers as possible with each
patchset in order to ease reviewing.

The following instances of target_ulong remain in accel/ and tcg/
    - atomic helpers (atomic_common.c.inc), cpu_atomic_*()
      (atomic_template.h,) and cpu_[st|ld]*()
      (cputlb.c/ldst_common.c.inc) are only used in target/ and can
      be pulled out into a separate target-specific file;

    - Calls to cpu_get_tb_cpu_state() cast pc and cs_base to
      target_ulong in order to avoid having to touch the target/
      directory in this patchset;

    - walk_memory_regions() is used in user-exec.c and
      linux-user/elfload.c;

    - helper_ret_*_mmu() is used in tcg/*/tcg-target.c.inc and
      tcg/tci.c;

    - Functions in translate-all.c dealing with TCGContext.gen_insn_data
      will be switched off target_ulong once gen_insn_data and
      TARGET_INSN_START_WORDS have been dealt with;

    - kvm_find_sw_breakpoint() in kvm-all.c used in target/;

    - The last address when looking up page flags for an interval
      [start,last] in pageflags_find()/pageflags_next() is still
      target_long.  I'm not sure why this is required.  This only
      seems relevant on 32-bit guests since the addresses passed
      to the interval tree are uint64_t's, are we relying on a
      sign extension here for some reason?

    - CPUTLBEntry and functions that read from it will be left for a
      later date;

Smaller patchsets implementing above changes will follow.

Finally, the grand goal is to allow for heterogeneous QEMU binaries
consisting of multiple frontends.

RFC: https://lists.nongnu.org/archive/html/qemu-devel/2022-12/msg04518.html

Anton Johansson (8):
  accel: Replace `target_ulong` with `vaddr` in TB/TLB
  accel: Replace target_ulong with vaddr in probe_*()
  accel/tcg: Replace target_ulong with vaddr in *_mmu_lookup()
  accel/tcg: Replace target_ulong with vaddr in helper_unaligned_*()
  accel/tcg: Replace target_ulong with vaddr in translator_*()
  accel/tcg: Replace target_ulong with vaddr in page_*()
  cpu: Replace target_ulong with vaddr in tb_invalidate_phys_addr()
  tcg: Replace target_ulong with vaddr in tcg_gen_code()

 accel/stubs/tcg-stub.c       |   6 +-
 accel/tcg/cpu-exec.c         |  49 ++++-----
 accel/tcg/cputlb.c           | 195 +++++++++++++++++------------------
 accel/tcg/internal.h         |   6 +-
 accel/tcg/tb-hash.h          |  12 +--
 accel/tcg/tb-jmp-cache.h     |   2 +-
 accel/tcg/tb-maint.c         |   2 +-
 accel/tcg/translate-all.c    |  15 +--
 accel/tcg/translator.c       |  10 +-
 accel/tcg/user-exec.c        |  59 ++++++-----
 cpu.c                        |   2 +-
 include/exec/cpu-all.h       |  10 +-
 include/exec/cpu-defs.h      |   4 +-
 include/exec/cpu_ldst.h      |   6 +-
 include/exec/exec-all.h      |  98 +++++++++---------
 include/exec/translate-all.h |   2 +-
 include/exec/translator.h    |   6 +-
 include/qemu/plugin-memory.h |   2 +-
 include/tcg/tcg-ldst.h       |   4 +-
 include/tcg/tcg.h            |   2 +-
 tcg/tcg.c                    |   2 +-
 21 files changed, 247 insertions(+), 247 deletions(-)

--
2.39.1


             reply	other threads:[~2023-04-20 21:31 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-20 21:28 Anton Johansson via [this message]
2023-04-20 21:28 ` [PATCH 1/8] accel: Replace `target_ulong` with `vaddr` in TB/TLB Anton Johansson via
2023-04-23  9:09   ` Richard Henderson
2023-04-24 12:47     ` Anton Johansson via
2023-04-20 21:28 ` [PATCH 2/8] accel: Replace target_ulong with vaddr in probe_*() Anton Johansson via
2023-04-23  9:09   ` Richard Henderson
2023-04-20 21:28 ` [PATCH 3/8] accel/tcg: Replace target_ulong with vaddr in *_mmu_lookup() Anton Johansson via
2023-04-23  9:10   ` Richard Henderson
2023-04-20 21:28 ` [PATCH 4/8] accel/tcg: Replace target_ulong with vaddr in helper_unaligned_*() Anton Johansson via
2023-04-23  9:10   ` Richard Henderson
2023-04-24 12:48     ` Anton Johansson via
2023-04-20 21:28 ` [PATCH 5/8] accel/tcg: Replace target_ulong with vaddr in translator_*() Anton Johansson via
2023-04-23  9:11   ` Richard Henderson
2023-04-20 21:28 ` [PATCH 6/8] accel/tcg: Replace target_ulong with vaddr in page_*() Anton Johansson via
2023-04-23  9:13   ` Richard Henderson
2023-04-24 12:51     ` Anton Johansson via
2023-04-24 13:10       ` Richard Henderson
2023-04-20 21:28 ` [PATCH 7/8] cpu: Replace target_ulong with vaddr in tb_invalidate_phys_addr() Anton Johansson via
2023-04-23  9:14   ` Richard Henderson
2023-04-23 17:29     ` Philippe Mathieu-Daudé
2023-04-23 18:46       ` Richard Henderson
2023-04-23 19:35         ` Alex Bennée
2023-04-23 19:42           ` Richard Henderson
2023-04-24 12:52             ` Anton Johansson via
2023-04-24 15:19               ` Philippe Mathieu-Daudé
2023-04-20 21:28 ` [PATCH 8/8] tcg: Replace target_ulong with vaddr in tcg_gen_code() Anton Johansson via
2023-04-23  9:15   ` Richard Henderson
2023-04-23 10:59 ` [PATCH 0/8] Start replacing target_ulong with vaddr Richard Henderson
2023-04-24 12:37   ` 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=20230420212850.20400-1-anjo@rev.ng \
    --to=qemu-devel@nongnu.org \
    --cc=ale@rev.ng \
    --cc=anjo@rev.ng \
    --cc=eduardo@habkost.net \
    --cc=marcel.apfelbaum@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=richard.henderson@linaro.org \
    --cc=wangyanan55@huawei.com \
    /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).