From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791372; cv=none; d=zohomail.com; s=zohoarc; b=dRD9tSothwxpk+tukIHykNOjjk3z+Qep3FmeMUlNZ5Wfbk9qhrimCeUB36G7H67FwJNqc6fYBJGekRTjhY05usuoG+3GkR1AeCrvwWJbjYXHEf1lxQtQfK8rm19MPhDEqqHJWwH1kSaz/mn3RglAvHwqi7XEZWVFU2463HUPZ48= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791372; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=mkuAkGIrYoWFyIDgqIBN9F37U9+A9epUfwbwl3z+CUI=; b=ZcZg1ODFfK2/L0X4NVbmY/yy7PDIu4xSi1CkctSeb5YVOZyhapEMtl5P3sbk0vHIroFqAQkddleTrhvfdXQEHtodRQu32rx097WtsIQ74IhPRTMqcghbLsj85l2KFTyuZL2rtnksF7NITuuGYAFN/wCmnTbdBjaY3fLVZfRtNNg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791372095650.0417821965865; Wed, 7 Jan 2026 05:09:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTH6-0000Yn-QL; Wed, 07 Jan 2026 08:08:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTGw-0000Ot-Gp for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:22 -0500 Received: from mail-wm1-x343.google.com ([2a00:1450:4864:20::343]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTGs-0008ME-QF for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:20 -0500 Received: by mail-wm1-x343.google.com with SMTP id 5b1f17b1804b1-47d1d8a49f5so13821955e9.3 for ; Wed, 07 Jan 2026 05:08:18 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f661a03sm105305525e9.13.2026.01.07.05.08.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:08:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791297; x=1768396097; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=mkuAkGIrYoWFyIDgqIBN9F37U9+A9epUfwbwl3z+CUI=; b=d4m1S82w0vYlJxDO9ApvnOYyvwHNCVKVE4NHaLY6AkaA82Q2w7L2S9/Y3KOyKBVKQt rQfGj79mxZXBD+QoD5wcLAgjz058S+WDrhpfE7EHp7d4NU4Fwz9VSiRemP9ZzLW2cUvA qgnqKCpd+GUWhqBDh9HQXeGG+oV6MxnuvWVa5q/dd1zdmYt9QyOkT4uCkQVv2iHDqx/X 1gjrOIQj34xCq2G01/VkH85P0XUlB0DDuKnyTfcIkAbvlsdfAtaW7Z7HHc2QAgcXCoas hTMsx2NrZkvBufIFPjeyURG+DhWSc3x+biSwXvuEWs96WvH43bDBO1ssyNQThJ767+vo UPEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791297; x=1768396097; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=mkuAkGIrYoWFyIDgqIBN9F37U9+A9epUfwbwl3z+CUI=; b=aqW7TNyeT4RiylpHR4hijp0bKgZdAMq+OFT0q92mEIQN3kj/G01L3G7lW+kUKz9mwl 0Iv6N3YeVs0d75PH1lhB/QwikmhUIK92LhNP0XkEs9WwVXzPC/6Lu5/Wv/GN+c2xmG5A z2oBvJQjTxbEn5nieAcYNt0YFYpb6I65k5vxuOAoxoW0jXzQ9v/20bhz2iaRCYFJ6Syg RHjXIgKXH+tfKPAnl1ax6rlkXe/s2RXjwRrktgh8u2ht9RMHz8UqqjJFpM4aYGztUXbG BBHCfFlcoRLRy7d/7jT+jgQO+DwPkSZYyahJOYZyzyGhYjmL/+gipZJKh0xGKZQ2E5Ue JGDw== X-Gm-Message-State: AOJu0YxcoGWTmYWjFePpIMRhOfnePk1/M2ro1/lvDpbMlVS0Z8gQlNhH RyahI0LjHxUcfNGgBJSrZ5r02XRGLhR8tHKi2mcFrIRoFeSbi+CzQSmkvr3cYGbB2/gKEudCjM2 AGk+zox6GyQ== X-Gm-Gg: AY/fxX6CiSmdJ88mdfmYkkYsBdIuYLGqz61/J9fiAzfYfM7gLrAyWfECu8AeKm1YJq5 ew9qHEKYeIh7brLnSAJ+zvBMjeBLVJCmb/6EUvho8Zm2mcPIvyWhPSOvYK6R5XCB9Rh236a4cEj WAsFvldwlaZ7BH63x4qVWI54Y5yeFi7DJI25eEzFOwtfTZF8IJP99oIULe3fVCgnXKQ95naoSEQ nFigKX9OF4wA3nQntOmJlLtGWo6fYvgyy0lkY2a8Df7E3rpmZ8XWRsEmiszBGe/rdeQzIj91E3z Y1UPZhAgIjw3OvFwkY2h0Y+U6/pSf8YY507ffh4GyX2kT69oY9mP34Y8djtJsTLErWXLUSveI/1 V6UHbYxa3mGGwcDqDKs+irGnvpRhHvzY4sAFDVMs8ecvLDgdYQmFbhWRDK5IMHjoO5GA9OwRF+J UjSZUM6o29MLDwJMWlFsbGpyJBFsMwWGItXybWtbveQO4mYoNQ3KDb4q8LoDnGHexIUo4ut+w= X-Google-Smtp-Source: AGHT+IGIE3yR0kLLyXHjtztnslOGCnLgJbzMCSblwxgjTHE0NeqPrgnr1d+hENwFoZ7Drqzb7wV6xg== X-Received: by 2002:a05:600c:1d0c:b0:471:700:f281 with SMTP id 5b1f17b1804b1-47d84b4093cmr26647095e9.25.1767791296772; Wed, 07 Jan 2026 05:08:16 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 01/18] target/s390x: Restrict WatchPoint API to TCG Date: Wed, 7 Jan 2026 14:07:49 +0100 Message-ID: <20260107130807.69870-2-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::343; envelope-from=philmd@linaro.org; helo=mail-wm1-x343.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791374641158500 By inverting the 'tcg_enabled()' check in s390_cpu_set_psw() we can let the compiler elide the s390_cpu_recompute_watchpoints() call when TCG is not available. Move this function -- along with s390x_cpu_debug_excp_handler() which was introduced in the same commit 311918b979c ("target-s390x: PER storage-alteration event support") -- to a TCG specific file to avoid compiling dead code on KVM. This restricts the WatchPoint API calls to TCG. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- target/s390x/s390x-internal.h | 2 - target/s390x/tcg/tcg_s390x.h | 5 ++ target/s390x/cpu.c | 30 ++++++------ target/s390x/helper.c | 38 --------------- target/s390x/tcg/debug.c | 85 ++++++++++++++++++++++++++++++++++ target/s390x/tcg/excp_helper.c | 32 ------------- target/s390x/tcg/meson.build | 3 ++ 7 files changed, 108 insertions(+), 87 deletions(-) create mode 100644 target/s390x/tcg/debug.c diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index 9691366ec91..a4b54dc441c 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -259,7 +259,6 @@ ObjectClass *s390_cpu_class_by_name(const char *name); =20 =20 /* excp_helper.c */ -void s390x_cpu_debug_excp_handler(CPUState *cs); void s390_cpu_do_interrupt(CPUState *cpu); bool s390_cpu_exec_interrupt(CPUState *cpu, int int_req); =20 @@ -317,7 +316,6 @@ void s390_cpu_gdb_init(CPUState *cs); void s390_cpu_dump_state(CPUState *cpu, FILE *f, int flags); void do_restart_interrupt(CPUS390XState *env); #ifndef CONFIG_USER_ONLY -void s390_cpu_recompute_watchpoints(CPUState *cs); void s390x_tod_timer(void *opaque); void s390x_cpu_timer(void *opaque); void s390_handle_wait(S390CPU *cpu); diff --git a/target/s390x/tcg/tcg_s390x.h b/target/s390x/tcg/tcg_s390x.h index 78558912f99..7c8aede80d2 100644 --- a/target/s390x/tcg/tcg_s390x.h +++ b/target/s390x/tcg/tcg_s390x.h @@ -21,4 +21,9 @@ G_NORETURN void tcg_s390_data_exception(CPUS390XState *en= v, uint32_t dxc, G_NORETURN void tcg_s390_vector_exception(CPUS390XState *env, uint32_t vxc, uintptr_t ra); =20 +#ifndef CONFIG_USER_ONLY +void s390_cpu_recompute_watchpoints(CPUState *cs); +void s390x_cpu_debug_excp_handler(CPUState *cs); +#endif + #endif /* TCG_S390X_H */ diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c index 6c4198eb1b1..f68b288e364 100644 --- a/target/s390x/cpu.c +++ b/target/s390x/cpu.c @@ -40,6 +40,7 @@ #include "system/reset.h" #endif #include "hw/s390x/cpu-topology.h" +#include "tcg/tcg_s390x.h" =20 #define CR0_RESET 0xE0UL #define CR14_RESET 0xC2000000UL; @@ -74,26 +75,25 @@ void s390_cpu_set_psw(CPUS390XState *env, uint64_t mask= , uint64_t addr) env->psw.mask =3D mask; =20 /* KVM will handle all WAITs and trigger a WAIT exit on disabled_wait = */ - if (!tcg_enabled()) { - return; - } - env->cc_op =3D (mask >> 44) & 3; + if (tcg_enabled()) { + env->cc_op =3D (mask >> 44) & 3; =20 #ifndef CONFIG_USER_ONLY - if (is_early_exception_psw(mask, addr)) { - env->int_pgm_ilen =3D 0; - trigger_pgm_exception(env, PGM_SPECIFICATION); - return; - } + if (is_early_exception_psw(mask, addr)) { + env->int_pgm_ilen =3D 0; + trigger_pgm_exception(env, PGM_SPECIFICATION); + return; + } =20 - if ((old_mask ^ mask) & PSW_MASK_PER) { - s390_cpu_recompute_watchpoints(env_cpu(env)); - } + if ((old_mask ^ mask) & PSW_MASK_PER) { + s390_cpu_recompute_watchpoints(env_cpu(env)); + } =20 - if (mask & PSW_MASK_WAIT) { - s390_handle_wait(env_archcpu(env)); - } + if (mask & PSW_MASK_WAIT) { + s390_handle_wait(env_archcpu(env)); + } #endif + } } =20 uint64_t s390_cpu_get_psw_mask(CPUS390XState *env) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 184428c6d9d..8d1e03f6768 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -143,41 +143,3 @@ void do_restart_interrupt(CPUS390XState *env) =20 s390_cpu_set_psw(env, mask, addr); } - -void s390_cpu_recompute_watchpoints(CPUState *cs) -{ - const int wp_flags =3D BP_CPU | BP_MEM_WRITE | BP_STOP_BEFORE_ACCESS; - CPUS390XState *env =3D cpu_env(cs); - - /* We are called when the watchpoints have changed. First - remove them all. */ - cpu_watchpoint_remove_all(cs, BP_CPU); - - /* Return if PER is not enabled */ - if (!(env->psw.mask & PSW_MASK_PER)) { - return; - } - - /* Return if storage-alteration event is not enabled. */ - if (!(env->cregs[9] & PER_CR9_EVENT_STORE)) { - return; - } - - if (env->cregs[10] =3D=3D 0 && env->cregs[11] =3D=3D -1LL) { - /* We can't create a watchoint spanning the whole memory range, so - split it in two parts. */ - cpu_watchpoint_insert(cs, 0, 1ULL << 63, wp_flags, NULL); - cpu_watchpoint_insert(cs, 1ULL << 63, 1ULL << 63, wp_flags, NULL); - } else if (env->cregs[10] > env->cregs[11]) { - /* The address range loops, create two watchpoints. */ - cpu_watchpoint_insert(cs, env->cregs[10], -env->cregs[10], - wp_flags, NULL); - cpu_watchpoint_insert(cs, 0, env->cregs[11] + 1, wp_flags, NULL); - - } else { - /* Default case, create a single watchpoint. */ - cpu_watchpoint_insert(cs, env->cregs[10], - env->cregs[11] - env->cregs[10] + 1, - wp_flags, NULL); - } -} diff --git a/target/s390x/tcg/debug.c b/target/s390x/tcg/debug.c new file mode 100644 index 00000000000..01fd4b67442 --- /dev/null +++ b/target/s390x/tcg/debug.c @@ -0,0 +1,85 @@ +/* + * QEMU S/390 debug routines + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + +#include "qemu/osdep.h" +#include "exec/breakpoint.h" +#include "exec/watchpoint.h" +#include "target/s390x/cpu.h" +#include "target/s390x/s390x-internal.h" +#include "tcg_s390x.h" + +void s390_cpu_recompute_watchpoints(CPUState *cs) +{ + const int wp_flags =3D BP_CPU | BP_MEM_WRITE | BP_STOP_BEFORE_ACCESS; + CPUS390XState *env =3D cpu_env(cs); + + /* We are called when the watchpoints have changed. First + remove them all. */ + cpu_watchpoint_remove_all(cs, BP_CPU); + + /* Return if PER is not enabled */ + if (!(env->psw.mask & PSW_MASK_PER)) { + return; + } + + /* Return if storage-alteration event is not enabled. */ + if (!(env->cregs[9] & PER_CR9_EVENT_STORE)) { + return; + } + + if (env->cregs[10] =3D=3D 0 && env->cregs[11] =3D=3D -1LL) { + /* We can't create a watchoint spanning the whole memory range, so + split it in two parts. */ + cpu_watchpoint_insert(cs, 0, 1ULL << 63, wp_flags, NULL); + cpu_watchpoint_insert(cs, 1ULL << 63, 1ULL << 63, wp_flags, NULL); + } else if (env->cregs[10] > env->cregs[11]) { + /* The address range loops, create two watchpoints. */ + cpu_watchpoint_insert(cs, env->cregs[10], -env->cregs[10], + wp_flags, NULL); + cpu_watchpoint_insert(cs, 0, env->cregs[11] + 1, wp_flags, NULL); + + } else { + /* Default case, create a single watchpoint. */ + cpu_watchpoint_insert(cs, env->cregs[10], + env->cregs[11] - env->cregs[10] + 1, + wp_flags, NULL); + } +} + +void s390x_cpu_debug_excp_handler(CPUState *cs) +{ + CPUS390XState *env =3D cpu_env(cs); + CPUWatchpoint *wp_hit =3D cs->watchpoint_hit; + + if (wp_hit && wp_hit->flags & BP_CPU) { + /* + * FIXME: When the storage-alteration-space control bit is set, + * the exception should only be triggered if the memory access + * is done using an address space with the storage-alteration-event + * bit set. We have no way to detect that with the current + * watchpoint code. + */ + cs->watchpoint_hit =3D NULL; + + env->per_address =3D env->psw.addr; + env->per_perc_atmid |=3D PER_CODE_EVENT_STORE | get_per_atmid(env); + /* + * FIXME: We currently no way to detect the address space used + * to trigger the watchpoint. For now just consider it is the + * current default ASC. This turn to be true except when MVCP + * and MVCS instrutions are not used. + */ + env->per_perc_atmid |=3D env->psw.mask & (PSW_MASK_ASC) >> 46; + + /* + * Remove all watchpoints to re-execute the code. A PER exception + * will be triggered, it will call s390_cpu_set_psw which will + * recompute the watchpoints. + */ + cpu_watchpoint_remove_all(cs, BP_CPU); + cpu_loop_exit_noexc(cs); + } +} diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index d4a096f5998..019eb4fba1f 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -24,7 +24,6 @@ #include "exec/helper-proto.h" #include "exec/cputlb.h" #include "exec/target_page.h" -#include "exec/watchpoint.h" #include "s390x-internal.h" #include "tcg_s390x.h" #ifndef CONFIG_USER_ONLY @@ -607,37 +606,6 @@ bool s390_cpu_exec_interrupt(CPUState *cs, int interru= pt_request) return false; } =20 -void s390x_cpu_debug_excp_handler(CPUState *cs) -{ - CPUS390XState *env =3D cpu_env(cs); - CPUWatchpoint *wp_hit =3D cs->watchpoint_hit; - - if (wp_hit && wp_hit->flags & BP_CPU) { - /* FIXME: When the storage-alteration-space control bit is set, - the exception should only be triggered if the memory access - is done using an address space with the storage-alteration-event - bit set. We have no way to detect that with the current - watchpoint code. */ - cs->watchpoint_hit =3D NULL; - - env->per_address =3D env->psw.addr; - env->per_perc_atmid |=3D PER_CODE_EVENT_STORE | get_per_atmid(env); - /* FIXME: We currently no way to detect the address space used - to trigger the watchpoint. For now just consider it is the - current default ASC. This turn to be true except when MVCP - and MVCS instrutions are not used. */ - env->per_perc_atmid |=3D env->psw.mask & (PSW_MASK_ASC) >> 46; - - /* - * Remove all watchpoints to re-execute the code. A PER exception - * will be triggered, it will call s390_cpu_set_psw which will - * recompute the watchpoints. - */ - cpu_watchpoint_remove_all(cs, BP_CPU); - cpu_loop_exit_noexc(cs); - } -} - void s390x_cpu_do_unaligned_access(CPUState *cs, vaddr addr, MMUAccessType access_type, int mmu_idx, uintptr_t retaddr) diff --git a/target/s390x/tcg/meson.build b/target/s390x/tcg/meson.build index ee4e8fec77c..515cb8b473d 100644 --- a/target/s390x/tcg/meson.build +++ b/target/s390x/tcg/meson.build @@ -12,3 +12,6 @@ s390x_ss.add(when: 'CONFIG_TCG', if_true: files( 'vec_int_helper.c', 'vec_string_helper.c', )) +s390x_system_ss.add(when: 'CONFIG_TCG', if_true: files( + 'debug.c', +)) --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791390; cv=none; d=zohomail.com; s=zohoarc; b=I+djIXIbrNvfLmZQ989hJndJVELyIfS5yxyc4g0XaASZdyf+80pmQ2VRWpoknhuZwQkOO5tEz6eJtr/mN9sCy01jRUeVi+GNQz60L1pGF2m9jhu4MxS/wSngqIij+rosA/pJF91NWR51DXXzQktnWym2Ew6v0as3vzBvuLDhbg8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791390; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=r471lAfTDSZ91X7dNYg/GCwvgvHUQzpWa5sedZ2e7kw=; b=b/2t0fDu1BY6B/LTwWtCDyqRWCuUGfX0MROMdPQLUFX5MzhBa4byYATrzT2FEzLmaRSpzBV1NfOe8l5Go2lN9m3vpvMvd/A2hSmCvwUj6cxyPxncU0dDNAgHQJ3bu32NaxI+QMmMvCtnzG6gAK7AC2PPeXdJgr4MZRXgQIGgCgg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791390130615.8974553515479; Wed, 7 Jan 2026 05:09:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTH6-0000Zl-Tm; Wed, 07 Jan 2026 08:08:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTH2-0000Rs-Sq for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:29 -0500 Received: from mail-wm1-x336.google.com ([2a00:1450:4864:20::336]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTH1-0008NV-8t for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:28 -0500 Received: by mail-wm1-x336.google.com with SMTP id 5b1f17b1804b1-47d3ffa6720so20601215e9.0 for ; Wed, 07 Jan 2026 05:08:25 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d870c73c0sm12290385e9.3.2026.01.07.05.08.22 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:08:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791304; x=1768396104; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=r471lAfTDSZ91X7dNYg/GCwvgvHUQzpWa5sedZ2e7kw=; b=AE2zye6oldubKCtFwotsLOjfRWF416vBzIzA9qfn3F2EqVeWGlsU2FKaXEBO/lgFqT 063LLqeryLdQQgSGNrTFP8LBleTxM5p0stLUFcy68nK5yQZR1s5MfVsQCHhOJw/TAz5C b1BQ0a7Ub9QRkHoHCGzOODFs7fKDhxWVMliIvIrbSM2bPZjMPlFSvPwEsjeyz55B7gNx q15u7jGd21X0ejopO1Arliubt+hTswts4Yf39sh4FlRgurhkeS+mDb7+V2EcrCVSBiys q4y6SshWISC1j9cCdYQ4/4YjxQerTB336yMdmBvXx3eJyDRAP3oV59QLmszZpGhSjv6G i5Hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791304; x=1768396104; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=r471lAfTDSZ91X7dNYg/GCwvgvHUQzpWa5sedZ2e7kw=; b=Jp8RcxaQlEk9r3Zu2PxhjA6eCVx0CIlqnav1CyervsVxwOJEKk8+2Y93s2L0z0TSQ8 SGnRTs/Xt1L3DVJkpG5t80JhohXIDcsRQETMk32gSv/5+GCI4/7ijgSKJsrqfOgrz3wQ Hk6aIwGSgnTOBFmo+XdRHjkliQtoHhB/0Gkkl7HlQRzAZ8CVCHAzMtiv19GwVN9p4fgh f8P4c/2C/bmjUqTTdvQbXS4Vd8dAoF2hVMwGW8AZq2fX1SvrnD1hqOTusucpq1uy41qn nzl5iKfGtUglst+wHItJu/AIqEGr4SPPBaJMr4pd+LSNOQsnTNM2j9/Zq2+MMp8RdatS 3rMg== X-Gm-Message-State: AOJu0YwRowlQpEhHK0j6XASTXdWINIPz+R/HYKP7bf27Ye8/XdFOkOkJ nIrCjRvbvoVxYuEptW2j0PEcZJeI4Oi26gtpl8QuVmc7FjJ1fVCJsDVVxptwFdZcgyas48f+sED sUXqbk84= X-Gm-Gg: AY/fxX6yAiIk9pu6HFyhI1m/5aUtLty3H5v1QTeiVLVHnrBvOAAuxx2mm02/KtGbCzC JhL3rYSlc+06MTduOYlKpd9rgzKGmMiigpj9rX9FlB9T2U8GBKrq0QAyfl4Fz9ascMKuNVa9HSA Z1Nw18zm345KC9r3bOIYAsp3NRJAbImCk/ZLYCPezIGY/hZ2GO3MoHepfAvg8+1wtI5YtphE8A5 mlaZbgURd93u5FfFbvg3kNK6W6OTSWlb+gOqfAuGSNbpx+39rGbalucZUW46ksnf6SYr5Uy0vrb cqGd2wWrJw/jy7dRKoC8ZqHnomX5RdKbvU9UC+5g1I/FXVE/3optuSHTSzx8ReoJQiZRbIxu+Mg 5TMGIptht/2vtS3RPvbJa9h2Z7PaPsljjqqwAFPf91byyJIHoXsRW03Foazvh4a0l8HPjgwlQ/L hk7QeFtRuFaYmbbXfWJpJOcSv3gs3XhhLjThoE0gq93ZbQ/uYG2ZiIgqI1A7XK X-Google-Smtp-Source: AGHT+IFTu5k2vopksPZlCcsh5XGMkkD94rOxcfoW9RpZOjoNo+DiCzfx5fh6rQeaN9C/ioNfhNCcQw== X-Received: by 2002:a05:600c:a317:b0:477:9976:9e1a with SMTP id 5b1f17b1804b1-47d85bf063cmr19527975e9.6.1767791303723; Wed, 07 Jan 2026 05:08:23 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 02/18] target/s390x: Use address_space_ldl_be() in read_table_entry() Date: Wed, 7 Jan 2026 14:07:50 +0100 Message-ID: <20260107130807.69870-3-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::336; envelope-from=philmd@linaro.org; helo=mail-wm1-x336.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791392538158500 Keep address_space_read/write() API to access blob of memory. When the access size is known, use the address_space_ld/st() API which can directly swap endianness. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- target/s390x/mmu_helper.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 026502a3e40..9ee1d778876 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -108,6 +108,7 @@ static inline bool read_table_entry(CPUS390XState *env,= hwaddr gaddr, uint64_t *entry) { CPUState *cs =3D env_cpu(env); + MemTxResult ret; =20 /* * According to the PoP, these table addresses are "unpredictably real @@ -116,13 +117,9 @@ static inline bool read_table_entry(CPUS390XState *env= , hwaddr gaddr, * * We treat them as absolute addresses and don't wrap them. */ - if (unlikely(address_space_read(cs->as, gaddr, MEMTXATTRS_UNSPECIFIED, - entry, sizeof(*entry)) !=3D - MEMTX_OK)) { - return false; - } - *entry =3D be64_to_cpu(*entry); - return true; + *entry =3D address_space_ldl_be(cs->as, gaddr, MEMTXATTRS_UNSPECIFIED,= &ret); + + return ret =3D=3D MEMTX_OK; } =20 static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr, --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791365; cv=none; d=zohomail.com; s=zohoarc; b=dhqdAf/Rlp0S4ek+FXZYqRwxKP+aUtipNFq0xBiho0ilSxn2onGpxBo8SMsrPWqngjefvDBpmTlBdINKU1Dzcd1XGWeOwceiZdvENkQi8B3l1a/5ERoHcYIkEyHYX2W6Ey6WWdsTiXRMZNLTBDYLXNIppciDVpNH9EEFzGO1D0k= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791365; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=ZxF+PzZ1QlzvGpjebmovb1a8ovPqD1CmKjnHZwd0lKI=; b=X6HaVApAy1GteUT5O8GIrcbadEQ1+4CJrbKTveKs+X01PmTYsRSIpeHINf3kx4DhNh3LMDy83jvDmbt4L4qHmpIYpAODH1umaJ1FW6StbKgxPgzWS6FiJ4lLW/KQTx9826u8QtqxKQUuVFIexDFc/Pdr+icWl4CoVCOyre7zIX0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176779136567473.09504988015885; Wed, 7 Jan 2026 05:09:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTHB-0000bk-MN; Wed, 07 Jan 2026 08:08:37 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTH8-0000ae-BY for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:34 -0500 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTH6-0008O6-KF for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:34 -0500 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-42fb03c3cf2so1116059f8f.1 for ; Wed, 07 Jan 2026 05:08:32 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0e180csm10094151f8f.10.2026.01.07.05.08.29 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:08:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791311; x=1768396111; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=ZxF+PzZ1QlzvGpjebmovb1a8ovPqD1CmKjnHZwd0lKI=; b=QuzC6gLUcup6xLFLTGyd4sDM4vh5xFzokzy6TsPXwm6fHHeshisoiBar93XoiShdlY cpS2I0kLdcHHPZCU4wu71G7HUxeDUbL69CQySSqWCRjgCiORKD5hx6+crhtaTW0ym+rS 4DHBnC4a7ClmkVX4yCeIKrd9FR4AG+9jCv7iAW1OTHI7a5Ytdx1+csTLMy0514DHL5Zj FVTSU0J6i4BdsSjvs0tXq/cBrq7lKr648lkDMx/TaMb1bLvmhA+gM+SeaLSjrC2McQJI T+k7dX1Nutz8OxbvKZJogsmzI+RpG7pF6rnJjHZngwkttSPKLAUn6BnX9MoVHqF7zFpe JlRg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791311; x=1768396111; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=ZxF+PzZ1QlzvGpjebmovb1a8ovPqD1CmKjnHZwd0lKI=; b=n4qMHbtkg58JUZWV3F7Dl8kT+K85Z9CMLMPoJhoP5zkP/GSgTeGk7IOJT1tmTBAkxc W/1O5SKpzhUYxT0FngTAiwsM3i25pr0CRn4888miHJT8URm+LyYMRolZy+XxT3Fu3xCr YH5hRvMOKqjp6gsMym2JSk+DMDI04UxolDfgzDN+A2wgpg5XQItEUgxWkoGHB6ghKNN2 XDYpjyoqwhSJQ3bId3hO6DTZHZBi26Ym+zoEgOFG0scbwvcDeQg+mOjJ4YzgeNKZtiwz 2FRGJ/wIzf85j9hNio51uwuj1VlYDHDdkWeZZ8YXyCKci/eh/g1wOAcUgW0Wqyg6tLRE HRJg== X-Gm-Message-State: AOJu0YzCtH/FTlSwwoCaPryU4iPN7RlznRtEeVCvHqOw9pzYhOYHqyua QimkH9VlH3IMfOUtllCpj8rWullm0XalV+QbNXqaIM3Zqd93tT8ofukp1Lm75/TG09TZyN1HbkM Pi83KSDY= X-Gm-Gg: AY/fxX5hQwm+Nr0fNMaCJUb7+sGaLydDrQiQvv9T2qCXSgVXu4maBUZpMx6tjYb7JoD cmK+wyx32a6m2KP9JQVNJX0thHmLgCH7QObYeiS2SHeA7FvFaZNhV8SQp8xeFSXSX4ZBOnVaUBc qqvnz3BaWQG/tWQlP0/sYdS9e9Ehj52ADeO0SWRXQHmrjtMjsAX3MazACjZm/SY012So30dliXI nbcPmtMbxtnIslHCqopkkhKqY1RqMwtS3lq+wNyKnJPP+gh1Mpx/pqOxCWTlzAOowmxJ+ZZ0jC5 +Z1Gg8nTSs7S+v6ylRht7ev9W7ZwciiBcfa33oRY1iv7o1TjP3bFUrChLtYTUESMItosrIzP/cF cdD4diE0C8It85omVX5gzX18R8p/i6tTsDwk6qSKd/Qn1odZNOz88FpHM3FL7TLYMLGUr8InCP+ P+pt0jswXhT6U14U70MPg8i3l5pnOQJZ8iQfKg1GOad7IaMMwuFdiG/V8jhiI3 X-Google-Smtp-Source: AGHT+IF10Z+LS6NjB/XcznWOvxPeoNqQGuw7Xz7MA9StnCBML/X/tVBTA9TnB0YxQXOJ16buk07PoQ== X-Received: by 2002:a05:6000:2909:b0:431:a50:6ead with SMTP id ffacd0b85a97d-432c36340eemr3649045f8f.20.1767791310619; Wed, 07 Jan 2026 05:08:30 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , David Hildenbrand , Thomas Huth Subject: [PATCH 03/18] target/s390x: Use vaddr for $pc in get_next_pc() Date: Wed, 7 Jan 2026 14:07:51 +0100 Message-ID: <20260107130807.69870-4-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::42e; envelope-from=philmd@linaro.org; helo=mail-wr1-x42e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791366614158500 DisasContextBase::pc_next is of vaddr type. Since translator_lduw_end() returns a uint16_t, also use that type for clarity. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- target/s390x/tcg/translate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/target/s390x/tcg/translate.c b/target/s390x/tcg/translate.c index e38607ee18c..540c5a569c0 100644 --- a/target/s390x/tcg/translate.c +++ b/target/s390x/tcg/translate.c @@ -6405,10 +6405,9 @@ static void s390x_tr_insn_start(DisasContextBase *dc= base, CPUState *cs) tcg_gen_insn_start(dc->base.pc_next, dc->cc_op, 0); } =20 -static target_ulong get_next_pc(CPUS390XState *env, DisasContext *s, - uint64_t pc) +static vaddr get_next_pc(CPUS390XState *env, DisasContext *s, vaddr pc) { - uint64_t insn =3D translator_lduw_end(env, &s->base, pc, MO_BE); + uint16_t insn =3D translator_lduw_end(env, &s->base, pc, MO_BE); =20 return pc + get_ilen((insn >> 8) & 0xff); } --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791388; cv=none; d=zohomail.com; s=zohoarc; b=SblgchPY08B07zZs74rte7lg6Pcemb63OiBLmmF8H91lmfET9Qnkd0Nqry4mtE4wONrEswhsFk8xdqNB6Hc37z2EenJvtOlN+D49JZJLp06xeuhoWqGTttJtY4p28xx0pcvQSpeVNImgFP7cJtnwCvQ+GadZl7VZBDD16Lx+x/w= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791388; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=prcEORDpaGFxyGovg9LUonLPwKCY/l7aGLeExZ61Aa8=; b=U6joxOivttneL/cp/Jaag8yPZwxoUH94h9ekSqrsjTMmRvIDJWqTuDwOyQt/Ta0tQcrDH2ZCovgURMX8R3E5f/45Wn4mz07yI69urgUqevhCg/sltqazuVLTuP1+4PucdIXkaovL3sQRF1i2E6VxdMLuFxuHtlJf8wDzinjcAvI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791388397990.7321138469475; Wed, 7 Jan 2026 05:09:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTHh-00010u-Dm; Wed, 07 Jan 2026 08:09:11 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTHK-0000g2-Sr for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:52 -0500 Received: from mail-wm1-x32e.google.com ([2a00:1450:4864:20::32e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTHE-0008Os-Qy for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:45 -0500 Received: by mail-wm1-x32e.google.com with SMTP id 5b1f17b1804b1-477619f8ae5so16586345e9.3 for ; Wed, 07 Jan 2026 05:08:39 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f68f69dsm99515255e9.1.2026.01.07.05.08.36 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:08:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791318; x=1768396118; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=prcEORDpaGFxyGovg9LUonLPwKCY/l7aGLeExZ61Aa8=; b=b9sKjHVUWlRF0JWj2pbkpGqeGopIobUUYYOMN/3nm9+CXQE+gddiuTiE/U3TKlVQRu Wj76b5uKKOmdKV7D3QO66pZW/8/ZMC086tGvLQj6eKGISFNgESBY90YsbIlioi+4QRUl ZIKxflHmwPqSLB4aXH//mr13iAjYRYRcrsT10QX8L0R+/OZdXDCIAG29gfstfEk6xmtV y3U5B4/BrWzL3moo2I/nGytWWA1wqLrlEgu+6R2RkyJsZQ+gzbRUS2I0k0c8P+gCFcBd mUQCO7VfzblgfvTm3sy02iWlmey+PXyK/lYHenfTRwhnzjbZvpXqGMKHIofRf6/IW43P Kj/g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791318; x=1768396118; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=prcEORDpaGFxyGovg9LUonLPwKCY/l7aGLeExZ61Aa8=; b=tjoZHcutgdkA/G7eEUuMzckspoAC544JyHRZ8/KWsL5XJB72dCfjpb+c3zSV9d2/eK btzYxx58lOoiNsQCrBVt8vkfWA4U/mHjtywixmb0j+rwcB2L1onqsZaESSXw0xOJ7chD 5WTafRRQyU5rYnVrvA46E25uXsp8i4hIti25mtKJs1iGN9ezVJw4n4XHoHJBIZuqrCXM kJ4KFo7t4OUexh/UE7TgKAV8BNJ0cpkljeMTCnnoU+bInjYlMyAAUIpgwRSQ2c8nznw6 8PSh0/0zpcIYb8PauWbd/aucQW55O1uQFizImlKgvc7eqxYJf4Yq7jY7Gr5WGM7PCWJ8 is/g== X-Gm-Message-State: AOJu0YxCIHe6FaKoCbTYeeop5Y8/LcJPmhJXkhs0V/rryJvY4V+1T1tg v9ubxARpeRfFu/QZS+Nh7YsRvIdSp762dC2fZ2faLgKVvdJMerYiER7tuw0rc4Z+7w/GtE25yGN URjP/y2I= X-Gm-Gg: AY/fxX7AD77kTkxbA46MtjeVkrMn+V+WMt4O56/pO6bWlYcVn1pXX1mD+eDMIOvs2rI Qllp+pf4kzHkpV2kSP1OMcJHBGdBrB1/eAmc9msh+706mwGXN0d/v087ZzE/lISt2/6VWNFPeIk J30Fs1oEC1EP/gstZd58nwddOelFTE9l+Tiq3IetCF7g9fP0BZCoH9lzzwlC+sI2xWH8Psj8xiU T89nKvuI8ndPcJMk5T44g768XslreRdAOVBzPPfFbwI4vlPMznes/74jAasBh6eXKwtmEVHNhEW nRI41m27ghKG1JYrfNiqkIrRjNEPxv/+3qQI6d7GCrUMRoc6F3ae/K4pwrqqxhSGAFaYU48/+Fb RJCUErzYq3qASf40HtteaoKZrEeVwheN48s6S8guhDglMhvZr5+xNM6rnwIjh7ehyKCqQmY0bSL zT4RcCSX444kNQi4Rl0Ussvh7HNQwzjYnsT+rLGQvkk1ZeLmpV1Hiso0fQmBHe X-Google-Smtp-Source: AGHT+IEOkpYAfHJ/rFg2YST4NcvSABwvxPmaE54Sq3GAKwdny9PRzzF4kMgNzjkLvgeCNuBDxFKYAw== X-Received: by 2002:a05:600c:3114:b0:456:1a69:94fa with SMTP id 5b1f17b1804b1-47d84b2d27amr28680355e9.13.1767791317574; Wed, 07 Jan 2026 05:08:37 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 04/18] target/s390x: Replace target_ulong -> uint64_t in gdb_write_register() Date: Wed, 7 Jan 2026 14:07:52 +0100 Message-ID: <20260107130807.69870-5-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32e; envelope-from=philmd@linaro.org; helo=mail-wm1-x32e.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791390530158500 On s390x target_ulong expands to uint64_t. Besides, ldq_be_p() returns a uint64_t type. Use that instead. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- target/s390x/gdbstub.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/gdbstub.c b/target/s390x/gdbstub.c index d1f02ea5ce4..9ae715add4d 100644 --- a/target/s390x/gdbstub.c +++ b/target/s390x/gdbstub.c @@ -46,7 +46,7 @@ int s390_cpu_gdb_read_register(CPUState *cs, GByteArray *= mem_buf, int n) int s390_cpu_gdb_write_register(CPUState *cs, uint8_t *mem_buf, int n) { CPUS390XState *env =3D cpu_env(cs); - target_ulong tmpl =3D ldq_be_p(mem_buf); + uint64_t tmpl =3D ldq_be_p(mem_buf); =20 switch (n) { case S390_PSWM_REGNUM: --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791390; cv=none; d=zohomail.com; s=zohoarc; b=ADBZszsQV0q68VU3TmX7o4Sz2JEACkPFPwrd1fCPPhAlaZGxVnQ1yOlPNgnHcbNJGJ0WWbQ0xi5ZmVTbu7EwJ3r6uQtaavUImxEbKCKyhC6dOdlJNgVUgBHGegcxxD6kDcXguboxt+rWb/c4W2LGNHeE03VjcPpoqkJN+JEAJT8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791390; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=DJoNOWWwAVi5nweAYNiEiLdsrSLisRr57TrUquxJYsM=; b=C0yIX0QuKcJ+xU9L7f3RcTUJlqHwa8tvflmIL9JzjOglE8T1KF5vk3ALKJVTdB4wnG5UfA9pNhcUp805ceHfYiK7aSJkTNfnG75IvzCUZp7D5/eMmZ049k9meA3j+xO49evLQ9c5Jdi9rUJ0nrOCXqtQdMpE1/LlVpACf4zGP7Y= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791390385301.533620106296; Wed, 7 Jan 2026 05:09:50 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTHl-00018a-Ri; Wed, 07 Jan 2026 08:09:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTHL-0000g5-V0 for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:52 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTHK-0008PJ-LK for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:47 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-47aa03d3326so17445415e9.3 for ; Wed, 07 Jan 2026 05:08:46 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f69e802sm98387165e9.8.2026.01.07.05.08.43 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:08:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791324; x=1768396124; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=DJoNOWWwAVi5nweAYNiEiLdsrSLisRr57TrUquxJYsM=; b=vgeMCXI/dUA16LTHmkgv6sm64ytGjDa4jk0bJCZrSECS4xid+h/D0CZy0S/8oswBgz leHb5+tU/c1YjKQ8b6Dsi/BIYnXB037Iptd0WOEY8Ff93DiL2odSM2wZu6t6yMaPwqfR 9lZvHwCsMquHsnCjNGA0R66jMnWZP24Qo+4E/ebWVLfUI34XX2xj+wPZWfr+Ch3NOm54 2T+MyR5bF/MNWdQXD5XzLqz5Dbup7UYhz86nD1buYcx0TR6wD5bVGZmUrhaik0zutLOX klzy2G1XadcIs8G3OLTOI7CYp4ZxKiFi/hdEyd4THi+zISTe048jEFqBtLSxoELDQTt7 rAzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791324; x=1768396124; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=DJoNOWWwAVi5nweAYNiEiLdsrSLisRr57TrUquxJYsM=; b=A9ezWMzkhRmKZy6fon9mAu5SgQG3T2JB74kHykV2WWJqxXn0er7lqEadait1QSVeO+ 52wgpf8NJ9vIFw1xhaCRTd34Wwaz4udysF1E3rTw2Mm3OWmByGS+BIEk5mfKd8KK2+ag YmtikW09yuVbMy/gitSU53KcZ+wDrGGOARGIq+YWYUEKx0aYTd/QYr4ZtAyO6wusQ1Ph Pde+Wqf5kEWH8dmKXfRQkbWOOcEksH+jnurNOvWzhZ08sF6+pqKcG8lPcXUOWAMsjg+u SjqlU6KgFrVWzsGu2ch1z+jqMLOgZ7kBgdBLM3IAJ3FCsVM/MajoWiFJiYHcodu5egxP yhQw== X-Gm-Message-State: AOJu0YyOzepYAGeiOBp/Nz8pTNg8r0nW1cDjEkUegnj487FL9XAUTlmx wyQkIasB/eWZq3zvBUHqkq+QJ5EgHE5Ut/MDjjaLEiAiZmgbwQ2iHQqHyL0x08ZfEJW/TxVcziL z6/QH1Ig= X-Gm-Gg: AY/fxX49UuX2eOurDkmubLejxJnJXTw8DePycfEhhgPabsy9rJT4rsFk4ZvDOGoxv4p eNyG5yD1rJQGq6TrJHc+HRbp9tE247wNVo34tV7tZG1FiSb0vHdYcRmouR6B2LM6UPIBqWRN28L C2qAe+PSIGjAawMW/qdXBC7Ds2m62POLEZ7a22SXk4o2dGwD3cgt8h0GlXaEIqxMV0sb4Iu67bi 2zK/WIUAmSJ1jl1E2twRP8YmejyAzFRi+V0VgLy61gcQgrfeHPIE6QaYUAPllmpvTzMfqHWOJEl 1Bhb5vtr7nNe74VunQR1aNZMLnlxeKCFgoCrN/Lm+NEFsdGY57aiqdkR4RY7phXQRlqymo514rF zDLW5N7vzW0QTvIZBpixw8JDUTjU0tI624LIBQ0jRZ41yXEgrMuWKm0XYa0h1cPkbfzDbbC8fbQ U4mr5Dm8QkDNX1k0NKlbkIHJxc+5lE+GP3Y9ZYeFSiGB4WKrJujRJPxXMoPWF9 X-Google-Smtp-Source: AGHT+IE4TGwzYCKv4QmKTHQNGqOy8Iy4cY8AdSoulzAm534dmQAjYumkPoFxmASgbiOKqBXNINBbpw== X-Received: by 2002:a05:600c:444c:b0:477:7b16:5f77 with SMTP id 5b1f17b1804b1-47d84b0b303mr27009795e9.3.1767791324526; Wed, 07 Jan 2026 05:08:44 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , David Hildenbrand , Thomas Huth Subject: [PATCH 05/18] target/s390x: Remove unused 'gdbstub/helpers.h' header in helper.c Date: Wed, 7 Jan 2026 14:07:53 +0100 Message-ID: <20260107130807.69870-6-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791392527158500 Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Richard Henderson Tested-by: Thomas Huth --- target/s390x/helper.c | 1 - 1 file changed, 1 deletion(-) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 8d1e03f6768..a6c89ed0af3 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -21,7 +21,6 @@ #include "qemu/osdep.h" #include "cpu.h" #include "s390x-internal.h" -#include "gdbstub/helpers.h" #include "qemu/timer.h" #include "hw/s390x/ioinst.h" #include "system/hw_accel.h" --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791370; cv=none; d=zohomail.com; s=zohoarc; b=Bj1lhlbJTkGEJ2WL6QoJT6rHTUtTy9hH4JWQsz+tYaw8h/6lKRxzNPWO6j9W6+TlYR8geT3dTT7QXB95nJPlL6YKnBHRAfpOYhktiFoyCW4fKwUALMzJL1YB/NMuy/1h8mA+9sxYq/BncKUAC/iqvQgLNOFArwmm1PVUyypsvcI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791370; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=kuQHI+q1gbkBJnpX6BDTg6s0HDV4CInGXFHR6psqb1Q=; b=Q9PR0lR76GbJtLW9NQAOXVsSFfECSZWkm3IKgKn0Tk7htzuZERqz1V8YUHn6jS1s7O08JOH+ExiA2vuKlXrMkkneO4KVdaP3P0UaKZYAzTKNBikKLz0UqzTepRV2w/JCcA/JGl8l46sGs06lDUrq4siREpCs8t2Vlxlw+MXMlcM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791370490493.2850293768719; Wed, 7 Jan 2026 05:09:30 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTHs-0001WO-2v; Wed, 07 Jan 2026 08:09:20 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTHU-0000rY-M0 for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:58 -0500 Received: from mail-wm1-x329.google.com ([2a00:1450:4864:20::329]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTHS-0008QL-0M for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:08:56 -0500 Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-477ba2c1ca2so21697335e9.2 for ; Wed, 07 Jan 2026 05:08:52 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d86637b90sm14109815e9.2.2026.01.07.05.08.50 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:08:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791331; x=1768396131; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=kuQHI+q1gbkBJnpX6BDTg6s0HDV4CInGXFHR6psqb1Q=; b=Qf37ONiPM3jDGYICrVHK8ApQu7dZTw7C48Hc3e4wiex2cOajD10E1fK2PMOzLC+lKF Ke/1lkh6NIpRnaEkHPZmLWEa82kC1ydpGOxdEOkrOqR+1I/A+rVzSuaun1dslF6E4pym hGtDxMbz6JFKmsriDAJ0l7Qof7yVWgRGL14ISEYRFdI3IT/za7hQhFyHAxFkAovzQD/D FhmlMx4oI/dMAXU8thzL/e3f2I9U3x2PVF5vPKiD4HThat8jRpsxOzKKICh/mQ0cr2tK uyDQT1avgz1/hwL6+ThMcWBp9kUmK6bpIsRKnOzI6q2YWr4uET92JLcwMowaqdTGCI1N /7EQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791331; x=1768396131; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=kuQHI+q1gbkBJnpX6BDTg6s0HDV4CInGXFHR6psqb1Q=; b=GWLe9dXIWP/TRDvAaiJgFpHZlvPzkY1HDHxYJlA2QYWWg/fObzyr+rYPtKJs7ZK7Oq nEmRd6DyIWd2ZFQeereGkjy5fQi5SQly9zrLqTPhLLkrvpcljoF9ecAmPjMX33Uba5dC EZ6I5MGPVl/RqctXEbXTKa0awhSI+7b+zOYKB549ktAYxm76vrOcrrfDRYbKwiD4CIre YR22bnArJGLY+oraXzA4mouW353PjyJt5BI4qt4E9H9jywPoB9nHobl/kQZGMiiPPGt6 sujpclOhSeKTO2nAPVblSWsmxSIKjIKwWueOFcd0HYZvCsl7a5ueribHHrq7IwnHqMMl WDPw== X-Gm-Message-State: AOJu0YyaLteeQJsC1e+RzOaC3ihpWxSko8q8DJMZxxKwc0Z8/7mEiyZV vQyiAG9oYAgQrfkzJ6HfPXm9catJ8WOMXaFH02kw0Fh0AiI0RB+E3pbgVWdHkSSrzIAmBPq0/gS ztr5NhSI= X-Gm-Gg: AY/fxX7Rr+zz9oCsLsrFiFtvZcdI8PsS9p5A1ZDvupeyiiVXLNeqSU0aoU+lf+8dc2S YJnZRI2Z3TOhQe8EltXPRlWvas9oD7P7Ou1OhH6N2V3lVtOb+d9nFIcMkHI8JHHhbMcJPcQ2YcS qDyRseq4644fDhLutGQCQ2nlrIbx/yAuIcULIXIobAx2Dqx0XpYSq8dpScAZtgvFm0A/SvQWx8o u8P55RiGAgNYHmxn/xSroQTVX9HzJgSBPXeI3Ni8ZNDfQeBjWrqUiuX0ZhcaRUYydcyVburI3yT NJLhvRoHe4FO5otZLAUyaIo9bqsPr/LxvnG0YOQRh35HOQCsQRoXNCcILMGjaaWTLtfakgYLFq+ ZIK9JLFS9aWUnQk2Pgn0LfYuxt4YW2LhON4x9lZq2eotjL9Cf3G/36D6wAVNCrWAGQjeTqkNP1O x1SXvdg5jx9puE3PEvAuzysDMQFKD+ez/ED8L/6/3+qRKiDGkvTQHWdp3V4vXk X-Google-Smtp-Source: AGHT+IHSptVLu7l8uBZB+TJMhzP3+3+lzGXD0gW0SaDYo5AJyAg81fDNffclOvt093Z+icB0Co1AwQ== X-Received: by 2002:a05:600c:4e86:b0:477:9574:d641 with SMTP id 5b1f17b1804b1-47d84b3281fmr27619445e9.22.1767791331436; Wed, 07 Jan 2026 05:08:51 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 06/18] target/s390x: Replace target_ulong -> hwaddr in get_phys_page_debug() Date: Wed, 7 Jan 2026 14:07:54 +0100 Message-ID: <20260107130807.69870-7-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::329; envelope-from=philmd@linaro.org; helo=mail-wm1-x329.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791373450158500 mmu_translate() fills a hwaddr type. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index a6c89ed0af3..59e1fd0c4fe 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -43,7 +43,7 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr v= addr) { S390CPU *cpu =3D S390_CPU(cs); CPUS390XState *env =3D &cpu->env; - target_ulong raddr; + hwaddr raddr; int prot; uint64_t asc =3D env->psw.mask & PSW_MASK_ASC; uint64_t tec; --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791468; cv=none; d=zohomail.com; s=zohoarc; b=Gkc3eH1PnsGt0/l1F5/D60VyVuUznxcuIQr5Rlym+dKbTC/Ajy0g+uXfVd3poAB80GPGY3FddwuKNL/xdmeT48KJDIDkjBlmHdgjDdB6VeIPAFY3MIts5vYk8kNS3UoTXKoBhY5Ma1ZNvo5zoUxG3zQKTZiMBn4JCd62K7/xWk8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791468; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NJT9/Fz1DKFflJUDbix19L+27ce9cn0U0DoKqxhNjvg=; b=iP12sCmK7TqKLSB87rydAL4pF6p6WHkiv1xQ9hdyIQuHY437c2OvFjqkJqG/RAdufwkpuAZNG4FxAzThY45Ue4VMpNxcvH4tjKxo/AFv79babXYzYq4mBi4tgK9Vz2GfdYKNIPJLEQzWEdh7m6E/24TO8bPVi3HPEnCdeOLbFvA= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176779146836910.897570421200271; Wed, 7 Jan 2026 05:11:08 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTHm-0001KW-T9; Wed, 07 Jan 2026 08:09:14 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTHZ-00010R-LT for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:05 -0500 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTHY-0008RG-99 for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:01 -0500 Received: by mail-wm1-x341.google.com with SMTP id 5b1f17b1804b1-47aa03d3326so17448135e9.3 for ; Wed, 07 Jan 2026 05:08:59 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f6ef885sm96948515e9.9.2026.01.07.05.08.57 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:08:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791338; x=1768396138; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NJT9/Fz1DKFflJUDbix19L+27ce9cn0U0DoKqxhNjvg=; b=pYQH22wk1ScK00JtvkefhauCFia++IREeXK8lFWgUvHiIHbhEjtGdGsNA/pIJmEAJw cUnsDZrUdPSqJgoeMis5vt+uBsNl+hD16XVbT4XOkE/UWCkR0MaJTotpEpxOqlk8IZeK McxHYNL1VRFHMdbXXaXm+Kpzt6SnPQ0vwVk1giVPkwxP7qQBVHqSfOoKirctF+rToSAk 5SVFuAVrVyGFxhoABQvG5Z9tNs3Zr/sVGDrrd5GJwWVyrNCYqf8sDiZ71FYVUNOPoG/v iHKF/1mcZh3ZmV7b7GeFdXzIckU3FLyRp1dxyxZBCIyOCwCUEeAUQKB5sh4mhnNskQff znLQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791338; x=1768396138; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=NJT9/Fz1DKFflJUDbix19L+27ce9cn0U0DoKqxhNjvg=; b=foL7Er/otD+/hNmncwQmMTSmAoTFC1OjIyAPXXFrcGxYH/YAxjuzckI0Rr6mbggRne 2h3SbyQBV2DN+rZ+J8fm41iK3XaqZbxxbJBgKF8BwDmk57BvSUwJGKnwrcEDsgxFckOU qqKxiQ0k29MQIlfbhM9IH81sBFzO533lbJ77cRFe9yOBqwXohmkAQvvV1YlUrBeRiFHh W/ta3eU39Pdd1qyIqgCqk/KXBDDS6ZmuFVEfLrd3JBxwy4+rvAshJ1LxsOPYcAPXyGpQ VIX62UoCFfruUKWbXqlVKJYKBS869VBbU8pdx2uM3BQGkCVCR4FtmPayF+mYUpnf+Dhd 04rg== X-Gm-Message-State: AOJu0YxrrkbBlN2M3NB/WXIK7zLFoRRRenuEnP0ZZn+lVH31vYBAB92u 5Cd/mWmNXbztZkqimUJ6XmmFxe83fJXV7kT75bhJgLfSxS3E3IXsYCsRALTjaICbUTVDLE6XTb4 Mvn/1f8nBCw== X-Gm-Gg: AY/fxX5JYT7Ti0zVNmu1gUEff3+bwcRBYfnoMXkbO55UtAFJeGamCWk5o0dhNy/ogj3 VmxfIZobM5fuHjkq3BjEYVm15lLzbRaCuEsZXrDQBkqZmxGncjFRg9JiFJiHSRrzDvQBbc1RNGZ L1RSvlRIvJNS2TNjq/bb9FJma2N0C1ym8Js5mhOEx7eFjxSo9q4+ZapAkrA87bNyZebsEiiu9NZ BhMOD9dIMv1veKkhmqUdzmV6wI/nXHLHFkZFiKrTVDxl69D4doyvHZoCxoZIy2Cdh9EpRBb4Hx8 BuThSlCoUb/jtajY13suMYLFAKLjDEpJy0pqsTSPeu1Zw/j1tW1l1IWfHaOfMjxKIoH8GXGdflx uAKzoJTYyu3yCmejjpm2s6UigFFy+ni9bk9kpmyfltDox3DKb68QnmBDQDNc3jIJ7lYZ/EaOjS0 u8uOurgJw9OgWutx+RO10C65nfgNWMVYVSpaOniMDvplV6AdYhm/6dsoZOTu6j X-Google-Smtp-Source: AGHT+IGyYy5bQKimbZCunnZTD2OgD8hYWA+Rt5Qyp+v73adTlEuxLZOuy2mYYtm/4Kf2rms+Hon0uQ== X-Received: by 2002:a05:600c:444c:b0:477:7b16:5f77 with SMTP id 5b1f17b1804b1-47d84b0b303mr27018715e9.3.1767791338342; Wed, 07 Jan 2026 05:08:58 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , David Hildenbrand , Thomas Huth Subject: [PATCH 07/18] target/s390x: Pass vaddr/hwaddr types to mmu_translate_asce() Date: Wed, 7 Jan 2026 14:07:55 +0100 Message-ID: <20260107130807.69870-8-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::341; envelope-from=philmd@linaro.org; helo=mail-wm1-x341.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791469094158501 mmu_translate_asce() translates virtual address to physical one. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/mmu_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 9ee1d778876..ccb53e99ebd 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -122,8 +122,8 @@ static inline bool read_table_entry(CPUS390XState *env,= hwaddr gaddr, return ret =3D=3D MEMTX_OK; } =20 -static int mmu_translate_asce(CPUS390XState *env, target_ulong vaddr, - uint64_t asc, uint64_t asce, target_ulong *r= addr, +static int mmu_translate_asce(CPUS390XState *env, vaddr vaddr, + uint64_t asc, uint64_t asce, hwaddr *raddr, int *flags) { const bool edat1 =3D (env->cregs[0] & CR0_EDAT) && --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791401; cv=none; d=zohomail.com; s=zohoarc; b=ms2wzYxjZ1DL0dipXRmKh+Zo/mGI1lj8eFQMwRb7BrmFJGAtt79MO6Ut2sPHl9NHex1vxgXqLzynxt5xxwI483RgEjwFeCidCYR25qWxDfvQLfd+fyfTX1ztsONRctFYx++Pupd0J2JW9y4oMkZXU4R8wEA5m/+ZeSlyRZG/KF8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791401; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=i5YNVHn+fEcYtVEEvGoIpN+2XTdoPVL51JCAEL4vRnE=; b=Qr5WdVK5CtW843+LvHS+9uvRLS7mNF+ebxMdLNhnztBoli0RRPY6tgCBsCzHihg9V+dkfh7Ab/hnGMORjXSfRMkBmFQPChNMXyGZTgzLsaQVb47ldXOGiGF1E4Br5MX8FbTqp+cdDiRLwQDSB/xqpAWZLtEfyKihuiJ8ORnBL58= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791401426115.83684876972063; Wed, 7 Jan 2026 05:10:01 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTHo-0001Sr-U2; Wed, 07 Jan 2026 08:09:16 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTHh-00016i-KL for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:11 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTHf-0008Rs-AQ for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:09 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-477563e28a3so6358775e9.1 for ; Wed, 07 Jan 2026 05:09:06 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f6f0e15sm92747725e9.10.2026.01.07.05.09.04 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791345; x=1768396145; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=i5YNVHn+fEcYtVEEvGoIpN+2XTdoPVL51JCAEL4vRnE=; b=D2UqHxGPX+bSObcAntW5HsAdsFYNZ06ujG3DmrIz3NhjPxVb/NVX7v/fGkI0wZ7llW 5KzUb3aBbbPEOM/IoMtvTt3L4SRFAnPk02JsF9NDyZkoZ1YfApWS6WM0gnnqPRjWHY0d a5FI8arW7lhn/pssOa5XmOMzQHoi+VgeuVeMDf4zcSjSs/UBwzZcBpL9i+/b8ZVQAT/V Duo48JLQ5zoKTobumvDL1reCYbULDtSeFOPrmr42tlJTggSsQQlouJN3lM58nATyAqFJ 2DO5IHmj7XGw2Qpo1oHYE0MwUBL7XVtTa8s/9gjjQ50xd9OW/YZTTWPYd0YMX/5bH7LP E2lQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791345; x=1768396145; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=i5YNVHn+fEcYtVEEvGoIpN+2XTdoPVL51JCAEL4vRnE=; b=n1eU+TRAq9MaxVyO51JFja/sv8DaxLgKqQxFkZki7urkiVijVxKKPI+8iIirV2R+dS Q8a/LBD5LuTTk2u0MnugbFjNxyeqYcs9h783Jxk3L9Ga976shO9QAfX6ZMuOx8gOTSoo zDnI7jgjBExQIwJ6kPchgPpOZ6mIkh1r9yIGrsO4fsyHzPNU1r3RdWgbGMAzpArvB7mx O1YcEMFbxZQFzmr1EtUK2aGU73QjSI0gME2wLDWNJ9dYaC+aN6+swYo1Iq4nXAKjKpq4 6yjmeS3U7vJ35hFoXI/AzPaCJDuPyw1znX0r4I67N6FUzDQIGF5wDr9s+ciaxmto/Mpd Ug5w== X-Gm-Message-State: AOJu0YzNLAeSvO5hf7qJFWTXna/NIcijnnmll79r7d2FjFrCYffCuJTb grEAyebVnkaG2UdnL8wQsllMbO41/SfkTkZhSAdtm+wIR7Q6UDITsBo1phTQsG6bOp6XhaNWaKl jB1gvW8Q= X-Gm-Gg: AY/fxX6b6JI6qO66JlbOU5Q2kJTn8rwAZjpKi7JK5a6rkdkc7tZVlqEHsuQQPvH4DgD Oy2QrajtBeODWKJpyN6CoN0dcVDjlpZu7zl32ry3vMxgC1ReGjRea4eSfI8fxDRs+fK/ehwbEQJ aIsup+pZuxSDa+vrQ991gzoi82PyomklApQariFOT/270AIjDOiXXKIUPZwu87YaIVmuAMBGRCK VCc/UzToNGTrMYq5ox3DDmWC+6oBGRDxgdgiL0FYb4Nn10VgicTOUzNZOqOslgfoj/eRIYQM2JU 4gj2Wj6IrsKSW4QcNixaLp+InGmppNCaJLFdVuGneh1inm+5gHkYVgweIRwbgajVYaVG+9XwmHa W17vMY7pw+HFvdNChc35B/OUKyICT7v9EG3RG36a16IfCoBSVb+JB228mrt/TaAca25Vdjjfqgx a5APcEjJban90BaBF5Q/9iOilGpOogrK8gER/+BKeI2NXr1fhoye8VJAbfgWDV X-Google-Smtp-Source: AGHT+IEtQQD2aRCIInNws4ZiwB2fokk3z9xBU96stolcOMN1Rve7mHcCfP7/bvJlrOVb9N8bF/oKjw== X-Received: by 2002:a05:600c:43c5:b0:477:a53c:8ca1 with SMTP id 5b1f17b1804b1-47d845536f2mr26145145e9.14.1767791345161; Wed, 07 Jan 2026 05:09:05 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , David Hildenbrand , Thomas Huth Subject: [PATCH 08/18] target/s390x: Use hwaddr in mmu_real2abs() Date: Wed, 7 Jan 2026 14:07:56 +0100 Message-ID: <20260107130807.69870-9-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791402509158500 On S/390, absolute addresses are physical ones. Since mmu_real2abs() is defined in mmu_helper.c, move its prototype declaration below the 'mmu_helper.c' comment. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/s390x-internal.h | 5 +++-- target/s390x/mmu_helper.c | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index a4b54dc441c..dfc95702c51 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -10,6 +10,7 @@ #ifndef S390X_INTERNAL_H #define S390X_INTERNAL_H =20 +#include "exec/hwaddr.h" #include "cpu.h" #include "fpu/softfloat.h" =20 @@ -367,13 +368,13 @@ void ioinst_handle_sal(S390CPU *cpu, uint64_t reg1, u= intptr_t ra); =20 =20 /* mem_helper.c */ -target_ulong mmu_real2abs(CPUS390XState *env, target_ulong raddr); void probe_write_access(CPUS390XState *env, uint64_t addr, uint64_t len, uintptr_t ra); =20 =20 /* mmu_helper.c */ -bool mmu_absolute_addr_valid(target_ulong addr, bool is_write); +hwaddr mmu_real2abs(CPUS390XState *env, hwaddr raddr); +bool mmu_absolute_addr_valid(hwaddr addr, bool is_write); /* Special access mode only valid for mmu_translate() */ #define MMU_S390_LRA -1 int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, uint64_t= asc, diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index ccb53e99ebd..b73d902b05a 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -86,7 +86,7 @@ static bool lowprot_enabled(const CPUS390XState *env, uin= t64_t asc) * Translate real address to absolute (=3D physical) * address by taking care of the prefix mapping. */ -target_ulong mmu_real2abs(CPUS390XState *env, target_ulong raddr) +hwaddr mmu_real2abs(CPUS390XState *env, hwaddr raddr) { if (raddr < 0x2000) { return raddr + env->psa; /* Map the lowcore. */ @@ -96,7 +96,7 @@ target_ulong mmu_real2abs(CPUS390XState *env, target_ulon= g raddr) return raddr; } =20 -bool mmu_absolute_addr_valid(target_ulong addr, bool is_write) +bool mmu_absolute_addr_valid(hwaddr addr, bool is_write) { return address_space_access_valid(&address_space_memory, addr & TARGET_PAGE_MASK, --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791432; cv=none; d=zohomail.com; s=zohoarc; b=SjoKo1rlgwcEj7vlIg9H6uOHLar7Fk5b/XmnRvot/oBHXli8k6m7y0JiaGtfRroISax9lX9NDDs/kPHXIv0OUAnrFW7pHhmpejvGFpYE37wJQ+/XPsw2ZxOVxrA1VluYE6GF2lDwGd8Wqu1Ehri5st502koBDJ0ks2/WmMgm6A0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791432; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=UPkxcYHG+SlsC2jdk1bjarvCnbLuCT55aC0CvSPC8p8=; b=M2DREfLKyVwHtazi8pk7EW22RdmZCR58rRYzE/lPlyped94L9epDahl6pjdPJH4Q8S6SYHgTa4pV4KbSoAAIGFSy47WR7e/WaLUTkaNeGxIUNyZK94L+PPuxsBFvPWclaWNwd8/Uo81w7xM9KeLStCax0xDkswYF/yg9te1anlg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 176779143263591.21942268688883; Wed, 7 Jan 2026 05:10:32 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTHx-0001oj-UX; Wed, 07 Jan 2026 08:09:25 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTHq-0001We-C5 for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:20 -0500 Received: from mail-wm1-x344.google.com ([2a00:1450:4864:20::344]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTHo-0008Sx-2f for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:17 -0500 Received: by mail-wm1-x344.google.com with SMTP id 5b1f17b1804b1-47aa03d3326so17450725e9.3 for ; Wed, 07 Jan 2026 05:09:14 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d870dd5b1sm12800305e9.4.2026.01.07.05.09.11 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:09:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791353; x=1768396153; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=UPkxcYHG+SlsC2jdk1bjarvCnbLuCT55aC0CvSPC8p8=; b=Akxrt+GP9NKajKkrfPEgZBTLbJvW0Dnw3ER/2f+Cd1ocKM/t1RMWyRDtjZYzC9w5mx ufBc9dD02pga0cunsuYtzvhWZR58l4DbykefGIOqwUAu1jxhDqz+fqMF5+XlanMZ4HO+ R2UCM2LAJMI2lkffdm9BsApQgwc8MkN1xEzVrMuJRiCeFBT8T+xaOtl49SIdiZCPXMSa Iwr9jFuBf565rZyM1OddIoFEzrNMcQMrPzhsl4dysC/VkBIeND6pV1099rr1pXisJafl XAgTH6PR5SdYAJ1qVF36WIlFARYGq48n4Ei1fhqoz1fTgzr08n6XvTYfBCTKj1RsaADr KSpw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791353; x=1768396153; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=UPkxcYHG+SlsC2jdk1bjarvCnbLuCT55aC0CvSPC8p8=; b=YVHQ2MU/z1y6/fC1SICmzatg03OfGcaXyBbXwZ1vtp1NyDbHquWEFVmVw9JUHL6/V7 tsSAJphA4MOmPdLQMJVaV6BYnKptgkdfoEm6oqzVUZjiMxZdzqcoKoTssTTfpaoxiDOH 3llVaIypEGo512djuZWJDLHnrKCaxTOgONwvgElv7A+1QpuitASJW6FHXR7t781kmkDp ST9TYLEZ8ENAe2FhFEjEJsbRC67NvxoPw+35PAUKXTHOLvJmmXg3hhG+2WTi06+1p7jQ qdnHcqgCVtGla6u1vSL7Y1LLKN+22lKPslAlApRHHvy3glopKsGtiuyUmd+6lckPyTpT thyA== X-Gm-Message-State: AOJu0Yx9xmH0r/QBu9iEKlmmGxDErDajSEr5VYCAMXdQSlactyOKRPB0 Sjiwr9yjf9SvdjnrZBroV6NqUKifIXL4XO5URgnN6K3otyCyjUmVf283KyUEQu8srfRy3jcMjVz bkDsse9zGbQ== X-Gm-Gg: AY/fxX48bu6s4FxdXMZIA2U6Ls8L0yMnvgKcXGsrxksula7C7LFVk9hJEGz2CUGIm/1 QlxTXyxMoMpblBkHuno3ZOGnStj/jvQOS86OpJgf5akx2uN6651x53lD579Qgn7aZbnBmo79dQU hY8BB+gP7tZjYNBjo76PH2ciD+nvfZKu8u/p1lyd7WO1HiGTghsSkBKUE6IXsOAfAO9x5GnodlE f1H7ej3wOJmR9ibOwJzwD6GGxMcvGQUy3XUSsepyCX2EEqG6ikx4sB4vNKWJjMVcD4k3nySjA46 j0vhktZ123t4cSIqFT/cg6WXVq5fTM7o59k1nBLk28Up24U4CSEQXr2+ysR1tNLiFPY9/KwuYNz ore4qwQzP0hqChuR7nSTODwOBGODLjU118MQAox8FBeapLK5X52u+5ir1zJmAwFRJeQtoJpcM/j R2QcS92D6gu58eXP3vTtjXrcJcnp14qvonQM9MzA4o2+MqS4K+QPp3mespftHX X-Google-Smtp-Source: AGHT+IGFNV9A9ubBI+h0ii18zKZyrY1NtsEcAA51HLWKqSq/fxGaQ9gqyI4+WVCKJNrtWPLzY4N4XQ== X-Received: by 2002:a05:600c:500d:b0:476:d494:41d2 with SMTP id 5b1f17b1804b1-47d84b3bc37mr19851835e9.29.1767791352769; Wed, 07 Jan 2026 05:09:12 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 09/18] target/s390x: Pass hwaddr to mmu_handle_skey() Date: Wed, 7 Jan 2026 14:07:57 +0100 Message-ID: <20260107130807.69870-10-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::344; envelope-from=philmd@linaro.org; helo=mail-wm1-x344.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791434698158500 mmu_handle_skey() takes a physical address, then aligns it to the page size to pass a guest physical page number to the methods defined in "hw/s390x/storage-keys.h" API. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/mmu_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index b73d902b05a..5a613b33150 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -296,7 +296,7 @@ static int mmu_translate_asce(CPUS390XState *env, vaddr= vaddr, return 0; } =20 -static void mmu_handle_skey(target_ulong addr, int rw, int *flags) +static void mmu_handle_skey(hwaddr addr, int rw, int *flags) { static S390SKeysClass *skeyclass; static S390SKeysState *ss; --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791433; cv=none; d=zohomail.com; s=zohoarc; b=HmuIRGxlu5eyPLCAqQnnttGdygjGPYnyqRq/nDecmv5psayXstVAEbvLOjzfQQRQOjkioKaBUmU10mhfh9LIG/k6NWJnbjE7mY5CVDqlgTNiR1K0YR3KAn2AqwAlq0tYVqf33kGf6a+2hIJXt015389ko51VBXKs4mA66U+Y7+c= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791433; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=L4PaD430EGXIEVzYZ6UquPoib7etUUnvv6hu8bCFULA=; b=WkeEeC1VycqwmoYtx1Q3EqUv6Kce8sjesJ5K9UMaTqoqrKf3hRXZpc+H/lFMbJ1ect0necZKmjklOoxNVLWgqBFSVvnbnED7G7ThlhEqSJcorQeiTQuw9gCzC2Q7BPhOnlOlZFUE/vHkQx8kIggqNzAc02AA6FxpA6Wl0tM5f5I= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791433132317.87935403567224; Wed, 7 Jan 2026 05:10:33 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTI1-0002Af-3n; Wed, 07 Jan 2026 08:09:29 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTHv-0001oi-2r for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:24 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTHt-0008U3-CI for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:22 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-4779cc419b2so18205405e9.3 for ; Wed, 07 Jan 2026 05:09:20 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f41eb3bsm100064535e9.7.2026.01.07.05.09.18 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:09:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791360; x=1768396160; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=L4PaD430EGXIEVzYZ6UquPoib7etUUnvv6hu8bCFULA=; b=NYN+QEZmnjq3lxfK2ZgN+OCSI/k6iwvlYl2Pi0xc3+VxkaF97nTl6vDL/Uaj213ilL 8ZEeW7+eEXOQjs89HVlhPmcciOD7QIci39P3X5ZGUkwuwbz/0W9MSbo4qOr0EcHBMu4i Cy8B23y1fa35VZWwSIva0k/4DL7LWjDhSN5OBHBAzXtSleO3ZTrgmeT1RcXOTXUirBwH 07M79FfxBJ+Qj7aLm91b5RzJHmhV6rcvP5m5BM8CWN0USn7HS3+Onat5bAJT2htEfaWQ MWcLrkc4kVl2So3r/sVBz0+UKvr6E8RN1vsYgLI/W35pbWK+Nn+NvFzePJvZa6Os6fPu frpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791360; x=1768396160; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=L4PaD430EGXIEVzYZ6UquPoib7etUUnvv6hu8bCFULA=; b=LBgaCvho6HsFFMfzBbQB+GMjRIAe1XkvA7C/NIIB2FGlOpfMA5LiX4gT97bqIAKu0i 8GqTRabrx/3GuEZpQDz0nrc69C6PlNcSlZ5c2VXbn2DP+G1QTTzWuJu4pSc6s+3vxVJ8 pi35s6H3VcFN42i7cic7v08biejSn801KxYCUbaA6PV8HNorS8OjqCIUXKLqCYdyMp6S Ekc54hepUoJgX7veyiH68fK6YqQ/itrftA2VtooNvzxARQEWfp1+nKuYL4RuyyRANbXW QJo0SOjExTbNv1qo0bnh2r0Xeb2yql6qwE0K7KccEIRm5HetYAV6cuXAkaJ6jvrr81mo 4O5g== X-Gm-Message-State: AOJu0YxzGvSKJz5OF2AenEAS7jyVqoqrtte2awfYHDUG+5Hg65t9Eubu ubF5IrKWXwLZ3ubonx5ooQcWRHL8C/M65CO8CZghxcigIc3/IBp1H8NbxqFK/0ULFghn556d62m zPWmg63c= X-Gm-Gg: AY/fxX6qLIDOLMJE93CG2iSEXFpuDhM+PQETCl8E7d4jZYSjwOzK9sd+HFtRIcvM8bL yVqM5qSM73cJz+xvEfYdGnCHqvwJD341c26+bfVi1zhmA6CxOJdjFWpClbb4Kxbop/eM5VazT4X 8LD20ssrLDPm1pssfMf/+magBH/0ru4amrBvS4/RkaiKfzI7w73/7GHHE52Ubx9ZGB7/Nt1CFcn fGHnU+ShWZgRjfOXrf5h7lFXPhdhz3gqi/+sCXxe6YzO+uKo4tq3RtqV32D7fG3UswowxoHrTfE NESJ2qwGC6Ugd4T/60ExdRdpCsBc7t63E1gNrqGCJ2G4MVk/mqlHhtdgloXAyZ1DtUo+MYJNoFB Fr5bQW/e1hmYfjZpWvfHAwDSFiy81J6gwzmpRhL1DihsDVuWhQeBZAX1dzaNK1WIRXGqF0oWWry HMmnI0WACBH4OG2qD+TY0zXMWy834mHsRGYEIMjXVVsUPB7lexw5eTE6LcpeiZ X-Google-Smtp-Source: AGHT+IGJHm3AIhTNX1Hx+55SqnCj4e66tLAuqWhX+DF2Aj+zd6vsnU+EaAgI8iahpZfbU3DZG0ZFkQ== X-Received: by 2002:a05:600c:6287:b0:475:dcbb:7903 with SMTP id 5b1f17b1804b1-47d84b17b7cmr28061995e9.9.1767791359613; Wed, 07 Jan 2026 05:09:19 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 10/18] target/s390x: Replace target_ulong -> vaddr in get_phys_addr_debug() Date: Wed, 7 Jan 2026 14:07:58 +0100 Message-ID: <20260107130807.69870-11-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791434605158500 cpu_get_phys_page_debug() takes a vaddr argument. Rename the @vaddr argument to avoid confusing the compiler. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/helper.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/target/s390x/helper.c b/target/s390x/helper.c index 59e1fd0c4fe..f124b16d1b3 100644 --- a/target/s390x/helper.c +++ b/target/s390x/helper.c @@ -68,14 +68,14 @@ hwaddr s390_cpu_get_phys_page_debug(CPUState *cs, vaddr= vaddr) return raddr; } =20 -hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr vaddr) +hwaddr s390_cpu_get_phys_addr_debug(CPUState *cs, vaddr addr) { hwaddr phys_addr; - target_ulong page; + vaddr page; =20 - page =3D vaddr & TARGET_PAGE_MASK; + page =3D addr & TARGET_PAGE_MASK; phys_addr =3D cpu_get_phys_page_debug(cs, page); - phys_addr +=3D (vaddr & ~TARGET_PAGE_MASK); + phys_addr +=3D (addr & ~TARGET_PAGE_MASK); =20 return phys_addr; } --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791388; cv=none; d=zohomail.com; s=zohoarc; b=KjCL6d2iYpj7X44YX6HYmhBvx31ofxe6Zw808NfmQRSR9MkKwu7d2F3XL6xevt4r7XL67nvBBiZNplzy02QraMjDnioUYvBCEBIxlEEIvJ513FqK/STytF91Q0edIRDzULKx+K2zjgdDdk3LVimy031JiGZlY5Wt2keT3TJQW6A= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791388; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=MCaTjNyAElQFuFaR8j3JF4/CT8EzoT5R+7ooDRWgoUg=; b=lLKQhRWKauxcmdlXB/4Wd4mBEAC1A2cby2BPz19GqizHJk71eppiIewRA5Sc+GRgsrio1kGI2DEW5jTGaz8Nf3htgDR4KD48+7UPazbjoZUQE2c8mabyNcyKhewVI6VC+7nFOrzuutn8SqAWZrXGCKEyCO5bgiW/8f9xB4WuIUQ= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791388620685.6465059656043; Wed, 7 Jan 2026 05:09:48 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTI4-0002hX-1m; Wed, 07 Jan 2026 08:09:32 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTI2-0002SX-DX for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:30 -0500 Received: from mail-wm1-x32a.google.com ([2a00:1450:4864:20::32a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTI0-0008UY-AB for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:30 -0500 Received: by mail-wm1-x32a.google.com with SMTP id 5b1f17b1804b1-477a219dbcaso17219025e9.3 for ; Wed, 07 Jan 2026 05:09:27 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f69e802sm98419495e9.8.2026.01.07.05.09.25 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:09:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791366; x=1768396166; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MCaTjNyAElQFuFaR8j3JF4/CT8EzoT5R+7ooDRWgoUg=; b=zV+Gwa5/0KqySKpL2x95VaM6PtKSS9EzlUhqruwF7WDHQFaF6Y8ND5X0fY+GC1qqog lxkCfwlIo2tedF4plivJq6WWt9efKJSbZOowvpZSIVINhvlZiHvVNaO0AXg+2ynwTB8p XdOVtt7/K3mymi+MT9rcqJtwnrFdjQnNmOD4SUwDLV2W84PmZZ6wZV9yv4G7mQppbhmi GNutqPp5ivIP6bGIyGxzBKHPyUaS6xxI60XzFbWa+slgpyZ4qq1XZcIRiuqIS2c7ulIV gfjtr1tnPMV8vzTXAs7KV9RdHzqKIfEG6uvqrJDFig04ZM7Imn/1Hke6YxMlIxNuA3GZ qkzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791366; x=1768396166; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=MCaTjNyAElQFuFaR8j3JF4/CT8EzoT5R+7ooDRWgoUg=; b=f5pGbex8yMWGMtSgP+60Ui9TgOIHduzviIDQVosFKNhCBlvBa8MolSVQ33rHrMcLuE DdRHeCd4RYH8XaU3zNuSC9lRa+m4Rs8MbK0eAOcAT8T6wFF/r+juAT5ILpxF0iZe+uRc VlPh3RQG68E4fndvAUrVH8bmp8meZZFrtSWvc8k7+0JXHbp0S1KB4gKnx/ZH2Ugv2B03 SBoycfhLEGHo4eNIU4wZDY1Nqn5OyAJQKgURsRtX8GvhpGcQGE7L+BnunFdlogXomywq d2KiVk7jSOl5JgtUa4kc3DR7ljuO/f3HUjjmJE/Chra1oV+w9/585amUyaYBvbhptde9 12GA== X-Gm-Message-State: AOJu0YwaMzUz157MlQYk1PKe7s+RA/YSs/cbTYyiYBiMsrMLFMLzvAas uQ1q42XgoKh8Viuts4gAS9cyuvMMHOc4dDDfzDFOU/T9+tY91TWm0Riq4IsCd1xzYYAtlomSkav k5ftFwek= X-Gm-Gg: AY/fxX6ypnqsXZg9NH4JwcEnRJHYYaxszAhB+hSkcQAyDspISwfnDyfAKoYes25Dz+J qezm+d8UUHVmpHa5M4bpkKyPx+Ioc8NKrN5JAc5vqzfQbhNVnmc4dEAIb5yd9gsdW2nv6PyfDWI OvBcf6bBShwwktCz1gBTTUlVdUwXsnMGQXjH55Sxnic/18oMVDOs0/m5W17KWboJKY2X5DG+DkG wtFX3AEk6CcmUMFN7jI/dC6o2M+22vnQATYSdg3RLfT6dCCLGqwERDR3NSsa3vxoJR8/cjexcPI YJQfOSHF1S76pXHoSagwvNrNneK0CCtPLI0gFkp6rhCTqzjaHTJR12xLTFj5JHenH3k+75hqy3M F2s7tbCAd6riTo4Os9h10bttujDHqBgoK10QuYqJ6t44huf5HU6v8ePRTNydEK070jETdVMB8Sw bc1UuH+WpFilkTGjyBnvFwxksKJk4+X/6kF7nJraO3KtNxdk2niVFH9xiPpj4N X-Google-Smtp-Source: AGHT+IGstuoxk93f01RZYxKuCOEX0adEmlTV3HCkPoAnZ51DRU8HM7FJmp0RtPZo2emeBonYGlOYxA== X-Received: by 2002:a05:600c:5490:b0:471:1717:411 with SMTP id 5b1f17b1804b1-47d84b33bc0mr31711575e9.24.1767791366401; Wed, 07 Jan 2026 05:09:26 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 11/18] target/s390x: Use hwaddr in translate_pages() Date: Wed, 7 Jan 2026 14:07:59 +0100 Message-ID: <20260107130807.69870-12-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32a; envelope-from=philmd@linaro.org; helo=mail-wm1-x32a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791390536158500 translate_pages() returns absolute addresses, which are physcal ones. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/mmu_helper.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 5a613b33150..abf8da28ea5 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -472,7 +472,7 @@ nodat: * the MEMOP interface. */ static int translate_pages(S390CPU *cpu, vaddr addr, int nr_pages, - target_ulong *pages, bool is_write, uint64_t *t= ec) + hwaddr *pages, bool is_write, uint64_t *tec) { uint64_t asc =3D cpu->env.psw.mask & PSW_MASK_ASC; CPUS390XState *env =3D &cpu->env; @@ -523,7 +523,7 @@ int s390_cpu_virt_mem_rw(S390CPU *cpu, vaddr laddr, uin= t8_t ar, void *hostbuf, { const MemTxAttrs attrs =3D MEMTXATTRS_UNSPECIFIED; int currlen, nr_pages, i; - target_ulong *pages; + hwaddr *pages; uint64_t tec; int ret; =20 --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791409; cv=none; d=zohomail.com; s=zohoarc; b=m5OvyAq1Rui4jtOrI9YUIYefcZbW9posgMUaD5OmgD3x7f5q66jObVX9sl3ZZTiMxoxQjBRQ5IANz6pjKNx3aXYQj0FDJ4948CqvyX+w03pYaC5t+E8MoKISGrKDaMrNk7uKmqfMoyyZOTZx2Y2BQ3DSWMPVedJf9ZS4jSy8s3M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791409; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=iTd24fuLkUcPdtjlQ0PktHxm0veo9AVLLnZX4UIhnN8=; b=MHO2848I0ynbEQJ1FR6rYh04WCSG41P4LRCT5XQ2VAxxfZ7I3LO4xAVPGqnNMWewP/fA4QyxpI8xdhUuVkbauC3ifY2Ff7BgRzJgHWCo7GPqN3Xk+huIoyh/BcEnsjZLwA1GEdHHt2qLPKoN+juaF/WXxx3r/1D9B9LnsvEUNtk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17677914091951023.9270878194615; Wed, 7 Jan 2026 05:10:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTIG-0003fL-V4; Wed, 07 Jan 2026 08:09:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTIB-0003ML-0h for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:40 -0500 Received: from mail-wr1-x444.google.com ([2a00:1450:4864:20::444]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTI8-0008VZ-3y for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:38 -0500 Received: by mail-wr1-x444.google.com with SMTP id ffacd0b85a97d-42fbad1fa90so1661981f8f.0 for ; Wed, 07 Jan 2026 05:09:34 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd0860f5sm10069642f8f.0.2026.01.07.05.09.32 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:09:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791373; x=1768396173; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=iTd24fuLkUcPdtjlQ0PktHxm0veo9AVLLnZX4UIhnN8=; b=Wrq+YNp5LKubCBonlG1lUMYzG5QgkxRrPScAhptwQCFlnb7r7hzB8E2CLR58KEqa8S PP0B+3DiylUw8Nq+eclOE6AU0jCtkPBaP8wrvkF00V/ig5J+r77wgHeSzJ9U7HtEd4aj iLO8QAdDwSa+XYG1MySEQihWMAQJmxbiGYEc72Hv9fIAQNPdV/4DrzNCfNFGpDn7RGEp /FQcLJqd7CNfdxDCtA+qkZ6Mb4RVgELUhEPh7iP+2r1y26t5oT0P3vgz5ZFaWAbIyJ2R PWseihTUHF4zOp1xvKgMPj6q5VoxL8Ky1X7i/kEy/b91KFNmBo7ny5By/rN6Xk26Tb/Y QDQw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791373; x=1768396173; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=iTd24fuLkUcPdtjlQ0PktHxm0veo9AVLLnZX4UIhnN8=; b=O0Yss/1TDmg2cqYW+iqYu7zu5VoYCruLQ3r51M+VHo73p5R3Aw2UUX1vwa+Cud4g99 3wCN+UnxDgM8nMTmtyseG/SoVZsE9ZIJNfsdw5B8rsjPR2E2SN/qDcMf5AEA7ENcKQh9 sQnMS/WAvOSoySdvGbwPTI0KkyCTfr5T+QRIKnZyhtmV9nDaq1PVyAQRezPdiSA/zdO8 YIMzxJYd4PEVXwAZt+jxUP761IsCizPdwATpPKgbCpQcwUcXAi7Q44iZKM4UarpAWnmz tX8mt/GGhDLe2A3+ufgVxPP/dqUnC+XK1P09ymagoxuRZWXvGliAua+YsXowV1PS9sDL DhWA== X-Gm-Message-State: AOJu0YwRYXaTOc1qXENxX4+ZFF+QbUY/wSqxGMfdIKi9EQjLQGwxKV4j 56mU1Z+AV+jabERhkrQ/qcwqjRfcVJL7fsJECQBo6QzVuM2dow9YZTxN505J6+D4rvdpsi9h/B6 5rmH9FX5XIA== X-Gm-Gg: AY/fxX6vbbTFb4xszI0LkpeGO5H4cUiWePDwvsV5NY/U0jIws+xo0bkNpjeXNMsRu7Q l3YiB5XaszGBUtisPGxIoctC77HYF1nx7FpuZlOacEhH8sIijzDCwVWmGCTB4bx7an2jYJ0ctO1 6cLuDGWvLX7HSBmLjEJJNoJUK1Mcwyhlh4YTnCsfI3nMSblsUDUahSM3t5hIYpjyB0+oDxJXuGP t65Y8rZSDAwcUprHeMz3ayLd789kvShPM96tVWwkt35QcV1XH2chj2IOlF/AuGDq7NSEdiIc42J 2/W1oJwCTdoJPqwkv1D5fFgEATaduUnOO4gS52WMSP/DCq8t6BMTIPNuGL6ym8FE0/QBXcrBAcd VH4iSxfwX/d78LtUllidWBtmoO47IV9a65rgcxx1uPMVNebJRcdR5fAje+J5kCCVR7BPKcOCBtr cf06rJV4gIzv/C0QRyKWrJlYUyblEKthRBQvv0YzyMGMWZjvhTl1AFTsI62NSo X-Google-Smtp-Source: AGHT+IGadna+9SAN7jsZbhy6tNNiM2SRz2B81Q7enodwT/gTLfrAxYwgMHsmoQ9iwXym0C6/XQcKFA== X-Received: by 2002:a05:6000:1a8e:b0:432:5d73:79a1 with SMTP id ffacd0b85a97d-432c38d0f49mr2711098f8f.55.1767791373285; Wed, 07 Jan 2026 05:09:33 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 12/18] target/s390x: Pass vaddr/hwaddr types to mmu_translate*() Date: Wed, 7 Jan 2026 14:08:00 +0100 Message-ID: <20260107130807.69870-13-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::444; envelope-from=philmd@linaro.org; helo=mail-wr1-x444.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791410657158500 mmu_translate() and mmu_translate_real() translate virtual addresses to physical ones. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/s390x-internal.h | 9 +++++---- target/s390x/mmu_helper.c | 8 ++++---- target/s390x/tcg/excp_helper.c | 3 ++- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/target/s390x/s390x-internal.h b/target/s390x/s390x-internal.h index dfc95702c51..790cd688762 100644 --- a/target/s390x/s390x-internal.h +++ b/target/s390x/s390x-internal.h @@ -11,6 +11,7 @@ #define S390X_INTERNAL_H =20 #include "exec/hwaddr.h" +#include "exec/vaddr.h" #include "cpu.h" #include "fpu/softfloat.h" =20 @@ -377,10 +378,10 @@ hwaddr mmu_real2abs(CPUS390XState *env, hwaddr raddr); bool mmu_absolute_addr_valid(hwaddr addr, bool is_write); /* Special access mode only valid for mmu_translate() */ #define MMU_S390_LRA -1 -int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, uint64_t= asc, - target_ulong *raddr, int *flags, uint64_t *tec); -int mmu_translate_real(CPUS390XState *env, target_ulong raddr, int rw, - target_ulong *addr, int *flags, uint64_t *tec); +int mmu_translate(CPUS390XState *env, vaddr vaddr, int rw, uint64_t asc, + hwaddr *raddr, int *flags, uint64_t *tec); +int mmu_translate_real(CPUS390XState *env, vaddr raddr, int rw, + hwaddr *addr, int *flags, uint64_t *tec); =20 =20 /* misc_helper.c */ diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index abf8da28ea5..9295a9d8dae 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -381,8 +381,8 @@ static void mmu_handle_skey(hwaddr addr, int rw, int *f= lags) * there is an exception to raise * @return 0 =3D success, !=3D 0, the exception to raise */ -int mmu_translate(CPUS390XState *env, target_ulong vaddr, int rw, uint64_t= asc, - target_ulong *raddr, int *flags, uint64_t *tec) +int mmu_translate(CPUS390XState *env, vaddr vaddr, int rw, uint64_t asc, + hwaddr *raddr, int *flags, uint64_t *tec) { uint64_t asce; int r; @@ -584,8 +584,8 @@ void s390_cpu_virt_mem_handle_exc(S390CPU *cpu, uintptr= _t ra) * @param flags the PAGE_READ/WRITE/EXEC flags are stored to this pointer * @return 0 =3D success, !=3D 0, the exception to raise */ -int mmu_translate_real(CPUS390XState *env, target_ulong raddr, int rw, - target_ulong *addr, int *flags, uint64_t *tec) +int mmu_translate_real(CPUS390XState *env, vaddr raddr, int rw, + hwaddr *addr, int *flags, uint64_t *tec) { const bool lowprot_enabled =3D env->cregs[0] & CR0_LOWPROT; =20 diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index 019eb4fba1f..41b0017d767 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -147,7 +147,8 @@ bool s390_cpu_tlb_fill(CPUState *cs, vaddr address, int= size, bool probe, uintptr_t retaddr) { CPUS390XState *env =3D cpu_env(cs); - target_ulong vaddr, raddr; + vaddr vaddr; + hwaddr raddr; uint64_t asc, tec; int prot, excp; =20 --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791394; cv=none; d=zohomail.com; s=zohoarc; b=EDqTf5ayBDwqu7ckcJSP+/Q+paRqp01PEbkS4r8i5LJ4JxUxh1dsikOZI9XzNa7cpZ5jHvZkhP0qhPHsxFV4M4TVe5vQG49RLWkJRN04AsG0U1HAhHJRYIoO4Vnq6XeE0OIjpgflw3bRGOk0X/Hmk8YsuQMecHpEeVwWH8jhZ+g= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791394; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=aPewYGIgnLtmjiblgvLSQFQTyV7kU6Zgv5bBB5uTL4A=; b=mFYFxHidEKFVvnem3jBveeaLtoPubhS6pZ8wSiTw27gzbfp5hdUwWymaUiRPZ7ftwgHA2SOECS2d9fXcCjLtFt7pM+QO701ZvI4q3x9Ah5HdYEiT4W1cfs+nw4XsO/PKk0kCFSP+wXQPcD4DZ+01S9oLVXqEllg3+gj47PB36Ss= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 17677913942121008.2315501336716; Wed, 7 Jan 2026 05:09:54 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTIN-00048Z-Ky; Wed, 07 Jan 2026 08:09:51 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTIG-0003fT-BF for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:44 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTIE-00006X-Lz for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:44 -0500 Received: by mail-wm1-x335.google.com with SMTP id 5b1f17b1804b1-47796a837c7so15233155e9.0 for ; Wed, 07 Jan 2026 05:09:41 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5fe83bsm10763021f8f.38.2026.01.07.05.09.39 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:09:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791380; x=1768396180; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=aPewYGIgnLtmjiblgvLSQFQTyV7kU6Zgv5bBB5uTL4A=; b=ZI9rSZVXClSfkGQumOPhGvAtr2t6qQdwVf97+JO3uDyhI1MIGy7WRgPm6ecrurHeYV hTC8NfakP4NnXDThCrUPB2OAJ9zz84I2YqRNxTS20Dn6QD0F8I+BGKWBlAJRYIbiJsA5 Q2FN+uAbCublOCxGe01YJSdwM+dgVXGmLqZIeig6U4fT1m7j+cMCROAHDFqpen/jWoZc VAHbv+HdhfiXammAYN9za0Z7YNG9PF67rIVWAi9KUiQ8w0cXMMj/IccfCGr2x0gcDbwg Kfiah6H0mznvlBDXL4AIrvap+Eb49/nmdV51lqBOsorWL7FmMC+vH3mPG884jK+9DrHT J4iQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791380; x=1768396180; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=aPewYGIgnLtmjiblgvLSQFQTyV7kU6Zgv5bBB5uTL4A=; b=V1T6G2qZcgOqJSzWiDZitnnenuvDPXTGHu0moJwhn8F3pUa+srStLCR10C6E4uckaf d9bJz5bagJpOhMMgyudnJObjIuW4JYrTiCcsfMQ4tIwBsa+2W1SavJFVPvVVVpLhsdu3 29UPO8zIdEe8AVwJRXjvziE6Q2OOeuk5Ycale6PLzOA40WTS0lD3jvCT6YwS2Js/ZW9W HNUFnAXtVbycB8SVx8Ks4WNq00UZIcZVQqtu6an/WL4boU1dc2r61kJ8kjliXSlm0hkp mQ1ayNawaPHKCsoLrnOVPP94DP7dUHzlBH7IFxsWeWCpDtNslzTTFXGGT5cz+ub1cy5R RRzA== X-Gm-Message-State: AOJu0YwLG+fmLkMb71qnL5fdp6WEe/LhXWRpBH5+mCEuP9MwdrAjKYOA QCV+tbPoARvGpTDQXLCoU5PsntXUna8GCwhbJ0S96y9N4B0LsD0+LZZHUWk+KVmz82XujhHJdaN 3F2IecgA= X-Gm-Gg: AY/fxX7lvMjPTieL7O9CX+xSqe7TTHg7U4zS6TvCy7VPUQthTmJvKbFVoozpxqSrGpb akRaTpeqoozPJmjfbDHmQK9SytTdgbmk+rDQ7ZJjNhpTpRP3jbGpv/JTC3+9tSu+doa2Sm4/jFi uMhuqVZue7cX6s9zK6jgoIhmyMoNlXa0KO+6OH0+Wm0bEp9jIdznpYvQTlobn8k7N9ge4cMM6i9 xS7GdrcL89OHyn4A5Em3HZKdEcM0K7bBtsttyg30cs7SNuhG78yKHp9FMyzNAsP5nhDJH3eEqKd RxxULRp1JhftSHSIBaBoQzCP/5jMmBMgRflYWdBoCATXBr35wU9Ctm0JMJoiCTkayGB2IaMEPeh JslCiS2CSBLdwGkO03ZFUkEwJ16R62g+9aZgfyxa4xtJ0C+ekt8wfdZGHOI41N5qqChpehrmOWm TdFHAEzZHHHDO5vTaWBBJYG+RTNKY4u16zpgD1WGEiy1QEVgEjmwxZatrmTGGllrQvhRRnX7c= X-Google-Smtp-Source: AGHT+IGIRiNxB0NCxGXhSdKhU/qzBcpdcASeChuep496ruNNOu4gsI6rfs31nS9eYBXKnSJv2r7EEw== X-Received: by 2002:a05:600c:3b1f:b0:477:63dc:be00 with SMTP id 5b1f17b1804b1-47d84b5b3e6mr25335715e9.25.1767791380271; Wed, 07 Jan 2026 05:09:40 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Halil Pasic , Christian Borntraeger , Eric Farman , Farhan Ali , Ilya Leoshkevich , David Hildenbrand , Thomas Huth Subject: [PATCH 13/18] target/s390x: Introduce CHSC_MAX_REQ_LEN definition Date: Wed, 7 Jan 2026 14:08:01 +0100 Message-ID: <20260107130807.69870-14-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=philmd@linaro.org; helo=mail-wm1-x335.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791396462158500 Since commit 166f1bb7968 ("s390x/ioinst: Rework memory access in CHSC instruction") the access is no more tied to the page size. Define CHSC_MAX_REQ_LEN to better express the relation with the length of the Channel Subsystem Call request. Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/ioinst.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/s390x/ioinst.c b/target/s390x/ioinst.c index 2320dd4c122..d07773d14a3 100644 --- a/target/s390x/ioinst.c +++ b/target/s390x/ioinst.c @@ -398,6 +398,7 @@ typedef struct ChscResp { char data[]; } QEMU_PACKED ChscResp; =20 +#define CHSC_MAX_REQ_LEN 0x1000 #define CHSC_MIN_RESP_LEN 0x0008 =20 #define CHSC_SCPD 0x0002 @@ -660,7 +661,7 @@ void ioinst_handle_chsc(S390CPU *cpu, uint32_t ipb, uin= tptr_t ra) uint16_t len; uint16_t command; CPUS390XState *env =3D &cpu->env; - uint8_t buf[TARGET_PAGE_SIZE]; + uint8_t buf[CHSC_MAX_REQ_LEN]; =20 trace_ioinst("chsc"); reg =3D (ipb >> 20) & 0x00f; @@ -690,7 +691,7 @@ void ioinst_handle_chsc(S390CPU *cpu, uint32_t ipb, uin= tptr_t ra) s390_program_interrupt(env, PGM_OPERAND, ra); return; } - memset((char *)req + len, 0, TARGET_PAGE_SIZE - len); + memset((char *)req + len, 0, CHSC_MAX_REQ_LEN - len); res =3D (void *)((char *)req + len); command =3D be16_to_cpu(req->command); trace_ioinst_chsc_cmd(command, len); --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791409; cv=none; d=zohomail.com; s=zohoarc; b=mnLuqypkaDTc75XUsoUiKOg8BNWFiuXB1JE517zDxdNbo3DECDAacb5H5YrWwM5fnrhtQ2fCdMyoGJk9QaP7ZGB9ZiChVEs/5CPopUDHjnmVolhPMX7czQJvAiyDa3Z87rt9nyu8ipXzFaF7VSO21eI1NXWahufRWxHOuMjx7U8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791409; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=le/ZLytt6/xmq+ArK9Pel2VkKrzTlD3OED60/3igVmA=; b=RCm08k8mRS2qEGzi6Yl7lxl+ISXnOJbqGmagO7liVurwQH886OovPIzn5mdcjH6Yd4aUAZbJ1/SwEyb4DiZo85Ta0yEukw/9Ac3KulmfVauWtAP0BWuXhEDmVfeh40TVldBSz3iEJWtbYDvpholVAnIakRSjyAaxcfR+fljAgWE= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791409321527.1680069425698; Wed, 7 Jan 2026 05:10:09 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTIQ-0004jk-Mm; Wed, 07 Jan 2026 08:09:54 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTIN-0004F9-Vo for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:52 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTIM-0000F7-Bu for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:51 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-47d3ffa6720so20618025e9.0 for ; Wed, 07 Jan 2026 05:09:48 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f41f5e0sm95006545e9.8.2026.01.07.05.09.46 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:09:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791387; x=1768396187; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=le/ZLytt6/xmq+ArK9Pel2VkKrzTlD3OED60/3igVmA=; b=ShuRX3n0xVv60DZ+mAkUj0gRjoOpmZQ7IN70DR2MFgZx5v9n9E7SkdjFZchpdL9bAk xfOhkUzP5iMA62o+Io6Z+HwJQDI53FfuybMLnZ/6PcqYSQmVfHLUZzCosRC6/zMB13Y3 FuU6VWgrvb/hsY5hJ0bjCVuvxfFomBkLxtPVz/jp51RXMnRa3VwHGrDWG0IA24+1dzT2 uHpfNnT8lUwn/Bv3YiZl620p26vlWVVyKe8kAEkDysDt0PVmUS2Bip0zbl/uVlhBS2wt hw091a0wJLYcIMJyJPAkG+DxSyu45nq/LysV265F9eOZN4zQrq9/wMzYnwXCQN6bPFnv lGuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791387; x=1768396187; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=le/ZLytt6/xmq+ArK9Pel2VkKrzTlD3OED60/3igVmA=; b=aN7fLPhBj7hrypUY9VZ5soZCJo6UKwN5r0os7D1eW9913zTSeSrE+cFxR0nwSRRaCc x5JO0aXnTbh916q5vxROLE/EOzhzyFtCN3Alyh8F6TH2bWK4KNTkH3LaSkbXAGmNAsJd 3fJ5tFWHt2YW1LWxYBLdiYttrTZ2Mdvmw9pd6J3xZy2dD/0McnSHdHT6xbR0hF1GKeB5 A6NF4DAJQpVDWMkRj60DGUbUABUJhYpLDxfRWMfePYt1ieeVMusLyxtDBJ9m2ZOGvrjG qq1vbYIfI2Zz7BkCwvmjopYiPLFmQyJHGm2uhNDrBhHuTaTm8ir1Yx5SHfbUvJW0McdU U6Ig== X-Gm-Message-State: AOJu0YygQQOcL2n9fuepO+x4cvxXgXav25vcsugoAaP00nH8OyAwG/8h 7L0KiazixPKJsbYa3H38HeXutByvI8eGkeJTVrfVpVqg7cVgUDTlP3Y9GupB9gvAHUdPwTgysbj ifBovGaY= X-Gm-Gg: AY/fxX4mhTPUvv+EED0vUQox5d1sZ5tGXlIleVWZpfxkHVs4XVYZmPbqm1uiKNgl+Ch 2XC+Zn5c+LtCCaB746wtUFa036ecQtzWQ9R8Z0yjm88CtvopvizPZk6vGAzFId8oKfO4MmgQHPh hX/ACQSr6VSCYFLxRiNnA7k1OEZ/cYkT/b3aQjadMSyCL7ZEUogw2ge475dG22RtXtlq50Imk1n RgQcEhkw/vkjhxhM9zK3/xcrYIpBsUm7lDh/b10d+6BlmQYDsSVDSTm8ad36SIaaopdLAn9izF2 kpC6WEPPvn9RFy2sVCnmRpYtaDzykNkxVCSZeT7V7jSPrbZCmUs3SX/st23mqEZA4CTS07QLWJP hVauDf6FW6u+IbxPKxrGvvdBauL6t4BtbfoYKliaiwD+16019o1x7bVO8OwFpceiPVp3i8tJgXE 2m8GDM/4fKGcP+JbKl4NEpFmCsyR4vdVbVD/HPXpWuj8zVEH7AK+I+6BVtZC4/ X-Google-Smtp-Source: AGHT+IFxn3Jpyxx882d0d099+Zbp80TciSMTUMgzs3efjQRLxqtSsoN1VLJ4nH0mWo7akUhVYon/Mg== X-Received: by 2002:a05:600c:4e0e:b0:477:abea:9023 with SMTP id 5b1f17b1804b1-47d84b18e0dmr31207255e9.9.1767791387353; Wed, 07 Jan 2026 05:09:47 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Halil Pasic , Christian Borntraeger , Eric Farman , Farhan Ali , Matthew Rosato , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 14/18] target/s390x: Simplify S390_ADAPTER_SUPPRESSIBLE definition Date: Wed, 7 Jan 2026 14:08:02 +0100 Message-ID: <20260107130807.69870-15-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791410648158500 Commit 1497c160661 ("s390x: add flags field for registering I/O adapter") defined S390_ADAPTER_SUPPRESSIBLE twice, one when KVM is available and another when it isn't. However both definitions expand to the same value. Unify them, adding an extra safety check in KVM-specific file. This allows removing the target-specific 'CONFIG_KVM' definition in "cpu.h". Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- include/hw/s390x/css.h | 2 ++ target/s390x/cpu.h | 6 ------ target/s390x/kvm/kvm.c | 2 ++ 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/include/hw/s390x/css.h b/include/hw/s390x/css.h index 0b0400a9d4f..d3326237c9f 100644 --- a/include/hw/s390x/css.h +++ b/include/hw/s390x/css.h @@ -238,6 +238,8 @@ uint32_t css_get_adapter_id(CssIoAdapterType type, uint= 8_t isc); void css_register_io_adapters(CssIoAdapterType type, bool swap, bool maska= ble, uint8_t flags, Error **errp); =20 +#define S390_ADAPTER_SUPPRESSIBLE 0x01 + SubchDev *css_find_subch(uint8_t m, uint8_t cssid, uint8_t ssid, uint16_t schid); bool css_subch_visible(SubchDev *sch); diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h index aa931cb6748..75608b038f4 100644 --- a/target/s390x/cpu.h +++ b/target/s390x/cpu.h @@ -39,12 +39,6 @@ =20 #define S390_MAX_CPUS 248 =20 -#ifndef CONFIG_KVM -#define S390_ADAPTER_SUPPRESSIBLE 0x01 -#else -#define S390_ADAPTER_SUPPRESSIBLE KVM_S390_ADAPTER_SUPPRESSIBLE -#endif - typedef struct PSW { uint64_t mask; uint64_t addr; diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index bd6c440aefb..54d28e37d4d 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -2082,6 +2082,8 @@ int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu) return r; } =20 +QEMU_BUILD_BUG_ON(S390_ADAPTER_SUPPRESSIBLE !=3D KVM_S390_ADAPTER_SUPPRESS= IBLE); + int kvm_arch_fixup_msi_route(struct kvm_irq_routing_entry *route, uint64_t address, uint32_t data, PCIDevice *d= ev) { --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791415; cv=none; d=zohomail.com; s=zohoarc; b=mv9yc2PdNY77me2li6hBGrG0BR4Kr5BK4M1N09fB8Vz7iVsd2s1OAP0UEblgKBIEPHFP9PB4x6M3PYeiryxOLtsZsac+Hmrh6i6VdOl/8Zt+e/pCTFBQv7AF2evIG7to4INrwse/CSuDf9OMkgLMc1MNCoxHQ/yp6Fh6Q18W59M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791415; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=3jPdNmZA8j/yx5+vAulTL2BlPCCMjWRZMdn4TN5f6yU=; b=Zxo008D/4B5jf2djwTpwc16EMU0SHFqCoZvW8tI3QCiOxPjQ133aaYKNCMDLWVjgDoSB4ByaHQKe0ugaVT8ZdGEkKiyJE7sXEaGcjaOFUzlDL7kED8upTUN19gGTF492aL+qthzyBVS/l2umiBA0bdsYtBVD4LnyFZyOAIK9bGY= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791415239105.83602412071036; Wed, 7 Jan 2026 05:10:15 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTIc-0006MX-Iw; Wed, 07 Jan 2026 08:10:08 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTIU-0005Vf-5W for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:58 -0500 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTIS-0000KA-7D for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:09:57 -0500 Received: by mail-wm1-x32d.google.com with SMTP id 5b1f17b1804b1-477bf34f5f5so16759475e9.0 for ; Wed, 07 Jan 2026 05:09:55 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5dfa07sm10377345f8f.25.2026.01.07.05.09.53 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:09:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791394; x=1768396194; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3jPdNmZA8j/yx5+vAulTL2BlPCCMjWRZMdn4TN5f6yU=; b=Fb7HMmuN8L2uGlxkNwEU/BTCeTBxNO3Zl0OFTEHFDYjpf+hxNVdJ4MTt6lRcvYSBmR RqxdCS6grGSCX16Zfx1sAKdg74cApAeo03/Qyhb9Qzb+UbtpXtsRuIgJny4R6qc00ic1 gL8VMpLZA86gwSRnZBO499YnYviEF89TwdpC6BnerzyfMNj1pjXBAvC9BFDFmyDJnXpo dSJ2r8AZoZRTJO+hbVLEUV5DjGXuU1xYWBiMwWUmm6O5oTZy/atiNzmjzuAqqiHKcjKY IAxmJ7GhJ2C3cV8u0QtMJbheQV+bUxfoxIzGh6jErVYlPlQWR//tKRAkhDbpEvh7Ggcs 8sfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791394; x=1768396194; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3jPdNmZA8j/yx5+vAulTL2BlPCCMjWRZMdn4TN5f6yU=; b=tRx0NqsR2hY/4FRqel+QWfabqhFDNyOspARAXxG3VXbTZXl/Kg7Kx+oopIiyn+eD1P C4z95ITW0MpAj/jLre2Sgdh1KpcQzhk7MYTJQWkvq5g2CwhdPb2871AgBGYKxmHOsf5j QrO+Rb7ciHd7/iMW2PUSmjtnSKt1AE7wU502YlCN8GfzlRKLwcrvtBZm6xiws4PYIP1J nySftGvGwsLIuHcSDx86eo9GTwWXesFfNS0I/NHtGCopt2qkIjnX3XC+zFoSRzQ77xg4 BRDfQ2MjWIktqr1DWKp6ra6FBFhmI3oC6X+JM1CZz3z3Xf6zwxgSohox+W3XrN1oN+xO RR+g== X-Gm-Message-State: AOJu0Yx9U9Yo5upBk7NWBGo8CNYh5o50Zk9LUqDGDYhRmkNOF1KACKPL ChrTZ4hlUFnDKo5SolyynJ0m6hl+xQLuAzr9gdB7zwJCXdispxIuhs57hGDvkyVDLPw/10Zfxj4 XEv1dZaI= X-Gm-Gg: AY/fxX6kmq9USdVybfZsMS3EnYnLeTZBcxsEnj4WJIkqaPogeOOUQW6wh+qF3kWGtn0 ZEG8PI1vQIIfKzFcPMrtgpJjF5vRgcGaWmKx2ZPirlSOqucLQkm9DCGo+gxkuzPjoVjiFYRn4ES QaXGtxM2G64LSyUxLgCpGrmWIaPgp1Eb7JN3ckE8SNnUhmHLePpqhjm607Rs5Yb6e8ClZgY5KEd Na6zZ7TgxG+TDbChY2q1WG8wXGLgfsa1CO6MUQ2eNJ/lMKi9C6q490WQ0TYPYJrQWpHdO0Nkped eQV7XNDtf8QJZW5neMbvHDEgzmA4CiCPo3F6ddoeJ5XKyJJLNHc1JLVogkp3W9G+YBV6Oj1hZI9 TMJDK+k9OyhosEZnW6TljSCmquX34hvYNtz3BFlzk52J38NMG0e4Pois/ETlaHyDHZ4Sjva+fMa m5Id34HOg8xZhiLlJ/t9lQmFZctdh7/DvJgYNrEmDQD9ZPTpW22mTn3gGJtdqO X-Google-Smtp-Source: AGHT+IHUcVoHsJscuUkeklzlrCou0jEKNLzVM2+UxDiyT70o7uW2ieghcTDKA/AwpRfSSq42vphleg== X-Received: by 2002:a05:600c:4fc3:b0:477:569c:34e9 with SMTP id 5b1f17b1804b1-47d84b3b9e6mr33890795e9.23.1767791394366; Wed, 07 Jan 2026 05:09:54 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Halil Pasic , Christian Borntraeger , Eric Farman , Matthew Rosato , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 15/18] target/s390x: Un-inline s390_is_pv() Date: Wed, 7 Jan 2026 14:08:03 +0100 Message-ID: <20260107130807.69870-16-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=philmd@linaro.org; helo=mail-wm1-x32d.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791416627158501 Inlining a method which use a static variable is really a bad idea, as it totally defeats the point of both concepts. Currently we have 12 + 4 =3D 16 static 'ccw' variables...: $ git grep -wl target/s390x/kvm/pv.h | fgrep .h hw/s390x/ipl.h $ git grep -wl target/s390x/kvm/pv.h | fgrep .c | wc -l 12 $ git grep -wl hw/s390x/ipl.h | fgrep .c | wc -l 4 Fixes: c3347ed0d2e ("s390x: protvirt: Support unpack facility") Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Thomas Huth --- target/s390x/kvm/pv.h | 24 +----------------------- target/s390x/kvm/pv.c | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/target/s390x/kvm/pv.h b/target/s390x/kvm/pv.h index 94e885e9335..e266fc3d545 100644 --- a/target/s390x/kvm/pv.h +++ b/target/s390x/kvm/pv.h @@ -12,8 +12,6 @@ #ifndef HW_S390_PV_H #define HW_S390_PV_H =20 -#include "qapi/error.h" -#include "system/kvm.h" #include "hw/s390x/s390-virtio-ccw.h" =20 struct S390PVResponse { @@ -23,27 +21,7 @@ struct S390PVResponse { }; =20 #ifdef CONFIG_KVM -#include "cpu.h" - -static inline bool s390_is_pv(void) -{ - static S390CcwMachineState *ccw; - Object *obj; - - if (ccw) { - return ccw->pv; - } - - /* we have to bail out for the "none" machine */ - obj =3D object_dynamic_cast(qdev_get_machine(), - TYPE_S390_CCW_MACHINE); - if (!obj) { - return false; - } - ccw =3D S390_CCW_MACHINE(obj); - return ccw->pv; -} - +bool s390_is_pv(void); int s390_pv_query_info(void); int s390_pv_vm_enable(void); void s390_pv_vm_disable(void); diff --git a/target/s390x/kvm/pv.c b/target/s390x/kvm/pv.c index 2bc916a5455..3d508165f34 100644 --- a/target/s390x/kvm/pv.c +++ b/target/s390x/kvm/pv.c @@ -25,6 +25,24 @@ #include "target/s390x/kvm/kvm_s390x.h" #include "target/s390x/kvm/pv.h" =20 +bool s390_is_pv(void) +{ + static S390CcwMachineState *ccw; + Object *obj; + + if (ccw) { + return ccw->pv; + } + + /* we have to bail out for the "none" machine */ + obj =3D object_dynamic_cast(qdev_get_machine(), TYPE_S390_CCW_MACHINE); + if (!obj) { + return false; + } + ccw =3D S390_CCW_MACHINE(obj); + return ccw->pv; +} + static bool info_valid; static struct kvm_s390_pv_info_vm info_vm; static struct kvm_s390_pv_info_dump info_dump; --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791425; cv=none; d=zohomail.com; s=zohoarc; b=kwW7Psc3rSyirVLTYPcgZq80gZeDC+rqGA8o8AgMILnYXDDJy4JOpfbXZf9eoCLIzyaFjjI/aUMw+sC1EXWIVvikE98H3JkaGJaVHnpLinrFxv5qJkJHoRJHwEiC+rJZnKkD9Uw2hyNsb30VrGqfcd9UaQTO0qffW7CHeVtfryg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791425; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=czp5yyWlwc6urTTQl3IpGdpJOCaMKTZPyFgVAzx0mpQ=; b=jMgf/L/YgZ8OLdtNitRgewfaSt97ddJmSMtBT4aSrdtCJXiIA2URBxZ+wdMXx+/MlB/OFAlvTXHOP+j4F20JnOYSQSkVjqBjLkRa1s7AHSX4mJyY2gus9takWoAQzotvYohh1Mcxea9kRemRY7FE2QI7EiHTz4pBFFAOy+qPnMM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791425359345.74358740639775; Wed, 7 Jan 2026 05:10:25 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTIq-0006s1-TC; Wed, 07 Jan 2026 08:10:21 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTIc-0006VK-Ce for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:10:06 -0500 Received: from mail-wm1-x32b.google.com ([2a00:1450:4864:20::32b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTIa-0000PP-IF for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:10:05 -0500 Received: by mail-wm1-x32b.google.com with SMTP id 5b1f17b1804b1-47d182a8c6cso12707735e9.1 for ; Wed, 07 Jan 2026 05:10:03 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d8717d9e7sm11171785e9.8.2026.01.07.05.10.00 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:10:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791402; x=1768396202; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=czp5yyWlwc6urTTQl3IpGdpJOCaMKTZPyFgVAzx0mpQ=; b=jM+Ou0Vz7nRRJqG2mXIJhOxlYCHrKLQfN+dxGCi/HPRv0MLeaskhiYGA/gJVZkDZHC IGkZb/SFoAsuEpq1HPsQmsw3Bh63pW2pI5p3byxSYsXiWXWF6uddx93vH+SSK1U79UfT rf86tzLqhcYAmBZKUpDGgS5pJ8Yh90u40dhw59b3ZC/Gk1562iiTwVW6HLZm0GjtYHRT 1YaLMLfmAIimR5R5Kwz15f5AcRHf0Sa4b2h5GJMbH8wtvanZKv0q1sCzrGKp8GKqIxMp obGfDiwW8zKcJ7pZPniosr1mhKfyhCCRg+nxTBxkAk9IVbFe5oDlC8m+Bzd15BABQ96h 709w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791402; x=1768396202; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=czp5yyWlwc6urTTQl3IpGdpJOCaMKTZPyFgVAzx0mpQ=; b=leXbLGFdSJrrAH/J3eWSaj5ea+GxBCjyA9dudAoupHB07onqWtAyjMcZXZeUZUTrQe wZRxMQnzSzo6rDS90P5CMdHiPtWXVg74sp4WzhK9nT6+j7yGXK+21G6PuUy7CWf17zud wuC+lZojaNMPvLPBVhy1zTmUa9KQg4SA6Ist+529sBsDODsjzc86wf5KMcrb4CihO/oS E3tIv3Rr27lMWyQdoU9BhNeRLLUhT0LFZQ4iImcN5t4DQeapqFainpBYL4fA9NpohD/u wQps5On4BvreF6t6kJubZ+E8W8EkYUEbNRbIUdwsknzDSpZKpEea9IoBdVyYC1Dpfddo Giyg== X-Gm-Message-State: AOJu0YyYP3us0tx9eHzYu1U5b+at2vpfqRnE3a4BJbadsYYmD3Fuug1k DadcvjBlXfotP38rFNYUa2m3M90mxXCxQ1jgYtjDVBqgGzPBjSNQ5atrWHrP4cRYjLg04SgGucd hns10ilg= X-Gm-Gg: AY/fxX7Ndova0quWitf9uduEzQYNnixnv23EGpAzdxLLKp6jITSFSmTVonHSrxL+y6W gu5fnSvJgrQXXJuNQf0Ba2RU7Y3U82cu/TY7MRU/Sc4H2GQy5yBgE3NLtm864GDikg3qorZoz5Y jmdWSOMN6TOMyHQ5nTqOoKsnGe/YeR4FW/9XiWnaNHcMj1ULxnAiromEGgQMntmV2T1hdOUtW1q ER2R+gyjWIyFY8TPuEa60fEg1PI9pmWi3Ol9wEmBg+YGJJjz1dOThyVk34FVeKEbdAU9P4121EO bEOclDOIwNoH7mtkPjH8xindFh6cI9FeoyOHJVdmOvK/nkuDW5DSccFv3t+GDurWgdlF2W2s12d bJuLjA0PIAICOTKC4OiFJQRKbG0iIN7B6arzAaTQUhK04/jwJc2YzugDxLJhoAnIkfWGZj15BYn BZovGU2aJWL1pULAP+6zy1cV3JJM5K10zNco/VnXYzQ5SYFEv3rU7kqLXw3Aas X-Google-Smtp-Source: AGHT+IFgSwIWrHXxV7pbPQDHfk3IiG2ikAdGSCWpz9UXZ5cj3qJ4JIOxYRlLSj1uCj83QpNeEjTbcw== X-Received: by 2002:a05:600c:4e0e:b0:47a:7fd0:9eea with SMTP id 5b1f17b1804b1-47d84b1a31fmr30402095e9.3.1767791402354; Wed, 07 Jan 2026 05:10:02 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Halil Pasic , Christian Borntraeger , Eric Farman , Matthew Rosato , Ilya Leoshkevich , David Hildenbrand , Thomas Huth Subject: [PATCH 16/18] target/s390x: Un-inline KVM Protected Virtualization stubs Date: Wed, 7 Jan 2026 14:08:04 +0100 Message-ID: <20260107130807.69870-17-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32b; envelope-from=philmd@linaro.org; helo=mail-wm1-x32b.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791426630158500 Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/kvm/pv.h | 27 ------------ target/s390x/kvm/stubs.c | 94 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 94 insertions(+), 27 deletions(-) diff --git a/target/s390x/kvm/pv.h b/target/s390x/kvm/pv.h index e266fc3d545..ea4b4ec3403 100644 --- a/target/s390x/kvm/pv.h +++ b/target/s390x/kvm/pv.h @@ -20,7 +20,6 @@ struct S390PVResponse { uint16_t rc; }; =20 -#ifdef CONFIG_KVM bool s390_is_pv(void); int s390_pv_query_info(void); int s390_pv_vm_enable(void); @@ -43,31 +42,5 @@ int kvm_s390_dump_init(void); int kvm_s390_dump_cpu(S390CPU *cpu, void *buff); int kvm_s390_dump_mem_state(uint64_t addr, size_t len, void *dest); int kvm_s390_dump_completion_data(void *buff); -#else /* CONFIG_KVM */ -static inline bool s390_is_pv(void) { return false; } -static inline int s390_pv_query_info(void) { return 0; } -static inline int s390_pv_vm_enable(void) { return 0; } -static inline void s390_pv_vm_disable(void) {} -static inline bool s390_pv_vm_try_disable_async(S390CcwMachineState *ms) {= return false; } -static inline int s390_pv_set_sec_parms(uint64_t origin, uint64_t length, - struct S390PVResponse *pv_resp, - Error **errp) { return 0; } -static inline int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tw= eak, - struct S390PVResponse *pv_resp) { return = 0; } -static inline void s390_pv_prep_reset(void) {} -static inline int s390_pv_verify(struct S390PVResponse *pv_resp) { return = 0; } -static inline void s390_pv_unshare(void) {} -static inline void s390_pv_inject_reset_error(CPUState *cs, - struct S390PVResponse pv_res= p) {}; -static inline uint64_t kvm_s390_pv_dmp_get_size_cpu(void) { return 0; } -static inline uint64_t kvm_s390_pv_dmp_get_size_mem_state(void) { return 0= ; } -static inline uint64_t kvm_s390_pv_dmp_get_size_completion_data(void) { re= turn 0; } -static inline bool kvm_s390_pv_info_basic_valid(void) { return false; } -static inline int kvm_s390_dump_init(void) { return 0; } -static inline int kvm_s390_dump_cpu(S390CPU *cpu, void *buff) { return 0; } -static inline int kvm_s390_dump_mem_state(uint64_t addr, size_t len, - void *dest) { return 0; } -static inline int kvm_s390_dump_completion_data(void *buff) { return 0; } -#endif /* CONFIG_KVM */ =20 #endif /* HW_S390_PV_H */ diff --git a/target/s390x/kvm/stubs.c b/target/s390x/kvm/stubs.c index 5fd63b9a7e3..046e1f922b7 100644 --- a/target/s390x/kvm/stubs.c +++ b/target/s390x/kvm/stubs.c @@ -5,8 +5,102 @@ #include "qemu/osdep.h" =20 #include "kvm_s390x.h" +#include "target/s390x/kvm/pv.h" =20 int kvm_s390_get_protected_dump(void) { return false; } + +bool s390_is_pv(void) +{ + return false; +} + +int s390_pv_query_info(void) +{ + return 0; +} + +int s390_pv_vm_enable(void) +{ + return 0; +} + +void s390_pv_vm_disable(void) +{ +} + +bool s390_pv_vm_try_disable_async(S390CcwMachineState *ms) +{ + return false; +} + +int s390_pv_set_sec_parms(uint64_t origin, uint64_t length, + struct S390PVResponse *pv_resp, Error **errp) +{ + return 0; +} + +int s390_pv_unpack(uint64_t addr, uint64_t size, uint64_t tweak, + struct S390PVResponse *pv_resp) +{ + return 0; +} + +void s390_pv_prep_reset(void) +{ +} + +int s390_pv_verify(struct S390PVResponse *pv_resp) +{ + return 0; +} + +void s390_pv_unshare(void) +{ +} + +void s390_pv_inject_reset_error(CPUState *cs, struct S390PVResponse pv_res= p) +{ +} + +uint64_t kvm_s390_pv_dmp_get_size_cpu(void) +{ + return 0; +} + +uint64_t kvm_s390_pv_dmp_get_size_mem_state(void) +{ + return 0; +} + +uint64_t kvm_s390_pv_dmp_get_size_completion_data(void) +{ + return 0; +} + +bool kvm_s390_pv_info_basic_valid(void) +{ + return false; +} + +int kvm_s390_dump_init(void) +{ + return 0; +} + +int kvm_s390_dump_cpu(S390CPU *cpu, void *buff) +{ + return 0; +} + +int kvm_s390_dump_mem_state(uint64_t addr, size_t len, void *dest) +{ + return 0; +} + +int kvm_s390_dump_completion_data(void *buff) +{ + return 0; +} --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791426; cv=none; d=zohomail.com; s=zohoarc; b=iNmAEZPBmFnkMiNzy14JhG1ENlJgVjbQTYkM/Psiw7m2iRHU617V9wb9t6zv8HcVPf2YOUrI1/A3een5Sta5Ds07bQ6EPw66XWb7XOUWsQXTcb2issIyt75X5CVNEwqtnBZ67+rd01t/EDmgvwh/u4Pzn+vVa1alB4cW/bTvsRA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791426; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=5Cs0mvcCcwZ/i+ygFt7FDPPIj7PbgqNY+1moJF/HNjU=; b=JtK0Utuc4Zbu0ycZRvci49YnMb0MgPP0WMFvJYBAzsdRPrElT2go4NXrAugkltXiTuHY/BToYFDm8HtcusqQ/5JfWfhkpyOdqJRPnl4eCe6frK/My613CU3G09xT9IeUPC0ZWeNayuBJvHa7rOPciDWhySlyi/km7o1ToIDAhXg= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791426578198.4402322894107; Wed, 7 Jan 2026 05:10:26 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTIs-0007H7-UE; Wed, 07 Jan 2026 08:10:23 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTIk-0006kp-41 for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:10:14 -0500 Received: from mail-wr1-x435.google.com ([2a00:1450:4864:20::435]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTIi-0000Qo-CN for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:10:13 -0500 Received: by mail-wr1-x435.google.com with SMTP id ffacd0b85a97d-432755545fcso1172818f8f.1 for ; Wed, 07 Jan 2026 05:10:10 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-432bd5ee24esm10461497f8f.33.2026.01.07.05.10.08 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:10:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791409; x=1768396209; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=5Cs0mvcCcwZ/i+ygFt7FDPPIj7PbgqNY+1moJF/HNjU=; b=I1N9DZIGJxAfOH2s0uFNZMU5hiDLssZUzS3ZWKjAZecPR3DPFFiKhy8WJJBKhgWuHz +houe7rkB67K0ZZDA0XIGbFuvekx5d0SL/711ygwZ/aV2bm0MNwaOAi7fhMQ6MJfChG2 cotfcfMlFkploUBehfM5IevkGXm7jtLeeX0Gyx/9neWS08Voic5UH2ZsI1plToGPYMKb dFubN27/x3UdSxLldgOZZ8RS13dUInt4RwirCWZOeLln4+DUVlib73rFHPRRZCZpmCtP VQm47wU6VxT3s2qd1lqlNdHEB+ehu5koenektFwwDu8I+C2nhtTkH3dbfKsIaEKV+xAV iBGw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791409; x=1768396209; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=5Cs0mvcCcwZ/i+ygFt7FDPPIj7PbgqNY+1moJF/HNjU=; b=Si63VWasUyi/iJXbOhaCPAkd8YCrvqqr63FgjOzCbu5DuMDtmnprp4oPsR/rokMWXl UQCPb6w9N6f6mQmc/8Hkw8k3nQK0nqKLT1aX3ioyGLCJjnUaarbet5U8nH2AkYwA+U/i zA1S3JO1zC/bW/0P6Y2VVmrYB17ymLixtmeqtdP0KU70GOl4XoEAvpDm5BRBagt6zc6X xu0fdM5wpUx0Q7EQjfLosOSjf58O+LXox8Gwp6gppYzQh1V52ebbqB4AKTZD2vQu0CJi 0ECC0V4AuqVnTC0HMAyMm+rSXzcwyfoQrPbpa4JRC8YNW7sTEAC6SZlCD0ef1E3gLYLn SUUA== X-Gm-Message-State: AOJu0YyqlOmsgYl5UmVYfIXbVZcNt93ybXnWmeanyGOTXgnKp+SNH5DX kqWpPMUKzkpefcDEQHYp3uli5bU+zqtBFextuXoP4GGPX8ZsacaLbRe2ARzYxVV/Ckazl4Xw7GO tJC9sAVU= X-Gm-Gg: AY/fxX56b333t3qipE5thUZYSX65XmBHxQnkXRdaNA8oYG76zE4HCJ1E1IvkzK8RMjy 5qGkmAHxD9gDVkTOd4kWmQ52TqYEq2EiUuqHgQmVUW6hecX2h5Ez0xeJJtdeYvNivyQZX1Gb9kt g6F/7VCvn/xY3J71pfHBvXcMSwP/Ki5qGXSG3qaQtjSEqsubudQey+bfQxGuoMI+xixM5w6DtHN v9YbDUDUc/p0gMnZvut5k6naSUIDMwrBh/ef7bmYXwxYVR0PzSEWiIyKt+dkIINxZvOf/9jqKV5 AgWAIgAcBqUmNOCWW7XYgrAtbxLtV+Wj+JhAEOaZvp/imogVxOdYY+f6tY++KDvjo7TBtYc2yl4 NDFnqvs7+xDt4ubG4fJ8jghbOsCx4fRug6fFdedSxdP3R5YHQPMxvDlTi6JEjCDckekAmGpXR3c 3OR+iSOEzOOCn/g5Q0CC8/MV0vCHYkgaE+T6cDroy5GxFdBmp5Oki9TJBKKJAY X-Google-Smtp-Source: AGHT+IH7IAtEGk8cgjS2QxOhY4XEBYztXNqAwLwBC1Bxrn2Pg8f3xlYRNV5vXeaZ/1lpvILikZ6d1w== X-Received: by 2002:adf:f98d:0:b0:431:266:d142 with SMTP id ffacd0b85a97d-432c364309fmr2621684f8f.26.1767791409349; Wed, 07 Jan 2026 05:10:09 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Halil Pasic , Christian Borntraeger , Eric Farman , Matthew Rosato , Thomas Huth , Ilya Leoshkevich , David Hildenbrand Subject: [PATCH 17/18] target/s390x: Add more unreachable KVM stubs Date: Wed, 7 Jan 2026 14:08:05 +0100 Message-ID: <20260107130807.69870-18-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::435; envelope-from=philmd@linaro.org; helo=mail-wr1-x435.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791428673158500 Next patch will move s390x system objects from the target specific source set to the common one. Unfortunately the kvm_enabled() macro won't be evaluable at built-time anymore. Add stubs for KVM symbols unreachable at runtime. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Acked-by: Thomas Huth --- target/s390x/kvm/stubs.c | 76 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 75 insertions(+), 1 deletion(-) diff --git a/target/s390x/kvm/stubs.c b/target/s390x/kvm/stubs.c index 046e1f922b7..196127baa51 100644 --- a/target/s390x/kvm/stubs.c +++ b/target/s390x/kvm/stubs.c @@ -4,8 +4,9 @@ =20 #include "qemu/osdep.h" =20 -#include "kvm_s390x.h" +#include "target/s390x/kvm/kvm_s390x.h" #include "target/s390x/kvm/pv.h" +#include "target/s390x/cpu_models.h" =20 int kvm_s390_get_protected_dump(void) { @@ -104,3 +105,76 @@ int kvm_s390_dump_completion_data(void *buff) { return 0; } + +bool kvm_s390_apply_cpu_model(const S390CPUModel *model, Error **errp) +{ + g_assert_not_reached(); +} + +void kvm_s390_access_exception(S390CPU *cpu, uint16_t code, uint64_t te_co= de) +{ + g_assert_not_reached(); +} + +int kvm_s390_mem_op(S390CPU *cpu, vaddr addr, uint8_t ar, void *hostbuf, + int len, bool is_write) +{ + g_assert_not_reached(); +} + +int kvm_s390_mem_op_pv(S390CPU *cpu, vaddr addr, void *hostbuf, int len, + bool is_write) +{ + g_assert_not_reached(); +} + +int kvm_s390_set_cpu_state(S390CPU *cpu, uint8_t cpu_state) +{ + g_assert_not_reached(); +} + +void kvm_s390_vcpu_interrupt_pre_save(S390CPU *cpu) +{ + g_assert_not_reached(); +} + +int kvm_s390_vcpu_interrupt_post_load(S390CPU *cpu) +{ + g_assert_not_reached(); +} + +int kvm_s390_get_hpage_1m(void) +{ + g_assert_not_reached(); +} + +void kvm_s390_enable_css_support(S390CPU *cpu) +{ + g_assert_not_reached(); +} + +int kvm_s390_assign_subch_ioeventfd(EventNotifier *notifier, uint32_t sch, + int vq, bool assign) +{ + g_assert_not_reached(); +} + +void kvm_s390_cmma_reset(void) +{ + g_assert_not_reached(); +} + +void kvm_s390_crypto_reset(void) +{ + g_assert_not_reached(); +} + +void kvm_s390_set_diag318(CPUState *cs, uint64_t diag318_info) +{ + g_assert_not_reached(); +} + +int kvm_s390_topology_set_mtcr(uint64_t attr) +{ + g_assert_not_reached(); +} --=20 2.52.0 From nobody Sun Feb 8 23:32:46 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1767791459; cv=none; d=zohomail.com; s=zohoarc; b=Yrt0ZPBSg0k+3Dz/y5CVtU8AzL4U3Nq027rEF1GC65I1bzv/MZorxtxdiMPGr146njU6yw4NqCf9uzp4qeTB3B1fA5+dD/+ynVZgg2sZluR2v1IeZclmNBTGZ+srBUKTUNQTi+6kKH3daNF/I5Uyb282Uviy60rWTxK16QGb3C8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1767791459; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=XdCBdTAgg5DNMG8MNY7cl9gDDtL9mKyheHp1iT2HUIQ=; b=XbJgJWwHQJOfGLbgX703tbgiVRvG00UZ/14mDuAI7JgiWB0mTEN0GzXDEq7JD8PcVv6kTU2KDvF1rsUYYNAAw4Uow2/PDf22RJCXFy584mS73w/XED2wregiAsFBDgjJnWtYEHY1u+WO6ig8r9IyXTFcEF9hVg5WDi9UX3s0hjI= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1767791459887884.5747612975233; Wed, 7 Jan 2026 05:10:59 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vdTIu-0007ST-7k; Wed, 07 Jan 2026 08:10:24 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vdTIq-0006xf-6h for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:10:20 -0500 Received: from mail-wm1-x32f.google.com ([2a00:1450:4864:20::32f]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1vdTIo-0000cK-Fx for qemu-devel@nongnu.org; Wed, 07 Jan 2026 08:10:19 -0500 Received: by mail-wm1-x32f.google.com with SMTP id 5b1f17b1804b1-477770019e4so17117035e9.3 for ; Wed, 07 Jan 2026 05:10:17 -0800 (PST) Received: from localhost.localdomain (88-187-86-199.subs.proxad.net. [88.187.86.199]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-47d7f41f5e0sm95026885e9.8.2026.01.07.05.10.15 (version=TLS1_3 cipher=TLS_CHACHA20_POLY1305_SHA256 bits=256/256); Wed, 07 Jan 2026 05:10:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1767791416; x=1768396216; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XdCBdTAgg5DNMG8MNY7cl9gDDtL9mKyheHp1iT2HUIQ=; b=DaLWCFEs2Ce3yW9SdwAshGSxr3dx+k4y15pMQXvIY+K787jlTSGjG+Sk5stKQM7jne L1k9I/919wL3qJidgPwNRG69a5vNN7JOVGSVeSM711hBt9YJCUjeRCDgbCAQSKED6rFk 4TTLZfWZRix+c1XG5dxvsEuIJB7TdTrMfqFGBb0uCB0/wxqnmMZr9ibR6ev8PSmD/jf3 q5ndw2bLMVkz9MMnfDF21zSR2uA1RH8sqZ5R+4ezTqWgEhRxbRBtBbW4hm9N7gcSi88K zlSEdAt03cm9mQKKqeHyueMJM8wRBUwxKMo1ANkaAwZ5oL66tn8x5hD15Hy8hHl088cE oSTg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1767791416; x=1768396216; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=XdCBdTAgg5DNMG8MNY7cl9gDDtL9mKyheHp1iT2HUIQ=; b=qAbgQHUBstsA10bSYPk09AUX8AFs+5vvO/7K36HDBGXZ/4bjs9jJfNerZNgss67Ll5 Cn+Vo3kDMPZUzjGsQ8LCS7cBqIYQhGgh/ABRkImH3GgitpZCN/2gAIhYQ+9p93TyrwFq 5/eA0U+SAoiF9VKAr5GghD2ElEUCj38hvxcHJ1xcmsiwZjTsxPzi72Fg7+hTHi8x4Hyc CcmYZ0mkAHbm1cgYWuyoxFpMTJB0tRl4AQIryH6e4uoeiAvZU8x579APRvNSCgNOcM3y 9o/08Z79NOL1CPz31OIraRap2hKyIdzDhzgVH3ZIIt9Hs4Jj9/1vPWJwloB+LfVGNjrl 2q5w== X-Gm-Message-State: AOJu0Ywkc6Y8WEzF+j5nHMVgs6zWQVpcooPVHlRTnlLfIdoxTM1+SaC6 Zt/K2tcv2gQTOJg8TfM/mVQJSFOIuy8VeBaxycR//zpfUpRb0UueKHSN2IcE6yueUbUenoy7WfJ KbFulN5w= X-Gm-Gg: AY/fxX7msfKG7fYYPzETMLYNo8yc5x5ZBdkXZSkmmZsOg3dPtOAJojEMoaRcMqTfLmB AsyrcaBu1NRbZE9q83StALfn/wgd6eldqqBArl6ifqY+j07zqXBMauqHw0/AOnFUSqt9mPjiyye KZdAvG09z2pF6u01FVcrMbq36dlukDA9Tts8ttJsUCm3qU7mgBvSgvKxTnm5TM4JRKEYXTlzZnN q5EEgFsFOXW9vhbI9OI6ahQncOaJx/KPVubWuJ1+YddXUBhwY/eXn8n5+T0GEB1rFK5AxUFNHLC uaFsSpU+I0GjIBjG66lDOWY1IDG+SEDV7NgWlUcBvx/5teGeQugyKgJWC/kGwHQ+OvFO7EdT4k/ qKvnJGFjoYnJ3DEc1sRK7m33agHbkyhoYV7XYMpzY1kKLiC7WR1ONyGVtvCrruTWAfAVSwPHFyD 2qfX4DKT3G5JA5jm+7hInzBcmm3n+Rpf7k8soRmjeD0+j36ID5f5x3ktUiou++ X-Google-Smtp-Source: AGHT+IFINcdsWJy/iBL9SR6imcHhiYgG6eS8dARCCXARFt9bN3YTD4pRZjEbk9Vic9xCKqZqEw0kbg== X-Received: by 2002:a05:600c:4e8a:b0:479:1b0f:dfff with SMTP id 5b1f17b1804b1-47d84b170famr31607375e9.10.1767791416252; Wed, 07 Jan 2026 05:10:16 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Richard Henderson , Anton Johansson , Pierrick Bouvier , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , David Hildenbrand , Thomas Huth Subject: [PATCH 18/18] target/s390x: Build system units in common source set Date: Wed, 7 Jan 2026 14:08:06 +0100 Message-ID: <20260107130807.69870-19-philmd@linaro.org> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260107130807.69870-1-philmd@linaro.org> References: <20260107130807.69870-1-philmd@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=2a00:1450:4864:20::32f; envelope-from=philmd@linaro.org; helo=mail-wm1-x32f.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1767791460860158501 For the qemu-system-s390x binary, this doesn't reduce the number of built objects, but this ensure the files in the meson source set won't get access to target_ulong and TARGET_PAGE_SIZE definitions, thus forcing to use the correct types instead (such vaddr, hwaddr, uint64_t, ...). Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- target/s390x/meson.build | 5 ++++- target/s390x/tcg/meson.build | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/target/s390x/meson.build b/target/s390x/meson.build index 3b34ae034cb..626a8e18f82 100644 --- a/target/s390x/meson.build +++ b/target/s390x/meson.build @@ -19,7 +19,9 @@ gen_features_h =3D custom_target('gen-features.h', s390x_ss.add(gen_features_h) =20 s390x_system_ss =3D ss.source_set() -s390x_system_ss.add(files( + +s390x_common_system_ss =3D ss.source_set() +s390x_common_system_ss.add(files( 'helper.c', 'arch_dump.c', 'diag.c', @@ -41,4 +43,5 @@ subdir('kvm') =20 target_arch +=3D {'s390x': s390x_ss} target_system_arch +=3D {'s390x': s390x_system_ss} +target_common_system_arch +=3D {'s390x': s390x_common_system_ss} target_user_arch +=3D {'s390x': s390x_user_ss} diff --git a/target/s390x/tcg/meson.build b/target/s390x/tcg/meson.build index 515cb8b473d..17c9374d09e 100644 --- a/target/s390x/tcg/meson.build +++ b/target/s390x/tcg/meson.build @@ -12,6 +12,6 @@ s390x_ss.add(when: 'CONFIG_TCG', if_true: files( 'vec_int_helper.c', 'vec_string_helper.c', )) -s390x_system_ss.add(when: 'CONFIG_TCG', if_true: files( +s390x_common_system_ss.add(when: 'CONFIG_TCG', if_true: files( 'debug.c', )) --=20 2.52.0