Statistics
| Branch: | Revision:

root / cpus.c @ a8aec295

History | View | Annotate | Download (33.5 kB)

# Date Author Comment
215e79c0 07/01/2013 02:11 am Alexander Graf

KVM: Don't assume that mpstate exists with in-kernel PIC always

On PPC, we don't support MP state. So far it's not necessary and I'm
not convinced yet that we really need to support it ever.

However, the current idle logic in QEMU assumes that an in-kernel PIC...

64f6b346 06/28/2013 02:25 pm Andreas Färber

gdbstub: Set gdb_set_stop_cpu() argument to CPUState

Use CPUState::env_ptr for now.

Prepares for changing cpu_handle_guest_debug() argument to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

91325046 06/28/2013 02:25 pm Andreas Färber

cpus: Change cpu_handle_guest_debug() argument to CPUState

CPUArchState is no longer needed.

Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

48a106bd 06/28/2013 02:25 pm Andreas Färber

cpus: Change qemu_kvm_start_vcpu() argument to CPUState

Pass it on to qemu_kvm_cpu_thread_fn().

Prepares for changing qemu_init_vcpu() argument to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

10a9021d 06/28/2013 02:25 pm Andreas Färber

cpus: Change qemu_dummy_start_vcpu() argument to CPUState

Pass it to qemu_dummy_cpu_thread_fn().
Use CPUState::env_ptr for cpu_single_env.

Prepares for changing qemu_init_vcpu() argument to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

c643bed9 06/28/2013 02:25 pm Andreas Färber

cpu: Change qemu_init_vcpu() argument to CPUState

This allows to move the call into CPUState's realizefn.
Therefore move the stub into libqemustub.a.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

cb446eca 06/28/2013 02:25 pm Andreas Färber

kvm: Change cpu_synchronize_state() argument to CPUState

Change Monitor::mon_cpu to CPUState as well.

Reviewed-by: liguang <>
Acked-by: Paolo Bonzini <>
Signed-off-by: Andreas Färber <>

60a3e17a 06/28/2013 02:25 pm Andreas Färber

cpu: Change cpu_exit() argument to CPUState

It no longer depends on CPUArchState, so move it to qom/cpu.c.

Prepares for changing GDBState::c_cpu to CPUState.

Signed-off-by: Andreas Färber <>

a98ae1d8 06/28/2013 02:25 pm Andreas Färber

cpus: Change cpu_thread_is_idle() argument to CPUState

It no longer needs CPUArchState.

Prepares for changing all_cpu_threads_idle() CPU loop to CPUState and
needed for changing qemu_kvm_wait_io_event() argument to CPUState.

Reviewed-by: Richard Henderson <>...

fd529e8f 06/28/2013 02:25 pm Andreas Färber

cpus: Change qemu_kvm_wait_io_event() argument to CPUState

It no longer uses CPUArchState.

Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

491d6e80 06/28/2013 02:25 pm Andreas Färber

kvm: Change kvm_set_signal_mask() argument to CPUState

CPUArchState is no longer needed.

Prepares for changing qemu_kvm_init_cpu_signals() argument to CPUState.

Acked-by: Paolo Bonzini <>
Reviewed-by: Richard Henderson <>...

13618e05 06/28/2013 02:25 pm Andreas Färber

cpus: Change qemu_kvm_init_cpu_signals() argument to CPUState

CPUArchState is no longer needed.

Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState.

Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

878096ee 06/28/2013 02:25 pm Andreas Färber

cpu: Turn cpu_dump_{state,statistics}() into CPUState hooks

Make cpustats monitor command available unconditionally.

Prepares for changing kvm_handle_internal_error() and kvm_cpu_exec()
arguments to CPUState.

Signed-off-by: Andreas Färber <>

1458c363 06/28/2013 02:25 pm Andreas Färber

kvm: Change kvm_cpu_exec() argument to CPUState

It no longer uses CPUArchState.

Prepares for changing qemu_kvm_cpu_thread_fn() opaque to CPUState.

Acked-by: Paolo Bonzini <>
Reviewed-by: Richard Henderson <>
Signed-off-by: Andreas Färber <>

618da851 06/17/2013 06:01 pm Luiz Capitulino

cpus: use error_setg_file_open()

Signed-off-by: Luiz Capitulino <>
Acked-by: Kevin Wolf <>

10858193 05/02/2013 01:15 pm Andreas Färber

cpus: Fix pausing TCG CPUs while in vCPU thread

Due to a preceding while loop, no CPU would've been put into stopped
state. Reinitialize the variable.
This fixes commit d798e97456658ea7605303b7c69b04ec7df95c10 (Allow to use
pause_all_vcpus from VCPU context) for non-KVM case....

a37677c3 05/01/2013 02:04 pm Igor Mammedov

cpus: Use qemu_for_each_cpu() in TCG thread

Replaces an open-coded loop and hides unused CPUArchState.

Signed-off-by: Igor Mammedov <>
Signed-off-by: Andreas Färber <>

2993683b 05/01/2013 02:04 pm Igor Mammedov

cpu: Introduce cpu_resume(), for single CPU

Also add a stub for it, to make possible to use it in qom/cpu.c,
which is shared with user emulators.

Signed-off-by: Igor Mammedov <>
Signed-off-by: Andreas Färber <>

7f1721df 04/19/2013 12:38 pm Stefan Weil

w64: Fix compiler warnings (wrong format specifier)

GetLastError() returns a DWORD value which is unsigned long,
so the correct format specifier is %lu.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

3f24a58f 04/16/2013 02:19 am Igor Mammedov

cpu: Pass CPUState to cpu_synchronize_post()

... so it could be called without requiring CPUArchState.

Signed-off-by: Igor Mammedov <>
Reviewed-by: Eduardo Habkost <>
Signed-off-by: Andreas Färber <>

ed9164a3 04/12/2013 07:27 pm Olivier Hainque

Check effective suspension of TCG thread

On multi-core systems, SuspendThread does not guaranty immediate thread
suspension. We add busy loop to wait for effective thread suspension
after call to ThreadSuspend().

Signed-off-by: Fabien Chouteau <>...

259186a7 03/12/2013 11:35 am Andreas Färber

cpu: Move halted and interrupt_request fields to CPUState

Both fields are used in VMState, thus need to be moved together.
Explicitly zero them on reset since they were located before
breakpoints.

Pass PowerPCCPU to kvmppc_handle_halt().

Signed-off-by: Andreas Färber <>

c3affe56 03/12/2013 11:35 am Andreas Färber

cpu: Pass CPUState to cpu_interrupt()

Move it to qom/cpu.h to avoid issues with include order.

Change pc_acpi_smi_interrupt() opaque to X86CPU.

Signed-off-by: Andreas Färber <>

151d1322 03/12/2013 11:35 am Andreas Färber

cpus: Replace open-coded CPU loop in qmp_memsave() with qemu_get_cpu()

No functional change, just less usages of first_cpu and next_cpu fields.

env is passed to cpu_memory_rw_debug(), which in turn passes it to
target-specific cpu_get_phys_page_debug(). Changing both would be a...

b946bffa 02/16/2013 12:45 pm Peter Maydell

cpus.c: Drop unnecessary set_cpu_log()

The set_cpu_log() function in cpus.c is a fairly simple wrapper
which is only called from one location. Just inline the code
into vl.c, since there is no need to indirect it via cpus.c
and the handling of the error case is more appropriate to vl.c....

24537a01 02/16/2013 12:44 pm Peter Maydell

qemu-log: Rename the public-facing cpu_set_log function to qemu_set_log

Rename the public-facing function cpu_set_log to qemu_set_log. This
requires us to rename the internal-only qemu_set_log() to
do_qemu_set_log().

Signed-off-by: Peter Maydell <>...

4fde1eba 02/16/2013 12:44 pm Peter Maydell

qemu-log: Rename cpu_str_to_log_mask to qemu_str_to_log_mask

Rename cpu_str_to_log_mask() to qemu_str_to_log_mask(), since
the qemu_log functionality is no longer restricted to TCG CPU
debug logging.

Signed-off-by: Peter Maydell <>...

59a6fa6e 02/16/2013 12:44 pm Peter Maydell

qemu-log: Abstract out "print usage message about valid log categories"

Abstract out the "print a human readable list of all the
valid log categories" functionality which is currently duplicated
in three separate places. (We leave the monitor.c help_cmd()...

9a7e5424 02/16/2013 12:43 pm Peter Maydell

qemu-log: Unify {cpu_set,set_cpu}_log_filename as qemu_set_log_filename

The qemu_log() functionality is no longer specific to TCG CPU debug logs.
Rename cpu_set_log_filename() to qemu_set_log_filename() and drop the
pointless wrapper set_cpu_log_filename()....

290adf38 01/28/2013 05:57 pm Andreas Färber

kvm: Pass CPUState to kvm_on_sigbus_vcpu()

Since commit 20d695a9254c1b086a456d3b79a3c311236643ba (kvm: Pass
CPUState to kvm_arch_*) CPUArchState is no longer needed.

Allows to change qemu_kvm_eat_signals() argument as well.

Signed-off-by: Andreas Färber <>...

ce3960eb 01/15/2013 05:09 am Andreas Färber

cpu: Move nr_{cores,threads} fields to CPUState

To facilitate the field movements, pass MIPSCPU to malta_mips_config();
avoid that for mips_cpu_map_tc() since callers only access MIPS Thread
Contexts, inside TCG helpers.

Signed-off-by: Andreas Färber <>

1b1ed8dc 01/15/2013 05:09 am Andreas Färber

cpu: Move numa_node field to CPUState

Signed-off-by: Andreas Färber <>

55e5c285 01/15/2013 05:09 am Andreas Färber

cpu: Move cpu_index field to CPUState

Note that target-alpha accesses this field from TCG, now using a
negative offset. Therefore the field is placed last in CPUState.

Pass PowerPCCPU to [kvm]ppc_fixup_cpu() to facilitate this change.

Move common parts of mips cpu_state_reset() to mips_cpu_reset()....

504134d2 01/15/2013 05:09 am Andreas Färber

kvm: Pass CPUState to kvm_init_vcpu()

CPUArchState is no longer needed, and it thereby no longer depends on
NEED_CPU_H.

Signed-off-by: Andreas Färber <>

9c17d615 12/19/2012 09:32 am Paolo Bonzini

softmmu: move include files to include/sysemu/

Signed-off-by: Paolo Bonzini <>

1de7afc9 12/19/2012 09:32 am Paolo Bonzini

misc: move include files to include/qemu/

Signed-off-by: Paolo Bonzini <>

83c9089e 12/19/2012 09:31 am Paolo Bonzini

monitor: move include files to include/monitor/

Signed-off-by: Paolo Bonzini <>

022c62cb 12/19/2012 09:31 am Paolo Bonzini

exec: move include files to include/exec/

Signed-off-by: Paolo Bonzini <>

f100f0b3 10/31/2012 05:12 am Andreas Färber

cpus: Pass CPUState to run_on_cpu()

CPUArchState is no longer needed.

Move the declaration to include/qemu/cpu.h and add documentation.

Signed-off-by: Andreas Färber <>

9f09e18a 10/31/2012 05:12 am Andreas Färber

cpu: Move thread_id to CPUState

Signed-off-by: Andreas Färber <>

3993c6bd 10/31/2012 05:11 am Andreas Färber

cpus: Pass CPUState to [qemu_]cpu_has_work()

For target-mips also change the return type to bool.

Make include paths for cpu-qom.h consistent for alpha and unicore32.

Signed-off-by: Andreas Färber <>
[AF: Updated new target-openrisc function accordingly]...

e5ab30a2 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to qemu_tcg_init_vcpu()

CPUArchState is no longer needed.

Signed-off-by: Andreas Färber <>

c08d7424 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to qemu_cpu_kick()

CPUArchState is no longer needed there.

Signed-off-by: Andreas Färber <>

c64ca814 10/31/2012 02:02 am Andreas Färber

cpu: Move queued_work_{first,last} to CPUState

Signed-off-by: Andreas Färber <>

6d45b109 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to flush_queued_work()

CPUArchState is no longer needed there.

Signed-off-by: Andreas Färber <>

509a0d78 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to qemu_wait_io_event_common()

CPUArchState is no longer needed there.

Signed-off-by: Andreas Färber <>

2ff09a40 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to qemu_cpu_kick_thread()

CPUArchState is no longer needed there.

Signed-off-by: Andreas Färber <>
Reviewed-by: Igor Mammedov <>

61a46217 10/31/2012 02:02 am Andreas Färber

cpu: Move created field to CPUState

Change its type to bool.

Signed-off-by: Andreas Färber <>

4fdeee7c 10/31/2012 02:02 am Andreas Färber

cpu: Move stop field to CPUState

Change its type to bool.

Signed-off-by: Andreas Färber <>

f324e766 10/31/2012 02:02 am Andreas Färber

cpu: Move stopped field to CPUState

Change its type to bool.

Signed-off-by: Andreas Färber <>

2fa45344 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to cpu_is_stopped()

CPUArchState is no longer needed there.

Also change the return type to bool.

Signed-off-by: Andreas Färber <>

a1fcaa73 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to cpu_can_run()

CPUArchState is no longer needed there.

Also change its return type to bool.

Signed-off-by: Andreas Färber <>

f5c121b8 10/31/2012 02:02 am Andreas Färber

cpu: Move halt_cond to CPUState

Signed-off-by: Andreas Färber <>

c3586ba7 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to qemu_tcg_cpu_thread_fn

CPUArchState is no longer needed except for iterating the CPUs.

Needed for qemu_tcg_init_vcpu().

KVM and dummy threads still need CPUArchState for cpu_single_env.

Signed-off-by: Andreas Färber <>

60e82579 10/31/2012 02:02 am Andreas Färber

cpus: Pass CPUState to qemu_cpu_is_self()

Change return type to bool, move to include/qemu/cpu.h and
add documentation.

Signed-off-by: Andreas Färber <>
Reviewed-by: Igor Mammedov <>
[AF: Updated new caller qemu_in_vcpu_thread()]

aa723c23 10/17/2012 07:35 pm Juan Quintela

cpus: create qemu_in_vcpu_thread()

Old code used !io_thread to know if a thread was an vcpu or not. That
fails when we introduce the iothread.

Signed-off-by: Juan Quintela <>

046dbab9 10/06/2012 07:54 pm Aurelien Jarno

Merge branch 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm

  • 'target-arm.for-upstream' of git://git.linaro.org/people/pmaydell/qemu-arm:
    target-arm: Drop unused DECODE_CPREG_CRN macro
    target-arm: use deposit instead of hardcoded version...
6fd2a026 10/05/2012 05:04 pm Peter Maydell

cpu_dump_state: move DUMP_FPU and DUMP_CCOP flags from x86-only to generic

Move the DUMP_FPU and DUMP_CCOP flags for cpu_dump_state() from being
x86-specific flags to being generic ones. This allows us to drop some
TARGET_I386 ifdefs in various places, and means that we can (potentially)...

b2532d88 10/05/2012 03:02 pm Stefan Weil

cpu: Add missing 'static' attribute to qemu_global_mutex

Contrary to its name, 'qemu_global_mutex' is only used locally
in cpus.c.

Signed-off-by: Stefan Weil <>
Signed-off-by: Stefan Hajnoczi <>

e916cbf8 09/21/2012 04:12 pm Peter Maydell

Drop cpu_list_id macro

Since the only user of the extended cpu_list_id() format
was the x86 ?model/?dump/?cpuid output, we can drop it
completely.

Signed-off-by: Peter Maydell <>
Reviewed-by: Eduardo Habkost <>...

7ae26bd4 08/09/2012 04:16 pm Peter Maydell

kvm: Decouple 'async interrupt delivery' from 'kernel irqchip'

On x86 userspace delivers interrupts to the kernel asynchronously
(and therefore VCPU idle management is done in the kernel) if and
only if there is an in-kernel irqchip. On other architectures this...

ee785fed 08/04/2012 04:23 pm Chegu Vinod

Fixes related to processing of qemu's -numa option

The -numa option to qemu is used to create [fake] numa nodes
and expose them to the guest OS instance.

There are a couple of issues with the -numa option:

a) Max VCPU's that can be specified for a guest while using...

216fc9a4 08/02/2012 07:12 pm Andreas Färber

cpu: Move thread_kicked to CPUState

Change field type to bool.

Signed-off-by: Andreas Färber <>

bcba2a72 08/02/2012 07:12 pm Andreas Färber

cpu: Move CPU_COMMON_THREAD into CPUState

CPU_COMMON_THREAD was only used for Windows, adding an hThread field
to CPU_COMMON.

Move the field into QOM CPUState and change its type to HANDLE,
which it is assigned from. This requires Windows headers, pulled in...

814e612e 08/02/2012 07:12 pm Andreas Färber

cpu: Move thread field into CPUState

Signed-off-by: Andreas Färber <>

ac873f1e 07/21/2012 12:54 pm Peter Maydell

cpus.c: Make all_cpu_threads_idle() static

Commit 946fb27c1 moved all the uses of all_cpu_threads_idle()
into cpus.c. This means we can mark the function 'static'
(again), if we shuffle it a bit earlier in the source file.

Signed-off-by: Peter Maydell <>...

56b9ead2 04/13/2012 01:01 am Jan Kiszka

kvm: Drop redundant kvm_enabled from cpu_thread_is_idle

This is now implied by kvm_irqchip_in_kernel.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Avi Kivity <>

c7f0f3b1 03/30/2012 04:14 pm Anthony Liguori

qtest: add test framework

The idea behind qtest is pretty simple. Instead of executing a CPU via TCG or
KVM, rely on an external process to send events to the device model that the CPU
would normally generate.

qtest presents itself as an accelerator. In addition, a new option is added to...

8156be56 03/30/2012 04:14 pm Paolo Bonzini

qtest: add clock management

This patch combines qtest and -icount together to turn the vm_clock
into a source that can be fully managed by the client. To this end new
commands clock_step and clock_set are added. Hooking them with libqtest
is left as an exercise to the reader....

9349b4f9 03/14/2012 11:20 pm Andreas Färber

Rename CPUState -> CPUArchState

Scripted conversion:
for file in .[hc] hw/.[hc] hw/kvm/*.[hc] linux-user/*.[hc] linux-user/m68k/*.[hc] bsd-user/*.[hc] darwin-user/*.[hc] tcg/*/*.[hc] target-*/cpu.h; do
sed -i "s/CPUState/CPUArchState/g" $file
done...

d798e974 02/18/2012 12:15 pm Jan Kiszka

Allow to use pause_all_vcpus from VCPU context

In order to perform critical manipulations on the VM state in the
context of a VCPU, specifically code patching, stopping and resuming of
all VCPUs may be necessary. resume_all_vcpus is already compatible, now...

5207a5e0 02/18/2012 12:15 pm Jan Kiszka

Remove useless casts from cpu iterators

CPUState::next_cpu is already CPUState *.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Avi Kivity <>

8e564b4e 02/18/2012 12:15 pm Jan Kiszka

Process pending work while waiting for initial kick-off in TCG mode

When the TCG thread is started but not yet the machine, we wait in
qemu_tcg_cpu_thread_fn on tcg_halt_cond. To allow run_on_cpu already at
this time, we need to process pending request in that loop....

e479c207 02/18/2012 12:15 pm Jan Kiszka

kvm: Set cpu_single_env only once

As we have thread-local cpu_single_env now and KVM uses exactly one
thread per VCPU, we can drop the cpu_single_env updates from the loop
and initialize this variable only once during setup.

Signed-off-by: Jan Kiszka <>...

02c09195 01/19/2012 01:14 pm Jan Kiszka

apic: Inject external NMI events via LINT1

On real hardware, NMI button events are injected via the LINT1 line of
the APICs. E.g. kdump expect this wiring and gets upset if the per-APIC
LINT1 mask is not respected, i.e. if NMIs are injected to VCPUs that...

a7d64ddb 01/12/2012 06:34 pm Lai Jiangshan

cleanup, Remove duplicated code

These two blocks of code are exactly the same, remove one.

Signed-off-by: Lai Jiangshan <>
Signed-off-by: Lai Jiangshan <>
Signed-off-by: Anthony Liguori <>

1ecf47bf 12/15/2011 05:20 pm Paolo Bonzini

fix win32 build

On Windows, cpus.c needs access to the hThread. Add a Windows-specific
function to grab it. This requires changing the CPU threads to
joinable. There is no substantial change because the threads run
in an infinite loop.

Signed-off-by: Paolo Bonzini <>...

9423a2e8 12/14/2011 03:59 pm Anthony Liguori

Merge remote-tracking branch 'stefanha/trivial-patches-next' into staging

cf218714 12/13/2011 01:06 am Jan Kiszka

qemu-thread: add API for joinable threads

Split from Jan's original qemu-thread-posix.c patch. No semantic change,
just introduce the new API that POSIX and Win32 implementations will
conform to.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Paolo Bonzini <>...

6d3962bf 12/06/2011 03:40 pm Luiz Capitulino

qapi: Convert pmemsave

Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

ab49ab5c 12/06/2011 03:40 pm Luiz Capitulino

qapi: Convert inject-nmi

Signed-off-by: Luiz Capitulino <>

0cfd6a9a 12/06/2011 03:40 pm Luiz Capitulino

qapi: Convert memsave

Please, note that the QMP command has a new 'cpu-index' parameter.

Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

3a93113a 12/06/2011 11:56 am Dong Xu Wang

fix typo: delete redundant semicolon

Double semicolons should be single.

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

eb5d5bea 12/05/2011 05:39 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

922453bc 12/05/2011 03:56 pm Stefan Hajnoczi

block: convert qemu_aio_flush() calls to bdrv_drain_all()

Many places in QEMU call qemu_aio_flush() to complete all pending
asynchronous I/O. Most of these places actually want to drain all block
requests but there is no block layer API to do so.

This patch introduces the bdrv_drain_all() API to wait for requests...

07f35073 12/02/2011 12:50 pm Dong Xu Wang

fix spelling in main directory

Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

47113ab6 11/07/2011 06:57 pm Wen Congyang

reenable vm_clock when resuming all vcpus

We disable vm_clock when pausing all vcpus, but we forget to
reenable it when resuming all vcpus. It will cause that the
guest can not be rebooted.

Tested-by: Zhi Yong Wu <>
Reviewed-by: Paolo Bonzini <>...

bdb7ca67 11/01/2011 05:58 pm Jan Kiszka

Simplify cpu_exec_all to tcg_exec_all

After the removal of the non-threaded mode cpu_exec_all is now only used
by TCG. Refactor it accordingly, also dropping its unused return value.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Anthony Liguori <>

de0b36b6 10/27/2011 04:48 pm Luiz Capitulino

qapi: Convert query-cpus

Signed-off-by: Anthony Liguori <>
Signed-off-by: Luiz Capitulino <>

99435906 10/21/2011 07:14 pm Paolo Bonzini

simplify main loop functions

Provide a clean example of how to use the main loop in the tools.

Signed-off-by: Paolo Bonzini <>

946fb27c 10/21/2011 07:14 pm Paolo Bonzini

qemu-timer: move icount to cpus.c

None of this is needed by tools, and most of it can even be made static
inside cpus.c.

Signed-off-by: Paolo Bonzini <>

a5c57d64 10/21/2011 07:14 pm Paolo Bonzini

qemu-timer: do not refer to runstate_is_running()

Signed-off-by: Paolo Bonzini <>

44a9b356 10/21/2011 07:14 pm Paolo Bonzini

main-loop: create main-loop.h

Signed-off-by: Paolo Bonzini <>

d3b12f5d 10/21/2011 07:14 pm Paolo Bonzini

main-loop: create main-loop.c

Signed-off-by: Paolo Bonzini <>

8a9236f1 10/19/2011 03:48 pm Luiz Capitulino

runstate: Allow user to migrate twice

It should be a matter of allowing the transition POSTMIGRATE ->
FINISH_MIGRATE, but it turns out that the VM won't do the
transition the second time because it's already stopped.

So this commit also adds vm_stop_force_state() which performs...

c8af89af 09/20/2011 11:21 pm Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

e1d3b254 09/20/2011 03:32 pm Frediano Ziglio

block: avoid SIGUSR2

Now that iothread is always compiled sending a signal seems only an
additional step. This patch also avoid writing to two pipe (one from signal
and one in qemu_service_io).

Work with kvm enabled or disabled. strace output is more readable (less syscalls)....

1dfb4dd9 09/15/2011 10:39 pm Luiz Capitulino

Replace the VMSTOP macros with a proper state type

Today, when notifying a VM state change with vm_state_notify(),
we pass a VMSTOP macro as the 'reason' argument. This is not ideal
because the VMSTOP macros tell why qemu stopped and not exactly
what the current VM state is....

f5bbfba1 09/15/2011 10:39 pm Luiz Capitulino

RunState: Add additional states

Currently, only vm_start() and vm_stop() change the VM state.
That's, the state is only changed when starting or stopping the VM.

This commit adds the runstate_set() function, which makes it possible
to also do state transitions when the VM is stopped or running....

1354869c 09/15/2011 10:39 pm Luiz Capitulino

Drop the vm_running global variable

Use runstate_is_running() instead, which is introduced by this commit.

Signed-off-by: Luiz Capitulino <>