qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Kohei Tokunaga <ktokunaga.mail@gmail.com>
To: qemu-devel@nongnu.org
Cc: "Richard Henderson" <richard.henderson@linaro.org>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Daniel P . Berrangé" <berrange@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Stefan Weil" <sw@weilnetz.de>,
	"Stefan Hajnoczi" <stefanha@redhat.com>,
	ktokunaga.mail@gmail.com
Subject: [PATCH 4/5] tci: define TCG_TARGET_REG_BITS based on TCG_VADDR_BITS
Date: Fri, 23 May 2025 00:17:29 +0900	[thread overview]
Message-ID: <3edb13f42740984e2272425478bb58a6d985269e.1747922170.git.ktokunaga.mail@gmail.com> (raw)
In-Reply-To: <cover.1747922170.git.ktokunaga.mail@gmail.com>

This commit defines TCG_TARGET_REG_BITS based on the value of
TCG_VADDR_BITS. For non-wasm hosts, TCG_VADDR_BITS matches the pointer size,
so this change preserves the original behaviour. For the wasm host, this
change enables support for 64bit guests.

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
---
 tcg/tci/tcg-target-reg-bits.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tcg/tci/tcg-target-reg-bits.h b/tcg/tci/tcg-target-reg-bits.h
index dcb1a203f8..0e5db44e22 100644
--- a/tcg/tci/tcg-target-reg-bits.h
+++ b/tcg/tci/tcg-target-reg-bits.h
@@ -7,9 +7,9 @@
 #ifndef TCG_TARGET_REG_BITS_H
 #define TCG_TARGET_REG_BITS_H
 
-#if UINTPTR_MAX == UINT32_MAX
+#if TCG_VADDR_BITS == 32
 # define TCG_TARGET_REG_BITS 32
-#elif UINTPTR_MAX == UINT64_MAX
+#elif TCG_VADDR_BITS == 64
 # define TCG_TARGET_REG_BITS 64
 #else
 # error Unknown pointer size for tci target
-- 
2.43.0



  parent reply	other threads:[~2025-05-22 15:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 15:17 [PATCH 0/5] Enable QEMU TCI to run 64bit guests on browsers Kohei Tokunaga
2025-05-22 15:17 ` [PATCH 1/5] meson.build: add TCG_VADDR_BITS for defining the vaddr size Kohei Tokunaga
2025-05-22 15:17 ` [PATCH 2/5] include: define vaddr based on TCG_VADDR_BITS Kohei Tokunaga
2025-05-22 15:17 ` [PATCH 3/5] tlb: specify address field size " Kohei Tokunaga
2025-05-22 15:17 ` Kohei Tokunaga [this message]
2025-05-22 15:17 ` [PATCH 5/5] tci: use tcg_target_ulong when retrieving the pool data Kohei Tokunaga
2025-06-03  2:41 ` [PATCH 0/5] Enable QEMU TCI to run 64bit guests on browsers Kohei Tokunaga

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=3edb13f42740984e2272425478bb58a6d985269e.1747922170.git.ktokunaga.mail@gmail.com \
    --to=ktokunaga.mail@gmail.com \
    --cc=berrange@redhat.com \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.com \
    --cc=sw@weilnetz.de \
    /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).