|
|
28c80a |
From 0ae076c231b0b8096acf0103b559bc5d58c4fdcf Mon Sep 17 00:00:00 2001
|
|
|
28c80a |
From: David Hildenbrand <david@redhat.com>
|
|
|
28c80a |
Date: Fri, 21 Dec 2018 15:39:53 +0100
|
|
|
28c80a |
Subject: [PATCH 09/14] s390x/tcg: rearm the CKC timer during migration
|
|
|
28c80a |
|
|
|
28c80a |
RH-Author: David Hildenbrand <david@redhat.com>
|
|
|
28c80a |
Message-id: <20181221153957.28183-9-david@redhat.com>
|
|
|
28c80a |
Patchwork-id: 83767
|
|
|
28c80a |
O-Subject: [RHEL-7.6.z qemu-kvm-ma PATCH 08/12] s390x/tcg: rearm the CKC timer during migration
|
|
|
28c80a |
Bugzilla: 1672920
|
|
|
28c80a |
RH-Acked-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
28c80a |
RH-Acked-by: Thomas Huth <thuth@redhat.com>
|
|
|
28c80a |
RH-Acked-by: Laurent Vivier <lvivier@redhat.com>
|
|
|
28c80a |
|
|
|
28c80a |
If the CPU data is migrated after the TOD clock, the CKC timer of a CPU
|
|
|
28c80a |
is not rearmed. Let's rearm it when loading the CPU state.
|
|
|
28c80a |
|
|
|
28c80a |
Introduce tcg-stub.c just like kvm-stub.c for tcg specific stubs.
|
|
|
28c80a |
|
|
|
28c80a |
Reviewed-by: Thomas Huth <thuth@redhat.com>
|
|
|
28c80a |
Signed-off-by: David Hildenbrand <david@redhat.com>
|
|
|
28c80a |
Message-Id: <20180627134410.4901-9-david@redhat.com>
|
|
|
28c80a |
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
|
|
|
28c80a |
(cherry picked from commit 7c12f710bad60dc7e509da4e80c77e952ef0490c)
|
|
|
28c80a |
Signed-off-by: David Hildenbrand <david@redhat.com>
|
|
|
28c80a |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
28c80a |
---
|
|
|
28c80a |
target/s390x/Makefile.objs | 1 +
|
|
|
28c80a |
target/s390x/machine.c | 6 ++++++
|
|
|
28c80a |
target/s390x/tcg-stub.c | 20 ++++++++++++++++++++
|
|
|
28c80a |
3 files changed, 27 insertions(+)
|
|
|
28c80a |
create mode 100644 target/s390x/tcg-stub.c
|
|
|
28c80a |
|
|
|
28c80a |
diff --git a/target/s390x/Makefile.objs b/target/s390x/Makefile.objs
|
|
|
28c80a |
index 31932de..22a9a99 100644
|
|
|
28c80a |
--- a/target/s390x/Makefile.objs
|
|
|
28c80a |
+++ b/target/s390x/Makefile.objs
|
|
|
28c80a |
@@ -5,6 +5,7 @@ obj-$(CONFIG_SOFTMMU) += machine.o ioinst.o arch_dump.o mmu_helper.o diag.o
|
|
|
28c80a |
obj-$(CONFIG_SOFTMMU) += sigp.o
|
|
|
28c80a |
obj-$(CONFIG_KVM) += kvm.o
|
|
|
28c80a |
obj-$(call lnot,$(CONFIG_KVM)) += kvm-stub.o
|
|
|
28c80a |
+obj-$(call lnot,$(CONFIG_TCG)) += tcg-stub.o
|
|
|
28c80a |
|
|
|
28c80a |
# build and run feature list generator
|
|
|
28c80a |
feat-src = $(SRC_PATH)/target/$(TARGET_BASE_ARCH)/
|
|
|
28c80a |
diff --git a/target/s390x/machine.c b/target/s390x/machine.c
|
|
|
28c80a |
index 8421deb..cb792aa 100644
|
|
|
28c80a |
--- a/target/s390x/machine.c
|
|
|
28c80a |
+++ b/target/s390x/machine.c
|
|
|
28c80a |
@@ -19,6 +19,7 @@
|
|
|
28c80a |
#include "cpu.h"
|
|
|
28c80a |
#include "internal.h"
|
|
|
28c80a |
#include "kvm_s390x.h"
|
|
|
28c80a |
+#include "tcg_s390x.h"
|
|
|
28c80a |
#include "sysemu/kvm.h"
|
|
|
28c80a |
|
|
|
28c80a |
static int cpu_post_load(void *opaque, int version_id)
|
|
|
28c80a |
@@ -34,6 +35,11 @@ static int cpu_post_load(void *opaque, int version_id)
|
|
|
28c80a |
return kvm_s390_vcpu_interrupt_post_load(cpu);
|
|
|
28c80a |
}
|
|
|
28c80a |
|
|
|
28c80a |
+ if (tcg_enabled()) {
|
|
|
28c80a |
+ /* Rearm the CKC timer if necessary */
|
|
|
28c80a |
+ tcg_s390_tod_updated(CPU(cpu), RUN_ON_CPU_NULL);
|
|
|
28c80a |
+ }
|
|
|
28c80a |
+
|
|
|
28c80a |
return 0;
|
|
|
28c80a |
}
|
|
|
28c80a |
|
|
|
28c80a |
diff --git a/target/s390x/tcg-stub.c b/target/s390x/tcg-stub.c
|
|
|
28c80a |
new file mode 100644
|
|
|
28c80a |
index 0000000..c93501d
|
|
|
28c80a |
--- /dev/null
|
|
|
28c80a |
+++ b/target/s390x/tcg-stub.c
|
|
|
28c80a |
@@ -0,0 +1,20 @@
|
|
|
28c80a |
+/*
|
|
|
28c80a |
+ * QEMU TCG support -- s390x specific function stubs.
|
|
|
28c80a |
+ *
|
|
|
28c80a |
+ * Copyright (C) 2018 Red Hat Inc
|
|
|
28c80a |
+ *
|
|
|
28c80a |
+ * Authors:
|
|
|
28c80a |
+ * David Hildenbrand <david@redhat.com>
|
|
|
28c80a |
+ *
|
|
|
28c80a |
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
|
|
|
28c80a |
+ * See the COPYING file in the top-level directory.
|
|
|
28c80a |
+ */
|
|
|
28c80a |
+
|
|
|
28c80a |
+#include "qemu/osdep.h"
|
|
|
28c80a |
+#include "qemu-common.h"
|
|
|
28c80a |
+#include "cpu.h"
|
|
|
28c80a |
+#include "tcg_s390x.h"
|
|
|
28c80a |
+
|
|
|
28c80a |
+void tcg_s390_tod_updated(CPUState *cs, run_on_cpu_data opaque)
|
|
|
28c80a |
+{
|
|
|
28c80a |
+}
|
|
|
28c80a |
--
|
|
|
28c80a |
1.8.3.1
|
|
|
28c80a |
|