qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] Fix the vm state after vm migration when vm pan


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH] Fix the vm state after vm migration when vm panic
Date: Mon, 6 Mar 2017 19:11:38 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0


On 06/03/2017 15:05, hangaohuai wrote:
> Bug steps:
> 1. windows VM with pvpanic device:<panic model='isa'/>in xml
> 2. inject the panic in windows, the vm state is paused (guest-panicked)
> 3. migrate the vm to other host, vm state is running
> 
> Check the vmstate before runstate_set(RUN_STATE_RUNNING)

What's the backtrace for runstate_set(RUN_STATE_RUNNING)?

This should be triggered:

    if (!global_state_received() ||
        global_state_get_runstate() == RUN_STATE_RUNNING) {
        if (autostart) {
            vm_start();
        } else {
            runstate_set(RUN_STATE_PAUSED);
        }
    } else {
        runstate_set(global_state_get_runstate());   /* <<<< */
    }

I also suggest a testcase to tests/pvpanic-test.c.

Paolo

> Signed-off-by: hangaohuai <address@hidden>
> ---
>  cpus.c                  | 3 +++
>  include/sysemu/sysemu.h | 1 +
>  vl.c                    | 5 +++++
>  3 files changed, 9 insertions(+)
> 
> diff --git a/cpus.c b/cpus.c
> index c857ad2..37b93aa 100644
> --- a/cpus.c
> +++ b/cpus.c
> @@ -1734,6 +1734,9 @@ int vm_prepare_start(void)
>      if (runstate_is_running()) {
>          qapi_event_send_stop(&error_abort);
>          res = -1;
> +    } else if (runstate_is_paniced()) {
> +        qemu_system_guest_panicked(NULL);
> +        res = -1;
>      } else {
>          replay_enable_events();
>          cpu_enable_ticks();



reply via email to

[Prev in Thread] Current Thread [Next in Thread]