[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [qemu-s390x] [PATCH 1/1] s390/ipl: fix ipl with -no-reboot
From: |
Paolo Bonzini |
Subject: |
Re: [qemu-s390x] [PATCH 1/1] s390/ipl: fix ipl with -no-reboot |
Date: |
Thu, 21 Jun 2018 19:06:59 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 |
On 21/06/2018 18:31, David Hildenbrand wrote:
> + SHUTDOWN_CAUSE_GUEST_RESET_FORCE,/* Guest reset that should ignore
> + --no-reboot. This is useful for reset
> + like actions as s390 kexec/kdump */
> SHUTDOWN_CAUSE__MAX,
> } ShutdownCause;
>
> diff --git a/vl.c b/vl.c
> index b3426e03d0..722c3b9963 100644
> --- a/vl.c
> +++ b/vl.c
> @@ -1674,7 +1674,7 @@ void qemu_system_guest_panicked(GuestPanicInformation
> *info)
>
> void qemu_system_reset_request(ShutdownCause reason)
> {
> - if (no_reboot) {
> + if (no_reboot && reason != SHUTDOWN_CAUSE_GUEST_RESET_FORCE) {
> shutdown_requested = reason;
> } else {
> reset_requested = reason;
The only comment is that I'd drop the event too. It's not possible to
use SHUTDOWN_CAUSE_NONE directly of course, but you can special case it
in qemu_system_reset.
Also I wouldn't be worried of picking an s390-specific name like
SHUTDOWN_CAUSE_GUEST_(RE)?IPL. At least it explains exactly what it is
for and it makes sense that it doesn't obey -no-reboot and generate the
event.
Paolo