From: Kirill A. Korinsky Subject: emulators/qemu: sync macpcc patch To: Brad Smith Cc: OpenBSD ports Date: Sat, 26 Sep 2026 00:47:15 +0200 Brad, I'd like to sync my macppc patch to one which includes review and which is planned to be in 11.2 as I understand. Ok? Index: emulators/qemu/Makefile =================================================================== RCS file: /home/cvs/ports/emulators/qemu/Makefile,v diff -u -p -r1.267 Makefile --- emulators/qemu/Makefile 21 Sep 2026 09:48:01 -0000 1.267 +++ emulators/qemu/Makefile 24 Sep 2026 22:30:25 -0000 @@ -8,7 +8,7 @@ COMMENT-ga= QEMU guest agent VERSION= 11.1.1 DISTNAME= qemu-${VERSION} -REVISION= 0 +REVISION= 1 CATEGORIES= emulators SITES= https://download.qemu.org/ EXTRACT_SUFX= .tar.xz Index: emulators/qemu/patches/patch-hw_intc_openpic_c =================================================================== RCS file: /home/cvs/ports/emulators/qemu/patches/patch-hw_intc_openpic_c,v diff -u -p -r1.1 patch-hw_intc_openpic_c --- emulators/qemu/patches/patch-hw_intc_openpic_c 3 Sep 2026 08:58:14 -0000 1.1 +++ emulators/qemu/patches/patch-hw_intc_openpic_c 23 Sep 2026 23:14:53 -0000 @@ -1,4 +1,4 @@ -https://patchew.org/QEMU/20260827155310.7223-1-kirill@korins.ky/ +https://patchew.org/QEMU/20260923230452.3765-1-kirill@korins.ky/ Index: hw/intc/openpic.c --- hw/intc/openpic.c.orig Index: emulators/qemu/patches/patch-hw_misc_macio_cuda_c =================================================================== RCS file: /home/cvs/ports/emulators/qemu/patches/patch-hw_misc_macio_cuda_c,v diff -u -p -r1.1 patch-hw_misc_macio_cuda_c --- emulators/qemu/patches/patch-hw_misc_macio_cuda_c 3 Sep 2026 08:58:14 -0000 1.1 +++ emulators/qemu/patches/patch-hw_misc_macio_cuda_c 23 Sep 2026 23:14:53 -0000 @@ -1,4 +1,4 @@ -https://patchew.org/QEMU/20260827155310.7223-1-kirill@korins.ky/ +https://patchew.org/QEMU/20260923230452.3765-1-kirill@korins.ky/ Index: hw/misc/macio/cuda.c --- hw/misc/macio/cuda.c.orig @@ -30,7 +30,7 @@ Index: hw/misc/macio/cuda.c static const Property cuda_properties[] = { DEFINE_PROP_UINT64("timebase-frequency", CUDAState, tb_frequency, 0), -+ DEFINE_PROP_UINT64("sr-delay-ns", CUDAState, sr_delay_ns, ++ DEFINE_PROP_UINT64("x-sr-delay-ns", CUDAState, sr_delay_ns, + 20 * SCALE_US), }; Index: emulators/qemu/patches/patch-hw_ppc_ppc_c =================================================================== RCS file: /home/cvs/ports/emulators/qemu/patches/patch-hw_ppc_ppc_c,v diff -u -p -r1.1 patch-hw_ppc_ppc_c --- emulators/qemu/patches/patch-hw_ppc_ppc_c 3 Sep 2026 08:58:14 -0000 1.1 +++ emulators/qemu/patches/patch-hw_ppc_ppc_c 23 Sep 2026 23:14:53 -0000 @@ -1,13 +1,23 @@ -https://patchew.org/QEMU/20260827155310.7223-1-kirill@korins.ky/ +https://patchew.org/QEMU/20260923230452.3765-1-kirill@korins.ky/ Index: hw/ppc/ppc.c --- hw/ppc/ppc.c.orig +++ hw/ppc/ppc.c -@@ -885,6 +885,7 @@ static void __cpu_ppc_store_decr(PowerPCCPU *cpu, int6 +@@ -885,10 +885,17 @@ static void __cpu_ppc_store_decr(PowerPCCPU *cpu, int6 * an edge interrupt, so raise it here too. */ if (((flags & PPC_DECR_UNDERFLOW_LEVEL) && signed_value < 0) || -+ ((flags & PPC_DECR_UNDERFLOW_TRIGGERED) && value == 0) || ++ ((flags & PPC_DECR_ZERO_TRIGGERED) && value == 0) || ((flags & PPC_DECR_UNDERFLOW_TRIGGERED) && signed_value < 0 && signed_decr >= 0)) { (*raise_excp)(cpu); + return; ++ } else { ++ /* ++ * Classic 32-bit edge-triggered decrementer: zero write fires ++ * immediately ++ */ ++ tb_env->flags |= PPC_DECR_ZERO_TRIGGERED; + } + + /* On MSB level based systems a 0 for the MSB stops interrupt delivery */ Index: emulators/qemu/patches/patch-tests_functional_ppc_meson_build =================================================================== RCS file: /home/cvs/ports/emulators/qemu/patches/patch-tests_functional_ppc_meson_build,v diff -u -p -r1.1 patch-tests_functional_ppc_meson_build --- emulators/qemu/patches/patch-tests_functional_ppc_meson_build 3 Sep 2026 08:58:14 -0000 1.1 +++ emulators/qemu/patches/patch-tests_functional_ppc_meson_build 23 Sep 2026 23:14:53 -0000 @@ -1,4 +1,4 @@ -https://patchew.org/QEMU/20260827155310.7223-1-kirill@korins.ky/ +https://patchew.org/QEMU/20260923230452.3765-1-kirill@korins.ky/ Index: tests/functional/ppc/meson.build --- tests/functional/ppc/meson.build.orig Index: emulators/qemu/patches/patch-tests_functional_ppc_test_openbsd_py =================================================================== RCS file: /home/cvs/ports/emulators/qemu/patches/patch-tests_functional_ppc_test_openbsd_py,v diff -u -p -r1.1 patch-tests_functional_ppc_test_openbsd_py --- emulators/qemu/patches/patch-tests_functional_ppc_test_openbsd_py 3 Sep 2026 08:58:14 -0000 1.1 +++ emulators/qemu/patches/patch-tests_functional_ppc_test_openbsd_py 23 Sep 2026 23:14:53 -0000 @@ -1,4 +1,4 @@ -https://patchew.org/QEMU/20260827155310.7223-1-kirill@korins.ky/ +https://patchew.org/QEMU/20260923230452.3765-1-kirill@korins.ky/ Index: tests/functional/ppc/test_openbsd.py --- tests/functional/ppc/test_openbsd.py.orig @@ -33,7 +33,7 @@ Index: tests/functional/ppc/test_openbsd + '-m', '2g', + '-nic', 'none', + '-device', 'VGA', -+ '-global', 'cuda.sr-delay-ns=0', ++ '-global', 'cuda.x-sr-delay-ns=0', + '-prom-env', 'input-device=ttya', + '-prom-env', 'output-device=ttya', + '-cdrom', cdrom_path, -- wbr, Kirill