qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Huth <thuth@redhat.com>
To: Cornelia Huck <cohuck@redhat.com>, qemu-devel@nongnu.org
Cc: borntraeger@de.ibm.com, agraf@suse.de, rth@twiddle.net, david@redhat.com
Subject: Re: [Qemu-devel] [PATCH] s390x/tcg: initialize machine check queue
Date: Thu, 5 Oct 2017 14:49:43 +0200	[thread overview]
Message-ID: <72e8546a-0101-b7f7-a2c9-574d03754562@redhat.com> (raw)
In-Reply-To: <20171004162543.12233-1-cohuck@redhat.com>

On 04.10.2017 18:25, Cornelia Huck wrote:
> Just as for external interrupts and I/O interrupts, we need to
> initialize mchk_index during cpu reset.
> 
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> 
> Trying a device_add with a ccw device under tcg currently insta-crashes
> qemu. Probably nobody ever tried the crw machine check support that I
> hacked in...
> 
> Needs more work to avoid a guest kernel panic next; but let's pick the
> low-hanging fruit first.
> 
> ---
>  target/s390x/cpu.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/target/s390x/cpu.c b/target/s390x/cpu.c
> index 4e1823a3e0..3fdf9bae70 100644
> --- a/target/s390x/cpu.c
> +++ b/target/s390x/cpu.c
> @@ -111,6 +111,7 @@ static void s390_cpu_initial_reset(CPUState *s)
>      for (i = 0; i < ARRAY_SIZE(env->io_index); i++) {
>          env->io_index[i] = -1;
>      }
> +    env->mchk_index = -1;
>  
>      /* tininess for underflow is detected before rounding */
>      set_float_detect_tininess(float_tininess_before_rounding,
> @@ -148,6 +149,7 @@ static void s390_cpu_full_reset(CPUState *s)
>      for (i = 0; i < ARRAY_SIZE(env->io_index); i++) {
>          env->io_index[i] = -1;
>      }
> +    env->mchk_index = -1;
>  
>      /* tininess for underflow is detected before rounding */
>      set_float_detect_tininess(float_tininess_before_rounding,
> 

Makes sense.

Reviewed-by: Thomas Huth <thuth@redhat.com>


PS: I wonder whether the common code of s390_cpu_initial_reset() and
s390_cpu_full_reset() should be put into a separate function? Or maybe
s390_cpu_full_reset() should call s390_cpu_initial_reset() ? At least
the code duplication here looks like we should do some clean up here...

 Thomas

  parent reply	other threads:[~2017-10-05 12:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-04 16:25 [Qemu-devel] [PATCH] s390x/tcg: initialize machine check queue Cornelia Huck
2017-10-04 17:28 ` Richard Henderson
2017-10-05 12:49 ` Thomas Huth [this message]
2017-10-05 12:54 ` Cornelia Huck

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=72e8546a-0101-b7f7-a2c9-574d03754562@redhat.com \
    --to=thuth@redhat.com \
    --cc=agraf@suse.de \
    --cc=borntraeger@de.ibm.com \
    --cc=cohuck@redhat.com \
    --cc=david@redhat.com \
    --cc=qemu-devel@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).