From nobody Sat May 30 20:11:38 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=1776937797; cv=none; d=zohomail.com; s=zohoarc; b=fY2/aO1OHr+145nSvmxpPwkZwO0zqJyCWwulj6rEoLQ//U0AW9iF0Xx9TDXDLfg8T8VH0biqClBg9ICxzePkKEoEdn0e3Zm+y0he6t4m36sgk9vHCQEynBvJ0/h6Ei/qSQl3ZiajT+oOQbk8n37A6w1bjOtErdNk6BFh6QGMyvQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937797; 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=W0OjzQ5iFZRnw74fAt9g25Jr59CEoSgzYrkvHpMCEfzI6Svi7vK/t74GjtCaLw2/hnoheeqieLCSvsQAJ1QaQNYYhudTk2erwRtcw1duv4FWSiFZEuYm2LvQ11INVuQGy16JA5AybveGJIur3E8EcKRtiG7idDeY22VdLlmK8H8= 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 1776937797449837.9650935490545; Thu, 23 Apr 2026 02:49:57 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqgM-00086X-An; Thu, 23 Apr 2026 05:49:15 -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 1wFqgI-000867-N9 for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:10 -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 1wFqgG-0001E6-Os for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:10 -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-235-IbKQNFZ1PVaC5viRrDAIdQ-1; Thu, 23 Apr 2026 05:49:06 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 07F2D1800473; Thu, 23 Apr 2026 09:49:05 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 2789F3000709; Thu, 23 Apr 2026 09:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937747; 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=gft42p6iNBLOE+IsHuZGBsWKDPQSAnCF8UG8CtWrx3EIjzUAXLbC2US70cr1j3Ucp/aozX aFttf5hh086oEmRFYj7+dXn8tEwnnrxpzoMhTm3i/iWoY2p48oIOHvS7PllOdjSMbkAtCV 5VT9y8anjZSD1ARYhMFiXJtzCnfjETA= X-MC-Unique: IbKQNFZ1PVaC5viRrDAIdQ-1 X-Mimecast-MFC-AGG-ID: IbKQNFZ1PVaC5viRrDAIdQ_1776937745 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 01/11] target/s390x/kvm: Simplify the async pfault handling code Date: Thu, 23 Apr 2026 11:48:46 +0200 Message-ID: <20260423094856.270215-2-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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: 1776937799417158500 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 20:11:38 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=1776937850; cv=none; d=zohomail.com; s=zohoarc; b=OJm2VqqcvWe6DMT/h3cGHVXkmNId4ESp8ujMyjO9bNoBSEhvtB6eqBmGRMWfvRPfdwlzQJAIXqNLZnuAp5U8u6BqD6qIDOXnCoEhM2B5tUcN1BRxsmjPw+3s+7TJxvl/HSN/t49FhDoRavKbfu4dJBpICACtT5Bg2PM9oSchQLc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937850; 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=kpvHdjXlyq97YL+IUMBAmOrernXDG4tlj2t/k/2bhTPW/65YoPo7UldXCU/gPdDcl+ykRjGAfGdVBcHx1ZqWzztndQ/TX2K10NVrIIPMAZxm4BBpL7GZf4kcwitbVhjpUhXjFcK9/X5xkwC0/VamdvFoctMpsSsvASkwHuLOinE= 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 1776937850589621.0977046816565; Thu, 23 Apr 2026 02:50:50 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqh5-0008JZ-HZ; Thu, 23 Apr 2026 05:50:03 -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 1wFqgO-00087L-90 for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:19 -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 1wFqgM-0001GK-78 for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:15 -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-191-_sfQF2S0PsC08ba7dkMlVA-1; Thu, 23 Apr 2026 05:49:08 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 EFEC518003FC; Thu, 23 Apr 2026 09:49:06 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 5FBA9300757A; Thu, 23 Apr 2026 09:49:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937752; 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=G8OqcwcM3+iC1J66Abx2O/GDDTUlHYTzIZhKw5qDMUsSje8+0ChpOSdCRvwrmAphm7wOlN 0sTARH+FMedhM8NZC0lkg8JW2iK/VRNriQy9b6ifZBayM4y5PGgDoo+THCCaejTNF5JHcZ kU3nNVfJ2aDzin9guNZ37vcDpOmNybI= X-MC-Unique: _sfQF2S0PsC08ba7dkMlVA-1 X-Mimecast-MFC-AGG-ID: _sfQF2S0PsC08ba7dkMlVA_1776937747 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 02/11] target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (cpu) Date: Thu, 23 Apr 2026 11:48:47 +0200 Message-ID: <20260423094856.270215-3-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-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.4 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: 1776937851029158500 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 20:11:38 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=1776937854; cv=none; d=zohomail.com; s=zohoarc; b=I7TU4AiHH5UYJEuBk6+1FEcwh4TAJnIjQI317DMUyeGoJUhaLoEX7y2nluY5UBKWqtBfDfR79EFzkOx0hWkkSRwtW2DyO5uMSbHu0XBe3FVhYIsbHyizENhjq9/LQAWgRs+R7yi8+nmtphD8Wm0YwNt0/eGvCiZDCCE16x6Y6zA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937854; 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=UusPqpH+GCTx0CDw+lusrHtScBfASH3wcYu1ZU4pw0yGFqW4VXh5t5omL7i3CRVWqC9HtPtHiDW039Pq90uJnqkBUfAw75uiXcgzQ2Eg5S2EzPWw+FrIV2PdH6YdOi7Z6V+uhP0FUpaV3CwTVgJYL+pcjnTYGuEvEMf+A2DOkKM= 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 1776937854054843.8737432874361; Thu, 23 Apr 2026 02:50:54 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqhH-0008WM-Jf; Thu, 23 Apr 2026 05:50: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 1wFqgO-00087K-80 for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:19 -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 1wFqgM-0001HF-7G for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:15 -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-516-mK7OZgy5NYiPKT-ANsc41g-1; Thu, 23 Apr 2026 05:49:09 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 D89D5195605C; Thu, 23 Apr 2026 09:49:08 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 54B29300757A; Thu, 23 Apr 2026 09:49:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937753; 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=g6lbnL35XnNuzSUlcK2EvIAxkgtabB2PrF2uIXfxDUgCTRB6PvgPETEJ7ejidODQ78Qw/j MDXBcoDt3KUVtUbnaxPMNlSyQZfhOE55Vm0mU12JerZt6qSC3Yc5fOHTQfkkqux32DqZab yGgy+xWO+o2TUJJ8vJ/PwM76TrPXJoM= X-MC-Unique: mK7OZgy5NYiPKT-ANsc41g-1 X-Mimecast-MFC-AGG-ID: mK7OZgy5NYiPKT-ANsc41g_1776937749 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 03/11] target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (mmu) Date: Thu, 23 Apr 2026 11:48:48 +0200 Message-ID: <20260423094856.270215-4-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-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.4 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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: 1776937855588154100 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 20:11:38 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=1776937825; cv=none; d=zohomail.com; s=zohoarc; b=oHdPM7msNRovjwR7MjksrWKkpb/pqZ/8jOCQuaUAerlYNvwpwIzhfEyfk+nlwjdhBo/dcfluFSm3DiLa5GF0oM01JZE4e2ORIURP+vNtk89+O3EB47Upof56FtqFg/chWsvFJ5cHFVE/QSNxv23PCALntfSvb6QVSr/ovRDAfWs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937825; 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=mhHbSk9HZlkj9MRWvfnhfOeCnsOMlzFa+HgkFd42bZIuaLeKpbCza55zwjXuFwXZqqMvPW2YblleKFPNNOUNDObtPFuUtLR1P6AEFiqivHfiFxkvy15i+WsptI6yk9Xq5s+TCyiLFb7FeOZr8TMjxJGtMQAtXr3rzfL77+L7Qr4= 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 1776937825630233.20331049594745; Thu, 23 Apr 2026 02:50:25 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqgy-0008EZ-MS; Thu, 23 Apr 2026 05:49:54 -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 1wFqgP-00087N-Gm for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:19 -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 1wFqgO-0001Lf-0b for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:17 -0400 Received: from mx-prod-mc-05.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-591-Jcrtx4-BObeBgz6zUWC-Bw-1; Thu, 23 Apr 2026 05:49:11 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 9BF2E19560AD; Thu, 23 Apr 2026 09:49:10 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 3A7773000709; Thu, 23 Apr 2026 09:49:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937755; 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=VbF0m2OWWUgtHW9TjDPIRatn++33tNs1PdZI/4Fl8u9W2GclwJcd5TYV0fLzBO5FZsUeJ6 VDIpv6d3d366FVp6sYLkAnJzolJkEAsVh0Uo7f9CZiBnqnyxkuuRC9jWnEMH2adRptGyHz hjaC0gXowCZHUjR0kV92q8vVM8JFGrE= X-MC-Unique: Jcrtx4-BObeBgz6zUWC-Bw-1 X-Mimecast-MFC-AGG-ID: Jcrtx4-BObeBgz6zUWC-Bw_1776937750 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 04/11] target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (tcg) Date: Thu, 23 Apr 2026 11:48:49 +0200 Message-ID: <20260423094856.270215-5-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-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.4 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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: 1776937826957158501 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 20:11:38 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=1776937870; cv=none; d=zohomail.com; s=zohoarc; b=jUNWV1WDQIzJ7S2zmF3xlp6pYTwdGyTydv688k4tN3PY8HNPLPQclf1IjmItpuaJgd70M8y8v6q5Uh7zT2ebKxd9rwbXvzOSBqoNnw+xztLx8x/XALNqjHaooe0diyY1sgbHnQC1EuZije6WLlRvUPOc/hhhGsoMGGh/VO7hQ2M= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937870; 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=ADvpKGwJyBfKGFxz6tOTEi55ekCpRGoDMQz0mzs3NYytEQ5dbh5XwXQmLsuRw8UR05XjX1MoYZxU7+zWRGQ+T2wHL3uc5jnsHhTq/Bh4YwInGqRpI4PHER3yF/wgIZOeSlogadS6e47jGGEVH9bw9fynvzswiiighIcJBwKMf2A= 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 1776937870896980.7023615221879; Thu, 23 Apr 2026 02:51:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqhR-0000Ou-2G; Thu, 23 Apr 2026 05:50:21 -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 1wFqgS-00087W-4J for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:23 -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 1wFqgP-0001MQ-JI for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:18 -0400 Received: from mx-prod-mc-05.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-599-3srYlCaCPE-cDAzObdSuQg-1; Thu, 23 Apr 2026 05:49:13 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 68CEF19560B8; Thu, 23 Apr 2026 09:49:12 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 018DE300756E; Thu, 23 Apr 2026 09:49:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937756; 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=RruirU0rexYDMoPRMbMSP5rdLfhPw6IvT+ZXax8XVLzpvr/xqiBA+JDT8/2lOKficJfmdp CHoMofylrQK4V1s5i40r3lZXLnuZRalN2pai7TNiS0MFExu3S1Moe64YCCtYVRXWtJbiPq u/1Xv9AM8UFD1RciEu2X16xchu7YWco= X-MC-Unique: 3srYlCaCPE-cDAzObdSuQg-1 X-Mimecast-MFC-AGG-ID: 3srYlCaCPE-cDAzObdSuQg_1776937752 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 05/11] target/s390x: Replace legacy ld/st_phys -> address_space_ld/st (kvm) Date: Thu, 23 Apr 2026 11:48:50 +0200 Message-ID: <20260423094856.270215-6-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-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.4 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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: 1776937873100158500 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 20:11:38 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=1776937832; cv=none; d=zohomail.com; s=zohoarc; b=Q+3mJRsBTMmyAkeFOXpQ325R4p0zalf4Bm8zEWk6krFa7hLkFp76bl3iWgd8CF8tvdn8TrU9A1rLBclvOHtSJjhpXvvS4Fqe/qKGbWi3oULfPkVz6qywO0A1MOnoL9we8WcgcwQS+bHrtXZ8pg7XWLfevFS+Yhfu70QHbUMbW5U= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937832; 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=cfuQ31KMYywQp3rJhOqORF2ATFy45Y9wZipCPK23smkwA8i5aGxZLAUTfH8zZDFSDHPCMpFFIIYaAqOzgmI++8A76UbNJhAtjIcenW/SjTrXYglDzTl1w9SWv7YjH9pQo7c1HAk+6HtkVrVD4GMRPtn0ue1TE911mOb+x73p5LM= 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 1776937832444450.06427132606973; Thu, 23 Apr 2026 02:50:32 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqhQ-0000MK-OM; Thu, 23 Apr 2026 05:50:20 -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 1wFqgU-00087s-Fx for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:23 -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 1wFqgS-0001NW-Fl for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:22 -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-477-mJkkYJe2MV2yKAWzywA5LA-1; Thu, 23 Apr 2026 05:49:15 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 2EBF11956056; Thu, 23 Apr 2026 09:49:14 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id C17083000709; Thu, 23 Apr 2026 09:49:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937759; 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=BUO1H8rq3vy/VIvWglKldFKtdJ4uDuiKRaNKvjlLQ66TJC1rGzmx6LuwWxAwEq2wsQLqFS SUzOTPTErlvl97QN2Gsg63bXcQD+sNd5dHx9YZylaMx/RyLI1XWRv1RrVEcHpRUOY73Di4 XTmNRDh0oe3rOKCfIRKIRvyKMBxxc14= X-MC-Unique: mJkkYJe2MV2yKAWzywA5LA-1 X-Mimecast-MFC-AGG-ID: mJkkYJe2MV2yKAWzywA5LA_1776937754 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 06/11] configs/targets: Restrict the legacy ldst_phys() API on s390x target Date: Thu, 23 Apr 2026 11:48:51 +0200 Message-ID: <20260423094856.270215-7-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-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.4 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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: 1776937832921158500 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 20:11:38 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=1776937870; cv=none; d=zohomail.com; s=zohoarc; b=U/VWrO1Zvuh1NB4MWaGNuXCxjfGfcaPrnhRmbZenOmHeQPiQXciYjpqF3Nz4E72cIdznX6axxE/LYiQbsiT+ftKI2OieheSuqd7pjmB8+V7WCI5WOenddqDnsk6sqAmrUizoZUWqdQiUAna5NQuyC8PE37Cb4r+s3ejm2VgD4mU= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937870; 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=JO+hnVKX0bjjV8pBnxg1OnSOOnkZbkyvuugCnjyNtpdMVjBA0E1wD7nJypGeItzf1IiZ0YdXgHKe72Gpltc5IaAQJ5v6+YVKjirpLDalWnBnOvv6myjOdfWknq3oaxr/0y1Rnng4Wn0p/69O+gmeVzLMab22LrTLTROjtW8W2yc= 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 177693787051050.46141951355048; Thu, 23 Apr 2026 02:51:10 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqhR-0000SS-L2; Thu, 23 Apr 2026 05:50:21 -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 1wFqgV-00087u-Es for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:25 -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 1wFqgT-0001OC-FB for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:23 -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-641-vHHiSVpQPa-7C27Yexlgjg-1; Thu, 23 Apr 2026 05:49:16 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 E911319560B4; Thu, 23 Apr 2026 09:49:15 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 876D63000709; Thu, 23 Apr 2026 09:49:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937760; 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=EZBeed9BJ0fNVvfpTEU/hbLdfdsxn898N4NH6jKTlNeSX/X4VTYwwxHNCkJOCTfdBMaBuI 0cQkf+wmhLyQp3pESQPo/M0O5HtI6gS3vqKI+IVx1eQd/7cOkpcWCwdtXAuFarIGiicRPO I/EDp7XPPlnp7V8Y5c5wN8NYgzUa5Ys= X-MC-Unique: vHHiSVpQPa-7C27Yexlgjg-1 X-Mimecast-MFC-AGG-ID: vHHiSVpQPa-7C27Yexlgjg_1776937756 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Thomas Huth , Eric Farman , Cornelia Huck Subject: [PULL 07/11] tests/functional/s390x: Add test for booting from a disk with 4k sectors Date: Thu, 23 Apr 2026 11:48:52 +0200 Message-ID: <20260423094856.270215-8-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: 1776937871198158500 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 20:11:38 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=1776937845; cv=none; d=zohomail.com; s=zohoarc; b=R4mCu/PsA+wtfRNeM2jEZeVA+Pu0HSR1+WoatSpJX9CwYH2NEPCA0qDPTZYUe7whV198cmfQMQXEy0RTwl8GJtzvakAsU4xhexwa1bbBObOasaCqN3H4LdBvRVdJyPs/tFzfvJheTjgjtw4lKq00vd0oDD2X8Cticbc8XwcO0fM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937845; 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=/IUNg/bqXGhAM46xsuGhUHknfvqkJ/1A+TqtAjw7bCI=; b=kwWjzJeGtQlmwyWq2F7VJnozx/VDVrQc7uPgjhhJw+L6x23WEF8/a5izDADarocO5NTp3MsufTLX3V5S+B6F8O/Qvbg475lnX7rcBrcFiuWcQYceefH5zYl5mCtCR7DYq00rcJ9nwyzxkFBV+2lQF5baVKsWjM0ied+TXuZafa4= 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 1776937845108756.3920206974423; Thu, 23 Apr 2026 02:50:45 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqhH-00006t-Pj; Thu, 23 Apr 2026 05:50: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 1wFqgW-00088R-H4 for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:27 -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 1wFqgU-0001Ok-8G for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:23 -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-138-ZEDwaiy5PP6CUUBcZ_xuUQ-1; Thu, 23 Apr 2026 05:49:18 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 773E4195609E; Thu, 23 Apr 2026 09:49:17 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 4DCD53000709; Thu, 23 Apr 2026 09:49:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937761; 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=/IUNg/bqXGhAM46xsuGhUHknfvqkJ/1A+TqtAjw7bCI=; b=b7gwF6z+y73gzdIjpT2dTz0SoH7vOrmLv0Is1sYnKwiIyw/CZCmVvQWL4cpCmyScSnh+nU yomfeKSEQ24zNHL7OQfkp4STI59CMnLIV9M0DVJaNM2PqCyWa1NVqT/+uE901BjjVEMUBq zQ0Of4QI2E4xABzK3Ga0zO+HCd7UXpQ= X-MC-Unique: ZEDwaiy5PP6CUUBcZ_xuUQ-1 X-Mimecast-MFC-AGG-ID: ZEDwaiy5PP6CUUBcZ_xuUQ_1776937757 From: Cornelia Huck To: qemu-devel@nongnu.org Cc: qemu-s390x@nongnu.org, Cornelia Huck , Eric Farman Subject: [PULL 08/11] hw: add compat machines for 11.1 Date: Thu, 23 Apr 2026 11:48:53 +0200 Message-ID: <20260423094856.270215-9-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: 1776937847167158500 Content-Type: text/plain; charset="utf-8" Add 11.1 machine types for arm/i440fx/m68k/q35/s390x/spapr. Reviewed-by: Eric Farman # s390 Signed-off-by: Cornelia Huck Message-ID: <20260331140347.653404-1-cohuck@redhat.com> --- hw/arm/virt.c | 9 ++++++++- hw/core/machine.c | 3 +++ hw/i386/pc.c | 3 +++ hw/i386/pc_piix.c | 13 +++++++++++-- hw/i386/pc_q35.c | 13 +++++++++++-- hw/m68k/virt.c | 9 ++++++++- hw/ppc/spapr.c | 15 +++++++++++++-- hw/s390x/s390-virtio-ccw.c | 14 +++++++++++++- include/hw/core/boards.h | 3 +++ include/hw/i386/pc.h | 3 +++ 10 files changed, 76 insertions(+), 9 deletions(-) diff --git a/hw/arm/virt.c b/hw/arm/virt.c index ec0d8475ca40..d7e68d42ce02 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -3719,10 +3719,17 @@ static void machvirt_machine_init(void) } type_init(machvirt_machine_init); =20 +static void virt_machine_11_1_options(MachineClass *mc) +{ +} +DEFINE_VIRT_MACHINE_AS_LATEST(11, 1) + static void virt_machine_11_0_options(MachineClass *mc) { + virt_machine_11_1_options(mc); + compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len); } -DEFINE_VIRT_MACHINE_AS_LATEST(11, 0) +DEFINE_VIRT_MACHINE(11, 0) =20 static void virt_machine_10_2_options(MachineClass *mc) { diff --git a/hw/core/machine.c b/hw/core/machine.c index 0aa77a57e956..1abc8ae73739 100644 --- a/hw/core/machine.c +++ b/hw/core/machine.c @@ -38,6 +38,9 @@ #include "hw/acpi/generic_event_device.h" #include "qemu/audio.h" =20 +GlobalProperty hw_compat_11_0[] =3D {}; +const size_t hw_compat_11_0_len =3D G_N_ELEMENTS(hw_compat_11_0); + GlobalProperty hw_compat_10_2[] =3D { { "scsi-block", "migrate-pr", "off" }, { "isa-cirrus-vga", "global-vmstate", "true" }, diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 4b53b5be4a96..2ecad3c503fb 100644 --- a/hw/i386/pc.c +++ b/hw/i386/pc.c @@ -73,6 +73,9 @@ #include "hw/xen/xen-bus.h" #endif =20 +GlobalProperty pc_compat_11_0[] =3D {}; +const size_t pc_compat_11_0_len =3D G_N_ELEMENTS(pc_compat_11_0); + GlobalProperty pc_compat_10_2[] =3D {}; const size_t pc_compat_10_2_len =3D G_N_ELEMENTS(pc_compat_10_2); =20 diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 4d71e0d51a28..82457bdb167a 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -428,12 +428,21 @@ static void pc_i440fx_machine_options(MachineClass *m) pc_piix_compat_defaults, pc_piix_compat_defaults_len); } =20 -static void pc_i440fx_machine_11_0_options(MachineClass *m) +static void pc_i440fx_machine_11_1_options(MachineClass *m) { pc_i440fx_machine_options(m); } =20 -DEFINE_I440FX_MACHINE_AS_LATEST(11, 0); +DEFINE_I440FX_MACHINE_AS_LATEST(11, 1); + +static void pc_i440fx_machine_11_0_options(MachineClass *m) +{ + pc_i440fx_machine_11_1_options(m); + compat_props_add(m->compat_props, hw_compat_11_0, hw_compat_11_0_len); + compat_props_add(m->compat_props, pc_compat_11_0, pc_compat_11_0_len); +} + +DEFINE_I440FX_MACHINE(11, 0); =20 static void pc_i440fx_machine_10_2_options(MachineClass *m) { diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index cb23322f5a44..972dd9275f68 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -364,12 +364,21 @@ static void pc_q35_machine_options(MachineClass *m) pc_q35_compat_defaults, pc_q35_compat_defaults_len); } =20 -static void pc_q35_machine_11_0_options(MachineClass *m) +static void pc_q35_machine_11_1_options(MachineClass *m) { pc_q35_machine_options(m); } =20 -DEFINE_Q35_MACHINE_AS_LATEST(11, 0); +DEFINE_Q35_MACHINE_AS_LATEST(11, 1); + +static void pc_q35_machine_11_0_options(MachineClass *m) +{ + pc_q35_machine_11_1_options(m); + compat_props_add(m->compat_props, hw_compat_11_0, hw_compat_11_0_len); + compat_props_add(m->compat_props, pc_compat_11_0, pc_compat_11_0_len); +} + +DEFINE_Q35_MACHINE(11, 0); =20 static void pc_q35_machine_10_2_options(MachineClass *m) { diff --git a/hw/m68k/virt.c b/hw/m68k/virt.c index ffe6e234155b..96c0fb73fea5 100644 --- a/hw/m68k/virt.c +++ b/hw/m68k/virt.c @@ -367,10 +367,17 @@ type_init(virt_machine_register_types) #define DEFINE_VIRT_MACHINE(major, minor) \ DEFINE_VIRT_MACHINE_IMPL(false, major, minor) =20 +static void virt_machine_11_1_options(MachineClass *mc) +{ +} +DEFINE_VIRT_MACHINE_AS_LATEST(11, 1) + static void virt_machine_11_0_options(MachineClass *mc) { + virt_machine_11_1_options(mc); + compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len); } -DEFINE_VIRT_MACHINE_AS_LATEST(11, 0) +DEFINE_VIRT_MACHINE(11, 0) =20 static void virt_machine_10_2_options(MachineClass *mc) { diff --git a/hw/ppc/spapr.c b/hw/ppc/spapr.c index 0ab39dfea6b8..428b491a7df1 100644 --- a/hw/ppc/spapr.c +++ b/hw/ppc/spapr.c @@ -4760,15 +4760,26 @@ static void spapr_machine_latest_class_options(Mach= ineClass *mc) #define DEFINE_SPAPR_MACHINE(major, minor) \ DEFINE_SPAPR_MACHINE_IMPL(false, major, minor) =20 +/* + * pseries-11.1 + */ +static void spapr_machine_11_1_class_options(MachineClass *mc) +{ + /* Defaults for the latest behaviour inherited from the base class */ +} + +DEFINE_SPAPR_MACHINE_AS_LATEST(11, 1); + /* * pseries-11.0 */ static void spapr_machine_11_0_class_options(MachineClass *mc) { - /* Defaults for the latest behaviour inherited from the base class */ + spapr_machine_11_1_class_options(mc); + compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len); } =20 -DEFINE_SPAPR_MACHINE_AS_LATEST(11, 0); +DEFINE_SPAPR_MACHINE(11, 0); =20 /* * pseries-10.2 diff --git a/hw/s390x/s390-virtio-ccw.c b/hw/s390x/s390-virtio-ccw.c index 3ef009463d11..cc768daeb04c 100644 --- a/hw/s390x/s390-virtio-ccw.c +++ b/hw/s390x/s390-virtio-ccw.c @@ -907,14 +907,26 @@ static const TypeInfo ccw_machine_info =3D { DEFINE_CCW_MACHINE_IMPL(false, major, minor) =20 =20 +static void ccw_machine_11_1_instance_options(MachineState *machine) +{ +} + +static void ccw_machine_11_1_class_options(MachineClass *mc) +{ +} +DEFINE_CCW_MACHINE_AS_LATEST(11, 1); + static void ccw_machine_11_0_instance_options(MachineState *machine) { + ccw_machine_11_1_instance_options(machine); } =20 static void ccw_machine_11_0_class_options(MachineClass *mc) { + ccw_machine_11_1_class_options(mc); + compat_props_add(mc->compat_props, hw_compat_11_0, hw_compat_11_0_len); } -DEFINE_CCW_MACHINE_AS_LATEST(11, 0); +DEFINE_CCW_MACHINE(11, 0); =20 static void ccw_machine_10_2_instance_options(MachineState *machine) { diff --git a/include/hw/core/boards.h b/include/hw/core/boards.h index b8dad0a1074d..db83fe92922b 100644 --- a/include/hw/core/boards.h +++ b/include/hw/core/boards.h @@ -798,6 +798,9 @@ struct MachineState { } \ } while (0) =20 +extern GlobalProperty hw_compat_11_0[]; +extern const size_t hw_compat_11_0_len; + extern GlobalProperty hw_compat_10_2[]; extern const size_t hw_compat_10_2_len; =20 diff --git a/include/hw/i386/pc.h b/include/hw/i386/pc.h index 22325324d094..85a74363b52e 100644 --- a/include/hw/i386/pc.h +++ b/include/hw/i386/pc.h @@ -208,6 +208,9 @@ void pc_system_parse_ovmf_flash(uint8_t *flash_ptr, siz= e_t flash_size); /* sgx.c */ void pc_machine_init_sgx_epc(PCMachineState *pcms); =20 +extern GlobalProperty pc_compat_11_0[]; +extern const size_t pc_compat_11_0_len; + extern GlobalProperty pc_compat_10_2[]; extern const size_t pc_compat_10_2_len; =20 --=20 2.53.0 From nobody Sat May 30 20:11:38 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=1776937863; cv=none; d=zohomail.com; s=zohoarc; b=YkFZ982HvLhJktVZuh9TMzGd6nMC1EWzYeapwcLqbDgxTcNQPEL8Yo/okMuelEg5H4+b0DZB8gDmOuF6frQqVyny4Z/rF4bmCRZGVN+D4DfQQayKBHgWBeKjLy+aRM3ysh5Hdb4pdUKKRgDWDpJGe4wXJIO4K+OMv5HMqU6IEDo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937863; 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=TT9esZWkZyBhWSoCD0G+i8sIwDX3OoM4mRlSrTBi8Gj5Y4vah1369VKP2hZn3QGZbmAmR6TpUp5cg0P9lGtwZQ5wD+9jkUiarIC4kfS6wolLSaThP9amsn5AzljO9KT6xLowlF0TK7fumRSD2Oglrxhjy5DOrDW1cTwFNnvP5H8= 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 1776937863788946.2246095712289; Thu, 23 Apr 2026 02:51:03 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqhT-0000bg-AD; Thu, 23 Apr 2026 05:50:23 -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 1wFqgZ-00088m-TF for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49: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 1wFqgW-0001Pq-WC for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:26 -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-249-XItWH0j6NNGW6XWKB4qlHQ-1; Thu, 23 Apr 2026 05:49:20 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 A0C1F19560A2; Thu, 23 Apr 2026 09:49:19 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id D0F133000709; Thu, 23 Apr 2026 09:49:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937764; 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=gmdCm/iKxC/K3SSbxpHuovPF2C8DmYeZQDX4OHTR9hEidw2Z1Ij8ullbAwC7+Ic/qUgA1Y ww9/GqAmB9oZJo9LdSdbQRA1x0y8Bh0t6S1TvVV1TGWOo0+Th8GiV40pmk/UgQlulDOZx2 E531I5//wRtjhHprA3jNLSVs4LMtGdE= X-MC-Unique: XItWH0j6NNGW6XWKB4qlHQ-1 X-Mimecast-MFC-AGG-ID: XItWH0j6NNGW6XWKB4qlHQ_1776937759 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 09/11] target/s390x: Prefer MO_128 definition over magic value Date: Thu, 23 Apr 2026 11:48:54 +0200 Message-ID: <20260423094856.270215-10-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-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.4 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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: 1776937865690154100 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 20:11:38 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=1776937858; cv=none; d=zohomail.com; s=zohoarc; b=HOMHBfwclnmyGlD2EWzj2oDTjmG8k1kzfJdfN1vXBI2JeAK6+NUMrKqJ7qKhsTqknjbOamo0+l5UdAMBhCBiqSZo5ndg0jtfsmFSczPOT2hRAEB0Un5jD05mP5ehpwDFX6q4rzdAETpWSXYUbrKV8FPZjjwoE+vVjO0QAbuW8tM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937858; 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=LbDoYB20Kvlp9BRumsrOOBQmNcTITPgFtOUYHia1acw=; b=ABDjws0hFXA7S1LwxV6FH6pMODXLQCfGi6/VcU7L4W+8xxlYkRkawRRdp0OWuBw6wRlq3Zkqmd9BCjZf4s6YZsVJKcsIOUQn4V+CyX92/3wuXmKKATFilju2bvO/bJ1P1SMbV8tsZF6zT8td63Rp6Jd1xP0uFLKQhwJBK2CCLYw= 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 1776937858211385.84959218461074; Thu, 23 Apr 2026 02:50:58 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqhH-00005b-Lw; Thu, 23 Apr 2026 05:50: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 1wFqgc-00089T-LM for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:33 -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 1wFqgZ-0001QU-Ic for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:30 -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-339-mssYjHneNBG9OGXgjgMTZA-1; Thu, 23 Apr 2026 05:49:23 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 B9514195608E; Thu, 23 Apr 2026 09:49:21 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 04B053000709; Thu, 23 Apr 2026 09:49:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937766; 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=LbDoYB20Kvlp9BRumsrOOBQmNcTITPgFtOUYHia1acw=; b=XRif6z8YYJJTKTgc8T+hGMBZlOW0+sD9Pjq6P2p3WVoCicNq9x6GksM6C6j/p3mIIG+6ZL h6JlcbSysyykeriJVtmhner960b6CKxjOLx9k6G2vWsfKgcsjtrkTJwiJkZegx7UqVGGpq 7EoMvHPecQDF1TI8OkHXwCxaPpmO9Lw= X-MC-Unique: mssYjHneNBG9OGXgjgMTZA-1 X-Mimecast-MFC-AGG-ID: mssYjHneNBG9OGXgjgMTZA_1776937761 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 10/11] MAINTAINERS: Update s390 trees Date: Thu, 23 Apr 2026 11:48:55 +0200 Message-ID: <20260423094856.270215-11-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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: 12 X-Spam_score: 1.2 X-Spam_bar: + X-Spam_report: (1.2 / 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, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=no 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: 1776937859625154100 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 ad215eced84d..cdec4872d219 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 @@ -1854,7 +1854,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 @@ -1868,7 +1867,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 @@ -2468,8 +2466,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 20:11:38 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=1776937856; cv=none; d=zohomail.com; s=zohoarc; b=lXeDMcVQV4x6zQCmWgXz7d9p1QlRUkWr7WWyVO+eIhVX5gLE69piIPHlpUC9bxozx9ed7maKoINRj0qz9vgp9tGVrZwmorGh3wcVcGDpC2mImES0ouRnvI2FiUCYR4OHmByEklXh7cUXkdgfxgs5tJ2JvbND+IwwQ7WOie5rNYY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1776937856; 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=kEKEvTYC8p44iAP01zAzfSp/e6JsBl4rlsaqfCTbw5cn6HdvEVtS9CeAdjdcW5QMnvw8hitl+e3wmySZec+Iwr7OSdImc3h2uco6wwsImeIeALs0UAMF6oKhJ14VgYU1Jz1kcpTy7lEfWqdRQwDapQK/qoStir+O/EmVHmVWVTs= 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 1776937856452447.05026140645555; Thu, 23 Apr 2026 02:50:56 -0700 (PDT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists1p.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1wFqhU-0000fy-EL; Thu, 23 Apr 2026 05:50:24 -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 1wFqgh-0008Al-DO for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:40 -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 1wFqgd-0001SN-Nw for qemu-devel@nongnu.org; Thu, 23 Apr 2026 05:49:33 -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-658-fuUw9cHqNfWNLmZF7eg_Gg-1; Thu, 23 Apr 2026 05:49:25 -0400 Received: from mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.4]) (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 2BC011800464; Thu, 23 Apr 2026 09:49:24 +0000 (UTC) Received: from gondolin.str.redhat.com (dhcp-192-224.str.redhat.com [10.33.192.224]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 1E5DC3007572; Thu, 23 Apr 2026 09:49:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1776937771; 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=elv0OsQcWtpiWK82KGf/4aw1mJFtMEbhH8D5zNqzp1MsO3UdZMR1Iq4t68SJwxS3Ak5A2+ ha4lFY0jvwitdxOVGqj71gQ5ZTN0QUKYTDydokTpALUG863TGktfEhXJfZTo9bU8YFnU4O j3viXySNaaTtMqqG8fC3OMItLpcxqr4= X-MC-Unique: fuUw9cHqNfWNLmZF7eg_Gg-1 X-Mimecast-MFC-AGG-ID: fuUw9cHqNfWNLmZF7eg_Gg_1776937764 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 11/11] hw/s390x/ccw: Disable legacy virtio-pci by default (v11.1+) Date: Thu, 23 Apr 2026 11:48:56 +0200 Message-ID: <20260423094856.270215-12-cohuck@redhat.com> In-Reply-To: <20260423094856.270215-1-cohuck@redhat.com> References: <20260423094856.270215-1-cohuck@redhat.com> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.4 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: 1776937857762154100 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