On 12/05/2016 05:48, Bharata B Rao wrote:
> CPUState *cpu gets added to the cpus list during cpu_exec_init(). It
> should be removed from cpu_exec_exit().
> 
> cpu_exec_exit() is called from generic CPU::instance_finalize and some
> archs like PowerPC call it from CPU unrealizefn. So ensure that we
> dequeue the cpu only once.

I think the better thing would be to call it from CPU::unrealize, but
this patch is okay too.

Thanks,

Paolo

> Now -1 value for cpu->cpu_index indicates that we have already dequeued
> the cpu for CONFIG_USER_ONLY case also.
> 
> Signed-off-by: Bharata B Rao <bhar...@linux.vnet.ibm.com>
> Reviewed-by: David Gibson <da...@gibson.dropbear.id.au>
> Reviewed-by: Thomas Huth <th...@redhat.com>

Reply via email to