* [Qemu-devel] [PATCH v2 1/3] s390x/tcg: specification exception for unknown diag
2017-08-18 11:48 [Qemu-devel] [PATCH v2 0/3] s390x: diag-related things Cornelia Huck
@ 2017-08-18 11:48 ` Cornelia Huck
2017-08-18 11:51 ` Thomas Huth
2017-08-18 11:48 ` [Qemu-devel] [PATCH v2 2/3] watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable Cornelia Huck
` (2 subsequent siblings)
3 siblings, 1 reply; 8+ messages in thread
From: Cornelia Huck @ 2017-08-18 11:48 UTC (permalink / raw)
To: qemu-devel; +Cc: rth, agraf, thuth, borntraeger, Cornelia Huck
While the PoP is silent on the issue, z/VM documentation states
that unknown diagnose codes trigger a specification exception.
We already do that when running with kvm, so change tcg to do so
as well.
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
target/s390x/misc_helper.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index d23ffcd890..5a1eba02ab 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -109,7 +109,7 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)
}
if (r) {
- program_interrupt(env, PGM_OPERATION, ILEN_AUTO);
+ program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO);
}
}
--
2.13.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v2 1/3] s390x/tcg: specification exception for unknown diag
2017-08-18 11:48 ` [Qemu-devel] [PATCH v2 1/3] s390x/tcg: specification exception for unknown diag Cornelia Huck
@ 2017-08-18 11:51 ` Thomas Huth
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2017-08-18 11:51 UTC (permalink / raw)
To: Cornelia Huck, qemu-devel; +Cc: rth, agraf, borntraeger
On 18.08.2017 13:48, Cornelia Huck wrote:
> While the PoP is silent on the issue, z/VM documentation states
> that unknown diagnose codes trigger a specification exception.
> We already do that when running with kvm, so change tcg to do so
> as well.
>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> target/s390x/misc_helper.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
> index d23ffcd890..5a1eba02ab 100644
> --- a/target/s390x/misc_helper.c
> +++ b/target/s390x/misc_helper.c
> @@ -109,7 +109,7 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)
> }
>
> if (r) {
> - program_interrupt(env, PGM_OPERATION, ILEN_AUTO);
> + program_interrupt(env, PGM_SPECIFICATION, ILEN_AUTO);
> }
> }
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v2 2/3] watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable
2017-08-18 11:48 [Qemu-devel] [PATCH v2 0/3] s390x: diag-related things Cornelia Huck
2017-08-18 11:48 ` [Qemu-devel] [PATCH v2 1/3] s390x/tcg: specification exception for unknown diag Cornelia Huck
@ 2017-08-18 11:48 ` Cornelia Huck
2017-08-18 14:51 ` David Hildenbrand
2017-08-18 11:48 ` [Qemu-devel] [PATCH v2 3/3] s390x: wire up diag288 in tcg Cornelia Huck
2017-08-21 15:07 ` [Qemu-devel] [PATCH v2 0/3] s390x: diag-related things Cornelia Huck
3 siblings, 1 reply; 8+ messages in thread
From: Cornelia Huck @ 2017-08-18 11:48 UTC (permalink / raw)
To: qemu-devel; +Cc: rth, agraf, thuth, borntraeger, Cornelia Huck
From: Thomas Huth <thuth@redhat.com>
QEMU currently aborts when the user tries to hot-unplug a diag288
device:
$ qemu-system-s390x -nographic -nodefaults -S -monitor stdio
QEMU 2.9.92 monitor - type 'help' for more information
(qemu) device_add diag288,id=x
(qemu) device_del x
**
ERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl)
Aborted (core dumped)
The device is not designed as hot-pluggable (it should only be used
via the "-watchdog" parameter), so let's simply remove the possibility
to hotplug it to prevent that users can run into this ugly situation.
Signed-off-by: Thomas Huth <thuth@redhat.com>
Message-Id: <1502892528-22618-1-git-send-email-thuth@redhat.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
hw/watchdog/wdt_diag288.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c
index a7b64e2c40..47f289216a 100644
--- a/hw/watchdog/wdt_diag288.c
+++ b/hw/watchdog/wdt_diag288.c
@@ -121,6 +121,7 @@ static void wdt_diag288_class_init(ObjectClass *klass, void *data)
dc->realize = wdt_diag288_realize;
dc->unrealize = wdt_diag288_unrealize;
dc->reset = wdt_diag288_reset;
+ dc->hotpluggable = false;
set_bit(DEVICE_CATEGORY_MISC, dc->categories);
dc->vmsd = &vmstate_diag288;
diag288->handle_timer = wdt_diag288_handle_timer;
--
2.13.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v2 2/3] watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable
2017-08-18 11:48 ` [Qemu-devel] [PATCH v2 2/3] watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable Cornelia Huck
@ 2017-08-18 14:51 ` David Hildenbrand
0 siblings, 0 replies; 8+ messages in thread
From: David Hildenbrand @ 2017-08-18 14:51 UTC (permalink / raw)
To: Cornelia Huck, qemu-devel; +Cc: borntraeger, thuth, agraf, rth
On 18.08.2017 13:48, Cornelia Huck wrote:
> From: Thomas Huth <thuth@redhat.com>
>
> QEMU currently aborts when the user tries to hot-unplug a diag288
> device:
>
> $ qemu-system-s390x -nographic -nodefaults -S -monitor stdio
> QEMU 2.9.92 monitor - type 'help' for more information
> (qemu) device_add diag288,id=x
> (qemu) device_del x
> **
> ERROR:qemu/qdev-monitor.c:872:qdev_unplug: assertion failed: (hotplug_ctrl)
> Aborted (core dumped)
>
> The device is not designed as hot-pluggable (it should only be used
> via the "-watchdog" parameter), so let's simply remove the possibility
> to hotplug it to prevent that users can run into this ugly situation.
>
> Signed-off-by: Thomas Huth <thuth@redhat.com>
> Message-Id: <1502892528-22618-1-git-send-email-thuth@redhat.com>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> hw/watchdog/wdt_diag288.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/hw/watchdog/wdt_diag288.c b/hw/watchdog/wdt_diag288.c
> index a7b64e2c40..47f289216a 100644
> --- a/hw/watchdog/wdt_diag288.c
> +++ b/hw/watchdog/wdt_diag288.c
> @@ -121,6 +121,7 @@ static void wdt_diag288_class_init(ObjectClass *klass, void *data)
> dc->realize = wdt_diag288_realize;
> dc->unrealize = wdt_diag288_unrealize;
> dc->reset = wdt_diag288_reset;
> + dc->hotpluggable = false;
> set_bit(DEVICE_CATEGORY_MISC, dc->categories);
> dc->vmsd = &vmstate_diag288;
> diag288->handle_timer = wdt_diag288_handle_timer;
>
Reviewed-by: David Hildenbrand <david@redhat.com>
--
Thanks,
David
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH v2 3/3] s390x: wire up diag288 in tcg
2017-08-18 11:48 [Qemu-devel] [PATCH v2 0/3] s390x: diag-related things Cornelia Huck
2017-08-18 11:48 ` [Qemu-devel] [PATCH v2 1/3] s390x/tcg: specification exception for unknown diag Cornelia Huck
2017-08-18 11:48 ` [Qemu-devel] [PATCH v2 2/3] watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable Cornelia Huck
@ 2017-08-18 11:48 ` Cornelia Huck
2017-08-18 11:52 ` Thomas Huth
2017-08-21 15:07 ` [Qemu-devel] [PATCH v2 0/3] s390x: diag-related things Cornelia Huck
3 siblings, 1 reply; 8+ messages in thread
From: Cornelia Huck @ 2017-08-18 11:48 UTC (permalink / raw)
To: qemu-devel; +Cc: rth, agraf, thuth, borntraeger, Cornelia Huck
Make the diag288 watchdog useable via tcg as well.
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
target/s390x/misc_helper.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
index 5a1eba02ab..34d730ba73 100644
--- a/target/s390x/misc_helper.c
+++ b/target/s390x/misc_helper.c
@@ -103,6 +103,10 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)
handle_diag_308(env, r1, r3);
r = 0;
break;
+ case 0x288:
+ /* time bomb (watchdog) */
+ r = handle_diag_288(env, r1, r3);
+ break;
default:
r = -1;
break;
--
2.13.5
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v2 3/3] s390x: wire up diag288 in tcg
2017-08-18 11:48 ` [Qemu-devel] [PATCH v2 3/3] s390x: wire up diag288 in tcg Cornelia Huck
@ 2017-08-18 11:52 ` Thomas Huth
0 siblings, 0 replies; 8+ messages in thread
From: Thomas Huth @ 2017-08-18 11:52 UTC (permalink / raw)
To: Cornelia Huck, qemu-devel; +Cc: rth, agraf, borntraeger
On 18.08.2017 13:48, Cornelia Huck wrote:
> Make the diag288 watchdog useable via tcg as well.
>
> Signed-off-by: Cornelia Huck <cohuck@redhat.com>
> ---
> target/s390x/misc_helper.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/target/s390x/misc_helper.c b/target/s390x/misc_helper.c
> index 5a1eba02ab..34d730ba73 100644
> --- a/target/s390x/misc_helper.c
> +++ b/target/s390x/misc_helper.c
> @@ -103,6 +103,10 @@ void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num)
> handle_diag_308(env, r1, r3);
> r = 0;
> break;
> + case 0x288:
> + /* time bomb (watchdog) */
> + r = handle_diag_288(env, r1, r3);
> + break;
> default:
> r = -1;
> break;
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Qemu-devel] [PATCH v2 0/3] s390x: diag-related things
2017-08-18 11:48 [Qemu-devel] [PATCH v2 0/3] s390x: diag-related things Cornelia Huck
` (2 preceding siblings ...)
2017-08-18 11:48 ` [Qemu-devel] [PATCH v2 3/3] s390x: wire up diag288 in tcg Cornelia Huck
@ 2017-08-21 15:07 ` Cornelia Huck
3 siblings, 0 replies; 8+ messages in thread
From: Cornelia Huck @ 2017-08-21 15:07 UTC (permalink / raw)
To: qemu-devel; +Cc: rth, agraf, thuth, borntraeger
On Fri, 18 Aug 2017 13:48:41 +0200
Cornelia Huck <cohuck@redhat.com> wrote:
> ...which are a fix in tcg for diag handling and diag288 watchdog changes.
>
> v1->v2: just reorder patches for less churn [Thomas]
>
> Cornelia Huck (2):
> s390x/tcg: specification exception for unknown diag
> s390x: wire up diag288 in tcg
>
> Thomas Huth (1):
> watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable
>
> hw/watchdog/wdt_diag288.c | 1 +
> target/s390x/misc_helper.c | 6 +++++-
> 2 files changed, 6 insertions(+), 1 deletion(-)
>
Queued to s390-next.
^ permalink raw reply [flat|nested] 8+ messages in thread