env/darwin/aws: reduce guest CPU count to 4

QEMU scales poorly with CPU count on macOS (see
https://go.dev/issue/48945#issuecomment-1378850381). Reducing the CPU
count from 6 to 4 reduces boot time from ~4min to ~1min40sec.

For golang/go#48945.

Change-Id: I63fa70938049534b8f87d30935179d99a2e8f2f6
Reviewed-on: https://go-review.googlesource.com/c/build/+/461775
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Carlos Amedee <carlos@golang.org>
Run-TryBot: Michael Pratt <mpratt@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
diff --git a/env/darwin/aws/qemu.sh b/env/darwin/aws/qemu.sh
index fb1f35a..a7a8c6a 100755
--- a/env/darwin/aws/qemu.sh
+++ b/env/darwin/aws/qemu.sh
@@ -23,9 +23,10 @@
   -cpu host
   -machine q35
   -usb -device usb-kbd -device usb-tablet
-  # macOS only likes a power-of-two number of cores, but odd socket count is
-  # fine.
-  -smp cpus=6,sockets=3,cores=2,threads=1
+  # QEMU scales poorly with CPU count on macOS (see
+  # https://go.dev/issue/48945#issuecomment-1378850381). Increasing CPU count
+  # also increases boot time.
+  -smp cpus=4
   -device usb-ehci,id=ehci
   -device nec-usb-xhci,id=xhci
   -global nec-usb-xhci.msi=off