Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cpus-common: ensure auto-assigned cpu_indexes don't clash
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 <[email protected]> Reviewed-by: Richard Henderson <[email protected]> Acked-by: Igor Mammedow <[email protected]> Cc: Nikolay Igotti <[email protected]> Cc: Paolo Bonzini <[email protected]> Cc: Eduardo Habkost <[email protected]> Message-Id: <[email protected]>
- Loading branch information