]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/s390x: Fix missing interrupts for small CKC values
authorIlya Leoshkevich <iii@linux.ibm.com>
Thu, 16 Oct 2025 17:58:30 +0000 (19:58 +0200)
committerThomas Huth <thuth@redhat.com>
Mon, 3 Nov 2025 07:27:59 +0000 (08:27 +0100)
commitdf7e9243d540ee130f044f975af8de33c45f5299
treea57aa7ab3bd0fa17688dfac55a98aec550f362b7
parent0281105bc4c3bff5764b1caa18ee95c14798bccb
target/s390x: Fix missing interrupts for small CKC values

Suppose TOD clock value is 0x1111111111111111 and clock-comparator
value is 0, in which case clock-comparator interruption should occur
immediately.

With the current code, tod2time(env->ckc - td->base.low) ends up being
a very large number, so this interruption never happens.

Fix by firing the timer immediately if env->ckc < td->base.low.

Cc: qemu-stable@nongnu.org
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Message-ID: <20251016175954.41153-2-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
target/s390x/tcg/misc_helper.c