On Sat, Jun 22, 2024 at 05:23:40AM -0400, Brad Smith wrote: > On Sun, Jun 16, 2024 at 07:38:59AM -0400, Brad Smith wrote: > > Here is an update to QEMU 9.0.1. > > > > > > https://marc.info/?l=qemu-devel&m=171808086221928&w=2 > > > An updated diff rolling in a diff that should fix building on > powerpc/powerpc64 with an issue that popped up with 8.1 and > a hack to resolve an issue naddy@ ran into where the tests > will pull in gtk-vnc if it happens to exis, but then dpb > garbage collected it.
third rev, I sent out the wrong diff and the meson buts weren't what I intended. I'm going to look at that separately. I also added cpuinfo bits for arm64. Index: Makefile =================================================================== RCS file: /cvs/ports/emulators/qemu/Makefile,v retrieving revision 1.240 diff -u -p -u -p -r1.240 Makefile --- Makefile 28 May 2024 13:57:37 -0000 1.240 +++ Makefile 23 Jun 2024 02:22:22 -0000 @@ -6,7 +6,7 @@ USE_NOBTCFI= Yes COMMENT-main= multi system emulator COMMENT-ga= QEMU guest agent -VERSION= 9.0.0 +VERSION= 9.0.1 DISTNAME= qemu-${VERSION} CATEGORIES= emulators SITES= https://download.qemu.org/ Index: distinfo =================================================================== RCS file: /cvs/ports/emulators/qemu/distinfo,v retrieving revision 1.73 diff -u -p -u -p -r1.73 distinfo --- distinfo 28 May 2024 13:57:37 -0000 1.73 +++ distinfo 23 Jun 2024 02:22:22 -0000 @@ -1,2 +1,2 @@ -SHA256 (qemu-9.0.0.tar.xz) = MnCKxmww2MiSYz6paMdxwcdtWX1w3erSGg0izPOG2mk= -SIZE (qemu-9.0.0.tar.xz) = 129789856 +SHA256 (qemu-9.0.1.tar.xz) = 0PTbD70VHAzxb4SusqUA9ulQCXMlRvRNr6uNIEm7uAU= +SIZE (qemu-9.0.1.tar.xz) = 132368412 Index: patches/patch-util_cpuinfo-aarch64_c =================================================================== RCS file: patches/patch-util_cpuinfo-aarch64_c diff -N patches/patch-util_cpuinfo-aarch64_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-util_cpuinfo-aarch64_c 23 Jun 2024 02:22:22 -0000 @@ -0,0 +1,49 @@ +Index: util/cpuinfo-aarch64.c +--- util/cpuinfo-aarch64.c.orig ++++ util/cpuinfo-aarch64.c +@@ -20,6 +20,12 @@ + #ifdef CONFIG_DARWIN + # include <sys/sysctl.h> + #endif ++#ifdef __OpenBSD__ ++# include <machine/armreg.h> ++# include <machine/cpu.h> ++# include <sys/types.h> ++# include <sys/sysctl.h> ++#endif + + unsigned cpuinfo; + +@@ -71,6 +77,32 @@ unsigned __attribute__((constructor)) cpuinfo_init(voi + info |= sysctl_for_bool("hw.optional.arm.FEAT_AES") * CPUINFO_AES; + info |= sysctl_for_bool("hw.optional.arm.FEAT_PMULL") * CPUINFO_PMULL; + info |= sysctl_for_bool("hw.optional.arm.FEAT_BTI") * CPUINFO_BTI; ++#endif ++#ifdef __OpenBSD__ ++ int mib[2]; ++ uint64_t isar0; ++ uint64_t pfr1; ++ size_t len; ++ ++ mib[0] = CTL_MACHDEP; ++ mib[1] = CPU_ID_AA64ISAR0; ++ len = sizeof(isar0); ++ if (sysctl(mib, 2, &isar0, &len, NULL, 0) != -1) { ++ if (ID_AA64ISAR0_ATOMIC(isar0) >= ID_AA64ISAR0_ATOMIC_IMPL) ++ info |= CPUINFO_LSE; ++ if (ID_AA64ISAR0_AES(isar0) >= ID_AA64ISAR0_AES_BASE) ++ info |= CPUINFO_AES; ++ if (ID_AA64ISAR0_AES(isar0) >= ID_AA64ISAR0_AES_PMULL) ++ info |= CPUINFO_PMULL; ++ } ++ ++ mib[0] = CTL_MACHDEP; ++ mib[1] = CPU_ID_AA64PFR1; ++ len = sizeof(pfr1); ++ if (sysctl(mib, 2, &pfr1, &len, NULL, 0) != -1) { ++ if (ID_AA64PFR1_BT(pfr1) >= ID_AA64PFR1_BT_IMPL) ++ info |= CPUINFO_BTI; ++ } + #endif + + cpuinfo = info; Index: patches/patch-util_cpuinfo-ppc_c =================================================================== RCS file: patches/patch-util_cpuinfo-ppc_c diff -N patches/patch-util_cpuinfo-ppc_c --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-util_cpuinfo-ppc_c 23 Jun 2024 02:22:22 -0000 @@ -0,0 +1,53 @@ +Fix building on powerpc and powerpc64. + +Index: util/cpuinfo-ppc.c +--- util/cpuinfo-ppc.c.orig ++++ util/cpuinfo-ppc.c +@@ -6,11 +6,13 @@ + #include "qemu/osdep.h" + #include "host/cpuinfo.h" + +-#include <asm/cputable.h> +-#ifdef CONFIG_GETAUXVAL +-# include <sys/auxv.h> +-#else +-# include "elf.h" ++#ifdef CONFIG_LINUX ++# include <asm/cputable.h> ++# ifdef CONFIG_GETAUXVAL ++# include <sys/auxv.h> ++# else ++# include "elf.h" ++# endif + #endif + + unsigned cpuinfo; +@@ -19,16 +21,17 @@ unsigned cpuinfo; + unsigned __attribute__((constructor)) cpuinfo_init(void) + { + unsigned info = cpuinfo; +- unsigned long hwcap, hwcap2; + + if (info) { + return info; + } + +- hwcap = qemu_getauxval(AT_HWCAP); +- hwcap2 = qemu_getauxval(AT_HWCAP2); + info = CPUINFO_ALWAYS; + ++#ifdef CONFIG_LINUX ++ unsigned long hwcap = qemu_getauxval(AT_HWCAP); ++ unsigned long hwcap2 = qemu_getauxval(AT_HWCAP2); ++ + /* Version numbers are monotonic, and so imply all lower versions. */ + if (hwcap2 & PPC_FEATURE2_ARCH_3_1) { + info |= CPUINFO_V3_1 | CPUINFO_V3_0 | CPUINFO_V2_07 | CPUINFO_V2_06; +@@ -58,6 +61,7 @@ unsigned __attribute__((constructor)) cpuinfo_init(voi + } + } + } ++#endif + + cpuinfo = info; + return info;