From f1a7e547d2dfc2024c663ff2d35c7e29c644efb0 Mon Sep 17 00:00:00 2001 From: ChristofKaufmann Date: Tue, 1 Jun 2021 22:52:05 +0200 Subject: [PATCH] [CONF] Add popcount instruction Although Penryn processor did not have popcount instruction, adding it here works. This is e. g. required for OpenCV, since even when compiling from source, the detection seems to fail (in OpenCV 4.5.2_4 built with homebrew) and popcount is always recognized also in case it is not added in the CPU configuration. This commit fixes this issue. --- basic.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/basic.sh b/basic.sh index add14b5..0d47969 100755 --- a/basic.sh +++ b/basic.sh @@ -11,7 +11,7 @@ qemu-system-x86_64 \ -m 2G \ -machine q35,accel=kvm \ -smp 4,cores=2 \ - -cpu Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc \ + -cpu Penryn,vendor=GenuineIntel,kvm=on,+sse3,+sse4.2,+popcnt,+aes,+xsave,+avx,+xsaveopt,+xsavec,+xgetbv1,+avx2,+bmi2,+smep,+bmi1,+fma,+movbe,+invtsc \ -device isa-applesmc,osk="$OSK" \ -smbios type=2 \ -drive if=pflash,format=raw,readonly,file="$OVMF/OVMF_CODE.fd" \