From: Ilya Leoshkevich <iii@linux.ibm.com>
To: Thomas Huth <thuth@redhat.com>,
Richard Henderson <richard.henderson@linaro.org>,
David Hildenbrand <david@redhat.com>
Cc: qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH 3/3] tests/tcg/s390x: Test SET CLOCK COMPARATOR
Date: Wed, 15 Oct 2025 09:30:56 +0200 [thread overview]
Message-ID: <a0e889041a6b3859f4a836267eec6cbb684f9141.camel@linux.ibm.com> (raw)
In-Reply-To: <20251014160743.398093-4-iii@linux.ibm.com>
On Tue, 2025-10-14 at 18:05 +0200, Ilya Leoshkevich wrote:
> Add a small test to prevent regressions.
>
> Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
> ---
> tests/tcg/s390x/Makefile.softmmu-target | 1 +
> tests/tcg/s390x/sckc.S | 53
> +++++++++++++++++++++++++
> 2 files changed, 54 insertions(+)
> create mode 100644 tests/tcg/s390x/sckc.S
[...]
> diff --git a/tests/tcg/s390x/sckc.S b/tests/tcg/s390x/sckc.S
> new file mode 100644
> index 00000000000..0fadec0dd65
> --- /dev/null
> +++ b/tests/tcg/s390x/sckc.S
> @@ -0,0 +1,53 @@
> +/*
> + * 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 0x200 /* lowcore padding */
> +
> + .globl _start
> +_start:
> + lpswe start31_psw
> +_start31:
> + stctg %c0,%c0,c0
> + oi c0+6,8 /* set clock-comparator
> subclass mask */
> + lctlg %c0,%c0,c0
> +0:
> + cghsi ext_counter,0x1000
> + jnz 0b
It's better to move this check to the interrupt handler, otherwise
there is a risk we get two interrupts and the counter moves from
0xfff to 0x1001, causing an infinite loop. I will fix this in v2.
> + lpswe success_psw
> +
> +_ext:
> + stg %r0,ext_saved_r0
> +
> + lg %r0,ext_counter
> + aghi %r0,1
> + stg %r0,ext_counter
[...]
next prev parent reply other threads:[~2025-10-15 7:33 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-10-14 16:05 [PATCH 0/3] target/s390x: Fix missing clock-comparator interrupts Ilya Leoshkevich
2025-10-14 16:05 ` [PATCH 1/3] target/s390x: Fix missing interrupts for small CKC values Ilya Leoshkevich
2025-10-15 13:01 ` Thomas Huth
2025-10-14 16:05 ` [PATCH 2/3] target/s390x: Fix missing clock-comparator interrupts after reset Ilya Leoshkevich
2025-10-15 7:28 ` Ilya Leoshkevich
2025-10-14 16:05 ` [PATCH 3/3] tests/tcg/s390x: Test SET CLOCK COMPARATOR Ilya Leoshkevich
2025-10-15 7:30 ` Ilya Leoshkevich [this message]
2025-10-15 7:56 ` [PATCH 0/3] target/s390x: Fix missing clock-comparator interrupts Michael Tokarev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=a0e889041a6b3859f4a836267eec6cbb684f9141.camel@linux.ibm.com \
--to=iii@linux.ibm.com \
--cc=david@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=richard.henderson@linaro.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).