From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565208; cv=none; d=zohomail.com; s=zohoarc; b=KTDtO9efQw7lAhugCNEQxgjTFwvorCMZFkn0/0ma8MP3Gdto+Og6MFBkk4qq+KwnrpOfleVojzalmHaQFBS5Sk/ZxmLdvRwWvE8Gf9ck4r58pqaJUJJ16P9B+ugjWhobuN+nOoaFqlQX+uz3aa6HcCvL8hkcdMLyZl5vtuM9sxM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565208; 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=xRYLKOrmE7/oEuDtADR2OmYYnbN1a9jH/1mSe5dCafw=; b=m/15OyB1tXt7LrLJsRkAhp7J1AQTPmABxcxMDIEIAm6rTTZmAZDVXJ0MZ8HLG+HxW49hbroaL0wS+9Vm1N4O5HZGJuXbvv5wdcIHwwz6F49ET7dCNlp2Qo4dyT6X0u8U6PlHptuXo4rOGvTk4HQcwvpYFv5oYXedzjlhKH1ZGGk= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777565208644721.7075484301155; Thu, 30 Apr 2026 09:06:48 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITs0-0000xE-AZ; Thu, 30 Apr 2026 12:04:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrN-0007d1-Np for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:30 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrH-00079p-QA for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:28 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-364-ysVl5qMaMWKfXlaZvHY3Jg-1; Thu, 30 Apr 2026 12:03:16 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 312E519560B4; Thu, 30 Apr 2026 16:03:15 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1C31D18001ED; Thu, 30 Apr 2026 16:03:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565001; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=xRYLKOrmE7/oEuDtADR2OmYYnbN1a9jH/1mSe5dCafw=; b=At23GtMHrDQZeVwzahr8GA9GCqJQUEhEiuUI82v3kBMfnD1owbMWJHrqONK5A9u/m5TRQw 6qyocV+YnXryaciYQrDDbImM5EfTaoWQH6BOG6b9DtacGN1KNhze1JghRMcriYL8ofOSYA s0Iyzu1OJSEV5h8CM31k5x0AYIqPPM4= X-MC-Unique: ysVl5qMaMWKfXlaZvHY3Jg-1 X-Mimecast-MFC-AGG-ID: ysVl5qMaMWKfXlaZvHY3Jg_1777564995 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Thomas Huth , Eric Farman , Matthew Rosato , Christian Borntraeger , Cornelia Huck Subject: [PULL v2 01/11] target/s390x/kvm: Simplify the async pfault handling code Date: Thu, 30 Apr 2026 18:02:57 +0200 Message-ID: <20260430160307.634093-2-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565209080158500 Content-Type: text/plain; charset="utf-8" From: Thomas Huth Since commit 126e7f78036 ("kvm: require KVM_CAP_IOEVENTFD and KVM_CAP_IOEVENTFD_ANY_LENGTH") we require at least kernel v4.4 to be able to use KVM. KVM_CAP_ASYNC_PF is available in the kernel since v3.15 and KVM_SYNC_PFAULT is available since kernel v3.18, so we can assume now that they are available in all supported kernels. Thus simplify the code a little bit by removing the checks for these features. Signed-off-by: Thomas Huth Reviewed-by: Eric Farman Reviewed-by: Matthew Rosato Acked-by: Christian Borntraeger Message-ID: <20260317134531.460141-1-thuth@redhat.com> Signed-off-by: Cornelia Huck --- target/s390x/kvm/kvm.c | 52 +++++++++--------------------------------- 1 file changed, 11 insertions(+), 41 deletions(-) diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 54d28e37d4dd..133e8c12fd4d 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -140,7 +140,6 @@ const KVMCapabilityInfo kvm_arch_required_capabilities[= ] =3D { KVM_CAP_LAST_INFO }; =20 -static int cap_async_pf; static int cap_mem_op; static int cap_mem_op_extension; static int cap_s390_irq; @@ -333,6 +332,7 @@ int kvm_arch_get_default_type(MachineState *ms) int kvm_arch_init(MachineState *ms, KVMState *s) { int required_caps[] =3D { + KVM_CAP_ASYNC_PF, KVM_CAP_DEVICE_CTRL, KVM_CAP_SYNC_REGS, }; @@ -340,7 +340,7 @@ int kvm_arch_init(MachineState *ms, KVMState *s) for (int i =3D 0; i < ARRAY_SIZE(required_caps); i++) { if (!kvm_check_extension(s, required_caps[i])) { error_report("KVM is missing capability #%d - " - "please use kernel 3.15 or newer", required_caps[= i]); + "please use kernel 4.4 or newer", required_caps[i= ]); return -1; } } @@ -354,7 +354,6 @@ int kvm_arch_init(MachineState *ms, KVMState *s) return -1; } =20 - cap_async_pf =3D kvm_check_extension(s, KVM_CAP_ASYNC_PF); cap_mem_op =3D kvm_check_extension(s, KVM_CAP_S390_MEM_OP); cap_mem_op_extension =3D kvm_check_extension(s, KVM_CAP_S390_MEM_OP_EX= TENSION); mem_op_storage_key_support =3D cap_mem_op_extension > 0; @@ -466,7 +465,8 @@ static int can_sync_regs(CPUState *cs, int regs) } =20 #define KVM_SYNC_REQUIRED_REGS (KVM_SYNC_GPRS | KVM_SYNC_ACRS | \ - KVM_SYNC_CRS | KVM_SYNC_PREFIX) + KVM_SYNC_CRS | KVM_SYNC_PREFIX | \ + KVM_SYNC_PFAULT) =20 int kvm_arch_put_registers(CPUState *cs, KvmPutState level, Error **errp) { @@ -550,25 +550,10 @@ int kvm_arch_put_registers(CPUState *cs, KvmPutState = level, Error **errp) } =20 /* pfault parameters */ - if (can_sync_regs(cs, KVM_SYNC_PFAULT)) { - cs->kvm_run->s.regs.pft =3D env->pfault_token; - cs->kvm_run->s.regs.pfs =3D env->pfault_select; - cs->kvm_run->s.regs.pfc =3D env->pfault_compare; - cs->kvm_run->kvm_dirty_regs |=3D KVM_SYNC_PFAULT; - } else if (cap_async_pf) { - r =3D kvm_set_one_reg(cs, KVM_REG_S390_PFTOKEN, &env->pfault_token= ); - if (r < 0) { - return r; - } - r =3D kvm_set_one_reg(cs, KVM_REG_S390_PFCOMPARE, &env->pfault_com= pare); - if (r < 0) { - return r; - } - r =3D kvm_set_one_reg(cs, KVM_REG_S390_PFSELECT, &env->pfault_sele= ct); - if (r < 0) { - return r; - } - } + cs->kvm_run->s.regs.pft =3D env->pfault_token; + cs->kvm_run->s.regs.pfs =3D env->pfault_select; + cs->kvm_run->s.regs.pfc =3D env->pfault_compare; + cs->kvm_run->kvm_dirty_regs |=3D KVM_SYNC_PFAULT; =20 if (can_sync_regs(cs, KVM_SYNC_GSCB)) { memcpy(cs->kvm_run->s.regs.gscb, env->gscb, 32); @@ -673,24 +658,9 @@ int kvm_arch_get_registers(CPUState *cs, Error **errp) } =20 /* pfault parameters */ - if (can_sync_regs(cs, KVM_SYNC_PFAULT)) { - env->pfault_token =3D cs->kvm_run->s.regs.pft; - env->pfault_select =3D cs->kvm_run->s.regs.pfs; - env->pfault_compare =3D cs->kvm_run->s.regs.pfc; - } else if (cap_async_pf) { - r =3D kvm_get_one_reg(cs, KVM_REG_S390_PFTOKEN, &env->pfault_token= ); - if (r < 0) { - return r; - } - r =3D kvm_get_one_reg(cs, KVM_REG_S390_PFCOMPARE, &env->pfault_com= pare); - if (r < 0) { - return r; - } - r =3D kvm_get_one_reg(cs, KVM_REG_S390_PFSELECT, &env->pfault_sele= ct); - if (r < 0) { - return r; - } - } + env->pfault_token =3D cs->kvm_run->s.regs.pft; + env->pfault_select =3D cs->kvm_run->s.regs.pfs; + env->pfault_compare =3D cs->kvm_run->s.regs.pfc; =20 if (can_sync_regs(cs, KVM_SYNC_DIAG318)) { env->diag318_info =3D cs->kvm_run->s.regs.diag318; --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565051; cv=none; d=zohomail.com; s=zohoarc; b=IgMPEvEU+5JLpMVSGIw/aF78JqLOSDvznzSg1M9dYYU04CJYGVrednnp+EM4IFYt9wEgTyAmMVcTigCBRSvTEBdUserGUxBzDWYld0DJFDc9PF0iaGCx6pVcV1mMa9L6jGp0HVN8gfixMedKQSZCSJiiQVg9XST29Jw12qbRSxQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565051; 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=CTQH8Xk4rqvkiYnv2/aGbRTg+OAKN8L11IMTTxA0LDs=; b=jtwmpNLmYgGixK0YtNk5RDQvUIEvZMxlOQm9J2etFYPjKDSOxiL2LnvmLqkWYEBBDoeYb0jmxVgT+UsLYXnktN/gDu35subJGaP1rKlFsJ8u/r7u85slKIOkL8MQyQmzbJdzmrhWKwA6Wuv7DTNZngaqDxTou6LtGocNGYeZiIU= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777565051962203.35116139819672; Thu, 30 Apr 2026 09:04:11 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITra-0008CT-2s; Thu, 30 Apr 2026 12:03:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrO-0007dZ-GU for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrL-0007B8-QD for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:29 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-341-4q6-AtfJOU2ff1wXRRMGFw-1; Thu, 30 Apr 2026 12:03:18 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 57A191800620; Thu, 30 Apr 2026 16:03:17 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id B4F491800446; Thu, 30 Apr 2026 16:03:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565005; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CTQH8Xk4rqvkiYnv2/aGbRTg+OAKN8L11IMTTxA0LDs=; b=XsKVoato7FLGJvbW+bn5NV05Fsy52u39J5lq2mR6U+ZcBTLZX3aUDkIMhm1DLMkw8LrG7/ lpAyNljEDOLy7K35tPrZov3CPO7tUOMdRrYEEr22+n/uFE0A55gfKKF8J1sUCZdJ9wwEmy lKyjLJf/vMxCGsltXe/Geazkba6Iv88= X-MC-Unique: 4q6-AtfJOU2ff1wXRRMGFw-1 X-Mimecast-MFC-AGG-ID: 4q6-AtfJOU2ff1wXRRMGFw_1777564997 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Matthew Rosato , Cornelia Huck Subject: [PULL v2 02/11] target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (cpu) Date: Thu, 30 Apr 2026 18:02:58 +0200 Message-ID: <20260430160307.634093-3-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565053992158500 From: Philippe Mathieu-Daud=C3=A9 Prefer the address_space_ld/st API over the legacy ld_phys() because it allow checking for bus access fault. This code however doesn't check for fault, so we simply inline the calls (not specifying any memory transaction attribute nor expecting transation result). No logical change intended. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Matthew Rosato Tested-by: Matthew Rosato Message-ID: <20260319185203.11799-2-philmd@linaro.org> Signed-off-by: Cornelia Huck --- target/s390x/tcg/excp_helper.c | 21 +++++++++++++-------- target/s390x/tcg/mem_helper.c | 12 +++++++----- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/target/s390x/tcg/excp_helper.c b/target/s390x/tcg/excp_helper.c index 41b0017d767c..05e448d3f20c 100644 --- a/target/s390x/tcg/excp_helper.c +++ b/target/s390x/tcg/excp_helper.c @@ -54,8 +54,9 @@ G_NORETURN void tcg_s390_data_exception(CPUS390XState *en= v, uint32_t dxc, g_assert(dxc <=3D 0xff); #if !defined(CONFIG_USER_ONLY) /* Store the DXC into the lowcore */ - stl_be_phys(env_cpu(env)->as, - env->psa + offsetof(LowCore, data_exc_code), dxc); + address_space_stl_be(env_cpu(env)->as, + env->psa + offsetof(LowCore, data_exc_code), dxc, + MEMTXATTRS_UNSPECIFIED, NULL); #endif =20 /* Store the DXC into the FPC if AFP is enabled */ @@ -71,8 +72,9 @@ G_NORETURN void tcg_s390_vector_exception(CPUS390XState *= env, uint32_t vxc, g_assert(vxc <=3D 0xff); #if !defined(CONFIG_USER_ONLY) /* Always store the VXC into the lowcore, without AFP it is undefined = */ - stl_be_phys(env_cpu(env)->as, - env->psa + offsetof(LowCore, data_exc_code), vxc); + address_space_stl_be(env_cpu(env)->as, + env->psa + offsetof(LowCore, data_exc_code), vxc, + MEMTXATTRS_UNSPECIFIED, NULL); #endif =20 /* Always store the VXC into the FPC, without AFP it is undefined */ @@ -619,11 +621,14 @@ void monitor_event(CPUS390XState *env, uint64_t monitor_code, uint8_t monitor_class, uintptr_t ra) { + const MemTxAttrs attrs =3D MEMTXATTRS_UNSPECIFIED; + AddressSpace *as =3D env_cpu(env)->as; + /* Store the Monitor Code and the Monitor Class Number into the lowcor= e */ - stq_be_phys(env_cpu(env)->as, - env->psa + offsetof(LowCore, monitor_code), monitor_code); - stw_be_phys(env_cpu(env)->as, - env->psa + offsetof(LowCore, mon_class_num), monitor_class= ); + address_space_stq_be(as, env->psa + offsetof(LowCore, monitor_code), + monitor_code, attrs, NULL); + address_space_stw_be(as, env->psa + offsetof(LowCore, mon_class_num), + monitor_class, attrs, NULL); =20 tcg_s390_program_interrupt(env, PGM_MONITOR, ra); } diff --git a/target/s390x/tcg/mem_helper.c b/target/s390x/tcg/mem_helper.c index 2a79a789f639..8474a6941107 100644 --- a/target/s390x/tcg/mem_helper.c +++ b/target/s390x/tcg/mem_helper.c @@ -41,6 +41,7 @@ #else #include "hw/s390x/storage-keys.h" #include "hw/core/boards.h" +#include "system/memory.h" #endif =20 #ifdef CONFIG_USER_ONLY @@ -958,13 +959,14 @@ uint32_t HELPER(mvpg)(CPUS390XState *env, uint64_t r0= , uint32_t r1, uint32_t r2) inject_exc: #if !defined(CONFIG_USER_ONLY) if (exc !=3D PGM_ADDRESSING) { - stq_be_phys(env_cpu(env)->as, - env->psa + offsetof(LowCore, trans_exc_code), - env->tlb_fill_tec); + address_space_stq_be(env_cpu(env)->as, + env->psa + offsetof(LowCore, trans_exc_code), + env->tlb_fill_tec, MEMTXATTRS_UNSPECIFIED, NU= LL); } if (exc =3D=3D PGM_PAGE_TRANS) { - stb_phys(env_cpu(env)->as, env->psa + offsetof(LowCore, op_access_= id), - r1 << 4 | r2); + address_space_stb(env_cpu(env)->as, + env->psa + offsetof(LowCore, op_access_id), + r1 << 4 | r2, MEMTXATTRS_UNSPECIFIED, NULL); } #endif tcg_s390_program_interrupt(env, exc, ra); --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565093; cv=none; d=zohomail.com; s=zohoarc; b=HFUxYHfYt9IihKwfdu/W3KxbneijfajFUYd5eAitN+g4iSEKYBnUnLHlT8JMp8hK7E3NdZmCrIQXCxUn3xYzb6ccMQl4uhkyD/BvKupytQT6Ri+mYICvxaq7zldKxVdFwvtwzjZTfqbwZ6ZzcpoqeCpceUmSB3a7RqdfObQdPsI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565093; 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=OVaMSEVlkjvRUr5fJ15ohVKJp9SOXSWi+5tyUwSEAv4=; b=AciK+4MBi+XO7R0nVgCduNlQOFVoJHuqyU3MCKtS4+5iyM6/KGKYbBnDyo7g/oiL3NO6zwXqaYHEScX9ROuNRiq8RP1tbbU8E29G6MRhMGP1xGSQpxlok/O2wN6oLvap9onR36NREpOsubizKXUU+LfHToiks3iEmLvDXdxq2gI= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777565093983165.4585790322061; Thu, 30 Apr 2026 09:04:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITrb-0008FX-D1; Thu, 30 Apr 2026 12:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrN-0007d5-RY for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:31 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrK-0007At-LK for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:28 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-437-K-VJ17cQPzS_roUXWnUrWg-1; Thu, 30 Apr 2026 12:03:20 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6550D180034A; Thu, 30 Apr 2026 16:03:19 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C34AB1800446; Thu, 30 Apr 2026 16:03:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565004; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=OVaMSEVlkjvRUr5fJ15ohVKJp9SOXSWi+5tyUwSEAv4=; b=M0K/txNiWYYUc6YEHrlqWhNYBqSvj/oMfmiR5TWdIB2SRONM65RQmz+Vl+trXpz3LPGRvF 9Y4FPjNAedugCtBrvpl29DXBnUIQYLKR221MJgtSGTFd0wDMc1BYvxPJLY/9d3NI6n3i2v xenbscmVbR+WbF6LoA1jTI8o2FfyG5Q= X-MC-Unique: K-VJ17cQPzS_roUXWnUrWg-1 X-Mimecast-MFC-AGG-ID: K-VJ17cQPzS_roUXWnUrWg_1777564999 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Matthew Rosato , Cornelia Huck Subject: [PULL v2 03/11] target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (mmu) Date: Thu, 30 Apr 2026 18:02:59 +0200 Message-ID: <20260430160307.634093-4-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565100223158500 From: Philippe Mathieu-Daud=C3=A9 Prefer the address_space_ld/st API over the legacy ld_phys() because it allow checking for bus access fault. This code however doesn't check for fault, so we simply inline the calls (not specifying any memory transaction attribute nor expecting transation result). No logical change intended. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Matthew Rosato Tested-by: Matthew Rosato Message-ID: <20260319185203.11799-3-philmd@linaro.org> Signed-off-by: Cornelia Huck --- target/s390x/mmu_helper.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/target/s390x/mmu_helper.c b/target/s390x/mmu_helper.c index 246573ff6429..255271b9d340 100644 --- a/target/s390x/mmu_helper.c +++ b/target/s390x/mmu_helper.c @@ -44,8 +44,9 @@ static void trigger_access_exception(CPUS390XState *env, = uint32_t type, } else { CPUState *cs =3D env_cpu(env); if (type !=3D PGM_ADDRESSING) { - stq_be_phys(cs->as, env->psa + offsetof(LowCore, trans_exc_cod= e), - tec); + address_space_stq_be(cs->as, + env->psa + offsetof(LowCore, trans_exc_co= de), + tec, MEMTXATTRS_UNSPECIFIED, NULL); } trigger_pgm_exception(env, type); } --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565276; cv=none; d=zohomail.com; s=zohoarc; b=YolqHOAu5Uubft/2YvfTEKF6fhT0MjqMvuGIjSbi2rrUbaMz3M+PShA3GWz9ZtgZYYnwY+No+GOCg9FELZrNN2mL1Ok4Szh9kQiiQvxVCID1OTBXR8uabtK1ZhLfx3PA8TVmIU8+vBIt6A5Oy8xlYI0zGAC0tAn0XKfv6/WHejM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565276; 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=eyfzpmyqKVA2Gof2shhfmgjxNFHZFOv56RRy+VzeIDM=; b=CO7nu71V8K5OHsJD/qgvXlpV7pOjbtsb3/re4bn9UQ/jz5Q0sfT2B2Ef1HVn35Vxpgsbc9Z89zr9SSGy6D/9TllEXAmkAvToXDinAIWdDdlVW5V8uXVWQLC9JvCcbCiBnuWobPGXLTEdNT8mt0s7MmItckocY6sMk4InuoGUGB8= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777565276195199.6519953105378; Thu, 30 Apr 2026 09:07:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITrz-0000u5-TD; Thu, 30 Apr 2026 12:04:07 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrQ-0007h5-8o for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrN-0007Bu-F6 for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:31 -0400 Received: from mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-570-VX5xfYqLNHyccGdVvvxSDA-1; Thu, 30 Apr 2026 12:03:23 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-03.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id AFC061956054; Thu, 30 Apr 2026 16:03:21 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 0EFBF1800347; Thu, 30 Apr 2026 16:03:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565007; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=eyfzpmyqKVA2Gof2shhfmgjxNFHZFOv56RRy+VzeIDM=; b=FcpUr+k30N2m3096F12HbAxWDMtIqzB55DAkXSC5/uCRVysJr3403kzrC1OzT4PVCEaYtA UTXlJC/41USIFNXRi2U26eC3YIENhrvThBtZqddX90sRlp4QDXF0Xx+s1Gx8i8T+CcKYh1 pYgfnp0gyU44X2ai65DLTi0S73rFm7w= X-MC-Unique: VX5xfYqLNHyccGdVvvxSDA-1 X-Mimecast-MFC-AGG-ID: VX5xfYqLNHyccGdVvvxSDA_1777565001 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Matthew Rosato , Cornelia Huck Subject: [PULL v2 04/11] target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (tcg) Date: Thu, 30 Apr 2026 18:03:00 +0200 Message-ID: <20260430160307.634093-5-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565277317154100 From: Philippe Mathieu-Daud=C3=A9 Prefer the address_space_ld/st API over the legacy ld_phys() because it allow checking for bus access fault. This code however doesn't check for fault, so we simply inline the calls (not specifying any memory transaction attribute nor expecting transation result). No logical change intended. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Matthew Rosato Tested-by: Matthew Rosato Message-ID: <20260319185203.11799-4-philmd@linaro.org> Signed-off-by: Cornelia Huck --- target/s390x/cpu-system.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/cpu-system.c b/target/s390x/cpu-system.c index 881171d71a26..285f59996616 100644 --- a/target/s390x/cpu-system.c +++ b/target/s390x/cpu-system.c @@ -63,7 +63,7 @@ static void s390_cpu_load_normal(CPUState *s) uint64_t spsw; =20 if (!s390_is_pv()) { - spsw =3D ldq_be_phys(s->as, 0); + spsw =3D address_space_ldq_be(s->as, 0, MEMTXATTRS_UNSPECIFIED, NU= LL); cpu->env.psw.mask =3D spsw & PSW_MASK_SHORT_CTRL; /* * Invert short psw indication, so SIE will report a specification --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565129; cv=none; d=zohomail.com; s=zohoarc; b=jN8pXPBnhoOMQVQj0BdK3ypyxM/iXR2zL3hsceCPQmTIyPF+0dZ8dFtQvsM7z/V+ZFjDmavCQgZJsqXm8gZUVgroV3h/iufSRCElGDoyfURaEM4lnKAFFV7FS3x62jW/k/933nI0gFqL/NHmOvmwSu3pRhfLnVVlwIhlQy8NyM8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565129; 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=q7sYoGhYV6uhzjU7T/8b4Om54JypajawmdrA3+XZMbM=; b=HXMgPEuxnuFCn00m47K9ezncnPFqslclO3MQet6S6BfjEnNa65O9NY/suTAvAcjl1H+psNGXHU+ciEm1jWMIriKTODDFEKB0sU4m412X1G5R6XFgAPWrekj8BNt0rxR0W6UqF+umSNZ3XTeAwC9E+qiQ/yNBX0ohJmdmyWbUowQ= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777565129390182.50069031614316; Thu, 30 Apr 2026 09:05:29 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITrb-0008Ey-BP; Thu, 30 Apr 2026 12:03:43 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrS-0007p7-0R for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrQ-0007Eq-Ie for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:33 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-361-XgbEdHrPMqaW7Pd05viqPw-1; Thu, 30 Apr 2026 12:03:25 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id BD56918004AD; Thu, 30 Apr 2026 16:03:23 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 26CAC1800347; Thu, 30 Apr 2026 16:03:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=q7sYoGhYV6uhzjU7T/8b4Om54JypajawmdrA3+XZMbM=; b=hBXuokaFkh8DwaSjUYLXWfj0rk9/qWkjermfsUz9ngfxOj+J3btij7u2IEXY1386rcR0Ze rCWlq0KzqvZKkob64WSEH8sSOQTbnGI391Tqlv/iKaZpofIaJxdk7WvJPWZxbiJVynnMrp QbRhKytMFOnfHuKcoCS3SUWfLtyz4pU= X-MC-Unique: XgbEdHrPMqaW7Pd05viqPw-1 X-Mimecast-MFC-AGG-ID: XgbEdHrPMqaW7Pd05viqPw_1777565003 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Matthew Rosato , Cornelia Huck Subject: [PULL v2 05/11] target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (kvm) Date: Thu, 30 Apr 2026 18:03:01 +0200 Message-ID: <20260430160307.634093-6-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565130961154100 From: Philippe Mathieu-Daud=C3=A9 Prefer the address_space_ld/st API over the legacy ld_phys() because it allow checking for bus access fault. This code however doesn't check for fault, so we simply inline the calls (not specifying any memory transaction attribute nor expecting transation result). No logical change intended. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Matthew Rosato Tested-by: Matthew Rosato Message-ID: <20260319185203.11799-5-philmd@linaro.org> Signed-off-by: Cornelia Huck --- target/s390x/kvm/kvm.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/target/s390x/kvm/kvm.c b/target/s390x/kvm/kvm.c index 133e8c12fd4d..2e4f435c5371 100644 --- a/target/s390x/kvm/kvm.c +++ b/target/s390x/kvm/kvm.c @@ -36,6 +36,7 @@ #include "qemu/main-loop.h" #include "qemu/mmap-alloc.h" #include "qemu/log.h" +#include "system/memory.h" #include "system/system.h" #include "system/hw_accel.h" #include "system/runstate.h" @@ -1634,13 +1635,16 @@ static void unmanageable_intercept(S390CPU *cpu, S3= 90CrashReason reason, /* try to detect pgm check loops */ static int handle_oper_loop(S390CPU *cpu, struct kvm_run *run) { + const MemTxAttrs attrs =3D MEMTXATTRS_UNSPECIFIED; CPUState *cs =3D CPU(cpu); PSW oldpsw, newpsw; =20 - newpsw.mask =3D ldq_be_phys(cs->as, cpu->env.psa + - offsetof(LowCore, program_new_psw)); - newpsw.addr =3D ldq_be_phys(cs->as, cpu->env.psa + - offsetof(LowCore, program_new_psw) + 8); + newpsw.mask =3D address_space_ldq_be(cs->as, cpu->env.psa + + offsetof(LowCore, program_new_psw), + attrs, NULL); + newpsw.addr =3D address_space_ldq_be(cs->as, cpu->env.psa + + offsetof(LowCore, program_new_psw) = + 8, + attrs, NULL); oldpsw.mask =3D run->psw_mask; oldpsw.addr =3D run->psw_addr; /* --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565093; cv=none; d=zohomail.com; s=zohoarc; b=gOkX3J5OoeslJ8tn+TApc3UsEBkCf5WqJsaJ/m+X6FfqRTNcewVuaWEw9MmLE3irCoBvwJxaT22dRq/gMQiqWVCtcCSAxjo+y7L38xWuPZv0XsBypAqWVTPpiNdnd7IERdTCstW62G9UdJ+5eepK/dfOOA1On7yTiPOEfcga3L0= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565093; 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=VVEqqQesANJZWHL7KqYbgm+Qub69Hs3y6LcKiBEkD9I=; b=byeMzyVJUsDsXcTavM4hwitW+3FLOIK8yncZd/JwGf6j9OIkbkJZi7W3htzczTVhBMxsbp8jkVq8YLrD/6R8sLsDHt5xQDusnukYnhy+VhQbe1vh5debIyw8yiOEZG3/clCgxWtHsQ2vvddppqB+K9OvPjLLnBtqinWvlBbM8rk= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177756509376386.81134377856927; Thu, 30 Apr 2026 09:04:53 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITrc-0008Ho-74; Thu, 30 Apr 2026 12:03:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrQ-0007h6-8w for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:32 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrN-0007CE-H8 for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:31 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-578-i1IPLl5_Na-m92GIfm_evw-1; Thu, 30 Apr 2026 12:03:27 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id D815C19560AF; Thu, 30 Apr 2026 16:03:25 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3697A1800446; Thu, 30 Apr 2026 16:03:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565008; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=VVEqqQesANJZWHL7KqYbgm+Qub69Hs3y6LcKiBEkD9I=; b=Pb6NjNTcU4zFJHJ356+8pj94FknMso3XA6fMfIND+WZU3PiwxnreyAbJ9UtF3GNQVbxUqE P9Pi8SCZ8VbI6wcKQFG40izj0cvcYo1dam2jbM7ey4t8oP6eceQETzBZvyLAoa7D7BBP8D 0iVJqjZDgJgSI4VdRKOH/ieT3/S1YhE= X-MC-Unique: i1IPLl5_Na-m92GIfm_evw-1 X-Mimecast-MFC-AGG-ID: i1IPLl5_Na-m92GIfm_evw_1777565006 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Matthew Rosato , Cornelia Huck Subject: [PULL v2 06/11] configs/targets: Restrict the legacy ldst_phys() API on s390x target Date: Thu, 30 Apr 2026 18:03:02 +0200 Message-ID: <20260430160307.634093-7-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565094370154100 From: Philippe Mathieu-Daud=C3=A9 The s390x target doesn't use the legacy ldst_phys() API anymore. Set the TARGET_NOT_USING_LEGACY_LDST_PHYS_API variable to hide the legacy API to the qemu-system-loongarch64 binary, avoiding further API uses to creep in. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Matthew Rosato Tested-by: Matthew Rosato Message-ID: <20260319185203.11799-6-philmd@linaro.org> Signed-off-by: Cornelia Huck --- configs/targets/s390x-softmmu.mak | 1 + 1 file changed, 1 insertion(+) diff --git a/configs/targets/s390x-softmmu.mak b/configs/targets/s390x-soft= mmu.mak index e273075f1a99..478988e6d4a5 100644 --- a/configs/targets/s390x-softmmu.mak +++ b/configs/targets/s390x-softmmu.mak @@ -4,3 +4,4 @@ TARGET_KVM_HAVE_GUEST_DEBUG=3Dy TARGET_XML_FILES=3D s390x-core64.xml s390-acr.xml s390-fpr.xml s390-vx.xml= s390-cr.xml s390-virt.xml s390-virt-kvm.xml s390-gs.xml TARGET_LONG_BITS=3D64 TARGET_NOT_USING_LEGACY_NATIVE_ENDIAN_API=3Dy +TARGET_NOT_USING_LEGACY_LDST_PHYS_API=3Dy --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565285; cv=none; d=zohomail.com; s=zohoarc; b=BQeGIK7gJtVCwLu60jBCaQH2PvdyMlAzFcEnu8IqF4J676/bTyPxZqQl/X11Eu+bTpAeSS2rT0B40T7Q0YQoAQih6NS5h0JLQqH87CVBYl5846qvAs43ABejDZB8qWNk+4ySNoeybRSh1zKFb4cIl1i2DAPK0KWHh6EX2G63bCw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565285; 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=1/1GlS2T+jJeVU5ZLNkbivtz/FW9fVBSvejzXEldY3E=; b=PrSsD7DmG4xb8Zx/j/supdb2TfGtrtYi2mRqPBdRtC7Wh8QrkyRQ/mNqM8tYT9XsMwjFPap/BgIRCEoPdkJI2iZzCxhnk4IMrOWz7DASA3mJedolMKTQJogjOX0uesblHPISolXg2ZR9sbvRztg6b2y7bBC7iXWIbASJySYP8lM= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177756528588264.83859505038436; Thu, 30 Apr 2026 09:08:05 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITs1-00013K-Vt; Thu, 30 Apr 2026 12:04:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrS-0007rF-HZ for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:34 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrQ-0007Eb-9T for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:34 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-237-n_8fTX0YNiGzAdAJeyKvwg-1; Thu, 30 Apr 2026 12:03:29 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 09B3519560B2; Thu, 30 Apr 2026 16:03:28 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4FC571800446; Thu, 30 Apr 2026 16:03:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565011; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=1/1GlS2T+jJeVU5ZLNkbivtz/FW9fVBSvejzXEldY3E=; b=NUioWFKeWewsJtKBVn2ltX6LT7qMhX1EA+xWC5XmnEZHieELL0MQwGAKS8wF4zT+TYQU+6 cpATUm940UlFDD/0ErAj5KM2Gh8mM/MfrZ8lK2YdPmAMxR13fZmC7Ff+v4G44+KNheleCo +xVpnT2UKllDBxTE++XUR+/zK/Us42E= X-MC-Unique: n_8fTX0YNiGzAdAJeyKvwg-1 X-Mimecast-MFC-AGG-ID: n_8fTX0YNiGzAdAJeyKvwg_1777565008 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Thomas Huth , Eric Farman , Cornelia Huck Subject: [PULL v2 07/11] tests/functional/s390x: Add test for booting from a disk with 4k sectors Date: Thu, 30 Apr 2026 18:03:03 +0200 Message-ID: <20260430160307.634093-8-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565287565154100 Content-Type: text/plain; charset="utf-8" From: Thomas Huth The DASD disks on s390x have a different sector size (4k) and use a different layout of the boot loader data compared to the usual "SCSI"-style disks with 512 sectors that are used with most modern guests. To make sure that there are no regressions with 4k disk booting, add a test case that uses a disk image with these 4k sectors and check that we can successfully show the boot menu and and load the right kernel in all supported cases. Signed-off-by: Thomas Huth Reviewed-by: Eric Farman Message-ID: <20260323171423.112205-1-thuth@redhat.com> Signed-off-by: Cornelia Huck --- tests/functional/s390x/meson.build | 1 + tests/functional/s390x/test_boot_4k.py | 138 +++++++++++++++++++++++++ 2 files changed, 139 insertions(+) create mode 100755 tests/functional/s390x/test_boot_4k.py diff --git a/tests/functional/s390x/meson.build b/tests/functional/s390x/me= son.build index 0f03e1c9db8a..b065b666bc2e 100644 --- a/tests/functional/s390x/meson.build +++ b/tests/functional/s390x/meson.build @@ -10,6 +10,7 @@ tests_s390x_system_quick =3D [ ] =20 tests_s390x_system_thorough =3D [ + 'boot_4k', 'ccw_virtio', 'pxelinux', 'replay', diff --git a/tests/functional/s390x/test_boot_4k.py b/tests/functional/s390= x/test_boot_4k.py new file mode 100755 index 000000000000..965123ebd311 --- /dev/null +++ b/tests/functional/s390x/test_boot_4k.py @@ -0,0 +1,138 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: GPL-2.0-or-later +# +# Copyright 2026 Red Hat, Inc. +# +# Author: +# Thomas Huth +''' +Functional test that boots from a (incomplete) disk with 4k sectors +(DASD/ECKD geometry) and multiple kernels installed, so we can check +the boot menu and various LOADPARM options. +''' + +from qemu_test import QemuSystemTest, Asset, skipFlakyTest +from qemu_test import wait_for_console_pattern + + +class S390Boot4k(QemuSystemTest): + + # This disk image has been taken from a DASD with 4k sectors. + # Note: It's incomplete (to keep it small), it contains just enough + # data for booting the kernels that are installed on the disk image + ASSET_DISK =3D Asset( + ('https://github.com/huth/qemu-paddock/raw/refs/heads/main/s390x/' + 'f32-4k-bootmenu.raw.xz'), + 'f4e2c91b4ec50a4756e8816b7a7c8ca01cc0d929f7a711cfd8124640c304ea41') + + def wait_for_pattern(self, success_message, vm=3DNone): + wait_for_console_pattern(self, success_message, vm=3Dvm, + failure_message=3D'panic') + + def basic_machine_setup(self): + self.set_machine('s390-ccw-virtio') + disk_path =3D self.uncompress(self.ASSET_DISK, format=3D"xz") + + self.vm.set_console() + self.vm.add_args("-nographic", "-no-shutdown", "-blockdev", + f"driver=3Dfile,filename=3D{disk_path},node-name= =3Dd1") + + def test_default(self): + ''' + Check that the default kernel boots up correctly from a ccw device + ''' + self.basic_machine_setup() + self.vm.add_args("-device", "virtio-blk-ccw,drive=3Dd1") + self.vm.launch() + self.wait_for_pattern("Linux version 5.8.15-301.fc33.s390x") + self.wait_for_pattern("Trying to unpack rootfs image as initramfs") + + def test_loadparm_machine(self): + ''' + Check that we can select a kernel via "-machine loadparm=3D..." + ''' + self.basic_machine_setup() + self.vm.add_args("-device", "virtio-blk-ccw,drive=3Dd1", + "-machine", "loadparm=3D2") + self.vm.launch() + self.wait_for_pattern("Linux version 5.6.6-300.fc32.s390x") + + def test_loadparm_device(self): + ''' + Check that we can select a kernel via "-device ...,loadparm=3D..." + ''' + self.basic_machine_setup() + self.vm.add_args("-device", + "virtio-blk-ccw,drive=3Dd1,bootindex=3D1,loadparm= =3D3") + self.vm.launch() + self.wait_for_pattern("Linux version 5.6.6-300.fc32.s390x") + + @skipFlakyTest("https://gitlab.com/qemu-project/qemu/-/work_items/3350= ") + def test_loadparm_pci(self): + ''' + Check that we can select a kernel via "-device ...-pci,loadparm= =3D..." + ''' + self.require_device('virtio-blk-pci') + self.basic_machine_setup() + self.vm.add_args("-device", + "virtio-blk-pci,drive=3Dd1,bootindex=3D1,loadparm= =3D2") + self.vm.launch() + self.wait_for_pattern("Linux version 5.6.6-300.fc32.s390x") + + def test_scsi_default(self): + ''' + Check that we can boot via SCSI, too (need to set logical block si= ze + here to avoid that the auto-detection in the bios fails) + ''' + self.basic_machine_setup() + self.vm.add_args("-device", "virtio-scsi", "-device", + "scsi-hd,drive=3Dd1,physical_block_size=3D4096,logical_block_s= ize=3D4096") + self.vm.launch() + self.wait_for_pattern("Linux version 5.8.15-301.fc33.s390x") + + def test_scsi_loadparm(self): + ''' + Check that we can boot via SCSI with loadparm + ''' + self.basic_machine_setup() + self.vm.add_args("-device", "virtio-scsi", "-device", + ("scsi-hd,drive=3Dd1,bootindex=3D1,loadparm=3D3," + "physical_block_size=3D4096,logical_block_size= =3D4096")) + self.vm.launch() + self.wait_for_pattern("Linux version 5.6.6-300.fc32.s390x") + + def test_menu(self): + ''' + Check that boot menu shows up correctly + ''' + self.basic_machine_setup() + self.vm.add_args("-device", "virtio-blk-ccw,drive=3Dd1,bootindex= =3D1", + "-boot", "menu=3Don") + self.vm.launch() + self.wait_for_pattern("1. Fedora (5.8.15-301.fc33.s390x) 33") + self.wait_for_pattern("2. Fedora (5.6.6-300.fc32.s390x) 32") + self.wait_for_pattern("3. Fedora (0-rescue-b7218f0092704c5a9") + self.wait_for_pattern("Please choose:") + # For some unknown reason, sending a key to the bios does not work + # in the testing framework yet: + # exec_command_and_wait_for_pattern(self, '2', + # "Linux version 5.6.6-300.fc32.s390x= ") + + def test_menu_timeout(self): + ''' + Check that boot menu shows up and boot continues automatically + when a timeout has been specified + ''' + self.basic_machine_setup() + self.vm.add_args("-device", "virtio-blk-ccw,drive=3Dd1,bootindex= =3D1", + "-boot", "menu=3Don,splash-time=3D1") + self.vm.launch() + self.wait_for_pattern("s390-ccw zIPL Boot Menu") + self.wait_for_pattern("0. default (Fedora (5.8.15-301.fc33.s390x)") + self.wait_for_pattern("(default will boot in 0 seconds)") + self.wait_for_pattern("Linux version 5.8.15-301.fc33.s390x") + + +if __name__ =3D=3D '__main__': + QemuSystemTest.main() --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565262; cv=none; d=zohomail.com; s=zohoarc; b=EsD9Qq+AQbl+oV75pAtlqTXbNxLiw7gav99zYnyTaQvqRGPHfBDu7swpW24GoaOW9klZWkdZkbDoVjVqGFSDma9zJlp0n9/rJLQZ9LzuH7hmJ6KGL/Si+WO+k86cHjNYQoPANN8YqtJt31fx3WEfoN6lCj5ZvPqW6xkliLtBlRA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565262; 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=x0cvoD2oURrpVEeD1ACbJuj3eZot/d2GpctRCJzX2uU=; b=ZCyUdcxY4nKvlcx0TeKAA8gPFqgZftFQlujdpjmMp1UKrlfw02Uk5eOwaOxxk239nmI2rFtTKiJDTaH1BgQQglOwlkUmIr3PdtHjP0KHnDpmpOJYH+P/+szqTEaLECeL9HMtHCt5qo3ffaODYQX3Qz5m/raeoIIm1KqF/Ac00K0= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777565262912536.4924156183703; Thu, 30 Apr 2026 09:07:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITt1-0003oc-It; Thu, 30 Apr 2026 12:05:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITsS-0001pk-RZ for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:04:38 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITsQ-0007aj-3f for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:04:35 -0400 Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-694-TnTjpwHCNwyPXAWb9vQxsg-1; Thu, 30 Apr 2026 12:03:43 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id A0B7518002CA; Thu, 30 Apr 2026 16:03:30 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 75B091800446; Thu, 30 Apr 2026 16:03:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=x0cvoD2oURrpVEeD1ACbJuj3eZot/d2GpctRCJzX2uU=; b=At3wifnvjMln6SLDYKqKl8KMiWiqQlbmrt1j7ytwGugfAzSSaAp1tR9C6SFN44qvj2Zku9 5iqPtFpNQ5/I8cC9ulvQkRoeO3u5gg8BewIfCKVxfPXN/JbvWCa66Hz65LRbUj/mGjJ38O 7uRXP/kx5ceLqdpr1O4yNGYm6ZDgq84= X-MC-Unique: TnTjpwHCNwyPXAWb9vQxsg-1 X-Mimecast-MFC-AGG-ID: TnTjpwHCNwyPXAWb9vQxsg_1777565011 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Matthew Rosato , Richard Henderson , Pierrick Bouvier , Cornelia Huck Subject: [PULL v2 08/11] target/s390x: Prefer MO_128 definition over magic value Date: Thu, 30 Apr 2026 18:03:04 +0200 Message-ID: <20260430160307.634093-9-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565265453154100 From: Philippe Mathieu-Daud=C3=A9 The MO_128 definition was not existing when commit 6d841663be8 ("s390x/tcg: Implement VECTOR GATHER ELEMENT") introduced the ES_128 definition. It was added 2 years later in commit 4b473e0c60d ("tcg: Expand MO_SIZE to 3 bits"). Since it is now available, replace the magic '4' by the more explicit 'MO_128'. Signed-off-by: Philippe Mathieu-Daud=C3=A9 Reviewed-by: Matthew Rosato Reviewed-by: Richard Henderson Reviewed-by: Pierrick Bouvier Message-ID: <20260415220358.93063-1-philmd@linaro.org> Signed-off-by: Cornelia Huck --- target/s390x/tcg/translate_vx.c.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/target/s390x/tcg/translate_vx.c.inc b/target/s390x/tcg/transla= te_vx.c.inc index b53e9e526391..447641df25c0 100644 --- a/target/s390x/tcg/translate_vx.c.inc +++ b/target/s390x/tcg/translate_vx.c.inc @@ -50,7 +50,7 @@ #define ES_16 MO_16 #define ES_32 MO_32 #define ES_64 MO_64 -#define ES_128 4 +#define ES_128 MO_128 =20 /* Floating-Point Format */ #define FPF_SHORT 2 --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565322; cv=none; d=zohomail.com; s=zohoarc; b=g9GfHR80unpKVTAmMOdzHvCVZOpYR/sIidUFdxyDNuuwJObD+e/2SDz27hrxURGYjnUri1WgakA9bCpAJ0ABt7w05v6Zfn70NUmkoED3FsDE7dE/No9pNcLLHb0lqgm2r+FLG7BcqIOrYROOFZo3OAx1ODFwl/r54tPkMjE4aUA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565322; 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=MkYxmbrCwBUm4h9tBZGzxIDYxBUQTYz73TS7PdYKhs8=; b=CEfTN2CAne50tOIE21rCFTXrR0UprshJi1h7KKG65/OX+zCRwMlhQBO2XPGhv29QJuj0oscyuzOrxgDFD+Es2vzYVSUUZup/e6BBLtx7raDLaNTL1JbryivrQ3CYn/iyftay4Uk9wirmXiqVAYHE+rMzso4pbHnlRsu1wEMUPzU= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777565322125685.0529394545047; Thu, 30 Apr 2026 09:08:42 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITsi-0002rc-Tq; Thu, 30 Apr 2026 12:04:53 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrZ-0008AD-Ap for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:41 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrX-0007Gp-6L for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:40 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-641-ocuA9cPUNjW4TAwr0s3VLg-1; Thu, 30 Apr 2026 12:03:34 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 2CA781956057; Thu, 30 Apr 2026 16:03:33 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1B4681800446; Thu, 30 Apr 2026 16:03:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565018; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MkYxmbrCwBUm4h9tBZGzxIDYxBUQTYz73TS7PdYKhs8=; b=Kdo7n4ia8kgd5hZga2zUQPsEG7Xy9H3IV1k7ZVtzdyxfrFrPX6AOsU20Mxa2xj/Hpb89S9 6qpJkgoCH97a0jsh5PfBx3wTJnhmZLUrM2ojhfC165Ed+x119OAZxYuSP4RJ6JpM7zuq04 xgJwprLigqhQU8wPHMNefbktyuglzr8= X-MC-Unique: ocuA9cPUNjW4TAwr0s3VLg-1 X-Mimecast-MFC-AGG-ID: ocuA9cPUNjW4TAwr0s3VLg_1777565013 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Eric Farman , Halil Pasic , Matthew Rosato , Christian Borntraeger , Cornelia Huck Subject: [PULL v2 09/11] MAINTAINERS: Update s390 trees Date: Thu, 30 Apr 2026 18:03:05 +0200 Message-ID: <20260430160307.634093-10-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565323853158500 Content-Type: text/plain; charset="utf-8" From: Eric Farman Move Cornelia's git tree from virtio-ccw to the overall s390 architecture group, since all the subgroups funnel up through that. Remove Christian's tree from the subgroups, since they are not specified consistently across areas but also haven't been used in ~6 years. Signed-off-by: Eric Farman Acked-by: Halil Pasic Reviewed-by: Matthew Rosato Acked-by: Christian Borntraeger Message-ID: <20260417152236.1305333-2-farman@linux.ibm.com> Signed-off-by: Cornelia Huck --- MAINTAINERS | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e41f0eb92cfd..39618d89b6f1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -126,6 +126,7 @@ F: docs/system/target-s390x.rst F: docs/system/s390x/ F: tests/qtest/migration/s390x/ K: ^Subject:.*(?i)s390x? +T: git https://gitlab.com/cohuck/qemu.git s390-next L: qemu-s390x@nongnu.org =20 MIPS general architecture support @@ -500,7 +501,6 @@ F: target/s390x/kvm/ F: target/s390x/machine.c F: target/s390x/sigp.c F: gdbstub/gdb-xml/s390*.xml -T: git https://github.com/borntraeger/qemu.git s390-next L: qemu-s390x@nongnu.org =20 X86 KVM CPUs @@ -1863,7 +1863,6 @@ F: hw/s390x/ F: include/hw/s390x/ F: configs/devices/s390x-softmmu/default.mak F: tests/functional/s390x -T: git https://github.com/borntraeger/qemu.git s390-next L: qemu-s390x@nongnu.org =20 S390-ccw boot @@ -1877,7 +1876,6 @@ F: pc-bios/s390-ccw/ F: pc-bios/s390-ccw.img F: docs/devel/s390-dasd-ipl.rst F: tests/functional/s390x/test_pxelinux.py -T: git https://github.com/borntraeger/qemu.git s390-next L: qemu-s390x@nongnu.org =20 S390 PCI @@ -2464,8 +2462,6 @@ M: Eric Farman S: Supported F: hw/s390x/virtio-ccw*.[hc] F: hw/s390x/vhost-*-ccw.c -T: git https://gitlab.com/cohuck/qemu.git s390-next -T: git https://github.com/borntraeger/qemu.git s390-next L: qemu-s390x@nongnu.org =20 virtio-dmabuf --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565290; cv=none; d=zohomail.com; s=zohoarc; b=cOMzGOpce1sVu847mh1WfjFSNqtWVBDP3xZcWIH1avEnnGNi6PbWIUJHa8AtL/pnj/e9/iUL/x1rxQ0l8TVCpdO5qGlOMGrYArwLMVAM+aOHCBvBtqeXx17zANfY7h6OQeyTIXpnlexz0FQPM2SUqfFBsVjNzxdEihO8mTpmmI4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565290; 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=MYssZ2jX6kV2gh+5VY85dXxJGS2UBMoRMWXKR4lB6jo=; b=DCkgIBoTjmVST4qb88dKyX24Nw4RDqmjUTj75neYY/JlHSTdCldvc1N7b7TTvGXhVhXIqiDRRW1kSSW6TijK9qrsyTBI0IQuK1OoN2J5hbHDXrVq3P6VaUX5ORvPiJZ8V6gYOW2mIK3CqL21pMsuV2LdTTBo/cF81yyIlY6KlXE= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1777565290407869.0535727008082; Thu, 30 Apr 2026 09:08:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITt1-0003o2-GK; Thu, 30 Apr 2026 12:05:11 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrb-0008Hb-TG for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:43 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrZ-0007Hg-UM for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:43 -0400 Received: from mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-412-_MP2ON3jPWOWjxPI6_imyw-1; Thu, 30 Apr 2026 12:03:37 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 0F59B19560AB; Thu, 30 Apr 2026 16:03:36 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 97D041800446; Thu, 30 Apr 2026 16:03:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565021; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=MYssZ2jX6kV2gh+5VY85dXxJGS2UBMoRMWXKR4lB6jo=; b=Pp62dvrpfYByZxPuu80Lm1nSR0Cox/lo3WVAhM33xMFlGclnoE1I1uRueY/bMskx4oLJ0k +qY305kwYolCG8fAHng76nI33pZSjNppcKSaGXXh0m6OQytptECCwKid5WhLIl82vQSLnW O3l8CVSx8PsyHuNJr4t1mRub15dANC8= X-MC-Unique: _MP2ON3jPWOWjxPI6_imyw-1 X-Mimecast-MFC-AGG-ID: _MP2ON3jPWOWjxPI6_imyw_1777565016 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Jaehoon Kim , Mohamed Mediouni , Halil Pasic , Matthew Rosato , Cornelia Huck Subject: [PULL v2 10/11] hw/s390x/ccw: Disable legacy virtio-pci by default (v11.1+) Date: Thu, 30 Apr 2026 18:03:06 +0200 Message-ID: <20260430160307.634093-11-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H5=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565293918154100 Content-Type: text/plain; charset="utf-8" From: Jaehoon Kim On the s390 Linux kernel, IO_SPACE_LIMIT has been 0 since the initial zPCI implementation (commit cd24834130ac "s390/pci: base support"), making I/O BARs unusable. However, when virtio-pci devices operate in transitional mode, QEMU unconditionally exposes the legacy interface via BAR0. This results in firmware warnings during PCI enumeration, such as: pci 0005:00:00.0: [Firmware Bug]: BAR 0: invalid; can't size even though BAR0 is never usable on the s390 kernel. Close this gap by disabling legacy virtio-pci support starting from machine version 11.1. This effectively makes virtio-pci devices non-transitional and prevents the creation of the unusable legacy I/O BAR. This introduces s390x-specific global compatibility properties that set disable-legacy=3Don as the default for virtio-pci devices. Machine versions v11.0 and earlier set disable-legacy=3Doff to maintain their original default behavior (legacy support enabled), ensuring VMs created with those versions continue to work identically. Users can override the default on the command line if needed: - On v11.1+: -global virtio-pci.disable-legacy=3Doff (to enable legacy) - On v11.0-: -global virtio-pci.disable-legacy=3Don (to disable legacy) Signed-off-by: Jaehoon Kim Reviewed-by: Mohamed Mediouni Reviewed-by: Halil Pasic Reviewed-by: Matthew Rosato Tested-by: Matthew Rosato Message-ID: <20260420144759.2970726-2-jhkim@linux.ibm.com> Signed-off-by: Cornelia Huck --- hw/s390x/s390-virtio-ccw.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index cc768daeb04c..4d35f9b10bcc 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -788,6 +788,21 @@ static void machine_set_loadparm(Object *obj, Visitor = *v, g_free(val); } =20 + /* + * S390x-specific global compatibility properties. + * + * On the s390 kernel, legacy virtio-pci is not usable because I/O BARs + * are not supported (IO_SPACE_LIMIT is 0), and would only result in + * unusable BARs and firmware warnings. + * + * Therefore, starting from v11.1, disable legacy virtio-pci by default, + * while older machine types keep legacy behavior for compatibility. + */ +static GlobalProperty hw_compat_s390x[] =3D { + { TYPE_VIRTIO_PCI, "disable-legacy", "on", .optional =3D true}, +}; +static const size_t hw_compat_s390x_len =3D G_N_ELEMENTS(hw_compat_s390x); + static void ccw_machine_class_init(ObjectClass *oc, const void *data) { MachineClass *mc =3D MACHINE_CLASS(oc); @@ -878,6 +893,9 @@ static const TypeInfo ccw_machine_info =3D { const void *data) = \ { = \ MachineClass *mc =3D MACHINE_CLASS(oc); = \ + /* Apply global s390x-wide default properties */ = \ + compat_props_add(mc->compat_props, hw_compat_s390x, = \ + hw_compat_s390x_len); = \ MACHINE_VER_SYM(class_options, ccw, __VA_ARGS__)(mc); = \ mc->desc =3D "Virtual s390x machine (version " MACHINE_VER_STR(__V= A_ARGS__) ")"; \ mc->init =3D MACHINE_VER_SYM(mach_init, ccw, __VA_ARGS__); = \ @@ -923,7 +941,15 @@ static void ccw_machine_11_0_instance_options(MachineS= tate *machine) =20 static void ccw_machine_11_0_class_options(MachineClass *mc) { + /* + * Preserve v11.0 and older version behavior: + * keep legacy virtio-pci enabled. + */ + static GlobalProperty compat[] =3D { + { TYPE_VIRTIO_PCI, "disable-legacy", "off" }, + }; ccw_machine_11_1_class_options(mc); + compat_props_add(mc->compat_props, compat, G_N_ELEMENTS(compat)); compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len); } DEFINE_CCW_MACHINE(11, 0); --=20 2.53.0 From nobody Sat May 30 18:34:12 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=quarantine dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1777565159; cv=none; d=zohomail.com; s=zohoarc; b=S0OLmU9AJbW9DV7Ji0A0fkci5z3St1tgPBfIvQ1jfulg1yjj2xbbUKnvp83tp75dE8GzaYXqL8JmmzfjcIFyz5RZ0Uhl4OSc1zbvB9dNSFPVvgd6c8ZWfLmyCDF4yyBEZmot4NnXs3TpX5V56D71PkREzT4R6vUbnPUYcAFZf6E= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1777565159; 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=dDrtXQw8rbWKDXNmO/t+UeKG0DrRlla3ZJfTV7xhK+c=; b=YdGra1CExJ8tP224ffxH0+qM/vL3504SNsufySLnqlgMN+gau5fy4COaw3Q3n8NQDujQC/GGblFqavf94yDBhB7OWkPfvBRZVy6uOEwkGRPGW0VbipXDNBaGfPh4NQSiD+L3vYUCW/Lf6imsJfv3c1ilN2Q+cpuD2Es+GHz5Sco= 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=quarantine dis=none) Return-Path: Received: from lists1p.gnu.org (lists1p.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 177756515978883.7519352348296; Thu, 30 Apr 2026 09:05:59 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wITsh-0002gA-ME; Thu, 30 Apr 2026 12:04:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists1p.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrd-0008LB-8k for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:46 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.129.124]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1wITrb-0007ID-Mm for qemu-devel@nongnu.org; Thu, 30 Apr 2026 12:03:45 -0400 Received: from mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-29-viSdQ1kSOsWbv9ctkNPOmw-1; Thu, 30 Apr 2026 12:03:38 -0400 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id DAAFD1800601; Thu, 30 Apr 2026 16:03:37 +0000 (UTC) Received: from gondolin.redhat.com (unknown [10.44.50.47]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 7AF101800446; Thu, 30 Apr 2026 16:03:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1777565022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dDrtXQw8rbWKDXNmO/t+UeKG0DrRlla3ZJfTV7xhK+c=; b=S6G9yWuVEBhR1T3dfeogHO9Rp+nRb35LM8LyYkjzNFUFSYi+L0px8X2eI+lednjHMO21sm eiB63lO7lpX5JwBMxO9+YxrAImSg/9LHLzl0uUUV0UJPevWWaezT7QErMtnaUFgoxgqItj E6/e7ep+/ovoCP3mMoJSEYi9fC47Qe8= X-MC-Unique: viSdQ1kSOsWbv9ctkNPOmw-1 X-Mimecast-MFC-AGG-ID: viSdQ1kSOsWbv9ctkNPOmw_1777565018 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Matthew Rosato , Cornelia Huck Subject: [PULL v2 11/11] tests/functional/s390x: Update expected virtio-pci IDs Date: Thu, 30 Apr 2026 18:03:07 +0200 Message-ID: <20260430160307.634093-12-cohuck@redhat.com> In-Reply-To: <20260430160307.634093-1-cohuck@redhat.com> References: <20260430160307.634093-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 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=lists1p.gnu.org; Received-SPF: pass client-ip=170.10.129.124; envelope-from=cohuck@redhat.com; helo=us-smtp-delivery-124.mimecast.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, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_PASS=-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: qemu development 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 @redhat.com) X-ZM-MESSAGEID: 1777565160671158500 Content-Type: text/plain; charset="utf-8" From: Matthew Rosato Now that legacy virtio-pci is disabled by default for s390x, adjust existing testcases to look for appropriate device IDs. Signed-off-by: Matthew Rosato Message-ID: <20260424132703.833249-1-mjrosato@linux.ibm.com> Signed-off-by: Cornelia Huck --- tests/functional/s390x/test_ccw_virtio.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/functional/s390x/test_ccw_virtio.py b/tests/functional/s= 390x/test_ccw_virtio.py index 045533785670..1d4958bbe293 100755 --- a/tests/functional/s390x/test_ccw_virtio.py +++ b/tests/functional/s390x/test_ccw_virtio.py @@ -136,7 +136,7 @@ def test_s390x_devices(self): r'0x1af4') exec_command_and_wait_for_pattern(self, r'cat /sys/bus/pci/devices/0005\:00\:00.0/subsystem_de= vice', - r'0x0001') + r'0x1100') # check fid propagation exec_command_and_wait_for_pattern(self, r'cat /sys/bus/pci/devices/000a\:00\:00.0/function_id', @@ -203,7 +203,7 @@ def test_s390x_fedora(self): 'while ! (dmesg | grep enP7p0s0) ; do sleep 1 ; do= ne', 'virtio_net virtio0 enP7p0s0: renamed') exec_command_and_wait_for_pattern(self, 'lspci', - '0007:00:00.0 Class 0200: Device 1af4:1000') + '0007:00:00.0 Class 0200: Device 1af4:1041') exec_command_and_wait_for_pattern(self, 'cat /sys/class/net/enP7p0s0/address', '02:ca:fe:fa:ce:12') --=20 2.53.0