Re: [Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap

2015-05-11 Thread Eduardo Habkost
On Mon, May 11, 2015 at 09:07:35AM +0530, Bharata B Rao wrote: > On Fri, May 08, 2015 at 11:57:40AM -0300, Eduardo Habkost wrote: > > On Fri, May 08, 2015 at 03:21:35PM +0530, Bharata B Rao wrote: > > [...] > > > void cpu_exec_init(CPUArchState *env, Error **errp) > > > { > > > CPUState *cpu

Re: [Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap

2015-05-11 Thread Eduardo Habkost
On Mon, May 11, 2015 at 09:03:57AM +0530, Bharata B Rao wrote: > On Fri, May 08, 2015 at 11:55:00AM -0300, Eduardo Habkost wrote: > > On Fri, May 08, 2015 at 03:21:35PM +0530, Bharata B Rao wrote: > > > Currently CPUState.cpu_index is monotonically increasing and a newly > > > created CPU always ge

Re: [Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap

2015-05-10 Thread Bharata B Rao
On Fri, May 08, 2015 at 11:57:40AM -0300, Eduardo Habkost wrote: > On Fri, May 08, 2015 at 03:21:35PM +0530, Bharata B Rao wrote: > [...] > > void cpu_exec_init(CPUArchState *env, Error **errp) > > { > > CPUState *cpu = ENV_GET_CPU(env); > > CPUClass *cc = CPU_GET_CLASS(cpu); > > -C

Re: [Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap

2015-05-10 Thread Bharata B Rao
On Fri, May 08, 2015 at 11:55:00AM -0300, Eduardo Habkost wrote: > On Fri, May 08, 2015 at 03:21:35PM +0530, Bharata B Rao wrote: > > Currently CPUState.cpu_index is monotonically increasing and a newly > > created CPU always gets the next higher index. The next available > > index is calculated by

Re: [Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap

2015-05-08 Thread Eduardo Habkost
On Fri, May 08, 2015 at 03:21:35PM +0530, Bharata B Rao wrote: [...] > void cpu_exec_init(CPUArchState *env, Error **errp) > { > CPUState *cpu = ENV_GET_CPU(env); > CPUClass *cc = CPU_GET_CLASS(cpu); > -CPUState *some_cpu; > int cpu_index; > - > #if defined(CONFIG_USER_ONLY) >

Re: [Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap

2015-05-08 Thread Eduardo Habkost
On Fri, May 08, 2015 at 03:21:35PM +0530, Bharata B Rao wrote: > Currently CPUState.cpu_index is monotonically increasing and a newly > created CPU always gets the next higher index. The next available > index is calculated by counting the existing number of CPUs. This is > fine as long as we only

[Qemu-devel] [RFC v1 PATCH 2/3] cpus: Convert cpu_index into a bitmap

2015-05-08 Thread Bharata B Rao
Currently CPUState.cpu_index is monotonically increasing and a newly created CPU always gets the next higher index. The next available index is calculated by counting the existing number of CPUs. This is fine as long as we only add CPUs, but there are architectures which are starting to support CPU