qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: qemu-devel@nongnu.org
Cc: "Stefan Hajnoczi" <stefanha@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Richard Henderson" <richard.henderson@linaro.org>
Subject: [PULL 02/15] target/s390x/tcg: Use vaddr in s390_probe_access()
Date: Fri, 11 Jul 2025 11:33:27 +0200	[thread overview]
Message-ID: <20250711093340.608485-3-thuth@redhat.com> (raw)
In-Reply-To: <20250711093340.608485-1-thuth@redhat.com>

From: Philippe Mathieu-Daudé <philmd@linaro.org>

Commit 70ebd9ce1cb ("s390x/tcg: Fault-safe memset") passed
vaddr type to access_prepare(), and commit b6c636f2cd6
("s390x/tcg: Fault-safe memmove") to do_access_get_byte(),
but declared S390Access::vaddr[1,2] as target_ulong.
Directly declare these as vaddr type, and have
s390_probe_access() use that type as argument.

Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-ID: <20250707171059.3064-3-philmd@linaro.org>
Signed-off-by: Thomas Huth <thuth@redhat.com>
---
 target/s390x/tcg/mem_helper.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c
index a03609a1406..f1acb1618f7 100644
--- a/target/s390x/tcg/mem_helper.c
+++ b/target/s390x/tcg/mem_helper.c
@@ -126,8 +126,8 @@ static inline void cpu_stsize_data_ra(CPUS390XState *env, uint64_t addr,
 
 /* An access covers at most 4096 bytes and therefore at most two pages. */
 typedef struct S390Access {
-    target_ulong vaddr1;
-    target_ulong vaddr2;
+    vaddr vaddr1;
+    vaddr vaddr2;
     void *haddr1;
     void *haddr2;
     uint16_t size1;
@@ -148,7 +148,7 @@ typedef struct S390Access {
  * For !CONFIG_USER_ONLY, the TEC is stored stored to env->tlb_fill_tec.
  * For CONFIG_USER_ONLY, the faulting address is stored to env->__excp_addr.
  */
-static inline int s390_probe_access(CPUArchState *env, target_ulong addr,
+static inline int s390_probe_access(CPUArchState *env, vaddr addr,
                                     int size, MMUAccessType access_type,
                                     int mmu_idx, bool nonfault,
                                     void **phost, uintptr_t ra)
@@ -258,7 +258,7 @@ static void access_memset(CPUS390XState *env, S390Access *desta,
 static uint8_t access_get_byte(CPUS390XState *env, S390Access *access,
                                int offset, uintptr_t ra)
 {
-    target_ulong vaddr = access->vaddr1;
+    vaddr vaddr = access->vaddr1;
     void *haddr = access->haddr1;
 
     if (unlikely(offset >= access->size1)) {
@@ -278,7 +278,7 @@ static uint8_t access_get_byte(CPUS390XState *env, S390Access *access,
 static void access_set_byte(CPUS390XState *env, S390Access *access,
                             int offset, uint8_t byte, uintptr_t ra)
 {
-    target_ulong vaddr = access->vaddr1;
+    vaddr vaddr = access->vaddr1;
     void *haddr = access->haddr1;
 
     if (unlikely(offset >= access->size1)) {
-- 
2.50.0



  parent reply	other threads:[~2025-07-11  9:35 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-11  9:33 [PULL 00/15] functional tests and s390x patches Thomas Huth
2025-07-11  9:33 ` [PULL 01/15] target/s390x/kvm: Use vaddr in find/insert_hw_breakpoint() Thomas Huth
2025-07-11  9:33 ` Thomas Huth [this message]
2025-07-11  9:33 ` [PULL 03/15] hw/s390x/s390-pci-bus.c: Use g_assert_not_reached() in functions taking an ett Thomas Huth
2025-07-11  9:33 ` [PULL 04/15] pc-bios/s390-ccw: Allow to select a different pxelinux.cfg entry via loadparm Thomas Huth
2025-07-11  9:33 ` [PULL 05/15] pc-bios/s390-ccw: Allow up to 31 entries for pxelinux.cfg Thomas Huth
2025-07-11  9:33 ` [PULL 06/15] pc-bios/s390-ccw: Make get_boot_index() from menu.c global Thomas Huth
2025-07-11  9:33 ` [PULL 07/15] pc-bios/s390-ccw: Add a boot menu for booting via pxelinux.cfg Thomas Huth
2025-07-11  9:33 ` [PULL 08/15] tests/functional: Add a test for s390x pxelinux.cfg network booting Thomas Huth
2025-07-11  9:33 ` [PULL 09/15] pc-bios/s390-ccw: link statically Thomas Huth
2025-07-11  9:33 ` [PULL 10/15] pc-bios: Update the s390 bios images with the pxelinux.cfg loadparm changes Thomas Huth
2025-07-11  9:33 ` [PULL 11/15] tests/functional: Add dependency to the keymap_targets Thomas Huth
2025-07-11  9:33 ` [PULL 12/15] tests/functional/test_ppc_bamboo: Replace broken link with working assets Thomas Huth
2025-07-11  9:33 ` [PULL 13/15] target/s390x: Remove unused s390_cpu_[un]halt() user stubs Thomas Huth
2025-07-11  9:33 ` [PULL 14/15] target/s390x: Expose s390_count_running_cpus() method Thomas Huth
2025-07-11  9:33 ` [PULL 15/15] target/s390x: Have s390_cpu_halt() not return anything Thomas Huth
2025-07-13  7:06 ` [PULL 00/15] functional tests and s390x patches Stefan Hajnoczi

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=20250711093340.608485-3-thuth@redhat.com \
    --to=thuth@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=stefanha@redhat.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).