qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: David Hildenbrand <david@redhat.com>,
	qemu-s390x@nongnu.org, qemu-devel@nongnu.org
Cc: Cornelia Huck <cohuck@redhat.com>, Richard Henderson <rth@twiddle.net>
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	[thread overview]
Message-ID: <b25586af-43e2-4ad1-f426-cd1de59610ce@redhat.com> (raw)
In-Reply-To: <20171204125505.29203-4-david@redhat.com>

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 <david@redhat.com>
> ---
[...]
> 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 <thuth@redhat.com>

  parent reply	other threads:[~2017-12-06 15:10 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-04 12:55 [Qemu-devel] [PATCH v1 for-2.12 0/5] s390x/tcg: CCW hotplug support David Hildenbrand
2017-12-04 12:55 ` [Qemu-devel] [PATCH v1 for-2.12 1/5] s390x/kvm: factor out build_channel_report_mcic() into cpu.h David Hildenbrand
2017-12-04 17:03   ` Cornelia Huck
2017-12-04 17:16     ` David Hildenbrand
2017-12-05 10:20       ` Cornelia Huck
2017-12-05 11:29         ` David Hildenbrand
2017-12-04 12:55 ` [Qemu-devel] [PATCH v1 for-2.12 2/5] s390x/tcg: fix and cleanup mcck injection David Hildenbrand
2017-12-04 17:20   ` Cornelia Huck
2017-12-04 17:27     ` David Hildenbrand
2017-12-05 10:14       ` Cornelia Huck
2017-12-05 15:53   ` Thomas Huth
2017-12-05 16:22     ` David Hildenbrand
2017-12-04 12:55 ` [Qemu-devel] [PATCH v1 for-2.12 3/5] s390x/tcg: implement SET CLOCK PROGRAMMABLE FIELD David Hildenbrand
2017-12-05 11:05   ` Cornelia Huck
2017-12-06 15:10   ` Thomas Huth [this message]
2017-12-06 15:15     ` David Hildenbrand
2017-12-04 12:55 ` [Qemu-devel] [PATCH v1 for-2.12 4/5] s390x/tcg: indicate value of TODPR in STCKE David Hildenbrand
2017-12-06 15:24   ` Thomas Huth
2017-12-04 12:55 ` [Qemu-devel] [PATCH v1 for-2.12 5/5] s390x/tcg: wire up STORE CHANNEL REPORT WORD David Hildenbrand
2017-12-04 17:22   ` Cornelia Huck
2017-12-04 17:34     ` David Hildenbrand
2017-12-04 17:53       ` Cornelia Huck
2017-12-04 17:56         ` David Hildenbrand
2017-12-04 17:58           ` Cornelia Huck
2017-12-04 18:37             ` David Hildenbrand
2017-12-05 10:04               ` Cornelia Huck
2017-12-06 15:40   ` Thomas Huth
2017-12-04 13:10 ` [Qemu-devel] [PATCH v1 for-2.12 0/5] s390x/tcg: CCW hotplug support no-reply
2017-12-04 13:21   ` David Hildenbrand
2017-12-04 13:35 ` no-reply
2017-12-04 16:56 ` Cornelia Huck
2017-12-04 17:00   ` David Hildenbrand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b25586af-43e2-4ad1-f426-cd1de59610ce@redhat.com \
    --to=thuth@redhat.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-s390x@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).