diff options
author | David Hildenbrand <david@redhat.com> | 2017-12-08 17:01:56 +0100 |
---|---|---|
committer | Cornelia Huck <cohuck@redhat.com> | 2017-12-14 17:56:54 +0100 |
commit | 257a119ee3464a0558d47f692fb007b2713e24ec (patch) | |
tree | 6cc73936402fd257779615049a0cca003ade66a2 /target/s390x/misc_helper.c | |
parent | b8d55db07089493da8cc264ab5991253e1102822 (diff) | |
download | qemu-257a119ee3464a0558d47f692fb007b2713e24ec.zip |
s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD
Needed for machine check handling inside Linux (when restoring registers).
Except for SIGP and machine checks, we don't make use of the register
yet. Sufficient for now.
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: David Hildenbrand <david@redhat.com>
Message-Id: <20171208160207.26494-4-david@redhat.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
Diffstat (limited to 'target/s390x/misc_helper.c')
-rw-r--r-- | target/s390x/misc_helper.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c index 6d766ce1e7..769ec52e1d 100644 --- a/target/s390x/misc_helper.c +++ b/target/s390x/misc_helper.c @@ -146,6 +146,17 @@ void HELPER(sckc)(CPUS390XState *env, uint64_t time) timer_mod(env->tod_timer, env->tod_basetime + time); } +/* Set Tod Programmable Field */ +void HELPER(sckpf)(CPUS390XState *env, uint64_t r0) +{ + uint32_t val = r0; + + if (val & 0xffff0000) { + s390_program_interrupt(env, PGM_SPECIFICATION, 2, GETPC()); + } + env->todpr = val; +} + /* Store Clock Comparator */ uint64_t HELPER(stckc)(CPUS390XState *env) { |