Message ID | 20180525113708.29856-5-david@redhat.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index 418326e551..2ef9de1cca 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/misc_helper.c @@ -158,6 +158,12 @@ void HELPER(sckc)(CPUS390XState *env, uint64_t time) Error *err = NULL; S390TOD tod_base; + /* stop the timer and remove pending CKC IRQs */ + timer_del(env->tod_timer); + qemu_mutex_lock_iothread(); + env->pending_int &= ~INTERRUPT_EXT_CLOCK_COMPARATOR; + qemu_mutex_unlock_iothread(); + if (time == -1ULL) { return; }
Let's stop the timer and delete any pending CKC IRQ before doing anything else. Signed-off-by: David Hildenbrand <david@redhat.com> --- target/s390x/misc_helper.c | 6 ++++++ 1 file changed, 6 insertions(+)