[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v1 12/15] cpus-common: ensure auto-assigned cpu_indexes don't
From: |
Richard Henderson |
Subject: |
Re: [PATCH v1 12/15] cpus-common: ensure auto-assigned cpu_indexes don't clash |
Date: |
Thu, 21 May 2020 20:20:45 -0700 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 |
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 <address@hidden>
> Cc: Nikolay Igotti <address@hidden>
> Cc: Paolo Bonzini <address@hidden>
> Cc: Igor Mammedov <address@hidden>
> Cc: Eduardo Habkost <address@hidden>
>
> ---
> 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 <address@hidden>
r~
- [PATCH v1 08/15] tests/docker: bump fedora to 32, (continued)
- [PATCH v1 08/15] tests/docker: bump fedora to 32, Alex Bennée, 2020/05/20
- [PATCH v1 03/15] travis.yml: Use clang++ in the Clang tests, Alex Bennée, 2020/05/20
- [PATCH v1 07/15] tests/tcg: better detect confused gdb which can't connect, Alex Bennée, 2020/05/20
- [PATCH v1 06/15] tests/fp: split and audit the conversion tests, Alex Bennée, 2020/05/20
- [PATCH v1 10/15] tests/docker: use a gcc-10 based image for arm64 tests, Alex Bennée, 2020/05/20
- [PATCH v1 12/15] cpus-common: ensure auto-assigned cpu_indexes don't clash, Alex Bennée, 2020/05/20
- Re: [PATCH v1 12/15] cpus-common: ensure auto-assigned cpu_indexes don't clash,
Richard Henderson <=
- [PATCH v1 11/15] tests/tcg/aarch64: Add bti smoke test, Alex Bennée, 2020/05/20
- [PATCH v1 14/15] tests/tcg: add new threadcount test, Alex Bennée, 2020/05/20
- [PATCH v1 13/15] linux-user: properly "unrealize" vCPU object, Alex Bennée, 2020/05/20
- [PATCH v1 15/15] plugins: new lockstep plugin for debugging TCG changes, Alex Bennée, 2020/05/20
- [PATCH v1 09/15] tests/docker: add debian11 base image, Alex Bennée, 2020/05/20
- Re: [PATCH v1 00/15] testing and plugin updates, no-reply, 2020/05/20
- Re: [PATCH v1 00/15] testing and plugin updates, no-reply, 2020/05/20