s390x: diag-related things
v2 cover s390x: diag-related things
...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(-)
Signature · 1 line
2.13.5
PATCH v2 1/3 s390x/tcg: specification exception for unknown diag
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.
--- target/s390x/misc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
target/s390x/misc_helper.c +1 -1
@@ -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 ); } }
Signature · 1 line
2.13.5
Re: [Qemu-devel] [PATCH v2 1/3] s390x/tcg: specification exception for unknown diag
Quoted 15 lines · 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 <[email protected]>--- target/s390x/misc_helper.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)target/s390x/misc_helper.c +0
-0
target/s390x/misc_helper.c void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num) · line 114
Quoted 7 lines
target/s390x/misc_helper.c +1
-1@@ -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 ); } }
PATCH v2 2/3 watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable
In reply to Cornelia HuckFrom: Thomas Huth <[email protected]>
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.
Message-Id: <[email protected]>
--- hw/watchdog/wdt_diag288.c | 1 + 1 file changed, 1 insertion(+)
hw/watchdog/wdt_diag288.c +1 -0
@@ -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;
Signature · 1 line
2.13.5
Re: [Qemu-devel] [PATCH v2 2/3] watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggable
Quoted 30 lines · Cornelia Huck
From: Thomas Huth <[email protected]>
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 <[email protected]>Message-Id: <[email protected]>
Signed-off-by Cornelia Huck <[email protected]>--- hw/watchdog/wdt_diag288.c | 1 + 1 file changed, 1 insertion(+)hw/watchdog/wdt_diag288.c +0
-0
hw/watchdog/wdt_diag288.c static void wdt_diag288_class_init(ObjectClass *klass, void *data) · line 127
Quoted 7 lines
hw/watchdog/wdt_diag288.c +1
-0@@ -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;
Signature · 3 lines
Thanks, David
PATCH v2 3/3 s390x: wire up diag288 in tcg
In reply to Cornelia HuckMake the diag288 watchdog useable via tcg as well.
--- target/s390x/misc_helper.c | 4 ++++ 1 file changed, 4 insertions(+)
target/s390x/misc_helper.c +4 -0
@@ -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 ;
Signature · 1 line
2.13.5
Re: [Qemu-devel] [PATCH v2 3/3] s390x: wire up diag288 in tcg
Quoted 12 lines · Cornelia Huck
Make the diag288 watchdog useable via tcg as well.
Signed-off-by Cornelia Huck <[email protected]>--- target/s390x/misc_helper.c | 4 ++++ 1 file changed, 4 insertions(+)target/s390x/misc_helper.c +0
-0
target/s390x/misc_helper.c void HELPER(diag)(CPUS390XState *env, uint32_t r1, uint32_t r3, uint32_t num) · line 112
Quoted 10 lines
target/s390x/misc_helper.c +4
-0@@ -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 ;
Cornelia Huck
AppliedQuoted 8 lines · On Fri, 18 Aug 2017 13:48:41 +0200 Cornelia Huck <[email protected]> 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
Quoted 7 lines
Thomas Huth (1):
watchdog/wdt_diag288: Mark diag288 watchdog as non-hotpluggablehw/watchdog/wdt_diag288.c | 1 + target/s390x/misc_helper.c | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-)
Queued to s390-next.