On 06/21/2018 06:51 PM, Christian Borntraeger wrote:
> 
> 
> On 06/21/2018 06:35 PM, Christian Borntraeger wrote:
>> kexec/kdump as well as the bootloader use a subcode of diagnose 308
>> that is supposed to reset the subsystem but not comprise a full
>> "reboot". With the latest refactoring this is now broken when
>> -no-reboot is used. This for example break virt-install from
>> iso images.
> 
> Its even worse. With this patch I can IPL with --no-reboot, but
> virt-install still creates an xml like
> 
>   <on_poweroff>destroy</on_poweroff>
>   <on_reboot>destroy</on_reboot>
>   <on_crash>destroy</on_crash>
> 
> With you patch a "soft reset" still seems to trigger an qapi event
> so that libvirt kills the guest due to that...

So this on top....


diff --git a/vl.c b/vl.c
index 722c3b9963..44e65071bc 100644
--- a/vl.c
+++ b/vl.c
@@ -1628,7 +1628,7 @@ void qemu_system_reset(ShutdownCause reason)
     } else {
         qemu_devices_reset();
     }
-    if (reason) {
+    if (reason != SHUTDOWN_CAUSE_GUEST_RESET_FORCE) {
         qapi_event_send_reset(shutdown_caused_by_guest(reason),
                               &error_abort);
     }


Reply via email to