diff options
| author | Anthony Liguori <aliguori@us.ibm.com> | 2013-05-02 10:57:01 -0500 |
|---|---|---|
| committer | Anthony Liguori <aliguori@us.ibm.com> | 2013-05-02 10:57:01 -0500 |
| commit | 8ca27ce2e1150486ea2db4116a03706b28294f16 (patch) | |
| tree | 39a42b9ba7a4b1fc8db8c098fd24b08f39fee6ed /exec.c | |
| parent | 0db4c324a8c6f2b1b8a118146f9b0fc8c4210719 (diff) | |
| parent | e7bdf659c16e1cefd61f53648503d8c060668d6b (diff) | |
| download | focaccia-qemu-8ca27ce2e1150486ea2db4116a03706b28294f16.tar.gz focaccia-qemu-8ca27ce2e1150486ea2db4116a03706b28294f16.zip | |
Merge remote-tracking branch 'afaerber/qom-cpu' into staging
# By Igor Mammedov (21) and others # Via Andreas Färber * afaerber/qom-cpu: (29 commits) Drop redundant resume_all_vcpus() from main() cpus: Fix pausing TCG CPUs while in vCPU thread target-i386: Replace cpuid_*features fields with a feature word array target-i386: Break CPUID feature definition lines target-i386/kvm.c: Code formatting changes target-i386: Group together level, xlevel, xlevel2 fields pc: Implement QEMUMachine::hot_add_cpu hook QMP: Add cpu-add command Add hot_add_cpu hook to QEMUMachine target-i386: Move APIC to ICC bus target-i386: Attach ICC bus to CPU on its creation target-i386: Introduce ICC bus/device/bridge cpu: Move cpu_write_elfXX_note() functions to CPUState kvmvapic: Make dependency on sysbus.h explicit target-i386: Replace MSI_SPACE_SIZE with APIC_SPACE_SIZE target-i386: Do not allow to set apic-id once CPU is realized target-i386: Introduce apic-id CPU property target-i386: Introduce feat2prop() for CPU properties acpi_piix4: Add infrastructure to send CPU hot-plug GPE to guest cpu: Add helper cpu_exists(), to check if CPU with specified id exists ...
Diffstat (limited to 'exec.c')
| -rw-r--r-- | exec.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/exec.c b/exec.c index fa1e0c3d73..19725dbc05 100644 --- a/exec.c +++ b/exec.c @@ -265,6 +265,16 @@ CPUState *qemu_get_cpu(int index) return env ? cpu : NULL; } +void qemu_for_each_cpu(void (*func)(CPUState *cpu, void *data), void *data) +{ + CPUArchState *env = first_cpu; + + while (env) { + func(ENV_GET_CPU(env), data); + env = env->next_cpu; + } +} + void cpu_exec_init(CPUArchState *env) { CPUState *cpu = ENV_GET_CPU(env); |