From nobody Mon Feb 9 01:52:24 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=1762167827; cv=none; d=zohomail.com; s=zohoarc; b=HuYeWrqpsJ6jRNJnMMX31yAXNlErtSie+19wG8tZSftFMczAGzpbQEyEBd2pwLTGOZk65zD9IPCoHfRP8pkf+9yUEbNo18tsTYweQOoHawWKAvzk6XRBMXnaF7WpV9T8JKrlA+xeB5AI4fFc8HzCKMrJclcqG2nuJFMvYrllBz8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1762167827; h=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=gSuvTRmXv2fofIP+bvbCeQLENVrlaMGpCelkpxptMhg=; b=Q1TNfV49aUy1db9d1Q3EWlpgycTSYiyGBM+NF3Eir6WTBo0O2w1APrhsykVCnbaLJxBZRoBQrIqoVW/DIGvWPlkBa4ajQnvczUIQ5a+oJAIWh64lsv3GAjue7h5Wv1JHFhqkR8WG2byDg1hbQGmAHJBzzN5fNAdIKWkF7nYeO3w= 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 lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1762167827601273.0858414138286; Mon, 3 Nov 2025 03:03:47 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1vFsHm-0004M7-Q5; Mon, 03 Nov 2025 05:59:43 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1vFsHZ-0004AZ-9w for qemu-devel@nongnu.org; Mon, 03 Nov 2025 05:59:33 -0500 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 1vFsHT-0004eP-VY for qemu-devel@nongnu.org; Mon, 03 Nov 2025 05:59:28 -0500 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-584-CMfXd6aSMnebgpwbm6jd_w-1; Mon, 03 Nov 2025 05:59:18 -0500 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 EFC941801376; Mon, 3 Nov 2025 10:59:16 +0000 (UTC) Received: from thuth-p1g4.redhat.com (unknown [10.44.33.12]) by mx-prod-int-01.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 417D830001BC; Mon, 3 Nov 2025 10:59:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1762167562; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=gSuvTRmXv2fofIP+bvbCeQLENVrlaMGpCelkpxptMhg=; b=hccVFyCJpnW9LJ3FHQfxm+qyJGZnD+yEH0hevEyGqRarfJ7c9q2qO6ZDSDuBC2HFjV0m/e D/lFqpbtY/E1ZPlAclWhvvQdjlTxBUS+u3RHf5FVUa66N0ULRtzVYhGl+f62/r/QKdaeFS 9bf9U0O/tIlUyebE+QS7V/nVSFM+BpY= X-MC-Unique: CMfXd6aSMnebgpwbm6jd_w-1 X-Mimecast-MFC-AGG-ID: CMfXd6aSMnebgpwbm6jd_w_1762167557 From: Thomas Huth To: qemu-devel@nongnu.org Cc: Richard Henderson , qemu-stable@nongnu.org, Ilya Leoshkevich Subject: [PULL 22/22] tests/tcg/s390x: Test SET CLOCK COMPARATOR Date: Mon, 3 Nov 2025 11:58:19 +0100 Message-ID: <20251103105824.322039-23-thuth@redhat.com> In-Reply-To: <20251103105824.322039-1-thuth@redhat.com> References: <20251103105824.322039-1-thuth@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=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=thuth@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_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=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: 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: 1762167849562158500 Content-Type: text/plain; charset="utf-8" From: Ilya Leoshkevich Add a small test to prevent regressions. Cc: qemu-stable@nongnu.org Reviewed-by: Thomas Huth Signed-off-by: Ilya Leoshkevich Message-ID: <20251016175954.41153-5-iii@linux.ibm.com> Signed-off-by: Thomas Huth --- tests/tcg/s390x/Makefile.softmmu-target | 1 + tests/tcg/s390x/sckc.S | 63 +++++++++++++++++++++++++ 2 files changed, 64 insertions(+) create mode 100644 tests/tcg/s390x/sckc.S diff --git a/tests/tcg/s390x/Makefile.softmmu-target b/tests/tcg/s390x/Make= file.softmmu-target index 8cd4667c63b..a4425d3184a 100644 --- a/tests/tcg/s390x/Makefile.softmmu-target +++ b/tests/tcg/s390x/Makefile.softmmu-target @@ -28,6 +28,7 @@ ASM_TESTS =3D = \ mc = \ per = \ precise-smc-softmmu = \ + sckc = \ ssm-early = \ stosm-early = \ stpq = \ diff --git a/tests/tcg/s390x/sckc.S b/tests/tcg/s390x/sckc.S new file mode 100644 index 00000000000..ecd64a3059e --- /dev/null +++ b/tests/tcg/s390x/sckc.S @@ -0,0 +1,63 @@ +/* + * Test clock comparator. + * + * SPDX-License-Identifier: GPL-2.0-or-later + */ + .org 0x130 +ext_old_psw: + .org 0x1b0 +ext_new_psw: + .quad 0x180000000, _ext /* 64-bit mode */ + .org 0x1d0 +pgm_new_psw: + .quad 0x2000000000000,0 /* disabled wait */ + .org 0x200 /* lowcore padding */ + + .globl _start +_start: + lpswe start31_psw +_start31: + stctg %c0,%c0,c0 + oi c0+6,8 /* set clock-comparator subclass ma= sk */ + lctlg %c0,%c0,c0 + +0: + brasl %r14,_f /* %r14's most significant bit is 1= */ + jg 0b +_f: + br %r14 /* it must not end up in ext_old_ps= w */ + +_ext: + stg %r0,ext_saved_r0 + + lg %r0,ext_counter + aghi %r0,1 + stg %r0,ext_counter + + cgfi %r0,0x1000 + jnz 0f + lpswe success_psw +0: + + stck clock + lg %r0,clock + agfi %r0,0x40000 /* 64us * 0x1000 =3D~ 0.25s */ + stg %r0,clock + sckc clock + + lg %r0,ext_saved_r0 + lpswe ext_old_psw + + .align 8 +start31_psw: + .quad 0x100000080000000,_start31 /* EX, 31-bit mode */ +success_psw: + .quad 0x2000000000000,0xfff /* see is_special_wait_psw() */ +c0: + .skip 8 +clock: + .quad 0 +ext_counter: + .quad 0 +ext_saved_r0: + .skip 8 --=20 2.51.0