pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/sysutils



Module Name:    pkgsrc
Committed By:   bouyer
Date:           Fri Aug 22 09:00:14 UTC 2025

Modified Files:
        pkgsrc/sysutils: Makefile
Added Files:
        pkgsrc/sysutils/xenkernel420: DESCR MESSAGE Makefile PLIST distinfo
        pkgsrc/sysutils/xenkernel420/patches: patch-Config.mk
            patch-xen_Makefile patch-xen_arch_x86_Makefile
            patch-xen_arch_x86_Rules.mk patch-xen_arch_x86_boot_build32.lds.S
            patch-xen_arch_x86_extable.c patch-xen_arch_x86_mm_p2m.c
            patch-xen_tools_check-endbr.sh
        pkgsrc/sysutils/xentools420: DESCR MESSAGE MESSAGE.NetBSD Makefile
            PLIST buildlink3.mk distinfo version.mk
        pkgsrc/sysutils/xentools420/files: xen-watchdog.sh xencommons.sh
            xendomains.sh
        pkgsrc/sysutils/xentools420/patches:
            patch-.._seabios-1.16.3_src_string.c patch-Config.mk
            patch-configure patch-docs_configure patch-docs_man_xl.1.pod.in
            patch-docs_man_xl.cfg.5.pod.in patch-docs_man_xlcpupool.cfg.5.pod
            patch-docs_misc_block-scripts.txt patch-docs_misc_vtd.txt
            patch-tools_9pfsd_io.c patch-tools_Makefile patch-tools_Rules.mk
            patch-tools_configure patch-tools_console_daemon_utils.c
            patch-tools_examples_Makefile patch-tools_firmware_Makefile
            patch-tools_firmware_etherboot_Makefile
            patch-tools_hotplug_NetBSD_Makefile
            patch-tools_hotplug_NetBSD_block
            patch-tools_hotplug_common_Makefile
            patch-tools_include_xen-sys_NetBSD_evtchn.h
            patch-tools_include_xen-sys_NetBSD_privcmd.h
            patch-tools_libs_evtchn_netbsd.c
            patch-tools_libs_foreignmemory_netbsd.c
            patch-tools_libxl_libxl_dom.c patch-tools_libxl_libxl_event.c
            patch-tools_libxl_libxl_internal.h patch-tools_ocaml_common.make
            patch-tools_ocaml_xenstored_Makefile
            patch-tools_ocaml_xenstored_utils.ml patch-tools_pygrub_Makefile
            patch-tools_python_Makefile patch-tools_qemu-xen_audio_audio.c
            patch-tools_qemu-xen_net_tap-bsd.c patch-tools_qemu-xen_net_tap.c
            patch-tools_qemu-xen_pc-bios_optionrom_Makefile
            patch-tools_xenpaging_xenpaging.c patch-tools_xl_Makefile
            patch-xen_Makefile patch-xen_arch_x86_boot_build32.lds.S
            patch-xen_common_libelf_libelf-loader.c patch-xen_include_Makefile

Log Message:
Add xenkernel420 and xentools420 packages version 20250821, providing Xen
kernels and tools from the stable-4.20 branch (as of 20250821).


To generate a diff of this commit:
cvs rdiff -u -r1.1161 -r1.1162 pkgsrc/sysutils/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/xenkernel420/DESCR \
    pkgsrc/sysutils/xenkernel420/MESSAGE \
    pkgsrc/sysutils/xenkernel420/Makefile pkgsrc/sysutils/xenkernel420/PLIST \
    pkgsrc/sysutils/xenkernel420/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/xenkernel420/patches/patch-Config.mk \
    pkgsrc/sysutils/xenkernel420/patches/patch-xen_Makefile \
    pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_Makefile \
    pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_Rules.mk \
    pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_boot_build32.lds.S \
    pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_extable.c \
    pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_mm_p2m.c \
    pkgsrc/sysutils/xenkernel420/patches/patch-xen_tools_check-endbr.sh
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/xentools420/DESCR \
    pkgsrc/sysutils/xentools420/MESSAGE \
    pkgsrc/sysutils/xentools420/MESSAGE.NetBSD \
    pkgsrc/sysutils/xentools420/Makefile pkgsrc/sysutils/xentools420/PLIST \
    pkgsrc/sysutils/xentools420/buildlink3.mk \
    pkgsrc/sysutils/xentools420/distinfo \
    pkgsrc/sysutils/xentools420/version.mk
cvs rdiff -u -r0 -r1.1 pkgsrc/sysutils/xentools420/files/xen-watchdog.sh \
    pkgsrc/sysutils/xentools420/files/xencommons.sh \
    pkgsrc/sysutils/xentools420/files/xendomains.sh
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/sysutils/xentools420/patches/patch-.._seabios-1.16.3_src_string.c \
    pkgsrc/sysutils/xentools420/patches/patch-Config.mk \
    pkgsrc/sysutils/xentools420/patches/patch-configure \
    pkgsrc/sysutils/xentools420/patches/patch-docs_configure \
    pkgsrc/sysutils/xentools420/patches/patch-docs_man_xl.1.pod.in \
    pkgsrc/sysutils/xentools420/patches/patch-docs_man_xl.cfg.5.pod.in \
    pkgsrc/sysutils/xentools420/patches/patch-docs_man_xlcpupool.cfg.5.pod \
    pkgsrc/sysutils/xentools420/patches/patch-docs_misc_block-scripts.txt \
    pkgsrc/sysutils/xentools420/patches/patch-docs_misc_vtd.txt \
    pkgsrc/sysutils/xentools420/patches/patch-tools_9pfsd_io.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_Rules.mk \
    pkgsrc/sysutils/xentools420/patches/patch-tools_configure \
    pkgsrc/sysutils/xentools420/patches/patch-tools_console_daemon_utils.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_examples_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_firmware_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_firmware_etherboot_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_NetBSD_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_NetBSD_block \
    pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_common_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_include_xen-sys_NetBSD_evtchn.h \
    pkgsrc/sysutils/xentools420/patches/patch-tools_include_xen-sys_NetBSD_privcmd.h \
    pkgsrc/sysutils/xentools420/patches/patch-tools_libs_evtchn_netbsd.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_libs_foreignmemory_netbsd.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_dom.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_event.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_internal.h \
    pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_common.make \
    pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_xenstored_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_xenstored_utils.ml \
    pkgsrc/sysutils/xentools420/patches/patch-tools_pygrub_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_python_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_audio_audio.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_net_tap-bsd.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_net_tap.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_pc-bios_optionrom_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-tools_xenpaging_xenpaging.c \
    pkgsrc/sysutils/xentools420/patches/patch-tools_xl_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-xen_Makefile \
    pkgsrc/sysutils/xentools420/patches/patch-xen_arch_x86_boot_build32.lds.S \
    pkgsrc/sysutils/xentools420/patches/patch-xen_common_libelf_libelf-loader.c \
    pkgsrc/sysutils/xentools420/patches/patch-xen_include_Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/sysutils/Makefile
diff -u pkgsrc/sysutils/Makefile:1.1161 pkgsrc/sysutils/Makefile:1.1162
--- pkgsrc/sysutils/Makefile:1.1161     Sat Jul 26 09:01:44 2025
+++ pkgsrc/sysutils/Makefile    Fri Aug 22 09:00:11 2025
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.1161 2025/07/26 09:01:44 pin Exp $
+# $NetBSD: Makefile,v 1.1162 2025/08/22 09:00:11 bouyer Exp $
 #
 
 COMMENT=       System utilities
@@ -960,9 +960,11 @@ SUBDIR+=   xe
 SUBDIR+=       xe-guest-utilities
 SUBDIR+=       xenkernel415
 SUBDIR+=       xenkernel418
+SUBDIR+=       xenkernel420
 SUBDIR+=       xenstoretools
 SUBDIR+=       xentools415
 SUBDIR+=       xentools418
+SUBDIR+=       xentools420
 SUBDIR+=       xenvstat
 SUBDIR+=       xfburn
 SUBDIR+=       xfce4-appfinder

Added files:

Index: pkgsrc/sysutils/xenkernel420/DESCR
diff -u /dev/null pkgsrc/sysutils/xenkernel420/DESCR:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/DESCR  Fri Aug 22 09:00:11 2025
@@ -0,0 +1,14 @@
+Xen is a hypervisor which supports running multiple guest operating
+systems on a single machine. Guest OSes (also called "domains")
+can be either paravirtualised (i.e. make hypercalls in order to
+access hardware), run in HVM (Hardware Virtualisation Mode) where
+they will be presented with virtual devices, or a combination where
+they use hypercalls to access hardware but manage memory themselves.
+At boot, the xen kernel is loaded along with the guest kernel for
+the first domain (called domain0). domain0 has privileges to access
+the physical hardware (PCI and ISA devices), administrate other
+domains and provide virtual devices (disks and network) to other
+domains.
+
+This package contains the 4.20 Xen kernel itself.  PCI passthrough is
+not supported.  PAE is mandatory; on i386 one must use XEN3PAE_DOM[0U].
Index: pkgsrc/sysutils/xenkernel420/MESSAGE
diff -u /dev/null pkgsrc/sysutils/xenkernel420/MESSAGE:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/MESSAGE        Fri Aug 22 09:00:11 2025
@@ -0,0 +1,14 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+
+The Xen hypervisor is installed under the following locations:
+       ${XENKERNELDIR}/xen.gz          (standard hypervisor)
+       ${XENKERNELDIR}/xen-debug.gz    (debug hypervisor)
+
+Note that unlike upstream Xen, pv-linear-pt defaults to true.
+You can disable it using pv-linear-pt=false on the Xen command line,
+but then you can't boot NetBSD in PV mode.
+
+32bits PV guests are not officially supported any more.
+Switch to pvshim (for netbsd-9 or older) or pvh (for netbsd-10 or newer).
+===========================================================================
Index: pkgsrc/sysutils/xenkernel420/Makefile
diff -u /dev/null pkgsrc/sysutils/xenkernel420/Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/Makefile       Fri Aug 22 09:00:11 2025
@@ -0,0 +1,85 @@
+# $NetBSD: Makefile,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+# VERSION is set in version.mk as it is shared with other packages
+#PKGREVISION=        1
+
+XENKERNEL:=
+.include        "../../sysutils/xentools420/version.mk"
+PKGNAME=       xenkernel420-${VERSION:S/-//g}
+CATEGORIES=    sysutils
+
+MAINTAINER=    bouyer%NetBSD.org@localhost
+HOMEPAGE=      https://xenproject.org/
+COMMENT=       Xen 4.20.x Kernel
+
+LICENSE=       gnu-gpl-v2
+
+ONLY_FOR_PLATFORM=     NetBSD-*.*-x86_64
+
+SSP_SUPPORTED= no
+
+NO_CONFIGURE=  yes
+USE_TOOLS+=    gmake bison ggrep
+#force use of pkgsrc's ggrep, NetBSD one is not enough
+TOOLS_PLATFORM.ggrep=
+
+PYTHON_FOR_BUILD_ONLY=         YES
+
+MAKE_ENV+=     OCAML_TOOLS=no
+.if defined(PKGREVISION) && !empty(PKGREVISION) && (${PKGREVISION} != "0")
+MAKE_ENV+=     XEN_VENDORVERSION=_${VERSION}nb${PKGREVISION}
+.else
+MAKE_ENV+=     XEN_VENDORVERSION=_${VERSION}nb0
+.endif
+
+INSTALLATION_DIRS=     xen420-kernel
+XENKERNELDIR=          ${PREFIX}/${INSTALLATION_DIRS}
+
+MESSAGE_SUBST+=                XENKERNELDIR=${XENKERNELDIR}
+
+.include "../../mk/compiler.mk"
+EXTRA_CFLAGS+= -Wno-error=char-subscripts
+.if !empty(PKGSRC_COMPILER:Mclang)
+EXTRA_CFLAGS+= -Qunused-arguments -no-integrated-as -Wno-error=format \
+               -Wno-error=parentheses-equality -Wno-error=enum-conversion \
+               -Wno-error=unused-function -Wno-error=unused-const-variable \
+               -Wno-error=ignored-attributes -Wno-error=constant-conversion \
+               -Wno-error=address-of-packed-member \
+               -Wno-error=initializer-overrides \
+               -Wno-error=tautological-compare -Wno-error=pragma-pack
+.elif !empty(PKGSRC_COMPILER:Mgcc)
+EXTRA_CFLAGS+=  -falign-functions=16
+.endif
+
+MAKE_ENV+=     EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
+
+do-build:
+       cd ${WRKSRC} && ${BUILD_MAKE_CMD} build-xen
+       ${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen.gz
+       cd ${WRKSRC} && ${MAKE_PROGRAM} clean
+       echo "CONFIG_DEBUG=y" >> ${WRKSRC}/xen/.config
+       echo "CONFIG_DEBUG_INFO=y" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_DEBUG_LOCK_PROFILE is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_DEBUG_LOCKS is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_DEBUG_TRACE is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_XMEM_POOL_POISON is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_CRASH_DEBUG is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_GDBSX is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_FRAME_POINTER is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_GCOV is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_LOCK_PROFILE is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_PERF_COUNTERS is not set" >> ${WRKSRC}/xen/.config
+       echo "CONFIG_VERBOSE_DEBUG=y" >> ${WRKSRC}/xen/.config
+       echo "CONFIG_SCRUB_DEBUG=y" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_UBSAN is not set" >> ${WRKSRC}/xen/.config
+       echo "# CONFIG_SELF_TESTS is not set" >> ${WRKSRC}/xen/.config
+       cd ${WRKSRC} && ${BUILD_MAKE_CMD} build-xen
+       ${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen-debug.gz
+
+do-install:
+       ${INSTALL_DATA} ${WRKDIR}/xen.gz \
+           ${DESTDIR}${XENKERNELDIR}/xen.gz
+       ${INSTALL_DATA} ${WRKDIR}/xen-debug.gz \
+           ${DESTDIR}${XENKERNELDIR}/xen-debug.gz
+
+.include "../../lang/python/application.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/xenkernel420/PLIST
diff -u /dev/null pkgsrc/sysutils/xenkernel420/PLIST:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/PLIST  Fri Aug 22 09:00:11 2025
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+xen420-kernel/xen-debug.gz
+xen420-kernel/xen.gz
Index: pkgsrc/sysutils/xenkernel420/distinfo
diff -u /dev/null pkgsrc/sysutils/xenkernel420/distinfo:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/distinfo       Fri Aug 22 09:00:11 2025
@@ -0,0 +1,13 @@
+$NetBSD: distinfo,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+
+BLAKE2s (xen420/xen-ea5025554e982bd377f85b899b6d151e5ef33d1e.tar.gz) = 6732d2e90841860347e6b7a86b0ebd6cc6073aa8140ce0f61a8fbe6c7d7f4ad0
+SHA512 (xen420/xen-ea5025554e982bd377f85b899b6d151e5ef33d1e.tar.gz) = b02e57832885b45f7795ef47b5f518d2da2f649fa5f019da73b2846dd1546fedbe61c5c4c91404fe851449ad9b4e8df0336b26a9a2363620648e13658d07afa3
+Size (xen420/xen-ea5025554e982bd377f85b899b6d151e5ef33d1e.tar.gz) = 7034634 bytes
+SHA1 (patch-Config.mk) = 9372a09efd05c9fbdbc06f8121e411fcb7c7ba65
+SHA1 (patch-xen_Makefile) = 0c400e8054e907ce44faf2be955e0c2d63b768ed
+SHA1 (patch-xen_arch_x86_Makefile) = f05a5879518005417a9cdb69488d136f207a7ab1
+SHA1 (patch-xen_arch_x86_Rules.mk) = b0bc391f2ca3e96ce2bcaec5e1fcd66139ff16f9
+SHA1 (patch-xen_arch_x86_boot_build32.lds.S) = 0386a08a9e17b3ac9793df2542e8772329ebabd4
+SHA1 (patch-xen_arch_x86_extable.c) = f64b956be1167901a60bf9be1abd98dbfaffb100
+SHA1 (patch-xen_arch_x86_mm_p2m.c) = 6e9b84dc8448eca9677f184e720bbfcb3c6d314e
+SHA1 (patch-xen_tools_check-endbr.sh) = a7268ee5ff11f21fdc5b0bc213498a1923b693be

Index: pkgsrc/sysutils/xenkernel420/patches/patch-Config.mk
diff -u /dev/null pkgsrc/sysutils/xenkernel420/patches/patch-Config.mk:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/patches/patch-Config.mk        Fri Aug 22 09:00:11 2025
@@ -0,0 +1,14 @@
+$NetBSD: patch-Config.mk,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+
+--- Config.mk.orig     2018-04-17 19:21:31.000000000 +0200
++++ Config.mk  2018-04-23 13:29:47.000000000 +0200
+@@ -32,6 +32,9 @@
+ # Tools to run on system hosting the build
+ HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+ HOSTCFLAGS += -fno-strict-aliasing
++HOSTCFLAGS += ${EXTRA_CFLAGS}
++CFLAGS     += ${EXTRA_CFLAGS}
++
+ 
+ DISTDIR     ?= $(XEN_ROOT)/dist
+ DESTDIR     ?= /
Index: pkgsrc/sysutils/xenkernel420/patches/patch-xen_Makefile
diff -u /dev/null pkgsrc/sysutils/xenkernel420/patches/patch-xen_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/patches/patch-xen_Makefile     Fri Aug 22 09:00:11 2025
@@ -0,0 +1,13 @@
+$NetBSD: patch-xen_Makefile,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+
+--- xen/Makefile.orig  2023-10-06 19:17:42.000000000 +0200
++++ xen/Makefile       2023-10-10 16:04:53.552602218 +0200
+@@ -260,7 +260,7 @@
+ 
+ # Copy CFLAGS generated by "Config.mk" so they can be reused later without
+ # reparsing Config.mk by e.g. arch/x86/boot/.
+-export XEN_TREEWIDE_CFLAGS := $(CFLAGS)
++export XEN_TREEWIDE_CFLAGS :=  $(EXTRA_CFLAGS) $(CFLAGS)
+ 
+ # CLANG_FLAGS needs to be calculated before calling Kconfig
+ ifneq ($(shell $(CC) --version 2>&1 | head -n 1 | grep clang),)
Index: pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_Makefile
diff -u /dev/null pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_Makefile    Fri Aug 22 09:00:11 2025
@@ -0,0 +1,58 @@
+$NetBSD: patch-xen_arch_x86_Makefile,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+
+revert commit a9754615cb1e615d92efc40d2f725553236bcf5e, it causes the build
+to fail with:
+ld: prelink.o: relocation R_X86_64_32 against `.init.rodata' can not be used when making a PIE object; recompile with -fPIE
+
+--- xen/arch/x86/Makefile.old  2025-05-21 20:16:58.798923201 +0200
++++ xen/arch/x86/Makefile      2025-05-21 20:16:21.806018309 +0200
+@@ -138,19 +138,19 @@
+ CFLAGS-$(XEN_BUILD_EFI) += -DXEN_BUILD_EFI
+ 
+ $(TARGET)-syms: $(objtree)/prelink.o $(obj)/xen.lds
+-      $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
++      $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
+           $(objtree)/common/symbols-dummy.o -o $(dot-target).0
+       $(NM) -pa --format=sysv $(dot-target).0 \
+               | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+               > $(dot-target).0.S
+       $(MAKE) $(build)=$(@D) $(dot-target).0.o
+-      $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
++      $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
+           $(dot-target).0.o -o $(dot-target).1
+       $(NM) -pa --format=sysv $(dot-target).1 \
+               | $(objtree)/tools/symbols $(all_symbols) --sysv --sort $(syms-warn-dup-y) \
+               > $(dot-target).1.S
+       $(MAKE) $(build)=$(@D) $(dot-target).1.o
+-      $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds $< $(build_id_linker) \
++      $(LD) $(XEN_LDFLAGS) -T $(obj)/xen.lds -N $< $(build_id_linker) \
+           $(orphan-handling-y) $(dot-target).1.o -o $@
+       $(NM) -pa --format=sysv $@ \
+               | $(objtree)/tools/symbols --all-symbols --xensyms --sysv --sort \
+@@ -211,7 +211,7 @@
+       $(if $(filter --strip-debug,$(EFI_LDFLAGS)),echo,:) "Will strip debug info from $(@F)"
+ endif
+       $(foreach base, $(VIRT_BASE) $(ALT_BASE), \
+-                $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds $< $(relocs-dummy) \
++                $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< $(relocs-dummy) \
+                       $(objtree)/common/symbols-dummy.o $(note_file_option) \
+                       -o $(dot-target).$(base).0 &&) :
+       $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).0) \
+@@ -221,7 +221,7 @@
+               > $(dot-target).0s.S
+       $(MAKE) $(build)=$(@D) .$(@F).0r.o .$(@F).0s.o
+       $(foreach base, $(VIRT_BASE) $(ALT_BASE), \
+-                $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds $< \
++                $(LD) $(call EFI_LDFLAGS,$(base)) -T $(obj)/efi.lds -N $< \
+                       $(dot-target).0r.o $(dot-target).0s.o $(note_file_option) \
+                       -o $(dot-target).$(base).1 &&) :
+       $(MKRELOC) $(foreach base,$(VIRT_BASE) $(ALT_BASE),$(dot-target).$(base).1) \
+@@ -230,7 +230,7 @@
+               | $(objtree)/tools/symbols $(all_symbols) --sysv --sort \
+               > $(dot-target).1s.S
+       $(MAKE) $(build)=$(@D) .$(@F).1r.o .$(@F).1s.o
+-      $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds $< \
++      $(LD) $(call EFI_LDFLAGS,$(VIRT_BASE)) -T $(obj)/efi.lds -N $< \
+             $(dot-target).1r.o $(dot-target).1s.o $(orphan-handling-y) \
+             $(note_file_option) -o $@
+       $(NM) -pa --format=sysv $@ \
Index: pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_Rules.mk
diff -u /dev/null pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_Rules.mk:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_Rules.mk    Fri Aug 22 09:00:11 2025
@@ -0,0 +1,10 @@
+$NetBSD: patch-xen_arch_x86_Rules.mk,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+
+--- xen/arch/x86/Rules.mk.orig 2022-11-15 09:03:34.000000000 +0100
++++ xen/arch/x86/Rules.mk      2022-12-14 21:22:01.302860156 +0100
+@@ -8,3 +8,5 @@
+ endif
+ c_flags += $(object_label_flags) $(CFLAGS_stack_boundary)
+ a_flags += $(object_label_flags) $(CFLAGS_stack_boundary)
++
++c_flags += $(EXTRA_CFLAGS)
Index: pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_boot_build32.lds.S
diff -u /dev/null pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_boot_build32.lds.S:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_boot_build32.lds.S  Fri Aug 22 09:00:11 2025
@@ -0,0 +1,14 @@
+$NetBSD: patch-xen_arch_x86_boot_build32.lds.S,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+linux's toolchain doesn't generate a .eh_frame section but NetBSD does.
+remove it.
+
+--- xen/arch/x86/boot/build32.lds.S.orig       2025-08-21 12:51:20.500258990 +0200
++++ xen/arch/x86/boot/build32.lds.S    2025-08-21 12:51:25.633737534 +0200
+@@ -65,6 +65,7 @@
+        *(.comment)
+        *(.comment.*)
+        *(.note.*)
++       *(.eh_frame)
+   }
+   .shstrtab : {
+        *(.shstrtab)
Index: pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_extable.c
diff -u /dev/null pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_extable.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_extable.c   Fri Aug 22 09:00:11 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-xen_arch_x86_extable.c,v 1.1 2025/08/22 09:00:11 bouyer Exp $
+
+silent nosy debug output
+
+--- xen/arch/x86/extable.c.orig        2023-10-06 19:17:42.000000000 +0200
++++ xen/arch/x86/extable.c     2023-10-10 16:20:56.285091628 +0200
+@@ -202,7 +202,7 @@
+         __start___pre_ex_table, __stop___pre_ex_table, addr);
+     if ( fixup )
+     {
+-        dprintk(XENLOG_INFO, "Pre-exception: %p -> %p\n", _p(addr), _p(fixup));
++        // dprintk(XENLOG_INFO, "Pre-exception: %p -> %p\n", _p(addr), _p(fixup));
+         perfc_incr(exception_fixed);
+     }
+     return fixup;
Index: pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_mm_p2m.c
diff -u /dev/null pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_mm_p2m.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/patches/patch-xen_arch_x86_mm_p2m.c    Fri Aug 22 09:00:12 2025
@@ -0,0 +1,21 @@
+$NetBSD: patch-xen_arch_x86_mm_p2m.c,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+silent a noisy warning
+
+--- xen/arch/x86/mm/p2m.c.orig 2020-05-03 21:13:56.173269058 +0200
++++ xen/arch/x86/mm/p2m.c      2020-05-03 21:15:38.477174874 +0200
+@@ -1367,10 +1367,13 @@
+             ret = 0;
+         else
+             ret = -EBUSY;
+-        printk(XENLOG_G_WARNING
++
++      if (gfn_l != mfn_x(mfn)) {
++            printk(XENLOG_G_WARNING
+                "Cannot setup identity map d%d:%lx,"
+                " gfn already mapped to %lx.\n",
+                d->domain_id, gfn_l, mfn_x(mfn));
++      }
+     }
+ 
+     gfn_unlock(p2m, gfn, 0);
Index: pkgsrc/sysutils/xenkernel420/patches/patch-xen_tools_check-endbr.sh
diff -u /dev/null pkgsrc/sysutils/xenkernel420/patches/patch-xen_tools_check-endbr.sh:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xenkernel420/patches/patch-xen_tools_check-endbr.sh Fri Aug 22 09:00:12 2025
@@ -0,0 +1,26 @@
+$NetBSD: patch-xen_tools_check-endbr.sh,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+For for NetBSD's stat(1)
+
+--- ./xen/tools/check-endbr.sh.orig    2023-10-10 16:35:16.089399100 +0200
++++ ./xen/tools/check-endbr.sh 2023-10-10 16:41:12.764124684 +0200
+@@ -96,7 +96,7 @@
+ 
+ ${OBJCOPY} -j .text $1 -O binary $TEXT_BIN
+ 
+-bin_sz=$(stat -c '%s' $TEXT_BIN)
++bin_sz=$(stat -f '%z' $TEXT_BIN)
+ [ "$bin_sz" -ge $(((1 << 28) - $vma_lo)) ] &&
+     { echo "$MSG_PFX Error: .text offsets must not exceed 256M" >&2; exit 1; }
+ 
+@@ -116,8 +116,8 @@
+ wait
+ 
+ # Sanity check $VALID and $ALL, in case the string parsing bitrots
+-val_sz=$(stat -c '%s' $VALID)
+-all_sz=$(stat -c '%s' $ALL)
++val_sz=$(stat -f '%z' $VALID)
++all_sz=$(stat -f '%z' $ALL)
+ [ "$val_sz" -eq 0 ]         && { echo "$MSG_PFX Error: Empty valid-addrs" >&2; exit 1; }
+ [ "$all_sz" -eq 0 ]         && { echo "$MSG_PFX Error: Empty all-addrs" >&2; exit 1; }
+ [ "$all_sz" -lt "$val_sz" ] && { echo "$MSG_PFX Error: More valid-addrs than all-addrs" >&2; exit 1; }

Index: pkgsrc/sysutils/xentools420/DESCR
diff -u /dev/null pkgsrc/sysutils/xentools420/DESCR:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/DESCR   Fri Aug 22 09:00:12 2025
@@ -0,0 +1,5 @@
+The Xen virtual machine monitor allows running several virtual machines
+on a single physical machine.  The xentools420 package contains the
+tools to create, destroy and control the virtual machines.
+
+This package contains the tools for Xen 4.20.x
Index: pkgsrc/sysutils/xentools420/MESSAGE
diff -u /dev/null pkgsrc/sysutils/xentools420/MESSAGE:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/MESSAGE Fri Aug 22 09:00:12 2025
@@ -0,0 +1,12 @@
+===========================================================================
+$NetBSD: MESSAGE,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+Note that the rc.d scripts have been updated in this version.
+If you don't use PKG_RCD_SCRIPTS=YES then it is very important for
+you to copy the new rc.d scripts to /etc/rc.d.
+
+To create HVM guest with UEFI firmware, install sysutils/ovmf and set
+bios='ovmf'
+in your domU config
+
+===========================================================================
Index: pkgsrc/sysutils/xentools420/MESSAGE.NetBSD
diff -u /dev/null pkgsrc/sysutils/xentools420/MESSAGE.NetBSD:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/MESSAGE.NetBSD  Fri Aug 22 09:00:12 2025
@@ -0,0 +1,17 @@
+===========================================================================
+$NetBSD: MESSAGE.NetBSD,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+Please ensure that the Xen-specific devices needed by xend(8) exist:
+
+       cd /dev && sh MAKEDEV xen
+
+There are example configuration files for setting up a guest domain in:
+
+       ${EGDIR}/
+
+Please also refer to the the "NetBSD/xen How-To" for more information on
+creating a Xen setup:
+
+       http://www.NetBSD.org/ports/xen/howto.html
+
+===========================================================================
Index: pkgsrc/sysutils/xentools420/Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/Makefile        Fri Aug 22 09:00:12 2025
@@ -0,0 +1,251 @@
+# $NetBSD: Makefile,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+#
+# VERSION is set in version.mk as it is shared with other packages
+#PKGREVISION=        1
+.include        "version.mk"
+PKGNAME=               xentools420-${VERSION:S/-//g}
+
+CATEGORIES=            sysutils
+
+MAINTAINER=            bouyer%NetBSD.org@localhost
+HOMEPAGE=              https://xenproject.org/
+COMMENT=               Userland Tools for Xen 4.20.x
+LICENSE=               gnu-gpl-v2
+
+# XXX add version check: Xen requires dev86 >= 0.16.14
+TOOL_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware
+.if !exists(/usr/bin/iasl)
+TOOL_DEPENDS+= acpica-utils-[0-9]*:../../sysutils/acpica-utils
+.endif
+
+TOOL_DEPENDS+=  ninja-build-[0-9]*:../../devel/ninja-build
+TOOL_DEPENDS+=  ${PYPKGPREFIX}-setuptools-[0-9]*:../../devel/py-setuptools
+PYTHON_VERSIONS_INCOMPATIBLE=  27
+
+PKG_SYSCONFSUBDIR=     xen
+
+ONLY_FOR_PLATFORM+=    NetBSD-1[0-9]*-x86_64
+ONLY_FOR_PLATFORM+=    NetBSD-9.99.*-x86_64
+ONLY_FOR_PLATFORM+=    NetBSD-9.[1-9]-x86_64
+ONLY_FOR_PLATFORM+=    NetBSD-9.[1-9]_*-x86_64
+ONLY_FOR_PLATFORM+=    NetBSD-9.0_STABLE-x86_64
+
+SSP_SUPPORTED=         no
+MKPIE_SUPPORTED=       no
+
+CONFLICTS+=            libxen-[0-9]*
+CONFLICTS+=            xenstoretools-[0-9]*
+
+CHECK_PORTABILITY_SKIP=        tools/examples/* \
+                       tools/qemu-xen/scripts/qemu-binfmt-conf.sh
+CHECK_RELRO_SKIP=      libexec/xen/boot/hvmloader
+CHECK_RELRO_SKIP+=     libexec/xen/boot/xen-shim
+CHECK_RELRO_SKIP+=     lib/debug${PREFIX}/libexec/xen/boot/xen-shim-syms
+CHECK_RELRO_SKIP+=     libexec/xen/lib/libfdt.a
+
+CHECK_SHLIBS_SKIP+=    libexec/xen/bin/qemu-system-i386
+
+EGDIR=                 ${PREFIX}/share/examples/xen
+MESSAGE_SUBST+=                EGDIR=${EGDIR}
+
+USE_TOOLS+=            pod2man gmake pkg-config makeinfo perl bash cmake gsed bison
+USE_LANGUAGES=         c c++
+
+GNU_CONFIGURE=         YES
+CONFIGURE_ARGS+=       --enable-rpath --disable-golang
+CONFIGURE_ARGS+=       --sysconfdir=${PKG_SYSCONFBASE}
+CONFIGURE_ARGS+=       --enable-ipxe
+CONFIGURE_ARGS+=       --with-system-ovmf=${PREFIX}/share/ovmf/OVMFX64.fd
+
+MAKE_ENV+=             PREFIX=${prefix:Q} WRKSRC=${WRKSRC}
+MAKE_ENV+=             APPEND_LIB=${LDFLAGS:Q}
+MAKE_ENV+=             XEN_EXAMPLES_DIR=${EGDIR}
+MAKE_ENV+=             MV=${MV:Q} CP=${CP:Q}
+MAKE_ENV+=             PYTHON=${PYTHONBIN:Q} PYTHON_COMMAND=${PYTHONBIN:Q}
+MAKE_ENV+=             SED=${SED:Q}
+MAKE_ENV+=             V=YES
+MAKE_ENV+=             BARE_CPP="gcc -E"
+#MAKE_ENV+=            NO_WERROR=1
+
+#BUILDLINK_TRANSFORM+= rm:-Werror
+
+PY_PATCHPLIST=         yes
+REPLACE_PYTHON+=       tools/python/scripts/convert-legacy-stream
+REPLACE_PYTHON+=       tools/python/scripts/verify-stream-v2
+REPLACE_PYTHON+=       tools/xenmon/xenmon.py tools/misc/xencov_split
+
+REPLACE_PERL+=         tools/firmware/rombios/makesym.perl
+REPLACE_PERL+=         tools/qemu-xen/scripts/get_maintainer.pl
+REPLACE_PERL+=         tools/qemu-xen/scripts/checkpatch.pl
+
+SUBST_CLASSES+=                conf
+SUBST_STAGE.conf=      pre-configure
+SUBST_FILES.conf=      docs/misc/block-scripts.txt
+SUBST_FILES.conf+=     docs/misc/vtd.txt
+SUBST_SED.conf=                -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
+
+XEND_SCRIPTS=          block vif-bridge vif-ip qemu-ifup hotplugpath.sh locking.sh
+
+SUBST_CLASSES+=                getopt
+SUBST_STAGE.getopt=    pre-configure
+SUBST_MESSAGE.getopt=  Fixing getopt_long_only
+SUBST_FILES.getopt+=   tools/fuzz/x86_instruction_emulator/afl-harness.c
+SUBST_SED.getopt+=     -e 's,getopt_long_only,getopt_long,'
+
+OPSYSVARS+=            PROCPATH
+PROCPATH.NetBSD=       /kern
+PROCPATH.*=            /proc
+
+.include "../../mk/bsd.prefs.mk"
+
+.if ${OPSYS} == "NetBSD"
+MESSAGE_SRC=           ${.CURDIR}/MESSAGE ${.CURDIR}/MESSAGE.NetBSD
+.endif
+
+RCD_SCRIPTS=           xen-watchdog xencommons xendomains
+FILES_SUBST+=          RCD_INTERPRETER=${PYTHONBIN:Q}
+FILES_SUBST+=          PROCPATH=${PROCPATH:Q}
+FILES_SUBST+=          PKG_SYSCONFDIR=${PKG_SYSCONFDIR}
+FILES_SUBST+=          PREFIX=${PREFIX}
+
+CONF_FILES+=           ${EGDIR}/xl.conf ${PKG_SYSCONFDIR}/xl.conf
+CONF_FILES+=           ${EGDIR}/oxenstored.conf ${PKG_SYSCONFDIR}/oxenstored.conf
+
+OWN_DIRS=              ${PKG_SYSCONFDIR}/scripts ${VARBASE}/log/xen
+
+.for s in ${XEND_SCRIPTS}
+CONF_FILES_PERMS+=     ${EGDIR}/scripts/${s} ${PKG_SYSCONFDIR}/scripts/${s} \
+                       ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
+.endfor
+
+post-extract:
+       ${MV} ${WRKDIR}/${QEMU_DIST} ${WRKSRC}/tools/qemu-xen
+#${MV} ${WRKDIR}/${QEMUTRAD_DIST} ${WRKSRC}/tools/qemu-xen-traditional
+
+pre-build:
+       rm -f ${WRKSRC}/check/check_x11_devel
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xenstore-chmod.1.pod |\
+           pod2man -n xenstore-chmod >${WRKDIR}/xenstore-chmod.1
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xenstore-ls.1.pod |\
+           pod2man -n xenstore-ls >${WRKDIR}/xenstore-ls.1
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xenstore.1.pod |\
+           pod2man -n xenstore >${WRKDIR}/xenstore.1
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xentop.1.pod |\
+           pod2man -n xentop >${WRKDIR}/xentop.1
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xentrace.8.pod |\
+           pod2man -n xentrace >${WRKDIR}/xentrace.8
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xl.cfg.5.pod.in |\
+           pod2man -n xl.cfg >${WRKDIR}/xl.cfg.5
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xl.conf.5.pod |\
+           pod2man -n xl.conf >${WRKDIR}/xl.conf.5
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xl.1.pod.in |\
+           pod2man -n xl >${WRKDIR}/xl.1
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xlcpupool.cfg.5.pod |\
+           pod2man -n xlcpupool.cfg >${WRKDIR}/xlcpupool.cfg.5
+       ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
+               ${WRKSRC}/docs/man/xl-disk-configuration.5.pod |\
+           pod2man -n xl-disk-configuration >${WRKDIR}/xl-disk-configuration.5
+
+INSTALLATION_DIRS=     ${EGDIR} ${PKGMANDIR}/man1 ${PKGMANDIR}/man5
+INSTALLATION_DIRS+=    ${PKGMANDIR}/man8 share/doc/xen
+INSTALLATION_DIRS+=    ${PYSITELIB}
+
+BUILD_DEFS+=           VARBASE
+
+do-build:
+       cd ${WRKSRC} && ${BUILD_MAKE_CMD} V=1 build-tools
+       cd ${WRKSRC} && ${BUILD_MAKE_CMD} build-docs
+
+do-install:
+       cd ${WRKSRC} && ${BUILD_MAKE_CMD} DESTDIR=${DESTDIR} install-tools
+       cd ${WRKSRC} && ${BUILD_MAKE_CMD} DESTDIR=${DESTDIR} install-docs
+
+post-install:
+       ${INSTALL_MAN} ${WRKDIR}/xenstore-chmod.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+       ${INSTALL_MAN} ${WRKDIR}/xenstore-ls.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+       ${INSTALL_MAN} ${WRKDIR}/xenstore.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+       ${INSTALL_MAN} ${WRKDIR}/xentop.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+       ${INSTALL_MAN} ${WRKDIR}/xentrace.8 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man8
+       ${INSTALL_MAN} ${WRKDIR}/xl.cfg.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
+       ${INSTALL_MAN} ${WRKDIR}/xl.conf.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
+       ${INSTALL_MAN} ${WRKDIR}/xl.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
+       ${INSTALL_MAN} ${WRKDIR}/xlcpupool.cfg.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
+.for f in \
+    gamd-ucode-container.txt       gqemu-backends.txt \
+    gblock-scripts.txt             gqemu-deprivilege.txt \
+    gconsole.txt                   gstubdom.txt \
+    gcrashdb.txt                   gvtd-pi.txt \
+    gdistro_mapping.txt            gvtd.txt \
+    gdump-core-format.txt          gvtpm-platforms.txt \
+    ggrant-tables.txt              gxen-error-handling.txt \
+    gkconfig-language.txt          gxenmon.txt \
+    gkconfig.txt                   gxenpaging.txt \
+    gkexec_and_kdump.txt           gxenstore-ring.txt \
+    glibxl_memory.txt              gxenstore.txt \
+    gprintk-formats.txt            gxsm-flask.txt \
+       ${INSTALL_DATA} ${WRKSRC}/docs/misc/$f ${DESTDIR}${PREFIX}/share/doc/xen
+.endfor
+
+.if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 069900
+CPPFLAGS+=     -Dshm_open=open -Dshm_unlink=unlink
+.endif
+
+.include "../../mk/compiler.mk"
+EXTRA_CFLAGS+= -Wno-error=char-subscripts \
+       -Wno-error=declaration-after-statement \
+       -Wno-error=maybe-uninitialized \
+       -Wno-error=unused-value
+EXTRA_HOSTCFLAGS+=     -Wno-error=char-subscripts \
+       -Wno-error=declaration-after-statement \
+       -Wno-error=unused-value
+.if !empty(PKGSRC_COMPILER:Mclang)
+EXTRA_HOSTCFLAGS+=     -Wno-error=ignored-attributes
+EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \
+               -Wno-error=tautological-compare -Wno-error=null-dereference \
+               -Wno-error=empty-body -Wno-error=self-assign \
+               -Wno-error=sometimes-uninitialized \
+               -Wno-error=unused-function -Wno-error=format \
+               -Wno-error=unused-const-variable \
+               -Wno-error=gnu-designator -Wno-error=uninitialized \
+               -Wno-error=parentheses-equality \
+               -Wno-error=enum-conversion \
+               -Wno-error=address-of-packed-member
+BUILDLINK_TRANSFORM+=  rm:-falign-jumps=1 rm:-falign-loops=1 \
+                       rm:-mpreferred-stack-boundary=2
+.endif
+
+MAKE_ENV+=     EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:M*:Q} TARGET_CC=${TARGET_CC}
+
+# \todo Considering installing xen-command-line(7), perhaps by pandoc,
+# and perhaps by some mechanism that does not cause portability
+# issues.
+
+.include "../../lang/python/batteries-included.mk"
+.include "../../lang/python/application.mk"
+.include "../../lang/python/extension.mk"
+# SDL2 is forced off via a patch.  With that removed and the bl3
+# uncommented, the build completes with one additional file.  However,
+# there is no reason to add SDL2.
+#.include "../../devel/SDL2/buildlink3.mk"
+.include "../../lang/ocaml/buildlink3.mk"
+.include "../../devel/ocaml-findlib/buildlink3.mk"
+BUILDLINK_API_DEPENDS.pciutils+=       pciutils>=3.8
+.include "../../sysutils/pciutils/buildlink3.mk"
+.include "../../archivers/zstd/buildlink3.mk"
+.include "../../devel/glib2/buildlink3.mk"
+.include "../../devel/yajl/buildlink3.mk"
+.include "../../devel/argp/buildlink3.mk"
+.include "../../security/libgcrypt/buildlink3.mk"
+.include "../../x11/pixman/buildlink3.mk"
+
+.include "../../mk/curses.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
Index: pkgsrc/sysutils/xentools420/PLIST
diff -u /dev/null pkgsrc/sysutils/xentools420/PLIST:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/PLIST   Fri Aug 22 09:00:12 2025
@@ -0,0 +1,912 @@
+@comment $NetBSD: PLIST,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+${PYSITELIB}/grub/ExtLinuxConf.py
+${PYSITELIB}/grub/ExtLinuxConf.pyc
+${PYSITELIB}/grub/GrubConf.py
+${PYSITELIB}/grub/GrubConf.pyc
+${PYSITELIB}/grub/LiloConf.py
+${PYSITELIB}/grub/LiloConf.pyc
+${PYSITELIB}/grub/__init__.py
+${PYSITELIB}/grub/__init__.pyc
+${PYSITELIB}/pygrub-0.7-py${PYVERSSUFFIX}.egg-info/PKG-INFO
+${PYSITELIB}/pygrub-0.7-py${PYVERSSUFFIX}.egg-info/SOURCES.txt
+${PYSITELIB}/pygrub-0.7-py${PYVERSSUFFIX}.egg-info/dependency_links.txt
+${PYSITELIB}/pygrub-0.7-py${PYVERSSUFFIX}.egg-info/top_level.txt
+${PYSITELIB}/xen-3.0-py${PYVERSSUFFIX}.egg-info/PKG-INFO
+${PYSITELIB}/xen-3.0-py${PYVERSSUFFIX}.egg-info/SOURCES.txt
+${PYSITELIB}/xen-3.0-py${PYVERSSUFFIX}.egg-info/dependency_links.txt
+${PYSITELIB}/xen-3.0-py${PYVERSSUFFIX}.egg-info/top_level.txt
+${PYSITELIB}/xen/__init__.py
+${PYSITELIB}/xen/__init__.pyc
+${PYSITELIB}/xen/lowlevel/__init__.py
+${PYSITELIB}/xen/lowlevel/__init__.pyc
+${PYSITELIB}/xen/lowlevel/xc.so
+${PYSITELIB}/xen/lowlevel/xs.so
+${PYSITELIB}/xen/migration/__init__.py
+${PYSITELIB}/xen/migration/__init__.pyc
+${PYSITELIB}/xen/migration/legacy.py
+${PYSITELIB}/xen/migration/legacy.pyc
+${PYSITELIB}/xen/migration/libxc.py
+${PYSITELIB}/xen/migration/libxc.pyc
+${PYSITELIB}/xen/migration/libxl.py
+${PYSITELIB}/xen/migration/libxl.pyc
+${PYSITELIB}/xen/migration/public.py
+${PYSITELIB}/xen/migration/public.pyc
+${PYSITELIB}/xen/migration/tests.py
+${PYSITELIB}/xen/migration/tests.pyc
+${PYSITELIB}/xen/migration/verify.py
+${PYSITELIB}/xen/migration/verify.pyc
+${PYSITELIB}/xen/migration/xl.py
+${PYSITELIB}/xen/migration/xl.pyc
+${PYSITELIB}/xen/util.py
+${PYSITELIB}/xen/util.pyc
+${PYSITELIB}/xenfsimage.so
+bin/xen-cpuid
+bin/xen-detect
+bin/xenalyze
+bin/xencov_split
+bin/xenstore
+bin/xenstore-chmod
+bin/xenstore-control
+bin/xenstore-exists
+bin/xenstore-list
+bin/xenstore-ls
+bin/xenstore-read
+bin/xenstore-rm
+bin/xenstore-watch
+bin/xenstore-write
+include/_libxl_types.h
+include/_libxl_types_json.h
+include/libxl.h
+include/libxl_event.h
+include/libxl_json.h
+include/libxl_utils.h
+include/libxl_uuid.h
+include/libxlutil.h
+include/xen-barrier.h
+include/xen/COPYING
+include/xen/arch-arm.h
+include/xen/arch-arm/hvm/save.h
+include/xen/arch-arm/smccc.h
+include/xen/arch-ppc.h
+include/xen/arch-riscv.h
+include/xen/arch-x86/cpufeatureset.h
+include/xen/arch-x86/cpuid.h
+include/xen/arch-x86/guest-acpi.h
+include/xen/arch-x86/hvm/save.h
+include/xen/arch-x86/hvm/start_info.h
+include/xen/arch-x86/pmu.h
+include/xen/arch-x86/xen-mca.h
+include/xen/arch-x86/xen-x86_32.h
+include/xen/arch-x86/xen-x86_64.h
+include/xen/arch-x86/xen.h
+include/xen/arch-x86_32.h
+include/xen/arch-x86_64.h
+include/xen/argo.h
+include/xen/callback.h
+include/xen/device_tree_defs.h
+include/xen/dom0_ops.h
+include/xen/domctl.h
+include/xen/elfnote.h
+include/xen/errno.h
+include/xen/event_channel.h
+include/xen/features.h
+include/xen/foreign/arm32.h
+include/xen/foreign/arm64.h
+include/xen/foreign/x86_32.h
+include/xen/foreign/x86_64.h
+include/xen/grant_table.h
+include/xen/hvm/dm_op.h
+include/xen/hvm/e820.h
+include/xen/hvm/hvm_info_table.h
+include/xen/hvm/hvm_op.h
+include/xen/hvm/hvm_vcpu.h
+include/xen/hvm/hvm_xs_strings.h
+include/xen/hvm/ioreq.h
+include/xen/hvm/params.h
+include/xen/hvm/pvdrivers.h
+include/xen/hvm/save.h
+include/xen/hypfs.h
+include/xen/io/9pfs.h
+include/xen/io/blkif.h
+include/xen/io/cameraif.h
+include/xen/io/console.h
+include/xen/io/displif.h
+include/xen/io/fbif.h
+include/xen/io/fsif.h
+include/xen/io/kbdif.h
+include/xen/io/libxenvchan.h
+include/xen/io/netif.h
+include/xen/io/pciif.h
+include/xen/io/protocols.h
+include/xen/io/pvcalls.h
+include/xen/io/ring.h
+include/xen/io/sndif.h
+include/xen/io/tpmif.h
+include/xen/io/usbif.h
+include/xen/io/vscsiif.h
+include/xen/io/xenbus.h
+include/xen/io/xs_wire.h
+include/xen/kexec.h
+include/xen/memory.h
+include/xen/nmi.h
+include/xen/physdev.h
+include/xen/platform.h
+include/xen/pmu.h
+include/xen/sched.h
+include/xen/sys/evtchn.h
+include/xen/sys/privcmd.h
+include/xen/sysctl.h
+include/xen/tmem.h
+include/xen/trace.h
+include/xen/vcpu.h
+include/xen/version.h
+include/xen/vm_event.h
+include/xen/xen-compat.h
+include/xen/xen.h
+include/xen/xencomm.h
+include/xen/xenoprof.h
+include/xen/xsm/flask_op.h
+include/xen_list.h
+include/xencall.h
+include/xenctrl.h
+include/xenctrl_compat.h
+include/xendevicemodel.h
+include/xenevtchn.h
+include/xenforeignmemory.h
+include/xenfsimage.h
+include/xenfsimage_grub.h
+include/xenfsimage_plugin.h
+include/xengnttab.h
+include/xenguest.h
+include/xenhypfs.h
+include/xenstat.h
+include/xenstore-compat/xs.h
+include/xenstore-compat/xs_lib.h
+include/xenstore.h
+include/xenstore_lib.h
+include/xentoolcore.h
+include/xentoollog.h
+include/xs.h
+include/xs_lib.h
+lib/debug${LOCALBASE}/libexec/xen/boot/xen-shim-syms
+lib/libxencall.a
+lib/libxencall.so
+lib/libxencall.so.1
+lib/libxencall.so.1.3
+lib/libxenctrl.a
+lib/libxenctrl.so
+lib/libxenctrl.so.4.20
+lib/libxenctrl.so.4.20.0
+lib/libxendevicemodel.a
+lib/libxendevicemodel.so
+lib/libxendevicemodel.so.1
+lib/libxendevicemodel.so.1.4
+lib/libxenevtchn.a
+lib/libxenevtchn.so
+lib/libxenevtchn.so.1
+lib/libxenevtchn.so.1.2
+lib/libxenforeignmemory.a
+lib/libxenforeignmemory.so
+lib/libxenforeignmemory.so.1
+lib/libxenforeignmemory.so.1.4
+lib/libxenfsimage.so
+lib/libxenfsimage.so.4.20
+lib/libxenfsimage.so.4.20.0
+lib/libxengnttab.a
+lib/libxengnttab.so
+lib/libxengnttab.so.1
+lib/libxengnttab.so.1.2
+lib/libxenguest.a
+lib/libxenguest.so
+lib/libxenguest.so.4.20
+lib/libxenguest.so.4.20.0
+lib/libxenhypfs.a
+lib/libxenhypfs.so
+lib/libxenhypfs.so.1
+lib/libxenhypfs.so.1.0
+lib/libxenlight.a
+lib/libxenlight.so
+lib/libxenlight.so.4.20
+lib/libxenlight.so.4.20.0
+lib/libxenstat.a
+lib/libxenstat.so
+lib/libxenstat.so.4.20
+lib/libxenstat.so.4.20.0
+lib/libxenstore.a
+lib/libxenstore.so
+lib/libxenstore.so.4
+lib/libxenstore.so.4.0
+lib/libxentoolcore.a
+lib/libxentoolcore.so
+lib/libxentoolcore.so.1
+lib/libxentoolcore.so.1.0
+lib/libxentoollog.a
+lib/libxentoollog.so
+lib/libxentoollog.so.1
+lib/libxentoollog.so.1.0
+lib/libxlutil.a
+lib/libxlutil.so
+lib/libxlutil.so.4.20
+lib/libxlutil.so.4.20.0
+lib/ocaml/site-lib/xenbus/META
+lib/ocaml/site-lib/xenbus/dllxenbus_stubs.so
+lib/ocaml/site-lib/xenbus/libxenbus_stubs.a
+lib/ocaml/site-lib/xenbus/xenbus.a
+lib/ocaml/site-lib/xenbus/xenbus.cma
+lib/ocaml/site-lib/xenbus/xenbus.cmi
+lib/ocaml/site-lib/xenbus/xenbus.cmo
+lib/ocaml/site-lib/xenbus/xenbus.cmx
+lib/ocaml/site-lib/xenbus/xenbus.cmxa
+lib/ocaml/site-lib/xenctrl/META
+lib/ocaml/site-lib/xenctrl/dllxenctrl_stubs.so
+lib/ocaml/site-lib/xenctrl/libxenctrl_stubs.a
+lib/ocaml/site-lib/xenctrl/xenctrl.a
+lib/ocaml/site-lib/xenctrl/xenctrl.cma
+lib/ocaml/site-lib/xenctrl/xenctrl.cmi
+lib/ocaml/site-lib/xenctrl/xenctrl.cmx
+lib/ocaml/site-lib/xenctrl/xenctrl.cmxa
+lib/ocaml/site-lib/xeneventchn/META
+lib/ocaml/site-lib/xeneventchn/dllxeneventchn_stubs.so
+lib/ocaml/site-lib/xeneventchn/libxeneventchn_stubs.a
+lib/ocaml/site-lib/xeneventchn/xeneventchn.a
+lib/ocaml/site-lib/xeneventchn/xeneventchn.cma
+lib/ocaml/site-lib/xeneventchn/xeneventchn.cmi
+lib/ocaml/site-lib/xeneventchn/xeneventchn.cmx
+lib/ocaml/site-lib/xeneventchn/xeneventchn.cmxa
+lib/ocaml/site-lib/xenmmap/META
+lib/ocaml/site-lib/xenmmap/dllxenmmap_stubs.so
+lib/ocaml/site-lib/xenmmap/libxenmmap_stubs.a
+lib/ocaml/site-lib/xenmmap/xenmmap.a
+lib/ocaml/site-lib/xenmmap/xenmmap.cma
+lib/ocaml/site-lib/xenmmap/xenmmap.cmi
+lib/ocaml/site-lib/xenmmap/xenmmap.cmx
+lib/ocaml/site-lib/xenmmap/xenmmap.cmxa
+lib/ocaml/site-lib/xenstore/META
+lib/ocaml/site-lib/xenstore/xenstore.a
+lib/ocaml/site-lib/xenstore/xenstore.cma
+lib/ocaml/site-lib/xenstore/xenstore.cmi
+lib/ocaml/site-lib/xenstore/xenstore.cmo
+lib/ocaml/site-lib/xenstore/xenstore.cmx
+lib/ocaml/site-lib/xenstore/xenstore.cmxa
+lib/ocaml/site-lib/xsd_glue/META
+lib/ocaml/site-lib/xsd_glue/plugin_interface_v1.a
+lib/ocaml/site-lib/xsd_glue/plugin_interface_v1.cma
+lib/ocaml/site-lib/xsd_glue/plugin_interface_v1.cmi
+lib/ocaml/site-lib/xsd_glue/plugin_interface_v1.cmxa
+lib/pkgconfig/xencall.pc
+lib/pkgconfig/xencontrol.pc
+lib/pkgconfig/xendevicemodel.pc
+lib/pkgconfig/xenevtchn.pc
+lib/pkgconfig/xenforeignmemory.pc
+lib/pkgconfig/xengnttab.pc
+lib/pkgconfig/xenguest.pc
+lib/pkgconfig/xenhypfs.pc
+lib/pkgconfig/xenlight.pc
+lib/pkgconfig/xenstat.pc
+lib/pkgconfig/xenstore.pc
+lib/pkgconfig/xentoolcore.pc
+lib/pkgconfig/xentoollog.pc
+lib/pkgconfig/xlutil.pc
+lib/xenfsimage/ext2fs/fsimage.so
+lib/xenfsimage/fat/fsimage.so
+lib/xenfsimage/iso9660/fsimage.so
+lib/xenfsimage/reiserfs/fsimage.so
+lib/xenfsimage/ufs/fsimage.so
+lib/xenfsimage/xfs/fsimage.so
+lib/xenfsimage/zfs/fsimage.so
+libexec/xen/bin/convert-legacy-stream
+libexec/xen/bin/libxl-save-helper
+libexec/xen/bin/lsevtchn
+libexec/xen/bin/pygrub
+libexec/xen/bin/qemu-edid
+libexec/xen/bin/qemu-img
+libexec/xen/bin/qemu-io
+libexec/xen/bin/qemu-nbd
+libexec/xen/bin/qemu-storage-daemon
+libexec/xen/bin/qemu-system-i386
+libexec/xen/bin/readnotes
+libexec/xen/bin/verify-stream-v2
+libexec/xen/bin/xen-9pfsd
+libexec/xen/bin/xen-init-dom0
+libexec/xen/bin/xenconsole
+libexec/xen/bin/xenctx
+libexec/xen/bin/xenpaging
+libexec/xen/boot/hvmloader
+libexec/xen/boot/ipxe.bin
+libexec/xen/boot/seabios.bin
+libexec/xen/boot/xen-shim
+libexec/xen/include/fdt.h
+libexec/xen/include/libfdt.h
+libexec/xen/include/libfdt_env.h
+libexec/xen/include/qemu-plugin.h
+libexec/xen/lib/libfdt.a
+libexec/xen/lib/pkgconfig/libfdt.pc
+libexec/xen/ocaml/xsd_glue/xenctrl_plugin/domain_getinfo_v1.cmxs
+man/man1/xenhypfs.1
+man/man1/xenstore-chmod.1
+man/man1/xenstore-ls.1
+man/man1/xenstore-read.1
+man/man1/xenstore-write.1
+man/man1/xenstore.1
+man/man1/xentop.1
+man/man1/xl.1
+man/man5/xl-disk-configuration.5
+man/man5/xl-network-configuration.5
+man/man5/xl-pci-configuration.5
+man/man5/xl.cfg.5
+man/man5/xl.conf.5
+man/man5/xlcpupool.cfg.5
+man/man7/xen-pci-device-reservations.7
+man/man7/xen-pv-channel.7
+man/man7/xen-tscmode.7
+man/man7/xen-vtpm.7
+man/man7/xen-vtpmmgr.7
+man/man7/xl-numa-placement.7
+man/man8/xentrace.8
+man/man8/xenwatchdogd.8
+sbin/flask-get-bool
+sbin/flask-getenforce
+sbin/flask-label-pci
+sbin/flask-loadpolicy
+sbin/flask-set-bool
+sbin/flask-setenforce
+sbin/gdbsx
+sbin/oxenstored
+sbin/xen-access
+sbin/xen-diag
+sbin/xen-hptool
+sbin/xen-hvmcrash
+sbin/xen-hvmctx
+sbin/xen-kdd
+sbin/xen-livepatch
+sbin/xen-lowmemd
+sbin/xen-mceinj
+sbin/xen-memshare
+sbin/xen-mfndump
+sbin/xen-ucode
+sbin/xen-vmtrace
+sbin/xenbaked
+sbin/xenconsoled
+sbin/xencov
+sbin/xenhypfs
+sbin/xenlockprof
+sbin/xenmon
+sbin/xenperf
+sbin/xenpm
+sbin/xenpmd
+sbin/xenstored
+sbin/xentop
+sbin/xentrace
+sbin/xentrace_setmask
+sbin/xentrace_setsize
+sbin/xenwatchdogd
+sbin/xl
+share/doc/xen/html/hypercall/arm/include,public,arch-arm,hvm,save.h.html
+share/doc/xen/html/hypercall/arm/include,public,arch-arm,smccc.h.html
+share/doc/xen/html/hypercall/arm/include,public,arch-arm.h.html
+share/doc/xen/html/hypercall/arm/include,public,argo.h.html
+share/doc/xen/html/hypercall/arm/include,public,callback.h.html
+share/doc/xen/html/hypercall/arm/include,public,device_tree_defs.h.html
+share/doc/xen/html/hypercall/arm/include,public,dom0_ops.h.html
+share/doc/xen/html/hypercall/arm/include,public,domctl.h.html
+share/doc/xen/html/hypercall/arm/include,public,elfnote.h.html
+share/doc/xen/html/hypercall/arm/include,public,errno.h.html
+share/doc/xen/html/hypercall/arm/include,public,event_channel.h.html
+share/doc/xen/html/hypercall/arm/include,public,features.h.html
+share/doc/xen/html/hypercall/arm/include,public,grant_table.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,dm_op.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,e820.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,hvm_info_table.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,hvm_op.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,hvm_vcpu.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,hvm_xs_strings.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,ioreq.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,params.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,pvdrivers.h.html
+share/doc/xen/html/hypercall/arm/include,public,hvm,save.h.html
+share/doc/xen/html/hypercall/arm/include,public,hypfs.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,9pfs.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,blkif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,cameraif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,console.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,displif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,fbif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,fsif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,kbdif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,libxenvchan.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,netif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,pciif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,protocols.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,pvcalls.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,ring.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,sndif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,tpmif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,usbif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,vscsiif.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,xenbus.h.html
+share/doc/xen/html/hypercall/arm/include,public,io,xs_wire.h.html
+share/doc/xen/html/hypercall/arm/include,public,kexec.h.html
+share/doc/xen/html/hypercall/arm/include,public,memory.h.html
+share/doc/xen/html/hypercall/arm/include,public,nmi.h.html
+share/doc/xen/html/hypercall/arm/include,public,physdev.h.html
+share/doc/xen/html/hypercall/arm/include,public,platform.h.html
+share/doc/xen/html/hypercall/arm/include,public,pmu.h.html
+share/doc/xen/html/hypercall/arm/include,public,sched.h.html
+share/doc/xen/html/hypercall/arm/include,public,sysctl.h.html
+share/doc/xen/html/hypercall/arm/include,public,tmem.h.html
+share/doc/xen/html/hypercall/arm/include,public,trace.h.html
+share/doc/xen/html/hypercall/arm/include,public,vcpu.h.html
+share/doc/xen/html/hypercall/arm/include,public,version.h.html
+share/doc/xen/html/hypercall/arm/include,public,vm_event.h.html
+share/doc/xen/html/hypercall/arm/include,public,xen-compat.h.html
+share/doc/xen/html/hypercall/arm/include,public,xen.h.html
+share/doc/xen/html/hypercall/arm/include,public,xencomm.h.html
+share/doc/xen/html/hypercall/arm/include,public,xenoprof.h.html
+share/doc/xen/html/hypercall/arm/include,public,xsm,flask_op.h.html
+share/doc/xen/html/hypercall/arm/include,xen,errno.h.html
+share/doc/xen/html/hypercall/arm/index.html
+share/doc/xen/html/hypercall/index.html
+share/doc/xen/html/hypercall/ppc/include,public,arch-ppc.h.html
+share/doc/xen/html/hypercall/ppc/include,public,argo.h.html
+share/doc/xen/html/hypercall/ppc/include,public,callback.h.html
+share/doc/xen/html/hypercall/ppc/include,public,device_tree_defs.h.html
+share/doc/xen/html/hypercall/ppc/include,public,dom0_ops.h.html
+share/doc/xen/html/hypercall/ppc/include,public,domctl.h.html
+share/doc/xen/html/hypercall/ppc/include,public,elfnote.h.html
+share/doc/xen/html/hypercall/ppc/include,public,errno.h.html
+share/doc/xen/html/hypercall/ppc/include,public,event_channel.h.html
+share/doc/xen/html/hypercall/ppc/include,public,features.h.html
+share/doc/xen/html/hypercall/ppc/include,public,grant_table.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,dm_op.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,e820.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,hvm_info_table.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,hvm_op.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,hvm_vcpu.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,hvm_xs_strings.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,ioreq.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,params.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,pvdrivers.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hvm,save.h.html
+share/doc/xen/html/hypercall/ppc/include,public,hypfs.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,9pfs.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,blkif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,cameraif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,console.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,displif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,fbif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,fsif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,kbdif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,libxenvchan.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,netif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,pciif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,protocols.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,pvcalls.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,ring.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,sndif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,tpmif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,usbif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,vscsiif.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,xenbus.h.html
+share/doc/xen/html/hypercall/ppc/include,public,io,xs_wire.h.html
+share/doc/xen/html/hypercall/ppc/include,public,kexec.h.html
+share/doc/xen/html/hypercall/ppc/include,public,memory.h.html
+share/doc/xen/html/hypercall/ppc/include,public,nmi.h.html
+share/doc/xen/html/hypercall/ppc/include,public,physdev.h.html
+share/doc/xen/html/hypercall/ppc/include,public,platform.h.html
+share/doc/xen/html/hypercall/ppc/include,public,pmu.h.html
+share/doc/xen/html/hypercall/ppc/include,public,sched.h.html
+share/doc/xen/html/hypercall/ppc/include,public,sysctl.h.html
+share/doc/xen/html/hypercall/ppc/include,public,tmem.h.html
+share/doc/xen/html/hypercall/ppc/include,public,trace.h.html
+share/doc/xen/html/hypercall/ppc/include,public,vcpu.h.html
+share/doc/xen/html/hypercall/ppc/include,public,version.h.html
+share/doc/xen/html/hypercall/ppc/include,public,vm_event.h.html
+share/doc/xen/html/hypercall/ppc/include,public,xen-compat.h.html
+share/doc/xen/html/hypercall/ppc/include,public,xen.h.html
+share/doc/xen/html/hypercall/ppc/include,public,xencomm.h.html
+share/doc/xen/html/hypercall/ppc/include,public,xenoprof.h.html
+share/doc/xen/html/hypercall/ppc/include,public,xsm,flask_op.h.html
+share/doc/xen/html/hypercall/ppc/include,xen,errno.h.html
+share/doc/xen/html/hypercall/ppc/index.html
+share/doc/xen/html/hypercall/riscv/include,public,arch-riscv.h.html
+share/doc/xen/html/hypercall/riscv/include,public,argo.h.html
+share/doc/xen/html/hypercall/riscv/include,public,callback.h.html
+share/doc/xen/html/hypercall/riscv/include,public,device_tree_defs.h.html
+share/doc/xen/html/hypercall/riscv/include,public,dom0_ops.h.html
+share/doc/xen/html/hypercall/riscv/include,public,domctl.h.html
+share/doc/xen/html/hypercall/riscv/include,public,elfnote.h.html
+share/doc/xen/html/hypercall/riscv/include,public,errno.h.html
+share/doc/xen/html/hypercall/riscv/include,public,event_channel.h.html
+share/doc/xen/html/hypercall/riscv/include,public,features.h.html
+share/doc/xen/html/hypercall/riscv/include,public,grant_table.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,dm_op.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,e820.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,hvm_info_table.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,hvm_op.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,hvm_vcpu.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,hvm_xs_strings.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,ioreq.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,params.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,pvdrivers.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hvm,save.h.html
+share/doc/xen/html/hypercall/riscv/include,public,hypfs.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,9pfs.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,blkif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,cameraif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,console.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,displif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,fbif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,fsif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,kbdif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,libxenvchan.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,netif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,pciif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,protocols.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,pvcalls.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,ring.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,sndif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,tpmif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,usbif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,vscsiif.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,xenbus.h.html
+share/doc/xen/html/hypercall/riscv/include,public,io,xs_wire.h.html
+share/doc/xen/html/hypercall/riscv/include,public,kexec.h.html
+share/doc/xen/html/hypercall/riscv/include,public,memory.h.html
+share/doc/xen/html/hypercall/riscv/include,public,nmi.h.html
+share/doc/xen/html/hypercall/riscv/include,public,physdev.h.html
+share/doc/xen/html/hypercall/riscv/include,public,platform.h.html
+share/doc/xen/html/hypercall/riscv/include,public,pmu.h.html
+share/doc/xen/html/hypercall/riscv/include,public,sched.h.html
+share/doc/xen/html/hypercall/riscv/include,public,sysctl.h.html
+share/doc/xen/html/hypercall/riscv/include,public,tmem.h.html
+share/doc/xen/html/hypercall/riscv/include,public,trace.h.html
+share/doc/xen/html/hypercall/riscv/include,public,vcpu.h.html
+share/doc/xen/html/hypercall/riscv/include,public,version.h.html
+share/doc/xen/html/hypercall/riscv/include,public,vm_event.h.html
+share/doc/xen/html/hypercall/riscv/include,public,xen-compat.h.html
+share/doc/xen/html/hypercall/riscv/include,public,xen.h.html
+share/doc/xen/html/hypercall/riscv/include,public,xencomm.h.html
+share/doc/xen/html/hypercall/riscv/include,public,xenoprof.h.html
+share/doc/xen/html/hypercall/riscv/include,public,xsm,flask_op.h.html
+share/doc/xen/html/hypercall/riscv/include,xen,errno.h.html
+share/doc/xen/html/hypercall/riscv/index.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86,cpufeatureset.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86,cpuid.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86,guest-acpi.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86,hvm,save.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86,hvm,start_info.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86,pmu.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86,xen-mca.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86,xen-x86_32.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86,xen.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,arch-x86_32.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,argo.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,callback.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,device_tree_defs.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,dom0_ops.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,domctl.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,elfnote.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,errno.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,event_channel.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,features.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,grant_table.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,dm_op.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,e820.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,hvm_info_table.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,hvm_op.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,hvm_vcpu.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,hvm_xs_strings.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,ioreq.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,params.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,pvdrivers.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hvm,save.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,hypfs.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,9pfs.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,blkif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,cameraif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,console.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,displif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,fbif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,fsif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,kbdif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,libxenvchan.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,netif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,pciif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,protocols.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,pvcalls.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,ring.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,sndif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,tpmif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,usbif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,vscsiif.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,xenbus.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,io,xs_wire.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,kexec.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,memory.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,nmi.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,physdev.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,platform.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,pmu.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,sched.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,sysctl.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,tmem.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,trace.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,vcpu.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,version.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,vm_event.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,xen-compat.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,xen.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,xencomm.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,xenoprof.h.html
+share/doc/xen/html/hypercall/x86_32/include,public,xsm,flask_op.h.html
+share/doc/xen/html/hypercall/x86_32/include,xen,errno.h.html
+share/doc/xen/html/hypercall/x86_32/index.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86,cpufeatureset.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86,cpuid.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86,guest-acpi.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86,hvm,save.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86,hvm,start_info.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86,pmu.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86,xen-mca.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86,xen-x86_64.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86,xen.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,arch-x86_64.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,argo.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,callback.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,device_tree_defs.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,dom0_ops.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,domctl.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,elfnote.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,errno.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,event_channel.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,features.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,grant_table.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,dm_op.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,e820.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,hvm_info_table.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,hvm_op.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,hvm_vcpu.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,hvm_xs_strings.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,ioreq.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,params.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,pvdrivers.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hvm,save.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,hypfs.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,9pfs.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,blkif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,cameraif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,console.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,displif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,fbif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,fsif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,kbdif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,libxenvchan.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,netif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,pciif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,protocols.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,pvcalls.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,ring.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,sndif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,tpmif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,usbif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,vscsiif.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,xenbus.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,io,xs_wire.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,kexec.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,memory.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,nmi.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,physdev.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,platform.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,pmu.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,sched.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,sysctl.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,tmem.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,trace.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,vcpu.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,version.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,vm_event.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,xen-compat.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,xen.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,xencomm.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,xenoprof.h.html
+share/doc/xen/html/hypercall/x86_64/include,public,xsm,flask_op.h.html
+share/doc/xen/html/hypercall/x86_64/include,xen,errno.h.html
+share/doc/xen/html/hypercall/x86_64/index.html
+share/doc/xen/html/index.html
+share/doc/xen/html/man/index.html
+share/doc/xen/html/man/xen-pci-device-reservations.7.html
+share/doc/xen/html/man/xen-pv-channel.7.html
+share/doc/xen/html/man/xen-tscmode.7.html
+share/doc/xen/html/man/xen-vtpm.7.html
+share/doc/xen/html/man/xen-vtpmmgr.7.html
+share/doc/xen/html/man/xenhypfs.1.html
+share/doc/xen/html/man/xenstore-chmod.1.html
+share/doc/xen/html/man/xenstore-ls.1.html
+share/doc/xen/html/man/xenstore-read.1.html
+share/doc/xen/html/man/xenstore-write.1.html
+share/doc/xen/html/man/xenstore.1.html
+share/doc/xen/html/man/xentop.1.html
+share/doc/xen/html/man/xentrace.8.html
+share/doc/xen/html/man/xenwatchdogd.8.html
+share/doc/xen/html/man/xl-disk-configuration.5.html
+share/doc/xen/html/man/xl-network-configuration.5.html
+share/doc/xen/html/man/xl-numa-placement.7.html
+share/doc/xen/html/man/xl-pci-configuration.5.html
+share/doc/xen/html/man/xl.1.html
+share/doc/xen/html/man/xl.cfg.5.html
+share/doc/xen/html/man/xl.conf.5.html
+share/doc/xen/html/man/xlcpupool.cfg.5.html
+share/doc/xen/html/misc/amd-ucode-container.txt
+share/doc/xen/html/misc/arm/big.LITTLE.txt
+share/doc/xen/html/misc/arm/booting.txt
+share/doc/xen/html/misc/arm/device-tree/acpi.txt
+share/doc/xen/html/misc/arm/device-tree/booting.txt
+share/doc/xen/html/misc/arm/device-tree/cpupools.txt
+share/doc/xen/html/misc/arm/device-tree/guest.txt
+share/doc/xen/html/misc/arm/device-tree/index.html
+share/doc/xen/html/misc/arm/device-tree/passthrough.txt
+share/doc/xen/html/misc/arm/early-printk.txt
+share/doc/xen/html/misc/arm/index.html
+share/doc/xen/html/misc/arm/overlay.txt
+share/doc/xen/html/misc/arm/passthrough-noiommu.txt
+share/doc/xen/html/misc/arm/passthrough.txt
+share/doc/xen/html/misc/arm/silicon-errata.txt
+share/doc/xen/html/misc/block-scripts.txt
+share/doc/xen/html/misc/console.txt
+share/doc/xen/html/misc/crashdb.txt
+share/doc/xen/html/misc/distro_mapping.txt
+share/doc/xen/html/misc/dump-core-format.txt
+share/doc/xen/html/misc/grant-tables.txt
+share/doc/xen/html/misc/index.html
+share/doc/xen/html/misc/kexec_and_kdump.txt
+share/doc/xen/html/misc/libxl_memory.txt
+share/doc/xen/html/misc/printk-formats.txt
+share/doc/xen/html/misc/qemu-backends.txt
+share/doc/xen/html/misc/riscv/booting.txt
+share/doc/xen/html/misc/riscv/index.html
+share/doc/xen/html/misc/stubdom.txt
+share/doc/xen/html/misc/vtd-pi.txt
+share/doc/xen/html/misc/vtd.txt
+share/doc/xen/html/misc/vtpm-platforms.txt
+share/doc/xen/html/misc/xen-error-handling.txt
+share/doc/xen/html/misc/xenmon.txt
+share/doc/xen/html/misc/xenpaging.txt
+share/doc/xen/html/misc/xenstore-ring.txt
+share/doc/xen/html/misc/xenstore.txt
+share/doc/xen/html/misc/xsm-flask.txt
+share/examples/xen/README
+share/examples/xen/cpupool
+share/examples/xen/oxenstored.conf
+share/examples/xen/scripts/block
+share/examples/xen/scripts/hotplugpath.sh
+share/examples/xen/scripts/locking.sh
+share/examples/xen/scripts/qemu-ifup
+share/examples/xen/scripts/vif-bridge
+share/examples/xen/scripts/vif-ip
+share/examples/xen/xl.bash
+share/examples/xen/xl.conf
+share/examples/xen/xlexample.hvm
+share/examples/xen/xlexample.pvhlinux
+share/examples/xen/xlexample.pvlinux
+share/qemu-xen/applications/qemu.desktop
+share/qemu-xen/icons/hicolor/128x128/apps/qemu.png
+share/qemu-xen/icons/hicolor/16x16/apps/qemu.png
+share/qemu-xen/icons/hicolor/24x24/apps/qemu.png
+share/qemu-xen/icons/hicolor/256x256/apps/qemu.png
+share/qemu-xen/icons/hicolor/32x32/apps/qemu.bmp
+share/qemu-xen/icons/hicolor/32x32/apps/qemu.png
+share/qemu-xen/icons/hicolor/48x48/apps/qemu.png
+share/qemu-xen/icons/hicolor/512x512/apps/qemu.png
+share/qemu-xen/icons/hicolor/64x64/apps/qemu.png
+share/qemu-xen/icons/hicolor/scalable/apps/qemu.svg
+share/qemu-xen/qemu/QEMU,cgthree.bin
+share/qemu-xen/qemu/QEMU,tcx.bin
+share/qemu-xen/qemu/bamboo.dtb
+share/qemu-xen/qemu/bios-256k.bin
+share/qemu-xen/qemu/bios-microvm.bin
+share/qemu-xen/qemu/bios.bin
+share/qemu-xen/qemu/canyonlands.dtb
+share/qemu-xen/qemu/edk2-aarch64-code.fd
+share/qemu-xen/qemu/edk2-arm-code.fd
+share/qemu-xen/qemu/edk2-arm-vars.fd
+share/qemu-xen/qemu/edk2-i386-code.fd
+share/qemu-xen/qemu/edk2-i386-secure-code.fd
+share/qemu-xen/qemu/edk2-i386-vars.fd
+share/qemu-xen/qemu/edk2-licenses.txt
+share/qemu-xen/qemu/edk2-riscv-code.fd
+share/qemu-xen/qemu/edk2-riscv-vars.fd
+share/qemu-xen/qemu/edk2-x86_64-code.fd
+share/qemu-xen/qemu/edk2-x86_64-secure-code.fd
+share/qemu-xen/qemu/efi-e1000.rom
+share/qemu-xen/qemu/efi-e1000e.rom
+share/qemu-xen/qemu/efi-eepro100.rom
+share/qemu-xen/qemu/efi-ne2k_pci.rom
+share/qemu-xen/qemu/efi-pcnet.rom
+share/qemu-xen/qemu/efi-rtl8139.rom
+share/qemu-xen/qemu/efi-virtio.rom
+share/qemu-xen/qemu/efi-vmxnet3.rom
+share/qemu-xen/qemu/firmware/50-edk2-i386-secure.json
+share/qemu-xen/qemu/firmware/50-edk2-x86_64-secure.json
+share/qemu-xen/qemu/firmware/60-edk2-aarch64.json
+share/qemu-xen/qemu/firmware/60-edk2-arm.json
+share/qemu-xen/qemu/firmware/60-edk2-i386.json
+share/qemu-xen/qemu/firmware/60-edk2-x86_64.json
+share/qemu-xen/qemu/hppa-firmware.img
+share/qemu-xen/qemu/hppa-firmware64.img
+share/qemu-xen/qemu/keymaps/ar
+share/qemu-xen/qemu/keymaps/bepo
+share/qemu-xen/qemu/keymaps/cz
+share/qemu-xen/qemu/keymaps/da
+share/qemu-xen/qemu/keymaps/de
+share/qemu-xen/qemu/keymaps/de-ch
+share/qemu-xen/qemu/keymaps/en-gb
+share/qemu-xen/qemu/keymaps/en-us
+share/qemu-xen/qemu/keymaps/es
+share/qemu-xen/qemu/keymaps/et
+share/qemu-xen/qemu/keymaps/fi
+share/qemu-xen/qemu/keymaps/fo
+share/qemu-xen/qemu/keymaps/fr
+share/qemu-xen/qemu/keymaps/fr-be
+share/qemu-xen/qemu/keymaps/fr-ca
+share/qemu-xen/qemu/keymaps/fr-ch
+share/qemu-xen/qemu/keymaps/hr
+share/qemu-xen/qemu/keymaps/hu
+share/qemu-xen/qemu/keymaps/is
+share/qemu-xen/qemu/keymaps/it
+share/qemu-xen/qemu/keymaps/ja
+share/qemu-xen/qemu/keymaps/lt
+share/qemu-xen/qemu/keymaps/lv
+share/qemu-xen/qemu/keymaps/mk
+share/qemu-xen/qemu/keymaps/nl
+share/qemu-xen/qemu/keymaps/no
+share/qemu-xen/qemu/keymaps/pl
+share/qemu-xen/qemu/keymaps/pt
+share/qemu-xen/qemu/keymaps/pt-br
+share/qemu-xen/qemu/keymaps/ru
+share/qemu-xen/qemu/keymaps/sl
+share/qemu-xen/qemu/keymaps/sv
+share/qemu-xen/qemu/keymaps/th
+share/qemu-xen/qemu/keymaps/tr
+share/qemu-xen/qemu/kvmvapic.bin
+share/qemu-xen/qemu/linuxboot.bin
+share/qemu-xen/qemu/linuxboot_dma.bin
+share/qemu-xen/qemu/multiboot.bin
+share/qemu-xen/qemu/multiboot_dma.bin
+share/qemu-xen/qemu/npcm7xx_bootrom.bin
+share/qemu-xen/qemu/openbios-ppc
+share/qemu-xen/qemu/openbios-sparc32
+share/qemu-xen/qemu/openbios-sparc64
+share/qemu-xen/qemu/opensbi-riscv32-generic-fw_dynamic.bin
+share/qemu-xen/qemu/opensbi-riscv64-generic-fw_dynamic.bin
+share/qemu-xen/qemu/palcode-clipper
+share/qemu-xen/qemu/petalogix-ml605.dtb
+share/qemu-xen/qemu/petalogix-s3adsp1800.dtb
+share/qemu-xen/qemu/pvh.bin
+share/qemu-xen/qemu/pxe-e1000.rom
+share/qemu-xen/qemu/pxe-eepro100.rom
+share/qemu-xen/qemu/pxe-ne2k_pci.rom
+share/qemu-xen/qemu/pxe-pcnet.rom
+share/qemu-xen/qemu/pxe-rtl8139.rom
+share/qemu-xen/qemu/pxe-virtio.rom
+share/qemu-xen/qemu/qboot.rom
+share/qemu-xen/qemu/qemu-nsis.bmp
+share/qemu-xen/qemu/qemu_vga.ndrv
+share/qemu-xen/qemu/s390-ccw.img
+share/qemu-xen/qemu/s390-netboot.img
+share/qemu-xen/qemu/skiboot.lid
+share/qemu-xen/qemu/slof.bin
+share/qemu-xen/qemu/trace-events-all
+share/qemu-xen/qemu/u-boot-sam460-20100605.bin
+share/qemu-xen/qemu/u-boot.e500
+share/qemu-xen/qemu/vgabios-ati.bin
+share/qemu-xen/qemu/vgabios-bochs-display.bin
+share/qemu-xen/qemu/vgabios-cirrus.bin
+share/qemu-xen/qemu/vgabios-qxl.bin
+share/qemu-xen/qemu/vgabios-ramfb.bin
+share/qemu-xen/qemu/vgabios-stdvga.bin
+share/qemu-xen/qemu/vgabios-virtio.bin
+share/qemu-xen/qemu/vgabios-vmware.bin
+share/qemu-xen/qemu/vgabios.bin
+share/qemu-xen/qemu/vof-nvram.bin
+share/qemu-xen/qemu/vof.bin
+@pkgdir share/examples/xen/auto
Index: pkgsrc/sysutils/xentools420/buildlink3.mk
diff -u /dev/null pkgsrc/sysutils/xentools420/buildlink3.mk:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/buildlink3.mk   Fri Aug 22 09:00:12 2025
@@ -0,0 +1,14 @@
+# $NetBSD: buildlink3.mk,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+BUILDLINK_TREE+=       xentools415
+
+.if !defined(XENTOOLS415_BUILDLINK3_MK)
+XENTOOLS415_BUILDLINK3_MK:=
+
+BUILDLINK_API_DEPENDS.xentools415+=    xentools415>=4.15.2nb3
+BUILDLINK_ABI_DEPENDS.xentools415?=    xentools415>=4.15.4nb1
+BUILDLINK_PKGSRCDIR.xentools415?=      ../../sysutils/xentools415
+
+.endif # XENTOOLS415_BUILDLINK3_MK
+
+BUILDLINK_TREE+=       -xentools415
Index: pkgsrc/sysutils/xentools420/distinfo
diff -u /dev/null pkgsrc/sysutils/xentools420/distinfo:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/distinfo        Fri Aug 22 09:00:12 2025
@@ -0,0 +1,56 @@
+$NetBSD: distinfo,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+BLAKE2s (xen420/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = 82256e7e5d45980590a6493e17a4e133ff63fa28f00aff1963db96371e702448
+SHA512 (xen420/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = e1c11e37f53aab0cc6a3ceaace0b8417f07009b1f20ff8572320895fef24f1a796ade041094a024eb24c988b9bed404c556a1fdde809bba89fb49f0e0ff45a57
+Size (xen420/ipxe-1d1cf74a5e58811822bee4b3da3cff7282fcdfca.tar.gz) = 4079541 bytes
+BLAKE2s (xen420/qemu-xen-20250821.tar.gz) = c88b2f8a5fe6bfef2ca92145e67f32e9f3294e45a3ef116da14e508bdc0cb048
+SHA512 (xen420/qemu-xen-20250821.tar.gz) = ba77506b53047a202ba229a5222cb5f75e4900cac5eb1c6c12e2a46aa1f0fc6a1595f226f5ae90bd998256127e494933607d9fd55ec267c7f29cc93f45e0d927
+Size (xen420/qemu-xen-20250821.tar.gz) = 38939960 bytes
+BLAKE2s (xen420/seabios-1.16.3.tar.gz) = 0c8181f637b55ade090a8e2bb5728cbbc9df05cc1976a7de5e080a3c6600f038
+SHA512 (xen420/seabios-1.16.3.tar.gz) = 55ea6c8c1831d2451d1f5af595ecda9edd89af2568b1118d74615f9103e4af4ad3fff7e9e92568e897e525f800537beaa793bc9662dc3b4d3ac928c911d838f3
+Size (xen420/seabios-1.16.3.tar.gz) = 636695 bytes
+BLAKE2s (xen420/xen-ea5025554e982bd377f85b899b6d151e5ef33d1e.tar.gz) = 6732d2e90841860347e6b7a86b0ebd6cc6073aa8140ce0f61a8fbe6c7d7f4ad0
+SHA512 (xen420/xen-ea5025554e982bd377f85b899b6d151e5ef33d1e.tar.gz) = b02e57832885b45f7795ef47b5f518d2da2f649fa5f019da73b2846dd1546fedbe61c5c4c91404fe851449ad9b4e8df0336b26a9a2363620648e13658d07afa3
+Size (xen420/xen-ea5025554e982bd377f85b899b6d151e5ef33d1e.tar.gz) = 7034634 bytes
+SHA1 (patch-.._seabios-1.16.3_src_string.c) = bbfafcd4c463a5806e88423928b3639e5a6bfa06
+SHA1 (patch-Config.mk) = f2c5d83d4738db706e980fbbd0ae889477d87c7d
+SHA1 (patch-configure) = d52bd51ae234ffd0796b0d3c2453e5e5931c9b63
+SHA1 (patch-docs_configure) = 08b7540afb2c1027c4770ff451de984a90d0040d
+SHA1 (patch-docs_man_xl.1.pod.in) = 280a3717b9f15578d90f85392249ef97844b6765
+SHA1 (patch-docs_man_xl.cfg.5.pod.in) = 5970961552f29c4536a884161a208a27a20dccf4
+SHA1 (patch-docs_man_xlcpupool.cfg.5.pod) = ab3a2529cd10458948557fd7ab032e80df8b1d81
+SHA1 (patch-docs_misc_block-scripts.txt) = 29a49edc4d15c4c8db822fd1d6356d07aeb27b86
+SHA1 (patch-docs_misc_vtd.txt) = 26c12a3023315f35a6f59b6715b811c989c67680
+SHA1 (patch-tools_9pfsd_io.c) = f3778bd9488f6509ef91169e18a42f22c64f7e3e
+SHA1 (patch-tools_Makefile) = f6717230a126c2bc8e8f50c211734a1e80a501f1
+SHA1 (patch-tools_Rules.mk) = f782551c76266890c2a07f988e4730712a1a612f
+SHA1 (patch-tools_configure) = ba5ce2bdd4bdbb1cb94ffa4937721821a75e2c07
+SHA1 (patch-tools_console_daemon_utils.c) = ea0f66a3edbf6cb643580d0fae190064c0cbf0e0
+SHA1 (patch-tools_examples_Makefile) = 55839120606cd4c029cf5a816db4a284c249188e
+SHA1 (patch-tools_firmware_Makefile) = 8b69336ce5382ce15c4c247c8a4b366d1f321265
+SHA1 (patch-tools_firmware_etherboot_Makefile) = 61741d59c72430d53682ea83deed91ee4ff3d220
+SHA1 (patch-tools_hotplug_NetBSD_Makefile) = 61798426eb3bd3e7eca1f52fe19ee258db951a01
+SHA1 (patch-tools_hotplug_NetBSD_block) = 23a18f1ebfa3bc4a689707fd5c8afa07fa232bee
+SHA1 (patch-tools_hotplug_common_Makefile) = 8d2a57ba929e9b57b87869d08731c6b5bb13ba87
+SHA1 (patch-tools_include_xen-sys_NetBSD_evtchn.h) = cac834bdddfab8bb76be3b4766f084f6fc2a7bc2
+SHA1 (patch-tools_include_xen-sys_NetBSD_privcmd.h) = b47ef90b0e823b270c491b9206ae10b9f230971d
+SHA1 (patch-tools_libs_evtchn_netbsd.c) = 4534b48496b47543b943b382a42409e191741edf
+SHA1 (patch-tools_libs_foreignmemory_netbsd.c) = d744017cd730ff4c3cea7d1c327d371168f2dd94
+SHA1 (patch-tools_libxl_libxl_dom.c) = 4aa62de9adbc1eb659ba22d03e3fed42619e5a21
+SHA1 (patch-tools_libxl_libxl_event.c) = 9446c88d01b419cc7531b6f6d959816410e74024
+SHA1 (patch-tools_libxl_libxl_internal.h) = abcfaec70521b3ada6b4eae743119c24f141ea8f
+SHA1 (patch-tools_ocaml_common.make) = d7b23c1605b64ff8ada39bd3d7b7ccaf4e66d99d
+SHA1 (patch-tools_ocaml_xenstored_Makefile) = b267702cf4090c7b45bba530e60327fced24e3e5
+SHA1 (patch-tools_ocaml_xenstored_utils.ml) = dbac89c0a3f105429f97f13c4888c8efd616867e
+SHA1 (patch-tools_pygrub_Makefile) = ed9e471c70047bb1b8bfe0265b8cfecbc293937b
+SHA1 (patch-tools_python_Makefile) = 92706e044b1933d6699aab5e4fa89e53b83f23dd
+SHA1 (patch-tools_qemu-xen_audio_audio.c) = d6a857ae398cb218d8ae4219f6b905bd8d7c0b0b
+SHA1 (patch-tools_qemu-xen_net_tap-bsd.c) = 1d143fcc75ba21c78d7b44a191fd265c76a235e6
+SHA1 (patch-tools_qemu-xen_net_tap.c) = 575e3f1b920562d7bdc567fa1e6b3b4731fc3f47
+SHA1 (patch-tools_qemu-xen_pc-bios_optionrom_Makefile) = f2fa7af589e894b9dd66b6e543bff4d5b815df3e
+SHA1 (patch-tools_xenpaging_xenpaging.c) = 3ade1afeb17210632ca350cdbb649f30d4697493
+SHA1 (patch-tools_xl_Makefile) = 76f401d3f3dddb4fd48cf386494583db658e56b0
+SHA1 (patch-xen_Makefile) = bba02be1c25c1a1cef44754602e073afc5de85eb
+SHA1 (patch-xen_arch_x86_boot_build32.lds.S) = fac14eff5cfe1f031e96927d22c42686f0d114e9
+SHA1 (patch-xen_common_libelf_libelf-loader.c) = 1b3d9e315aa6c218e6eec1cb9b5536956d5c689c
+SHA1 (patch-xen_include_Makefile) = e7614a337584facb27e173c0e1be081b60947b73
Index: pkgsrc/sysutils/xentools420/version.mk
diff -u /dev/null pkgsrc/sysutils/xentools420/version.mk:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/version.mk      Fri Aug 22 09:00:12 2025
@@ -0,0 +1,36 @@
+# $NetBSD: version.mk,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+#
+# Version number is used by xenkernel420, xentools420
+
+VERSION=               20250821
+XEN_COMMIT=            ea5025554e982bd377f85b899b6d151e5ef33d1e
+XEN_SHORTCOMMIT=       ea50255
+
+DIST_SUBDIR=           xen420
+DISTNAME=              xen-${XEN_COMMIT}
+MASTER_SITES=          -${MASTER_SITE_GITHUB:=xen-project/}xen/archive/${XEN_COMMIT}.tar.gz
+DISTFILES=             ${DISTNAME}.tar.gz
+
+.if !defined(XENKERNEL)
+IPXE_VERSION=          1d1cf74a5e58811822bee4b3da3cff7282fcdfca
+IPXE_DIST=             ipxe-${IPXE_VERSION}.tar.gz
+DISTFILES+=            ${IPXE_DIST}
+SITES.${IPXE_DIST}=    -https://github.com/ipxe/ipxe/archive/${IPXE_VERSION}.tar.gz
+
+QEMU_VERSION=          20250821
+QEMU_DIST=             qemu-xen-${QEMU_VERSION}
+QEMU_DISTFILE=         ${QEMU_DIST}.tar.gz
+DISTFILES+=            ${QEMU_DISTFILE}
+SITES.${QEMU_DISTFILE}=        ${MASTER_SITE_LOCAL}xen420/
+
+#QEMUTRAD_VERSION=     3d273dd05e51e5a1ffba3d98c7437ee84e8f8764
+#QEMUTRAD_DIST=                qemu-xen-traditional-3d273dd
+#QEMUTRAD_DISTFILE=    ${QEMUTRAD_DIST}.tar.gz
+#DISTFILES+=           ${QEMUTRAD_DISTFILE}
+#SITES.${QEMUTRAD_DISTFILE}=   -https://xenbits.xen.org/gitweb/?p=qemu-xen-traditional.git;a=snapshot;h=${QEMUTRAD_VERSION};sf=tgz
+
+SEABIOS_VERSION=       1.16.3
+SEABIOS_DIST=          seabios-${SEABIOS_VERSION}.tar.gz
+DISTFILES+=            ${SEABIOS_DIST}
+SITES.${SEABIOS_DIST}= ${MASTER_SITE_LOCAL}xen420/
+.endif # !XENKERNEL

Index: pkgsrc/sysutils/xentools420/files/xen-watchdog.sh
diff -u /dev/null pkgsrc/sysutils/xentools420/files/xen-watchdog.sh:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/files/xen-watchdog.sh   Fri Aug 22 09:00:12 2025
@@ -0,0 +1,17 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# PROVIDE: xen-watchdog
+# REQUIRE: DAEMON
+#
+# description: Run domain watchdog daemon
+#
+
+. /etc/rc.subr
+
+name="xenwatchdog"
+rcvar=$name
+command="@PREFIX@/sbin/xenwatchdogd"
+start_cmd="echo Starting ${name}. && PATH=${PATH}:@PREFIX@/sbin ${command} 30 15"
+
+load_rc_config $name
+run_rc_command "$1"
Index: pkgsrc/sysutils/xentools420/files/xencommons.sh
diff -u /dev/null pkgsrc/sysutils/xentools420/files/xencommons.sh:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/files/xencommons.sh     Fri Aug 22 09:00:12 2025
@@ -0,0 +1,107 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# PROVIDE: xencommons
+# REQUIRE: DAEMON
+
+. /etc/rc.subr
+
+name="xencommons"
+rcvar=$name
+start_precmd="xen_precmd"
+start_cmd="xen_startcmd"
+stop_cmd="xen_stop"
+status_cmd="xen_status"
+extra_commands="status"
+required_files="/kern/xen/privcmd"
+
+XENSTORED_PIDFILE="/var/run/xenstored.pid"
+XENCONSOLED_PIDFILE="/var/run/xenconsoled.pid"
+
+BINDIR=@PREFIX@/bin
+SBINDIR=@PREFIX@/sbin
+LIBEXEC_BIN=@PREFIX@/libexec/xen/bin
+
+xen_precmd()
+{
+       mkdir -p /var/run/xen || exit 1
+       mkdir -p /var/run/xenstored || exit 1
+}
+
+xen_startcmd()
+{
+       printf "Starting xenservices: xenstored, xenconsoled.\n"
+       if test ! -r ${required_files}; then
+               warn "${required_files} is not readable."
+       fi
+       XENSTORED_ARGS=" --pid-file ${XENSTORED_PIDFILE}"
+       if [ -n "${XENSTORED_TRACE}" ]; then
+               XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log"
+       fi
+
+       ${SBINDIR}/xenstored ${XENSTORED_ARGS}
+       sleep 5
+
+        printf "Setting domain 0 name, domid and JSON config...\n"
+        ${LIBEXEC_BIN}/xen-init-dom0
+
+       XENCONSOLED_ARGS=""
+       if [ -n "${XENCONSOLED_TRACE}" ]; then
+               XENCONSOLED_ARGS="${XENCONSOLED_ARGS} --log=${XENCONSOLED_TRACE}"
+       fi
+
+       ${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS}
+}
+
+xen_stop()
+{
+       pids=""
+       printf "Stopping xencommons"
+
+       rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
+       pids="$pids $rc_pid"
+       rc_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+       pids="$pids $rc_pid"
+
+       kill -${sig_stop:-TERM} $pids
+       wait_for_pids $pids
+
+       printf ".\n"
+}
+
+xen_status()
+{
+       xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
+       if test -n ${xenstored_pid}; then
+               pids="$pids $xenstored_pid"
+       fi
+
+       xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
+       if test -n ${xenconsoled_pid}; then
+               pids="$pids $xenconsoled_pid"
+       fi
+
+       if test -n "$xenconsoled_pid" -a -n "$xenstored_pid";
+       then
+               echo "xencommons are running as pids $pids."
+               return 0
+       fi
+       if test -a -z "$xenconsoled_pid" -a -z "$xenstored_pid";
+       then
+               echo "xencommons are not running."
+               return 0
+       fi
+
+       if test -n "$xenstored_pid"; then
+               echo "xenstored is running as pid $xenstored_pid."
+       else
+               echo "xenstored is not running."
+       fi
+       if test -n "$xenconsoled_pid"; then
+               echo "xenconsoled is running as pid $xenconsoled_pid."
+       else
+               echo "xenconsoled is not running."
+       fi
+}
+
+load_rc_config $name
+run_rc_command "$1"
Index: pkgsrc/sysutils/xentools420/files/xendomains.sh
diff -u /dev/null pkgsrc/sysutils/xentools420/files/xendomains.sh:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/files/xendomains.sh     Fri Aug 22 09:00:12 2025
@@ -0,0 +1,129 @@
+#!@RCD_SCRIPTS_SHELL@
+#
+# PROVIDE: xendomains
+# REQUIRE: xencommons
+# KEYWORD: shutdown
+#
+# xendomains           This required variable is a whitespace-separated
+#                      list of domains, e.g., xendomains="dom1 dom2 dom3".
+#
+# xendomains_config    This optional variable is a format string that
+#                      represents the path to the configuration file for
+#                      each domain.  "%s" is substituted with the name of
+#                      the domain.  The default is "@PKG_SYSCONFDIR@/%s".
+#
+# xendomains_prehook   This optional variable is a format string that
+#                      represents the command to run, if it exists, before
+#                      starting each domain.  "%s" is substituted with the
+#                      name of the domain.  The default is
+#                      "@PKG_SYSCONFDIR@/%s-pre".
+#
+# xendomains_posthook  This optional variable is a format string that
+#                      represents the command to run, if it exists, after
+#                      stopping each domain.  "%s" is substituted with the
+#                      name of the domain.  The default is
+#                      "@PKG_SYSCONFDIR@/%s-post".
+#
+
+. /etc/rc.subr
+
+name="xendomains"
+ctl_command="@PREFIX@/sbin/xl"
+start_cmd="xendomains_start"
+stop_cmd="xendomains_stop"
+list_cmd="xendomains_list"
+extra_commands="list"
+required_files="/kern/xen/privcmd"
+
+xendomains_start()
+{
+       [ -n "$xendomains" ] || return
+
+       echo "Starting xen domains."
+       for domain in $xendomains; do
+               case "$domain" in
+               "")     continue ;;
+               esac
+
+               # Start off by running the pre-hook script if it's present.
+               if [ -n "${xendomains_prehook}" ]; then
+                       cmdline=`printf "${xendomains_prehook}" $domain`
+                       cmd="${cmdline%% *}"
+                       if [ -x "$cmd" ]; then
+                               if ! $cmdline; then
+                                       echo "Pre-hook \`\`$cmdline'' failed... skipping $domain."
+                                       continue
+                               fi
+                       fi
+               fi
+
+               # Ask xend to create the domain.
+               if [ -n "${xendomains_config}" ]; then
+                       file=`printf "${xendomains_config}" $domain`
+                       if [ -f "$file" ]; then
+                               ${ctl_command} create "$file"
+                       fi
+               fi
+       done
+}
+
+xendomains_list() {
+       # Output a whitespace-separated list of live guest domains.
+       ${ctl_command} list | awk '
+               (FNR <= 2) { next }
+               ($5 !~ /s/) { s = s " " $1 }
+               END { sub(" *", "", s); print s }'
+}
+
+xendomains_stop()
+{
+       # Determine an appropriate timeout waiting for all domains to
+       # stop -- always wait at least 60s, and add 5s per active domain.
+       #
+       numdomains=$(xendomains_list | awk '{ print NF }')
+       [ $numdomains -gt 0 ] || return
+       timeout=$((60 + numdomains * 5))
+
+       # Ask xend to stop every domain, and poll xend every 10s up to the
+       # timeout period to check if all the domains are stopped.  We
+       # consider a domain in the "s" (shutdown) state to be stopped.
+       #
+       echo "Stopping xen domains."
+       for domain in $(xendomains_list); do
+               ${ctl_command} shutdown -F $domain
+       done
+       while [ $timeout -gt 0 ]; do
+               livedomains=$(xendomains_list)
+               [ -n "$livedomains" ] || break
+               timeout=$((timeout - 10))
+               sleep 10
+       done
+       livedomains=$(xendomains_list)
+       if [ -n "$livedomains" ]; then
+               echo "Failed to stop: $livedomains"
+       else
+               echo "All domains stopped."
+       fi
+
+       # Finish off by running the post-hook script if it's present.
+       for domain in $xendomains; do
+               case "$domain" in
+               "")     continue ;;
+               esac
+               if [ -n "${xendomains_posthook}" ]; then
+                       cmdline=`printf "${xendomains_posthook}" $domain`
+                       cmd="${cmdline%% *}"
+                       if [ -x "$cmd" ]; then
+                               $cmdline || echo "Post-hook \`\`$cmdline'' failed."
+                       fi
+               fi
+       done
+}
+
+load_rc_config $name
+
+: ${xendomains_config="@PKG_SYSCONFDIR@/%s"}
+: ${xendomains_prehook="@PKG_SYSCONFDIR@/%s-pre"}
+: ${xendomains_posthook="@PKG_SYSCONFDIR@/%s-post"}
+
+run_rc_command "$1"

Index: pkgsrc/sysutils/xentools420/patches/patch-.._seabios-1.16.3_src_string.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-.._seabios-1.16.3_src_string.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-.._seabios-1.16.3_src_string.c    Fri Aug 22 09:00:12 2025
@@ -0,0 +1,18 @@
+$NetBSD: patch-.._seabios-1.16.3_src_string.c,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+when the code is compiled -fwhole-program, memcpy() will be ommitted by gcc
+because nothing in the file references it. Later the link fails with
+undefined references to memcpy().
+Force the inclusion with (externally_visible) attribute
+
+--- ../seabios-1.16.3/src/string.c.orig        2021-04-17 22:32:25.409876075 +0200
++++ ../seabios-1.16.3/src/string.c     2021-04-17 22:32:39.873615679 +0200
+@@ -149,7 +149,7 @@
+         memcpy(d_fl, s_fl, len);
+ }
+ 
+-void *
++__attribute__((externally_visible)) void *
+ #undef memcpy
+ memcpy(void *d1, const void *s1, size_t len)
+ #if MODESEGMENT == 0
Index: pkgsrc/sysutils/xentools420/patches/patch-Config.mk
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-Config.mk:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-Config.mk Fri Aug 22 09:00:12 2025
@@ -0,0 +1,34 @@
+$NetBSD: patch-Config.mk,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+Make sure to pass pkgsrc CFLAGS.
+Use -R instead if -rpath, to appease our linker (--enable-rpath bug ?)
+
+--- Config.mk.orig     2024-08-14 15:45:06.000000000 +0200
++++ Config.mk  2024-09-10 13:09:54.189244858 +0200
+@@ -37,7 +37,7 @@
+ 
+ # Tools to run on system hosting the build
+ HOSTCFLAGS  = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
+-HOSTCFLAGS += -fno-strict-aliasing
++HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS}
+ 
+ DISTDIR     ?= $(XEN_ROOT)/dist
+ DESTDIR     ?= /
+@@ -177,6 +177,8 @@
+ 
+ CFLAGS += -Wall -Wstrict-prototypes
+ 
++CFLAGS += ${EXTRA_CFLAGS}
++
+ $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable)
+ $(call cc-option-add,CFLAGS,CC,-Wno-unused-local-typedefs)
+ 
+@@ -185,7 +187,7 @@
+ LDFLAGS += $(foreach i, $(PREPEND_LIB), -L$(i))
+ CFLAGS += $(foreach i, $(PREPEND_INCLUDES), -I$(i))
+ ifeq ($(XEN_TOOLS_RPATH),y)
+-LDFLAGS += -Wl,-rpath,$(libdir)
++LDFLAGS += -Wl,-R$(libdir)
+ endif
+ APPEND_LDFLAGS += $(foreach i, $(APPEND_LIB), -L$(i))
+ APPEND_CFLAGS += $(foreach i, $(APPEND_INCLUDES), -I$(i))
Index: pkgsrc/sysutils/xentools420/patches/patch-configure
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-configure:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-configure Fri Aug 22 09:00:12 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-configure,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+Don't try to build stubdom
+
+--- configure.orig     2023-10-11 16:40:52.386364019 +0200
++++ configure  2023-10-11 16:41:06.088121617 +0200
+@@ -2127,7 +2127,7 @@
+ 
+ case "$host_cpu" in
+     i[3456]86|x86_64)
+-        arch_enable_stubdom=y
++        arch_enable_stubdom=n
+         ;;
+     *)
+         arch_enable_stubdom=n
Index: pkgsrc/sysutils/xentools420/patches/patch-docs_configure
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-docs_configure:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-docs_configure    Fri Aug 22 09:00:12 2025
@@ -0,0 +1,20 @@
+$NetBSD: patch-docs_configure,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+Don't try to find pandoc because if it happens to be installed:
+  - the build fails because of some latex footnote issue
+  - it is not declared as a dependency and therefore should be
+    "--without-pandoc" but I can't come up with a CONFIGURE_ARGS
+    incantation that works
+
+--- docs/configure.orig        2025-08-04 15:22:34.000000000 +0200
++++ docs/configure     2025-08-21 16:22:03.086724470 +0200
+@@ -2290,7 +2290,8 @@
+   ;;
+ esac
+ fi
+-PANDOC=$ac_cv_path_PANDOC
++# Don't ever find pandoc.
++PANDOC=
+ if test -n "$PANDOC"; then
+   { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
+ printf "%s\n" "$PANDOC" >&6; }
Index: pkgsrc/sysutils/xentools420/patches/patch-docs_man_xl.1.pod.in
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-docs_man_xl.1.pod.in:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-docs_man_xl.1.pod.in      Fri Aug 22 09:00:12 2025
@@ -0,0 +1,17 @@
+$NetBSD: patch-docs_man_xl.1.pod.in,v 1.1 2025/08/22 09:00:12 bouyer Exp $
+
+--- docs/man/xl.1.pod.in.orig  2021-04-06 19:14:18.000000000 +0200
++++ docs/man/xl.1.pod.in       2021-04-17 13:34:37.085288645 +0200
+@@ -33,10 +33,10 @@
+ 
+ =over 4
+ 
+-=item start the script B</etc/init.d/xencommons> at boot time
++=item start the script B</etc/rc.d/xencommons> at boot time
+ 
+ Most B<xl> operations rely upon B<xenstored> and B<xenconsoled>: make
+-sure you start the script B</etc/init.d/xencommons> at boot time to
++sure you start the script B</etc/rc.d/xencommons> at boot time to
+ initialize all the daemons needed by B<xl>.
+ 
+ =item setup a B<xenbr0> bridge in dom0
Index: pkgsrc/sysutils/xentools420/patches/patch-docs_man_xl.cfg.5.pod.in
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-docs_man_xl.cfg.5.pod.in:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-docs_man_xl.cfg.5.pod.in  Fri Aug 22 09:00:13 2025
@@ -0,0 +1,29 @@
+$NetBSD: patch-docs_man_xl.cfg.5.pod.in,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- docs/man/xl.cfg.5.pod.in.orig      2018-04-17 19:21:31.000000000 +0200
++++ docs/man/xl.cfg.5.pod.in   2018-04-23 16:14:18.000000000 +0200
+@@ -4,13 +4,13 @@
+ 
+ =head1 SYNOPSIS
+ 
+- /etc/xen/xldomain
++ @XENDCONFDIR@/xldomain
+ 
+ =head1 DESCRIPTION
+ 
+ Creating a VM (a domain in Xen terminology, sometimes called a guest)
+ with xl requires the provision of a domain configuration file.  Typically,
+-these live in F</etc/xen/DOMAIN.cfg>, where DOMAIN is the name of the
++these live in F<@XENDCONFDIR@/DOMAIN.cfg>, where DOMAIN is the name of the
+ domain.
+ 
+ =head1 SYNTAX
+@@ -2623,7 +2623,7 @@
+ 
+ =head1 FILES
+ 
+-F</etc/xen/NAME.cfg>
++F<@XENDCONFDIR@/NAME.cfg>
+ F<@XEN_DUMP_DIR@/NAME>
+ 
+ =head1 BUGS
Index: pkgsrc/sysutils/xentools420/patches/patch-docs_man_xlcpupool.cfg.5.pod
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-docs_man_xlcpupool.cfg.5.pod:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-docs_man_xlcpupool.cfg.5.pod      Fri Aug 22 09:00:13 2025
@@ -0,0 +1,28 @@
+$NetBSD: patch-docs_man_xlcpupool.cfg.5.pod,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- docs/man/xlcpupool.cfg.5.pod.orig  2017-03-24 17:41:23.000000000 +0100
++++ docs/man/xlcpupool.cfg.5.pod       2017-03-24 17:41:50.000000000 +0100
+@@ -4,12 +4,12 @@
+ 
+ =head1 SYNOPSIS
+ 
+- /etc/xen/xlcpupool
++ @XENDCONFDIR@/xlcpupool
+ 
+ =head1 DESCRIPTION
+ 
+ To create a Cpupool with xl requires the provision of a cpupool config
+-file.  Typically these live in `/etc/xen/CPUPOOL.cfg` where CPUPOOL is
++file.  Typically these live in `@XENDCONFDIR@/CPUPOOL.cfg` where CPUPOOL is
+ the name of the cpupool.
+ 
+ =head1 SYNTAX
+@@ -117,7 +117,7 @@
+ 
+ =head1 FILES
+ 
+-F</etc/xen/CPUPOOL.cfg>
++F<@XENDCONFDIR@/CPUPOOL.cfg>
+ 
+ =head1 BUGS
+ 
Index: pkgsrc/sysutils/xentools420/patches/patch-docs_misc_block-scripts.txt
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-docs_misc_block-scripts.txt:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-docs_misc_block-scripts.txt       Fri Aug 22 09:00:13 2025
@@ -0,0 +1,13 @@
+$NetBSD: patch-docs_misc_block-scripts.txt,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- ./docs/misc/block-scripts.txt.orig 2018-04-23 16:23:34.000000000 +0200
++++ ./docs/misc/block-scripts.txt      2018-04-23 16:23:39.000000000 +0200
+@@ -18,7 +18,7 @@
+ 
+ It is highly recommended that custom hotplug scripts as much as
+ possible include and use the common Xen functionality.  If the script
+-is run from the normal block script location (/etc/xen/scripts by
++is run from the normal block script location (@XENDCONFDIR@/scripts by
+ default), then this can be done by adding the following to the top of
+ the script:
+ 
Index: pkgsrc/sysutils/xentools420/patches/patch-docs_misc_vtd.txt
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-docs_misc_vtd.txt:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-docs_misc_vtd.txt Fri Aug 22 09:00:13 2025
@@ -0,0 +1,22 @@
+$NetBSD: patch-docs_misc_vtd.txt,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- docs/misc/vtd.txt.orig     2020-05-08 16:46:26.400241453 +0200
++++ docs/misc/vtd.txt  2020-05-08 16:46:50.253734556 +0200
+@@ -39,7 +39,7 @@
+             echo -n 0000:01:00.0 >/sys/bus/pci/drivers/pciback/bind
+ 
+ 12) reboot system (not requires if you use the dynamic hiding method)
+-13) add "pci" line in /etc/xen/hvm.conf for to assigned devices
++13) add "pci" line in @XENDCONFDIR@/hvm.conf for to assigned devices
+         pci = [ '01:00.0', '03:00.0' ]
+ 15) start hvm guest and use "lspci" to see the passthru device and
+     "ifconfig" to see if IP address has been assigned to NIC devices.
+@@ -77,7 +77,7 @@
+         echo "0000:01:00.0" > /sys/bus/pci/devices/0000:01:00.0/driver/unbind
+         echo "0000:01:00.0" > /sys/bus/pci/drivers/pci-stub/bind
+ 
+-12) add "pci" line in /etc/xen/hvm.conf for to assigned devices
++12) add "pci" line in @XENDCONFDIR@/hvm.conf for to assigned devices
+         pci = [ '01:00.0' ]
+ 13) start hvm guest and use "lspci" to see the passthru device and
+     "ifconfig" to see if IP address has been assigned to NIC devices.
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_9pfsd_io.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_9pfsd_io.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_9pfsd_io.c  Fri Aug 22 09:00:13 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-tools_9pfsd_io.c,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+Don't use non-standard d_off, use telldir(3) instead
+
+--- tools/9pfsd/io.c.orig      2025-08-21 17:42:32.397455897 +0200
++++ tools/9pfsd/io.c   2025-08-21 17:45:14.125083684 +0200
+@@ -1321,7 +1321,7 @@
+             fill_p9_stat(device, &p9s, &st, dirent->d_name);
+             if ( p9s.size + sizeof(p9s.size) > len )
+             {
+-                seekdir(fidp->data, dirent->d_off);
++                seekdir(fidp->data, telldir(fidp->data));
+                 break;
+             }
+             fill_buffer_at(&buf, "s", &p9s);
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_Makefile    Fri Aug 22 09:00:13 2025
@@ -0,0 +1,38 @@
+$NetBSD: patch-tools_Makefile,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/Makefile.orig        2025-08-04 15:22:34.000000000 +0200
++++ tools/Makefile     2025-08-21 16:34:11.296454784 +0200
+@@ -35,7 +35,6 @@
+ SUBDIRS-y += 9pfsd
+ SUBDIRS-$(CONFIG_X86) += xenpaging
+ SUBDIRS-$(CONFIG_X86) += debugger
+-SUBDIRS-$(CONFIG_TESTS) += tests
+ 
+ SUBDIRS-y += python
+ SUBDIRS-$(CONFIG_PYGRUB) += pygrub
+@@ -231,7 +230,7 @@
+       else \
+               virtfs='' ; \
+       fi ; \
+-      PKG_CONFIG_PATH=$(XEN_ROOT)/tools/pkg-config$${PKG_CONFIG_PATH:+:$${PKG_CONFIG_PATH}} \
++      PKG_CONFIG_PATH=$(XEN_ROOT)/tools/pkg-config$${PKG_CONFIG_PATH:+:$${PKG_CONFIG_PATH}} CFLAGS= \
+       $$source/configure --enable-xen --target-list=i386-softmmu \
+               $(QEMU_XEN_ENABLE_DEBUG) \
+               $$enable_trace_backend \
+@@ -247,6 +246,7 @@
+               --bindir=$(LIBEXEC_BIN) \
+               --datadir=$(SHAREDIR)/qemu-xen \
+               --localstatedir=$(localstatedir) \
++              --disable-opengl \
+               --docdir=$(LIBEXEC)/share/doc \
+               --mandir=$(LIBEXEC)/share/man \
+               --libexecdir=$(LIBEXEC)/libexec \
+@@ -259,7 +259,7 @@
+               --cpu=$(IOEMU_CPU_ARCH) \
+               $(IOEMU_CONFIGURE_CROSS) \
+               $$virtfs; \
+-      $(MAKE) all
++      CFLAGS= $(MAKE) all
+ 
+ subdir-install-qemu-xen-dir: subdir-all-qemu-xen-dir
+       cd qemu-xen-build; \
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_Rules.mk
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_Rules.mk:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_Rules.mk    Fri Aug 22 09:00:13 2025
@@ -0,0 +1,40 @@
+$NetBSD: patch-tools_Rules.mk,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/Rules.mk.orig        2025-08-04 15:22:34.000000000 +0200
++++ tools/Rules.mk     2025-08-21 19:38:13.321632339 +0200
+@@ -83,7 +83,7 @@
+ 
+ # Flags for linking recursive dependencies of Xen libraries in $(1)
+ define xenlibs-rpath
+-    $(addprefix -Wl$(comma)-rpath-link=$(XEN_ROOT)/tools/libs/,$(call xenlibs-dependencies,$(1)))
++    $(addprefix -Wl$(comma)-rpath-link$(comma)$(XEN_ROOT)/tools/libs/,$(call xenlibs-dependencies,$(1)))
+ endef
+ 
+ # Provide a path for each library in $(1)
+@@ -118,7 +118,7 @@
+  FILENAME_$(1) ?= xen$(1)
+  XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1)
+  CFLAGS_libxen$(1) = $$(CFLAGS_xeninclude)
+- SHLIB_libxen$(1) = $$(call xenlibs-rpath,$(1)) -Wl,-rpath-link=$$(XEN_libxen$(1))
++ SHLIB_libxen$(1) = $$(call xenlibs-rpath,$(1)) -Wl,-rpath-link,$$(XEN_libxen$(1))
+  LDLIBS_libxen$(1) = $$(call xenlibs-ldlibs,$(1))
+ endef
+ 
+@@ -220,7 +220,7 @@
+       echo "Description: $(PKG_CONFIG_DESC)"; \
+       echo "Version: $(PKG_CONFIG_VERSION)"; \
+       echo "Cflags: -I\$${includedir}"; \
+-      echo "Libs: -L\$${libdir} $(PKG_CONFIG_USELIBS) -l$(PKG_CONFIG_LIB)"; \
++      echo "Libs: -L\$${libdir} -Wl,-rpath,${libdir} $(PKG_CONFIG_USELIBS) -l$(PKG_CONFIG_LIB)"; \
+       echo "Libs.private: $(PKG_CONFIG_LIBSPRIV)"; \
+       echo "Requires.private: $(PKG_CONFIG_REQPRIV)"; \
+       } > $@
+@@ -235,7 +235,7 @@
+       echo "Description: $(PKG_CONFIG_DESC)"; \
+       echo "Version: $(PKG_CONFIG_VERSION)"; \
+       echo "Cflags: -I\$${includedir}"; \
+-      echo "Libs: -L\$${libdir} -l$(PKG_CONFIG_LIB)"; \
++      echo "Libs: -L\$${libdir} -Wl,-rpath,\$${libdir} -l$(PKG_CONFIG_LIB)"; \
+       echo "Libs.private: $(PKG_CONFIG_LIBSPRIV)"; \
+       echo "Requires.private: $(PKG_CONFIG_REQPRIV)"; \
+       } > $@
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_configure
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_configure:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_configure   Fri Aug 22 09:00:13 2025
@@ -0,0 +1,30 @@
+$NetBSD: patch-tools_configure,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/configure.orig       2023-10-06 19:17:42.000000000 +0200
++++ tools/configure    2023-10-11 16:06:37.459963548 +0200
+@@ -2457,7 +2457,7 @@
+ 
+ 
+ 
+-ac_config_files="$ac_config_files ../config/Tools.mk hotplug/common/hotplugpath.sh hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons 
hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain 
hotplug/Linux/launch-xenstore hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain 
ocaml/libs/xs/paths.ml ocaml/xenstored/paths.ml ocaml/xenstored/oxenstored.conf"
++ac_config_files="$ac_config_files ../config/Tools.mk ../config/Paths.mk hotplug/common/hotplugpath.sh hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain 
hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains 
hotplug/Linux/init.d/xendriverdomain hotplug/Linux/launch-xenstore hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons 
hotplug/NetBSD/rc.d/xendriverdomain ocaml/libs/xs/paths.ml ocaml/xenstored/paths.ml ocaml/xenstored/oxenstored.conf"
+ 
+ ac_config_headers="$ac_config_headers config.h"
+ 
+@@ -3907,7 +3907,7 @@
+ 
+ if test "x$sysconfdir" = 'x${prefix}/etc' ; then
+     case "$host_os" in
+-         *freebsd*)
++         *freebsd*|*netbsd*)
+          sysconfdir=$prefix/etc
+          ;;
+          *solaris*)
+@@ -10927,6 +10927,7 @@
+ do
+   case $ac_config_target in
+     "../config/Tools.mk") CONFIG_FILES="$CONFIG_FILES ../config/Tools.mk" ;;
++    "../config/Paths.mk") CONFIG_FILES="$CONFIG_FILES ../config/Paths.mk" ;;
+     "hotplug/common/hotplugpath.sh") CONFIG_FILES="$CONFIG_FILES hotplug/common/hotplugpath.sh" ;;
+     "hotplug/FreeBSD/rc.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xencommons" ;;
+     "hotplug/FreeBSD/rc.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xendriverdomain" ;;
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_console_daemon_utils.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_console_daemon_utils.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_console_daemon_utils.c      Fri Aug 22 09:00:13 2025
@@ -0,0 +1,22 @@
+$NetBSD: patch-tools_console_daemon_utils.c,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/console/daemon/utils.c.orig  2020-12-08 15:28:31.000000000 +0100
++++ tools/console/daemon/utils.c       2020-12-09 16:22:49.947276738 +0100
+@@ -107,13 +107,15 @@
+       xs = xs_open(0);
+       if (xs == NULL) {
+               dolog(LOG_ERR,
+-                    "Failed to contact xenstore (%m).  Is it running?");
++                    "Failed to contact xenstore (%s).  Is it running?",
++                        strerror(errno));
+               goto out;
+       }
+ 
+       xc = xc_interface_open(0,0,0);
+       if (!xc) {
+-              dolog(LOG_ERR, "Failed to contact hypervisor (%m)");
++              dolog(LOG_ERR, "Failed to contact hypervisor (%s)",
++                  strerror(errno));
+               goto out;
+       }
+ 
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_examples_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_examples_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_examples_Makefile   Fri Aug 22 09:00:13 2025
@@ -0,0 +1,12 @@
+$NetBSD: patch-tools_examples_Makefile,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/examples/Makefile.orig       2023-10-06 19:17:42.000000000 +0200
++++ tools/examples/Makefile    2023-10-11 16:08:29.065203062 +0200
+@@ -1,6 +1,7 @@
+ XEN_ROOT = $(CURDIR)/../..
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
++XEN_CONFIG_DIR=${XEN_EXAMPLES_DIR}
+ # Xen configuration dir and configs to go there.
+ 
+ XEN_READMES = README
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_firmware_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_firmware_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_firmware_Makefile   Fri Aug 22 09:00:13 2025
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_firmware_Makefile,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/firmware/Makefile.orig       2020-05-14 14:19:32.000000000 +0200
++++ tools/firmware/Makefile    2020-08-26 19:39:04.950176746 +0200
+@@ -24,7 +24,7 @@
+       cp ovmf-makefile ovmf-dir/Makefile;
+ 
+ seabios-dir:
+-      GIT=$(GIT) $(XEN_ROOT)/scripts/git-checkout.sh $(SEABIOS_UPSTREAM_URL) $(SEABIOS_UPSTREAM_REVISION) seabios-dir
++      ln -sf ../../../seabios-1.16.3 ${WRKSRC}/tools/firmware/seabios-dir
+       cp seabios-config seabios-dir/.config;
+       $(MAKE) -C seabios-dir olddefconfig CC=$(SEABIOSCC) LD=$(SEABIOSLD)
+       rm -f seabios-dir/.version
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_firmware_etherboot_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_firmware_etherboot_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_firmware_etherboot_Makefile Fri Aug 22 09:00:13 2025
@@ -0,0 +1,26 @@
+$NetBSD: patch-tools_firmware_etherboot_Makefile,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/firmware/etherboot/Makefile.orig     2019-12-17 15:23:09.000000000 +0100
++++ tools/firmware/etherboot/Makefile  2020-05-08 16:59:46.337172477 +0200
+@@ -32,18 +32,10 @@
+ %.rom: $D/src/arch/i386/Makefile
+       $(MAKE) -C $D/src bin/$(*F).rom
+ 
+-$T:
+-      set -e; if ! $(FETCHER) _$T $(IPXE_TARBALL_URL); then \
+-              $(GIT) clone $(IPXE_GIT_URL) $D.git; \
+-              (cd $D.git && $(GIT) archive --format=tar --prefix=$D/ \
+-              $(IPXE_GIT_TAG) | gzip -n >../_$T); \
+-              rm -rf $D.git; \
+-      fi
+-      mv _$T $T
++$D:
++      ln -sf $(WRKSRC)/../ipxe-${IPXE_GIT_TAG} $D
+ 
+-$D/src/arch/i386/Makefile: $T Config
+-      rm -rf $D
+-      gzip -dc $T | tar xf -
++$D/src/arch/i386/Makefile: $D Config
+       for i in $$(cat patches/series) ; do                 \
+           patch -d $D -p1 --quiet <patches/$$i || exit 1 ; \
+       done
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_NetBSD_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_NetBSD_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_NetBSD_Makefile     Fri Aug 22 09:00:13 2025
@@ -0,0 +1,46 @@
+$NetBSD: patch-tools_hotplug_NetBSD_Makefile,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/hotplug/NetBSD/Makefile.orig 2023-10-06 19:17:42.000000000 +0200
++++ tools/hotplug/NetBSD/Makefile      2023-10-11 16:10:06.619544743 +0200
+@@ -10,7 +10,7 @@
+ XEN_SCRIPTS += qemu-ifup
+ 
+ XEN_SCRIPT_DATA :=
+-XEN_RCD_PROG := rc.d/xencommons rc.d/xendomains rc.d/xen-watchdog rc.d/xendriverdomain
++#XEN_RCD_PROG := rc.d/xencommons rc.d/xendomains rc.d/xen-watchdog rc.d/xendriverdomain
+ 
+ .PHONY: all
+ all:
+@@ -23,10 +23,11 @@
+ 
+ .PHONY: install-scripts
+ install-scripts:
+-      $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
++      $(INSTALL_DIR) $(DESTDIR)$(XEN_EXAMPLES_DIR)
++      $(INSTALL_DIR) $(DESTDIR)$(XEN_EXAMPLES_DIR)/scripts
+       set -e; for i in $(XEN_SCRIPTS); \
+          do \
+-         $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
++         $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_EXAMPLES_DIR)/scripts; \
+       done
+       set -e; for i in $(XEN_SCRIPT_DATA); \
+          do \
+@@ -40,12 +41,12 @@
+ 
+ .PHONY: install-rcd
+ install-rcd:
+-      $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
+-      set -e; for i in $(XEN_RCD_PROG); \
+-         do \
+-         $(INSTALL_PROG) $$i $(DESTDIR)$(INITD_DIR); \
+-      done
+-      $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(INITD_DIR)/xen-hotplugpath.sh
++#     $(INSTALL_DIR) $(DESTDIR)$(INITD_DIR)
++#     set -e; for i in $(XEN_RCD_PROG); \
++#        do \
++#        $(INSTALL_PROG) $$i $(DESTDIR)$(INITD_DIR); \
++#     done
++#     $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(INITD_DIR)/xen-hotplugpath.sh
+ 
+ .PHONY: uninstall-rcd
+ uninstall-rcd:
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_NetBSD_block
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_NetBSD_block:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_NetBSD_block        Fri Aug 22 09:00:13 2025
@@ -0,0 +1,27 @@
+$NetBSD: patch-tools_hotplug_NetBSD_block,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+work around an issue in NetBSD 9.99.x kernel: pass the vnd name to vnconfig,
+not the path to the block device.
+
+--- tools/hotplug/NetBSD/block.orig    2022-01-31 10:42:09.000000000 +0100
++++ tools/hotplug/NetBSD/block 2022-05-30 10:50:42.821527086 +0200
+@@ -64,8 +64,9 @@
+               for disk in $available_disks; do
+                       eval status=\$$disk
+                       if [ "$status" = "free" ] && \
+-                          vnconfig /dev/${disk}d $xparams >/dev/null; then
++                          vnconfig ${disk} $xparams >/dev/null; then
+                               device=/dev/${disk}d
++                              vnd_device=$disk
+                               break   
+                       fi
+               done
+@@ -73,7 +74,7 @@
+               if [ x$device = x ] ; then
+                       error "no available vnd device"
+               fi
+-              xenstore-write $xpath/vnd $device
++              xenstore-write $xpath/vnd $vnd_device
+               ;;
+       phy)
+               device=$xparams
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_common_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_common_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_hotplug_common_Makefile     Fri Aug 22 09:00:13 2025
@@ -0,0 +1,22 @@
+$NetBSD: patch-tools_hotplug_common_Makefile,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/hotplug/common/Makefile.orig 2023-10-06 19:17:42.000000000 +0200
++++ tools/hotplug/common/Makefile      2023-10-11 16:12:44.756127842 +0200
+@@ -18,14 +18,14 @@
+ 
+ .PHONY: install-scripts
+ install-scripts: all
+-      $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
++      $(INSTALL_DIR) $(DESTDIR)$(XEN_EXAMPLES_DIR)/scripts
+       set -e; for i in $(XEN_SCRIPTS); \
+          do \
+-         $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
++         $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_EXAMPLES_DIR)/scripts; \
+       done
+       set -e; for i in $(XEN_SCRIPT_DATA); \
+          do \
+-         $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
++         $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_EXAMPLES_DIR)/scripts; \
+       done
+ 
+ .PHONY: uninstall-scripts
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_include_xen-sys_NetBSD_evtchn.h
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_include_xen-sys_NetBSD_evtchn.h:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_include_xen-sys_NetBSD_evtchn.h     Fri Aug 22 09:00:13 2025
@@ -0,0 +1,95 @@
+$NetBSD: patch-tools_include_xen-sys_NetBSD_evtchn.h,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+Use system-provided headers instead of local, outdated definitions
+
+--- tools/include/xen-sys/NetBSD/evtchn.h.orig 2021-04-17 13:48:20.754547947 +0200
++++ tools/include/xen-sys/NetBSD/evtchn.h      2021-04-17 13:51:39.136816295 +0200
+@@ -2,85 +2,3 @@
+-/******************************************************************************
+- * evtchn.h
+- * 
+- * Interface to /dev/xen/evtchn.
+- * 
+- * Copyright (c) 2003-2005, K A Fraser
+- * 
+- * This file may be distributed separately from the Linux kernel, or
+- * incorporated into other software packages, subject to the following license:
+- * 
+- * Permission is hereby granted, free of charge, to any person obtaining a copy
+- * of this source file (the "Software"), to deal in the Software without
+- * restriction, including without limitation the rights to use, copy, modify,
+- * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+- * and to permit persons to whom the Software is furnished to do so, subject to
+- * the following conditions:
+- * 
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- * 
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+- * IN THE SOFTWARE.
+- */
+-
+-#ifndef __NetBSD_EVTCHN_H__
+-#define __NetBSD_EVTCHN_H__
+-
+-/*
+- * Bind a fresh port to VIRQ @virq.
+- */
+-#define IOCTL_EVTCHN_BIND_VIRQ                                \
+-      _IOWR('E', 4, struct ioctl_evtchn_bind_virq)
+-struct ioctl_evtchn_bind_virq {
+-      unsigned int virq;
+-      unsigned int port;
+-};
+-
+-/*
+- * Bind a fresh port to remote <@remote_domain, @remote_port>.
+- */
+-#define IOCTL_EVTCHN_BIND_INTERDOMAIN                 \
+-      _IOWR('E', 5, struct ioctl_evtchn_bind_interdomain)
+-struct ioctl_evtchn_bind_interdomain {
+-      unsigned int remote_domain, remote_port;
+-      unsigned int port;
+-};
+-
+-/*
+- * Allocate a fresh port for binding to @remote_domain.
+- */
+-#define IOCTL_EVTCHN_BIND_UNBOUND_PORT                        \
+-      _IOWR('E', 6, struct ioctl_evtchn_bind_unbound_port)
+-struct ioctl_evtchn_bind_unbound_port {
+-      unsigned int remote_domain;
+-      unsigned int port;
+-};
+-
+-/*
+- * Unbind previously allocated @port.
+- */
+-#define IOCTL_EVTCHN_UNBIND                           \
+-      _IOW('E', 7, struct ioctl_evtchn_unbind)
+-struct ioctl_evtchn_unbind {
+-      unsigned int port;
+-};
+-
+-/*
+- * Send event to previously allocated @port.
+- */
+-#define IOCTL_EVTCHN_NOTIFY                           \
+-      _IOW('E', 8, struct ioctl_evtchn_notify)
+-struct ioctl_evtchn_notify {
+-      unsigned int port;
+-};
+-
+-/* Clear and reinitialise the event buffer. Clear error condition. */
+-#define IOCTL_EVTCHN_RESET                            \
+-      _IO('E', 9)
+-
+-#endif /* __NetBSD_EVTCHN_H__ */
++/* use the system-provided headers */
++#include <xen/xenio.h>
++#include <xen/xenio3.h>
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_include_xen-sys_NetBSD_privcmd.h
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_include_xen-sys_NetBSD_privcmd.h:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_include_xen-sys_NetBSD_privcmd.h    Fri Aug 22 09:00:13 2025
@@ -0,0 +1,116 @@
+$NetBSD: patch-tools_include_xen-sys_NetBSD_privcmd.h,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+Use system-provided headers instead of local, outdated definitions
+
+--- tools/include/xen-sys/NetBSD/privcmd.h.orig        2021-04-17 13:48:20.759557127 +0200
++++ tools/include/xen-sys/NetBSD/privcmd.h     2021-04-17 13:53:28.776879861 +0200
+@@ -1,106 +1,3 @@
+-/*    NetBSD: xenio.h,v 1.3 2005/05/24 12:07:12 yamt Exp $    */
+-
+-/******************************************************************************
+- * privcmd.h
+- * 
+- * Copyright (c) 2003-2004, K A Fraser
+- * 
+- * This file may be distributed separately from the Linux kernel, or
+- * incorporated into other software packages, subject to the following license:
+- * 
+- * Permission is hereby granted, free of charge, to any person obtaining a copy
+- * of this source file (the "Software"), to deal in the Software without
+- * restriction, including without limitation the rights to use, copy, modify,
+- * merge, publish, distribute, sublicense, and/or sell copies of the Software,
+- * and to permit persons to whom the Software is furnished to do so, subject to
+- * the following conditions:
+- * 
+- * The above copyright notice and this permission notice shall be included in
+- * all copies or substantial portions of the Software.
+- * 
+- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
+- * IN THE SOFTWARE.
+- */
+-
+-#ifndef __NetBSD_PRIVCMD_H__
+-#define __NetBSD_PRIVCMD_H__
+-
+-/* Interface to /dev/xen/privcmd */
+-
+-typedef struct privcmd_hypercall
+-{
+-    unsigned long op;
+-    unsigned long arg[5];
+-    long retval;
+-} privcmd_hypercall_t;
+-
+-typedef struct privcmd_mmap_entry {
+-    unsigned long va;
+-    unsigned long mfn;
+-    unsigned long npages;
+-} privcmd_mmap_entry_t; 
+-
+-typedef struct privcmd_mmap {
+-    int num;
+-    domid_t dom; /* target domain */
+-    privcmd_mmap_entry_t *entry;
+-} privcmd_mmap_t; 
+-
+-typedef struct privcmd_mmapbatch {
+-    int num;     /* number of pages to populate */
+-    domid_t dom; /* target domain */
+-    unsigned long addr;  /* virtual address */
+-    unsigned long *arr; /* array of mfns - top nibble set on err */
+-} privcmd_mmapbatch_t; 
+-
+-typedef struct privcmd_blkmsg
+-{
+-    unsigned long op;
+-    void         *buf;
+-    int           buf_size;
+-} privcmd_blkmsg_t;
+-
+-/*
+- * @cmd: IOCTL_PRIVCMD_HYPERCALL
+- * @arg: &privcmd_hypercall_t
+- * Return: Value returned from execution of the specified hypercall.
+- */
+-#define IOCTL_PRIVCMD_HYPERCALL         \
+-    _IOWR('P', 0, privcmd_hypercall_t)
+-
+-#if defined(_KERNEL)
+-/* compat */
+-#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN_OLD \
+-    _IO('P', 1)
+-#endif /* defined(_KERNEL) */
+-    
+-#define IOCTL_PRIVCMD_MMAP             \
+-    _IOW('P', 2, privcmd_mmap_t)
+-#define IOCTL_PRIVCMD_MMAPBATCH        \
+-    _IOW('P', 3, privcmd_mmapbatch_t)
+-#define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \
+-    _IOR('P', 4, unsigned long)
+-
+-/*
+- * @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN
+- * @arg: n/a
+- * Return: Port associated with domain-controller end of control event channel
+- *         for the initial domain.
+- */
+-#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
+-    _IOR('P', 5, int)
+-
+-/* Interface to /dev/xenevt */
+-/* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition. */
+-#define EVTCHN_RESET  _IO('E', 1)
+-/* EVTCHN_BIND: Bind to the specified event-channel port. */
+-#define EVTCHN_BIND   _IOW('E', 2, unsigned long)
+-/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */
+-#define EVTCHN_UNBIND _IOW('E', 3, unsigned long)
+-
+-#endif /* __NetBSD_PRIVCMD_H__ */
++/* use the system-provided headers */
++#include <xen/xenio.h>
++#include <xen/xenio3.h>
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_libs_evtchn_netbsd.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_libs_evtchn_netbsd.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_libs_evtchn_netbsd.c        Fri Aug 22 09:00:13 2025
@@ -0,0 +1,20 @@
+$NetBSD: patch-tools_libs_evtchn_netbsd.c,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+Set O_CLOEXEC if requested; avoid O_NONBLOCK (from libs/evtchn/freebsd.c)
+
+--- tools/libs/evtchn/netbsd.c.orig    2024-04-12 16:52:51.230321519 +0200
++++ tools/libs/evtchn/netbsd.c 2024-04-12 16:55:02.402441409 +0200
+@@ -33,8 +33,13 @@
+ 
+ int osdep_evtchn_open(xenevtchn_handle *xce, unsigned int flags)
+ {
+-    int fd = open(EVTCHN_DEV_NAME, O_NONBLOCK|O_RDWR);
++    int open_flags = O_RDWR;
++    int fd;
+ 
++    if ( !(flags & XENEVTCHN_NO_CLOEXEC) )
++        open_flags |= O_CLOEXEC;
++
++    fd = open(EVTCHN_DEV_NAME, open_flags);
+     if ( fd == -1 )
+         return -1;
+ 
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_libs_foreignmemory_netbsd.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_libs_foreignmemory_netbsd.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_libs_foreignmemory_netbsd.c Fri Aug 22 09:00:13 2025
@@ -0,0 +1,14 @@
+$NetBSD: patch-tools_libs_foreignmemory_netbsd.c,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+Set O_CLOEXEC if requested; (from libs/foreignmemory/freebsd.c)
+
+--- tools/libs/foreignmemory/netbsd.c.orig     2024-04-12 16:58:08.041146845 +0200
++++ tools/libs/foreignmemory/netbsd.c  2024-04-12 16:58:33.613393138 +0200
+@@ -28,7 +28,7 @@
+ int osdep_xenforeignmemory_open(xenforeignmemory_handle *fmem)
+ {
+     int flags, saved_errno;
+-    int fd = open("/kern/xen/privcmd", O_RDWR);
++    int fd = open("/kern/xen/privcmd", O_RDWR|O_CLOEXEC);
+ 
+     if ( fd == -1 )
+     {
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_dom.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_dom.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_dom.c   Fri Aug 22 09:00:13 2025
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_libxl_libxl_dom.c,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/libs/light/libxl_dom.c.orig  2020-12-08 15:28:31.000000000 +0100
++++ tools/libs/light/libxl_dom.c       2020-12-09 15:59:56.104509990 +0100
+@@ -1228,7 +1228,7 @@
+         goto out;
+     }
+     uuid_string = GCSPRINTF(LIBXL_UUID_FMT, LIBXL_UUID_BYTES(info.uuid));
+-    path = GCSPRINTF(XEN_LIB_DIR "/userdata-%s.%u.%s.%s",
++    path = GCSPRINTF(XEN_RUN_DIR "/userdata-%s.%u.%s.%s",
+                      wh, domid, uuid_string, userdata_userid);
+ 
+  out:
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_event.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_event.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_event.c Fri Aug 22 09:00:13 2025
@@ -0,0 +1,24 @@
+$NetBSD: patch-tools_libxl_libxl_event.c,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+The SIGCHLD handler just writes to a pipe where the reader is the
+same process. The idea is that this will cause poll(2) in the main
+thread to exit with the reaper pipe readable, and do child cleanup here.
+
+Unfortunably, is the child also has a write pipe back to the
+parent (as e.g. with pygrub), the loop in afterpoll_internal() may see the
+POLLHUP event on this pipe before the POLLIN even on the reaper pipe, and
+this will be considered as an error (from e.g. pygrub).
+
+work around by filtering POLLHUP events here
+
+--- tools/libs/light/libxl_event.c.orig        2020-12-08 15:28:31.000000000 +0100
++++ tools/libs/light/libxl_event.c     2020-12-09 16:00:48.840221028 +0100
+@@ -1443,7 +1443,7 @@
+ 
+             revents = afterpoll_check_fd(poller,fds,nfds,
+                                          efd->fd,efd->events);
+-            if (revents)
++            if (revents & ~POLLHUP)
+                 goto found_fd_event;
+         }
+         /* no ordinary fd events, then */
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_internal.h
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_internal.h:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_libxl_libxl_internal.h      Fri Aug 22 09:00:13 2025
@@ -0,0 +1,23 @@
+$NetBSD: patch-tools_libxl_libxl_internal.h,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+bump some timeouts to more reasonable values. 40s is not enough
+if there is lots of them (e.g lots of network interfaces) and they
+need to be serialized.
+
+--- tools/libs/light/libxl_internal.h.orig     2020-12-08 15:28:31.000000000 +0100
++++ tools/libs/light/libxl_internal.h  2020-12-09 16:01:49.819103324 +0100
+@@ -93,11 +93,11 @@
+ #include "_libxl_types_internal_json.h"
+ 
+ #define LIBXL_INIT_TIMEOUT 10
+-#define LIBXL_DESTROY_TIMEOUT 10
+-#define LIBXL_HOTPLUG_TIMEOUT 40
++#define LIBXL_DESTROY_TIMEOUT 180
++#define LIBXL_HOTPLUG_TIMEOUT 180
+ /* QEMU may be slow to load and start due to a bug in Linux where the I/O
+  * subsystem sometime produce high latency under load. */
+-#define LIBXL_DEVICE_MODEL_START_TIMEOUT 60
++#define LIBXL_DEVICE_MODEL_START_TIMEOUT 180
+ #define LIBXL_DEVICE_MODEL_SAVE_FILE XEN_LIB_DIR "/qemu-save" /* .$domid */
+ #define LIBXL_DEVICE_MODEL_RESTORE_FILE XEN_LIB_DIR "/qemu-resume" /* .$domid */
+ #define LIBXL_QMP_CMD_TIMEOUT 10
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_common.make
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_common.make:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_common.make   Fri Aug 22 09:00:13 2025
@@ -0,0 +1,21 @@
+$NetBSD: patch-tools_ocaml_common.make,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+Handle ocaml-findlib 1.7.3 already appending destdir
+
+--- tools/ocaml/common.make.orig       2025-08-04 15:22:34.000000000 +0200
++++ tools/ocaml/common.make    2025-08-21 16:27:13.873418217 +0200
+@@ -3,7 +3,7 @@
+ CC ?= gcc
+ OCAMLOPT ?= ocamlopt
+ OCAMLC ?= ocamlc
+-OCAMLMKLIB ?= ocamlmklib
++OCAMLMKLIB ?= ocamlmklib -elfmode
+ OCAMLDEP ?= ocamldep
+ OCAMLLEX ?= ocamllex
+ OCAMLYACC ?= ocamlyacc
+@@ -16,4 +16,4 @@
+ 
+ VERSION := $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile)
+ 
+-OCAMLDESTDIR ?= $(DESTDIR)$(shell $(OCAMLFIND) printconf destdir)
++OCAMLDESTDIR ?= $(shell $(OCAMLFIND) printconf destdir)
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_xenstored_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_xenstored_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_xenstored_Makefile    Fri Aug 22 09:00:13 2025
@@ -0,0 +1,12 @@
+$NetBSD: patch-tools_ocaml_xenstored_Makefile,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/ocaml/xenstored/Makefile.orig        2016-02-09 14:44:19.000000000 +0000
++++ tools/ocaml/xenstored/Makefile
+@@ -1,6 +1,7 @@
+ XEN_ROOT = $(CURDIR)/../../..
+ OCAML_TOPLEVEL = $(CURDIR)/..
+ include $(OCAML_TOPLEVEL)/common.make
++XEN_CONFIG_DIR=${XEN_EXAMPLES_DIR}
+ 
+ # Include configure output (config.h)
+ CFLAGS += -include $(XEN_ROOT)/tools/config.h
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_xenstored_utils.ml
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_xenstored_utils.ml:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_ocaml_xenstored_utils.ml    Fri Aug 22 09:00:13 2025
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_ocaml_xenstored_utils.ml,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/ocaml/xenstored/utils.ml.orig        2025-08-04 15:22:34.000000000 +0200
++++ tools/ocaml/xenstored/utils.ml     2025-08-21 16:25:53.106883352 +0200
+@@ -92,7 +92,7 @@
+   let buf = Bytes.make 20 '\000' in
+   let sz = Unix.read fd buf 0 20 in
+   Unix.close fd;
+-  int_of_string_exn (Bytes.sub_string buf 0 sz)
++  int_of_string_exn (String.trim (Bytes.sub_string buf 0 sz))
+ 
+ (* @path may be guest data and needs its length validating.  @connection_path
+  * is generated locally in xenstored and always of the form "/local/domain/$N/" *)
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_pygrub_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_pygrub_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_pygrub_Makefile     Fri Aug 22 09:00:13 2025
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_pygrub_Makefile,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/pygrub/Makefile.orig 2023-10-06 19:17:42.000000000 +0200
++++ tools/pygrub/Makefile      2023-10-11 16:22:36.161106315 +0200
+@@ -3,7 +3,7 @@
+ include $(XEN_ROOT)/tools/Rules.mk
+ 
+ PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
+-PY_LDFLAGS = $(SHLIB_LDFLAGS) $(APPEND_LDFLAGS)
++PY_LDFLAGS = $(SHLIB_LDFLAGS) $(LDFLAGS) $(APPEND_LDFLAGS)
+ INSTALL_LOG = build/installed_files.txt
+ 
+ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" \
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_python_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_python_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_python_Makefile     Fri Aug 22 09:00:13 2025
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_python_Makefile,v 1.1 2025/08/22 09:00:13 bouyer Exp $
+
+--- tools/python/Makefile.orig 2020-12-14 15:32:06.314547060 +0100
++++ tools/python/Makefile      2020-12-14 15:33:29.005101260 +0100
+@@ -5,7 +5,7 @@
+ all: build
+ 
+ PY_CFLAGS = $(CFLAGS) $(PY_NOOPT_CFLAGS)
+-PY_LDFLAGS = $(SHLIB_LDFLAGS) $(APPEND_LDFLAGS)
++PY_LDFLAGS = $(SHLIB_LDFLAGS) $(LDFLAGS) $(APPEND_LDFLAGS)
+ INSTALL_LOG = build/installed_files.txt
+ 
+ setup.py = CC="$(CC)" CFLAGS="$(PY_CFLAGS)" LDSHARED="$(CC)" LDFLAGS="$(PY_LDFLAGS)" \
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_audio_audio.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_audio_audio.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_audio_audio.c      Fri Aug 22 09:00:14 2025
@@ -0,0 +1,27 @@
+$NetBSD: patch-tools_qemu-xen_audio_audio.c,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+
+--- tools/qemu-xen/audio/audio.c.orig  2023-08-16 11:43:53.000000000 +0200
++++ tools/qemu-xen/audio/audio.c       2023-10-12 12:59:41.625600778 +0200
+@@ -895,6 +895,7 @@
+     if (audio_get_pdo_in(hw->s->dev)->mixing_engine) {
+         return audio_pcm_sw_read(sw, buf, size);
+     } else {
++#undef read
+         return hw->pcm_ops->read(hw, buf, size);
+     }
+ }
+@@ -2158,12 +2159,13 @@
+ void audio_parse_option(const char *opt)
+ {
+     Audiodev *dev = NULL;
++    Visitor *v;
+ 
+     if (is_help_option(opt)) {
+         audio_help();
+         exit(EXIT_SUCCESS);
+     }
+-    Visitor *v = qobject_input_visitor_new_str(opt, "driver", &error_fatal);
++    v = qobject_input_visitor_new_str(opt, "driver", &error_fatal);
+     visit_type_Audiodev(v, NULL, &dev, &error_fatal);
+     visit_free(v);
+ 
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_net_tap-bsd.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_net_tap-bsd.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_net_tap-bsd.c      Fri Aug 22 09:00:14 2025
@@ -0,0 +1,44 @@
+$NetBSD: patch-tools_qemu-xen_net_tap-bsd.c,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+
+--- tools/qemu-xen/net/tap-bsd.c.orig  2023-08-16 11:43:53.000000000 +0200
++++ tools/qemu-xen/net/tap-bsd.c       2023-11-14 17:27:20.501570015 +0100
+@@ -34,7 +34,7 @@
+ #include <net/if_tap.h>
+ #endif
+ 
+-#ifndef __FreeBSD__
++#if !defined(__FreeBSD__) && !defined(__NetBSD__)
+ int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
+              int vnet_hdr_required, int mq_required, Error **errp)
+ {
+@@ -102,7 +102,7 @@
+     return fd;
+ }
+ 
+-#else /* __FreeBSD__ */
++#else /* !__FreeBSD__ && !__NetBSD__ */
+ 
+ #define PATH_NET_TAP "/dev/tap"
+ 
+@@ -127,6 +127,7 @@
+     }
+ 
+     if (ifname[0] != '\0') {
++#ifdef SIOCSIFNAME
+         /* User requested the interface to have a specific name */
+         s = socket(AF_LOCAL, SOCK_DGRAM, 0);
+         if (s < 0) {
+@@ -143,10 +144,12 @@
+             close(fd);
+             return -1;
+         }
++#else
++        pstrcpy(ifname, ifname_size, ifr.ifr_name);
++#endif
+     } else {
+         pstrcpy(ifname, ifname_size, ifr.ifr_name);
+     }
+-
+     return fd;
+ }
+ 
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_net_tap.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_net_tap.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_net_tap.c  Fri Aug 22 09:00:14 2025
@@ -0,0 +1,70 @@
+$NetBSD: patch-tools_qemu-xen_net_tap.c,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+
+From Roman Shaposhnik via xen-devel: pass bridge name to ifup script
+
+--- tools/qemu-xen/net/tap.c.orig      2025-08-21 14:25:20.000000000 +0200
++++ tools/qemu-xen/net/tap.c   2025-08-21 16:30:35.628585691 +0200
+@@ -64,7 +64,7 @@
+     Notifier exit;
+ } TAPState;
+ 
+-static void launch_script(const char *setup_script, const char *ifname,
++static void launch_script(const char *setup_script, const char *ifname, const char *bridge,
+                           int fd, Error **errp);
+ 
+ static void tap_send(void *opaque);
+@@ -279,7 +279,7 @@
+     Error *err = NULL;
+ 
+     if (s->down_script[0]) {
+-        launch_script(s->down_script, s->down_script_arg, s->fd, &err);
++        launch_script(s->down_script, s->down_script_arg, "bn1", s->fd, &err);
+         if (err) {
+             error_report_err(err);
+         }
+@@ -403,7 +403,7 @@
+     qemu_close_all_open_fd(skip_fd, nskip);
+ }
+ 
+-static void launch_script(const char *setup_script, const char *ifname,
++static void launch_script(const char *setup_script, const char *ifname, const char *bridge,
+                           int fd, Error **errp)
+ {
+     int pid, status;
+@@ -422,6 +422,7 @@
+         parg = args;
+         *parg++ = (char *)setup_script;
+         *parg++ = (char *)ifname;
++      *parg++ = (char *)bridge;
+         *parg = NULL;
+         execv(setup_script, args);
+         _exit(1);
+@@ -609,7 +610,7 @@
+ 
+ static int net_tap_init(const NetdevTapOptions *tap, int *vnet_hdr,
+                         const char *setup_script, char *ifname,
+-                        size_t ifname_sz, int mq_required, Error **errp)
++                        size_t ifname_sz, const char *bridge, int mq_required, Error **errp)
+ {
+     Error *err = NULL;
+     int fd, vnet_hdr_required;
+@@ -631,7 +632,7 @@
+     if (setup_script &&
+         setup_script[0] != '\0' &&
+         strcmp(setup_script, "no") != 0) {
+-        launch_script(setup_script, ifname, fd, &err);
++        launch_script(setup_script, ifname, bridge, fd, &err);
+         if (err) {
+             error_propagate(errp, err);
+             close(fd);
+@@ -952,7 +953,9 @@
+ 
+         for (i = 0; i < queues; i++) {
+             fd = net_tap_init(tap, &vnet_hdr, i >= 1 ? "no" : script,
+-                              ifname, sizeof ifname, queues > 1, errp);
++                              ifname, sizeof ifname, 
++                            tap->br != NULL ? tap->br : "bn1",
++                            queues > 1, errp);
+             if (fd == -1) {
+                 return -1;
+             }
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_pc-bios_optionrom_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_pc-bios_optionrom_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_qemu-xen_pc-bios_optionrom_Makefile Fri Aug 22 09:00:14 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-tools_qemu-xen_pc-bios_optionrom_Makefile,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+
+force ld in 32bit mode
+
+--- tools/qemu-xen/pc-bios/optionrom/Makefile.orig     2025-08-21 14:25:20.000000000 +0200
++++ tools/qemu-xen/pc-bios/optionrom/Makefile  2025-08-21 16:32:01.954973578 +0200
+@@ -36,7 +36,7 @@
+           $(call cc-option,-Wno-array-bounds)) 3> config-cc.mak
+ -include config-cc.mak
+ 
+-override LDFLAGS = -nostdlib -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds
++override LDFLAGS = -nostdlib -Wl,-melf_i386 -Wl,--build-id=none,-T,$(SRC_DIR)/flat.lds
+ 
+ pvh.img: pvh.o pvh_main.o
+ 
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_xenpaging_xenpaging.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_xenpaging_xenpaging.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_xenpaging_xenpaging.c       Fri Aug 22 09:00:14 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-tools_xenpaging_xenpaging.c,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+
+Fix "error: 'buffer' may be used uninitialized"
+
+--- tools/xenpaging/xenpaging.c.orig   2021-04-17 14:43:41.053494277 +0200
++++ tools/xenpaging/xenpaging.c        2021-04-17 14:44:17.167271008 +0200
+@@ -180,7 +180,7 @@
+ 
+ static void *init_page(void)
+ {
+-    void *buffer;
++    void *buffer = NULL; /* XXX gcc */
+ 
+     /* Allocated page memory */
+     errno = posix_memalign(&buffer, XC_PAGE_SIZE, XC_PAGE_SIZE);
Index: pkgsrc/sysutils/xentools420/patches/patch-tools_xl_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-tools_xl_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-tools_xl_Makefile Fri Aug 22 09:00:14 2025
@@ -0,0 +1,16 @@
+$NetBSD: patch-tools_xl_Makefile,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+
+--- tools/xl/Makefile.orig     2021-01-26 12:35:19.000000000 +0100
++++ tools/xl/Makefile  2021-01-26 19:21:03.038848363 +0100
+@@ -43,9 +43,9 @@
+ .PHONY: install
+ install: all
+       $(INSTALL_DIR) $(DESTDIR)$(sbindir)
+-      $(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
++      $(INSTALL_DIR) $(DESTDIR)$(XEN_EXAMPLES_DIR)
+       $(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
+-      $(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl
++      $(INSTALL_DATA) bash-completion $(DESTDIR)$(XEN_EXAMPLES_DIR)/xl.bash
+ 
+ .PHONY: uninstall
+ uninstall:
Index: pkgsrc/sysutils/xentools420/patches/patch-xen_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-xen_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-xen_Makefile      Fri Aug 22 09:00:14 2025
@@ -0,0 +1,12 @@
+$NetBSD: patch-xen_Makefile,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+
+--- xen/Makefile.orig  2023-10-12 11:25:40.066708313 +0200
++++ xen/Makefile       2023-10-12 11:25:43.774709255 +0200
+@@ -1,3 +1,7 @@
++# reset CFLAGS, it accumulates settings from upper level (maybe because it's
++# in $ENV in pkgsrc
++CFLAGS=
++
+ # $(lastword,) for GNU Make older than 3.81
+ lastword = $(word $(words $(1)),$(1))
+ this-makefile := $(call lastword,$(MAKEFILE_LIST))
Index: pkgsrc/sysutils/xentools420/patches/patch-xen_arch_x86_boot_build32.lds.S
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-xen_arch_x86_boot_build32.lds.S:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-xen_arch_x86_boot_build32.lds.S   Fri Aug 22 09:00:14 2025
@@ -0,0 +1,14 @@
+$NetBSD: patch-xen_arch_x86_boot_build32.lds.S,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+linux's toolchain doesn't generate a .eh_frame section but NetBSD does.
+remove it.
+
+--- xen/arch/x86/boot/build32.lds.S.orig       2025-08-21 17:03:49.695572967 +0200
++++ xen/arch/x86/boot/build32.lds.S    2025-08-21 17:05:13.239731155 +0200
+@@ -65,6 +65,7 @@
+        *(.comment)
+        *(.comment.*)
+        *(.note.*)
++       *(.eh_frame)
+   }
+   .shstrtab : {
+        *(.shstrtab)
Index: pkgsrc/sysutils/xentools420/patches/patch-xen_common_libelf_libelf-loader.c
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-xen_common_libelf_libelf-loader.c:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-xen_common_libelf_libelf-loader.c Fri Aug 22 09:00:14 2025
@@ -0,0 +1,23 @@
+$NetBSD: patch-xen_common_libelf_libelf-loader.c,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+
+Compute total symbol table with the same size as used to build the
+symbol table.
+This bug only shows up with 32bit guest kernels, and if the end of the
+symbol table ends less than 64 bytes from a page boundary. When this
+happens the string table is not copied, and the guest sees all symbols with
+empty names.
+
+--- xen/common/libelf/libelf-loader.c.orig     2023-11-16 22:44:21.000000000 +0100
++++ xen/common/libelf/libelf-loader.c  2024-04-02 17:12:05.322638541 +0200
+@@ -204,10 +204,8 @@
+     sz = sizeof(uint32_t);
+ 
+     /* Space for the ELF header and section headers */
+-    sz += offsetof(struct elf_sym_header, elf_header.section) +
+-          ELF_BSDSYM_SECTIONS * (elf_64bit(elf) ? sizeof(Elf64_Shdr) :
+-                                                  sizeof(Elf32_Shdr));
++    sz += sizeof(struct elf_sym_header);
+     sz = elf_round_up(elf, sz);
+ 
+     /*
+      * No need to search for the symtab section header again, it's handler
Index: pkgsrc/sysutils/xentools420/patches/patch-xen_include_Makefile
diff -u /dev/null pkgsrc/sysutils/xentools420/patches/patch-xen_include_Makefile:1.1
--- /dev/null   Fri Aug 22 09:00:14 2025
+++ pkgsrc/sysutils/xentools420/patches/patch-xen_include_Makefile      Fri Aug 22 09:00:14 2025
@@ -0,0 +1,15 @@
+$NetBSD: patch-xen_include_Makefile,v 1.1 2025/08/22 09:00:14 bouyer Exp $
+
+also filter out flags added by pkgsrc
+
+--- xen/include/Makefile.orig  2025-08-04 15:22:34.000000000 +0200
++++ xen/include/Makefile       2025-08-21 16:36:25.971142122 +0200
+@@ -56,7 +56,7 @@
+ cmd_stub_h = echo '/* SAF-9-safe empty header */' >$@
+ 
+ quiet_cmd_compat_i = CPP     $@
+-cmd_compat_i = $(CPP) $(filter-out -Wa$(comma)% -include %/include/xen/config.h,$(XEN_CFLAGS)) $(cppflags-y) -o $@ $<
++cmd_compat_i = $(CPP) $(filter-out -Wa$(comma)% -g3 -include %/include/xen/config.h,$(XEN_CFLAGS)) $(cppflags-y) -o $@ $<
+ 
+ quiet_cmd_compat_c = GEN     $@
+ cmd_compat_c = \



Home | Main Index | Thread Index | Old Index