Am 16.06.2013 22:49, schrieb Blue Swirl: > On Sun, Jun 16, 2013 at 3:57 PM, Andreas Färber <afaer...@suse.de> wrote: >> Move it to qom/cpu.h. > > While renaming, perhaps a more descriptive name could be used instead > of 'cpu_single_cpu', something like cpu_loop_current_cpu?
There were some local variables named cpu_single_cpu (blame me :)) that this way simply fall away, but I can certainly rename it, adding just a few lines to the patch. However, cpu_loop_current_cpu seems to codify that we have a sequential loop of vCPUs, which Xen and IIUC KVM do not have and occasionally people have looked into changing for TCG. current_cpu is already used in a few places: include/sysemu/kvm.h:int kvm_arch_insert_sw_breakpoint(CPUState *current_cpu, include/sysemu/kvm.h:int kvm_arch_remove_sw_breakpoint(CPUState *current_cpu, kvm-all.c: CPUState *current_cpu = ENV_GET_CPU(current_env); kvm-all.c: bp = kvm_find_sw_breakpoint(current_cpu, addr); kvm-all.c: err = kvm_arch_insert_sw_breakpoint(current_cpu, bp); kvm-all.c: QTAILQ_INSERT_HEAD(¤t_cpu->kvm_state->kvm_sw_breakpoints, kvm-all.c: CPUState *current_cpu = ENV_GET_CPU(current_env); kvm-all.c: bp = kvm_find_sw_breakpoint(current_cpu, addr); kvm-all.c: err = kvm_arch_remove_sw_breakpoint(current_cpu, bp); kvm-all.c: QTAILQ_REMOVE(¤t_cpu->kvm_state->kvm_sw_breakpoints, bp, entry); kvm-all.c: CPUState *current_cpu = ENV_GET_CPU(current_env); kvm-all.c: KVMState *s = current_cpu->kvm_state; kvm-all.c: if (kvm_arch_remove_sw_breakpoint(current_cpu, bp) != 0) { but we could probably ignore these variable shadowings. Andreas -- SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg