runtime: Adjust probe_maxsmp for older QEMU

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")
Reviewed-by: Thomas Huth <thuth@redhat.com>
Signed-off-by: Andrew Jones <andrew.jones@linux.dev>
diff --git a/scripts/runtime.bash b/scripts/runtime.bash
index fb7c83a..177b621 100644
--- a/scripts/runtime.bash
+++ b/scripts/runtime.bash
@@ -208,8 +208,10 @@
 {
 	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