qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] [PATCH v3 1/2] move vm_start to cpus.c


From: Paolo Bonzini
Subject: Re: [Qemu-devel] [PATCH v3 1/2] move vm_start to cpus.c
Date: Wed, 25 Jan 2017 11:21:12 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1


On 28/10/2016 19:15, Claudio Imbrenda wrote:
> * moves the call to qemu_clock_enable away from resume_all_vcpus, and
>   add an explicit call to it before each instance of resume_all_vcpus
>   in the code.

This change adds useless duplication, and isn't matched by a similar
change to pause_all_vcpus.  You need to justify it; I suppose it is
because the next patch will not call resume_all_cpus?

Most of the callers of pause_all_vcpus/resume_all_vcpus don't let timers
run, so the clock need not be disabled and enabled.  Maybe the right
places to call qemu_clock_enable are cpu_disable_ticks and
cpu_enable_ticks?  That should work for you.

In that case, please make the first patch the qemu_clock_enable
movement; the second patch the introduction of vm_prepare_start; the
third patch the gdbstub change.

> diff --git a/include/sysemu/cpus.h b/include/sysemu/cpus.h
> index 3728a1e..5fa074b 100644
> --- a/include/sysemu/cpus.h
> +++ b/include/sysemu/cpus.h
> @@ -5,6 +5,7 @@
>  bool qemu_in_vcpu_thread(void);
>  void qemu_init_cpu_loop(void);
>  void resume_all_vcpus(void);
> +void resume_some_vcpus(CPUState **cpus);
>  void pause_all_vcpus(void);
>  void cpu_stop_current(void);
>  void cpu_ticks_init(void);

This function doesn't exist.

Paolo



reply via email to

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