aboutsummaryrefslogtreecommitdiff
path: root/target
diff options
context:
space:
mode:
authorDavid Hildenbrand <david@redhat.com>2018-06-27 15:44:04 +0200
committerCornelia Huck <cohuck@redhat.com>2018-07-02 10:37:38 +0200
commit8046f374a64b81fdf4f71f7a433bf4035d501521 (patch)
tree8dd52a7f33c9acedd66a0a96a52d49d8d2aad16a /target
parent4ab6a1feac0a142045d3b7bdbb8182a99c0b8980 (diff)
downloadqemu-8046f374a64b81fdf4f71f7a433bf4035d501521.zip
qemu-8046f374a64b81fdf4f71f7a433bf4035d501521.tar.gz
qemu-8046f374a64b81fdf4f71f7a433bf4035d501521.tar.bz2
s390x/tod: factor out TOD into separate device
Let's treat this like a separate device. TCG will have to store the actual state/time later on. Include cpu-qom.h in kvm_s390x.h (due to S390CPU) to compile tod-kvm.c. Reviewed-by: Thomas Huth <thuth@redhat.com> Signed-off-by: David Hildenbrand <david@redhat.com> Message-Id: <20180627134410.4901-4-david@redhat.com> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target')
-rw-r--r--target/s390x/cpu.c32
-rw-r--r--target/s390x/cpu.h2
-rw-r--r--target/s390x/kvm_s390x.h2
3 files changed, 2 insertions, 34 deletions
diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
index 68512e3..03ea6ea 100644
--- a/target/s390x/cpu.c
+++ b/target/s390x/cpu.c
@@ -390,38 +390,6 @@ unsigned int s390_cpu_set_state(uint8_t cpu_state, S390CPU *cpu)
return s390_count_running_cpus();
}
-int s390_get_clock(uint8_t *tod_high, uint64_t *tod_low)
-{
- int r = 0;
-
- if (kvm_enabled()) {
- r = kvm_s390_get_clock_ext(tod_high, tod_low);
- if (r == -ENXIO) {
- return kvm_s390_get_clock(tod_high, tod_low);
- }
- } else {
- /* Fixme TCG */
- *tod_high = 0;
- *tod_low = 0;
- }
-
- return r;
-}
-
-int s390_set_clock(uint8_t *tod_high, uint64_t *tod_low)
-{
- int r = 0;
-
- if (kvm_enabled()) {
- r = kvm_s390_set_clock_ext(*tod_high, *tod_low);
- if (r == -ENXIO) {
- return kvm_s390_set_clock(*tod_high, *tod_low);
- }
- }
- /* Fixme TCG */
- return r;
-}
-
int s390_set_memory_limit(uint64_t new_limit, uint64_t *hw_limit)
{
if (kvm_enabled()) {
diff --git a/target/s390x/cpu.h b/target/s390x/cpu.h
index 6629a53..ac51c17 100644
--- a/target/s390x/cpu.h
+++ b/target/s390x/cpu.h
@@ -714,8 +714,6 @@ static inline void s390_do_cpu_load_normal(CPUState *cs, run_on_cpu_data arg)
/* cpu.c */
-int s390_get_clock(uint8_t *tod_high, uint64_t *tod_low);
-int s390_set_clock(uint8_t *tod_high, uint64_t *tod_low);
void s390_crypto_reset(void);
bool s390_get_squash_mcss(void);
int s390_set_memory_limit(uint64_t new_limit, uint64_t *hw_limit);
diff --git a/target/s390x/kvm_s390x.h b/target/s390x/kvm_s390x.h
index 36eb34b..6e52287 100644
--- a/target/s390x/kvm_s390x.h
+++ b/target/s390x/kvm_s390x.h
@@ -10,6 +10,8 @@
#ifndef KVM_S390X_H
#define KVM_S390X_H
+#include "cpu-qom.h"
+
struct kvm_s390_irq;
void kvm_s390_floating_interrupt_legacy(struct kvm_s390_irq *irq);