mirror of
https://github.com/openbsd/ports.git
synced 2026-06-17 23:13:55 +02:00
update to qemu-9.0.1, from Brad (maintainer)
This commit is contained in:
@@ -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/
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -1,12 +1,21 @@
|
||||
util/cpuinfo-riscv: Support OpenBSD signal frame
|
||||
adc028428a6da5ea8d6a688085966a33be4c97c7
|
||||
|
||||
Index: tcg/riscv/tcg-target.c.inc
|
||||
--- tcg/riscv/tcg-target.c.inc.orig
|
||||
+++ tcg/riscv/tcg-target.c.inc
|
||||
@@ -2116,7 +2116,7 @@ static void sigill_handler(int signo, siginfo_t *si, v
|
||||
@@ -2116,7 +2116,14 @@ static void sigill_handler(int signo, siginfo_t *si, v
|
||||
{
|
||||
/* Skip the faulty instruction */
|
||||
ucontext_t *uc = (ucontext_t *)data;
|
||||
- uc->uc_mcontext.__gregs[REG_PC] += 4;
|
||||
+
|
||||
+#ifdef __linux__
|
||||
uc->uc_mcontext.__gregs[REG_PC] += 4;
|
||||
+#elif defined(__OpenBSD__)
|
||||
+ uc->sc_sepc += 4;
|
||||
+#else
|
||||
+# error Unsupported OS
|
||||
+#endif
|
||||
|
||||
got_sigill = 1;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
util/cpuinfo-aarch64: Add OpenBSD support
|
||||
ab089908b42f22e7edfa0d40db963c136ab35419
|
||||
|
||||
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,36 @@ 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;
|
||||
@@ -0,0 +1,54 @@
|
||||
util/cpuinfo-ppc: Fix building on OpenBSD
|
||||
272d3decc19aebe87955f4ec6d0c6cc8790471f1
|
||||
|
||||
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;
|
||||
Reference in New Issue
Block a user