qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH v1 for-2.12 3/5] s390x/tcg: implement SET CLOCK


From: Thomas Huth
Subject: Re: [Qemu-devel] [PATCH v1 for-2.12 3/5] s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD
Date: Wed, 6 Dec 2017 16:10:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0

On 04.12.2017 13:55, David Hildenbrand wrote:
> 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. Suficient for now.
> 
> Signed-off-by: David Hildenbrand <address@hidden>
> ---
[...]
> diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
> index 6d766ce1e7..2c6ab329fb 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)
> +{
> +    uint32_t val = env->regs[0];
> +
> +    if (val & 0xffff0000UL) {

I think you could drop the "UL" suffix here.

> +        s390_program_interrupt(env, PGM_SPECIFICATION, 2, GETPC());
> +    }
> +    env->todpr = val;
> +}
> +
>  /* Store Clock Comparator */
>  uint64_t HELPER(stckc)(CPUS390XState *env)
>  {
> diff --git a/target/s390x/translate.c b/target/s390x/translate.c
> index 26cf993405..48b031894a 100644
> --- a/target/s390x/translate.c
> +++ b/target/s390x/translate.c
> @@ -3922,6 +3922,13 @@ static ExitStatus op_sckc(DisasContext *s, DisasOps *o)
>      return NO_EXIT;
>  }
>  
> +static ExitStatus op_sckpf(DisasContext *s, DisasOps *o)
> +{
> +    check_privileged(s);
> +    gen_helper_sckpf(cpu_env);
> +    return NO_EXIT;
> +}
> +
>  static ExitStatus op_stckc(DisasContext *s, DisasOps *o)
>  {
>      check_privileged(s);
> 

Reviewed-by: Thomas Huth <address@hidden>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]