Blame SOURCES/kvm-s390x-tcg-drop-tod_basetime.patch

1359fb
From 7e7cd720a64754c0ebe4b38b310ceef2fc839c64 Mon Sep 17 00:00:00 2001
1359fb
From: David Hildenbrand <david@redhat.com>
1359fb
Date: Fri, 21 Dec 2018 15:39:49 +0100
1359fb
Subject: [PATCH 05/14] s390x/tcg: drop tod_basetime
1359fb
1359fb
RH-Author: David Hildenbrand <david@redhat.com>
1359fb
Message-id: <20181221153957.28183-5-david@redhat.com>
1359fb
Patchwork-id: 83768
1359fb
O-Subject: [RHEL-7.6.z qemu-kvm-ma PATCH 04/12] s390x/tcg: drop tod_basetime
1359fb
Bugzilla: 1672920
1359fb
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
1359fb
RH-Acked-by: Thomas Huth <thuth@redhat.com>
1359fb
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
1359fb
1359fb
Never set to anything but 0.
1359fb
1359fb
Reviewed-by: Thomas Huth <thuth@redhat.com>
1359fb
Signed-off-by: David Hildenbrand <david@redhat.com>
1359fb
Message-Id: <20180627134410.4901-5-david@redhat.com>
1359fb
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
1359fb
(cherry picked from commit f777b20544fe5db3de179a83374cbf9f1e454427)
1359fb
Signed-off-by: David Hildenbrand <david@redhat.com>
1359fb
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
1359fb
---
1359fb
 target/s390x/cpu.c         | 1 -
1359fb
 target/s390x/cpu.h         | 1 -
1359fb
 target/s390x/misc_helper.c | 4 ++--
1359fb
 3 files changed, 2 insertions(+), 4 deletions(-)
1359fb
1359fb
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
1359fb
index 167d089..5570741 100644
1359fb
--- a/target/s390x/cpu.c
1359fb
+++ b/target/s390x/cpu.c
1359fb
@@ -290,7 +290,6 @@ static void s390_cpu_initfn(Object *obj)
1359fb
     qemu_get_timedate(&tm, 0);
1359fb
     env->tod_offset = TOD_UNIX_EPOCH +
1359fb
                       (time2tod(mktimegm(&tm)) * 1000000000ULL);
1359fb
-    env->tod_basetime = 0;
1359fb
     env->tod_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, cpu);
1359fb
     env->cpu_timer = timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_cpu_timer, cpu);
1359fb
     s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu);
1359fb
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
1359fb
index 67118c8..04f9adf 100644
1359fb
--- a/target/s390x/cpu.h
1359fb
+++ b/target/s390x/cpu.h
1359fb
@@ -134,7 +134,6 @@ struct CPUS390XState {
1359fb
 #endif
1359fb
 
1359fb
     uint64_t tod_offset;
1359fb
-    uint64_t tod_basetime;
1359fb
     QEMUTimer *tod_timer;
1359fb
 
1359fb
     QEMUTimer *cpu_timer;
1359fb
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
1359fb
index e0b23c1..8b3b040 100644
1359fb
--- a/target/s390x/misc_helper.c
1359fb
+++ b/target/s390x/misc_helper.c
1359fb
@@ -142,7 +142,7 @@ uint64_t HELPER(stck)(CPUS390XState *env)
1359fb
     uint64_t time;
1359fb
 
1359fb
     time = env->tod_offset +
1359fb
-        time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL) - env->tod_basetime);
1359fb
+        time2tod(qemu_clock_get_ns(QEMU_CLOCK_VIRTUAL));
1359fb
 
1359fb
     return time;
1359fb
 }
1359fb
@@ -162,7 +162,7 @@ void HELPER(sckc)(CPUS390XState *env, uint64_t time)
1359fb
     /* nanoseconds */
1359fb
     time = tod2time(time);
1359fb
 
1359fb
-    timer_mod(env->tod_timer, env->tod_basetime + time);
1359fb
+    timer_mod(env->tod_timer, time);
1359fb
 }
1359fb
 
1359fb
 /* Set Tod Programmable Field */
1359fb
-- 
1359fb
1.8.3.1
1359fb