All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] s390x/tcg: initialize machine check queue
@ 2017-10-04 16:25 Cornelia Huck
  2017-10-04 17:28 ` Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Cornelia Huck @ 2017-10-04 16:25 UTC (permalink / raw)
  To: qemu-devel; +Cc: borntraeger, agraf, rth, thuth, david, Cornelia Huck

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,
-- 
2.13.6

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] s390x/tcg: initialize machine check queue
  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
  2017-10-05 12:54 ` Cornelia Huck
  2 siblings, 0 replies; 4+ messages in thread
From: Richard Henderson @ 2017-10-04 17:28 UTC (permalink / raw)
  To: Cornelia Huck, qemu-devel; +Cc: borntraeger, agraf, thuth, david

On 10/04/2017 12:25 PM, 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(+)

Reviewed-by: Richard Henderson <rth@twiddle.net>


r~

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] s390x/tcg: initialize machine check queue
  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
  2017-10-05 12:54 ` Cornelia Huck
  2 siblings, 0 replies; 4+ messages in thread
From: Thomas Huth @ 2017-10-05 12:49 UTC (permalink / raw)
  To: Cornelia Huck, qemu-devel; +Cc: borntraeger, agraf, rth, david

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] s390x/tcg: initialize machine check queue
  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
@ 2017-10-05 12:54 ` Cornelia Huck
  2 siblings, 0 replies; 4+ messages in thread
From: Cornelia Huck @ 2017-10-05 12:54 UTC (permalink / raw)
  To: qemu-devel; +Cc: borntraeger, agraf, rth, thuth, david

On Wed,  4 Oct 2017 18:25:43 +0200
Cornelia Huck <cohuck@redhat.com> 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(+)

Queued to s390-next.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-10-05 12:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
2017-10-05 12:54 ` Cornelia Huck

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.