* [kvm-unit-tests PATCH] runtime: Adjust probe_maxsmp for older QEMU
@ 2024-05-02 8:09 Andrew Jones
2024-05-02 8:27 ` Thomas Huth
2024-05-02 15:29 ` Andrew Jones
0 siblings, 2 replies; 3+ messages in thread
From: Andrew Jones @ 2024-05-02 8:09 UTC (permalink / raw)
To: kvm, kvmarm; +Cc: alexandru.elisei, eric.auger, pbonzini, thuth
probe_maxsmp is really just for Arm and for older QEMU which doesn't
default to gicv3. So, even though later QEMU has a new error message
format, we want to be able to parse the old error message format in
order to use --probe-maxsmp when necessary. Adjust the parsing so it
can handle both the old and new formats.
Fixes: 5dd20ec76ea6 ("runtime: Update MAX_SMP probe")
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
---
scripts/runtime.bash | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index e7af9bda953a..fd16fd4cfa25 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -204,8 +204,10 @@ function probe_maxsmp()
{
local smp
- if smp=$($RUNTIME_arch_run _NO_FILE_4Uhere_ -smp $MAX_SMP |& grep 'Invalid SMP CPUs'); then
+ if smp=$($RUNTIME_arch_run _NO_FILE_4Uhere_ -smp $MAX_SMP |& grep 'SMP CPUs'); then
smp=${smp##* }
+ smp=${smp/\(}
+ smp=${smp/\)}
echo "Restricting MAX_SMP from ($MAX_SMP) to the max supported ($smp)" >&2
MAX_SMP=$smp
fi
--
2.44.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [kvm-unit-tests PATCH] runtime: Adjust probe_maxsmp for older QEMU
2024-05-02 8:09 [kvm-unit-tests PATCH] runtime: Adjust probe_maxsmp for older QEMU Andrew Jones
@ 2024-05-02 8:27 ` Thomas Huth
2024-05-02 15:29 ` Andrew Jones
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Huth @ 2024-05-02 8:27 UTC (permalink / raw)
To: Andrew Jones, kvm, kvmarm; +Cc: alexandru.elisei, eric.auger, pbonzini
On 02/05/2024 10.09, Andrew Jones wrote:
> probe_maxsmp is really just for Arm and for older QEMU which doesn't
> default to gicv3. So, even though later QEMU has a new error message
> format, we want to be able to parse the old error message format in
> order to use --probe-maxsmp when necessary. Adjust the parsing so it
> can handle both the old and new formats.
>
> Fixes: 5dd20ec76ea6 ("runtime: Update MAX_SMP probe")
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
> ---
> scripts/runtime.bash | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
> index e7af9bda953a..fd16fd4cfa25 100644
> --- a/scripts/runtime.bash
> +++ b/scripts/runtime.bash
> @@ -204,8 +204,10 @@ function probe_maxsmp()
> {
> local smp
>
> - if smp=$($RUNTIME_arch_run _NO_FILE_4Uhere_ -smp $MAX_SMP |& grep 'Invalid SMP CPUs'); then
> + if smp=$($RUNTIME_arch_run _NO_FILE_4Uhere_ -smp $MAX_SMP |& grep 'SMP CPUs'); then
> smp=${smp##* }
> + smp=${smp/\(}
> + smp=${smp/\)}
> echo "Restricting MAX_SMP from ($MAX_SMP) to the max supported ($smp)" >&2
> MAX_SMP=$smp
> fi
Reviewed-by: Thomas Huth <thuth@redhat.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [kvm-unit-tests PATCH] runtime: Adjust probe_maxsmp for older QEMU
2024-05-02 8:09 [kvm-unit-tests PATCH] runtime: Adjust probe_maxsmp for older QEMU Andrew Jones
2024-05-02 8:27 ` Thomas Huth
@ 2024-05-02 15:29 ` Andrew Jones
1 sibling, 0 replies; 3+ messages in thread
From: Andrew Jones @ 2024-05-02 15:29 UTC (permalink / raw)
To: kvm, kvmarm; +Cc: alexandru.elisei, eric.auger, pbonzini, thuth
On Thu, May 02, 2024 at 10:09:35AM GMT, Andrew Jones wrote:
> probe_maxsmp is really just for Arm and for older QEMU which doesn't
> default to gicv3. So, even though later QEMU has a new error message
> format, we want to be able to parse the old error message format in
> order to use --probe-maxsmp when necessary. Adjust the parsing so it
> can handle both the old and new formats.
>
> Fixes: 5dd20ec76ea6 ("runtime: Update MAX_SMP probe")
> Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
> ---
> scripts/runtime.bash | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/runtime.bash b/scripts/runtime.bash
> index e7af9bda953a..fd16fd4cfa25 100644
> --- a/scripts/runtime.bash
> +++ b/scripts/runtime.bash
> @@ -204,8 +204,10 @@ function probe_maxsmp()
> {
> local smp
>
> - if smp=$($RUNTIME_arch_run _NO_FILE_4Uhere_ -smp $MAX_SMP |& grep 'Invalid SMP CPUs'); then
> + if smp=$($RUNTIME_arch_run _NO_FILE_4Uhere_ -smp $MAX_SMP |& grep 'SMP CPUs'); then
> smp=${smp##* }
> + smp=${smp/\(}
> + smp=${smp/\)}
> echo "Restricting MAX_SMP from ($MAX_SMP) to the max supported ($smp)" >&2
> MAX_SMP=$smp
> fi
> --
> 2.44.0
>
Merged.
Thanks,
drew
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-05-02 15:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-02 8:09 [kvm-unit-tests PATCH] runtime: Adjust probe_maxsmp for older QEMU Andrew Jones
2024-05-02 8:27 ` Thomas Huth
2024-05-02 15:29 ` Andrew Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox