On 5/20/20 7:05 AM, Alex Bennée wrote:
> Basing the cpu_index on the number of currently allocated vCPUs fails
> when vCPUs aren't removed in a LIFO manner. This is especially true
> when we are allocating a cpu_index for each guest thread in
> linux-user where there is no ordering constraint on their allocation
> and de-allocation.
> 
> [I've dropped the assert which is there to guard against out-of-order
> removal as this should probably be caught higher up the stack. Maybe
> we could just ifdef CONFIG_SOFTTMU it?]
> 
> Signed-off-by: Alex Bennée <alex.ben...@linaro.org>
> Cc: Nikolay Igotti <igo...@gmail.com>
> Cc: Paolo Bonzini <pbonz...@redhat.com>
> Cc: Igor Mammedov <imamm...@redhat.com>
> Cc: Eduardo Habkost <ehabk...@redhat.com>
> 
> ---
> v2
>   - slightly tweak the index algorithm to preserve cpu_index = 0
> ---
>  cpus-common.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)

Reviewed-by: Richard Henderson <richard.hender...@linaro.org>


r~


Reply via email to