1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
7 SDESC[standard]= Fast CPU emulator and virtualizer for x86 platform
8 HOMEPAGE= https://www.qemu.org/
12 SITES[main]= https://download.qemu.org/
13 DISTFILE[1]= qemu-8.0.0.tar.xz:main
15 SPKGS[standard]= complete
21 OPTIONS_AVAILABLE= none
22 OPTIONS_STANDARD= none
24 BUILD_DEPENDS= gnutls:dev:standard
26 python-Sphinx:single:python_used
27 python-sphinx-rtd-theme:single:python_used
28 texi2html:primary:standard
31 BUILDRUN_DEPENDS= cyrus-sasl:primary:standard
32 gnutls:primary:standard
33 libepoxy:primary:standard
34 nettle:primary:standard
35 snappy:primary:standard
38 USES= cpe gmake pkgconfig bison perl:build python:build
39 jpeg png mesa ncurses makeinfo ninja curl fontconfig
41 GNOME_COMPONENTS= gdkpixbuf gtk2 vte
42 SDL_COMPONENTS= sdl2 image2
43 XORG_COMPONENTS= x11 xext
45 LICENSE= GPLv2:primary
46 LICENSE_TERMS= primary:{{WRKSRC}}/LICENSE
47 LICENSE_FILE= GPLv2:{{WRKSRC}}/COPYING
50 FPC_EQUIVALENT= emulators/qemu
53 CONFIGURE_ARGS= --disable-usb-redir
54 --disable-stack-protector
64 --python={{PYTHON_CMD}}
67 BUILD_WRKSRC= {{WRKSRC}}/build
68 MAKE_ENV= BSD_MAKE="{{MAKE}}"
71 INSTALL_WRKSRC= {{WRKSRC}}/build
72 PLIST_SUB= JQUERY=3.6.0
75 CFLAGS= -I{{NCURSESBASE}}/include/ncursesw
76 VAR_OPSYS[freebsd]= CONFIGURE_ARGS=--enable-netmap
77 CONFIGURE_ARGS=--disable-linux-user
78 CONFIGURE_ARGS=--disable-linux-aio
79 VAR_OPSYS[linux]= CONFIGURE_ARGS=--disable-netmap
80 CONFIGURE_ARGS=--disable-linux-user
81 VAR_OPSYS[dragonfly]= CONFIGURE_ARGS=--disable-netmap
82 CONFIGURE_ARGS=--disable-linux-user
83 CONFIGURE_ARGS=--disable-linux-aio
84 VAR_OPSYS[midnightbsd]= CONFIGURE_ARGS=--enable-netmap
85 CONFIGURE_ARGS=--disable-linux-user
86 CONFIGURE_ARGS=--disable-linux-aio
87 CONFIGURE_ARGS=--extra-ldflags=-lutil
90 # silence some include warnings
91 ${MKDIR} ${WRKSRC}/bsd-user/dragonfly
93 ${CP} -a ${WRKSRC}/bsd-user/freebsd ${WRKSRC}/bsd-user/midnightbsd
96 ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample \
97 ${STAGEDIR}${PREFIX}/etc
98 ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample \
99 ${STAGEDIR}${PREFIX}/etc
100 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-*
101 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/elf2dmp
102 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/share/qemu/palcode-clipper
103 ${STRIP_CMD} ${STAGEDIR}${PREFIX}/share/qemu/hppa-firmware.img
104 (cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${STD_DOCDIR}/)
105 # remove sphinx leftovers
106 ${RM} -r ${STAGEDIR}${STD_DOCDIR}/docs/sphinx
107 # remove empty directories
108 ${RM} -r ${STAGEDIR}/var
110 pre-configure-dragonfly:
111 # On dragonfly, userland programs can't include <sys/disk.h>
112 ${REINPLACE_CMD} -e 's|sys/disk\.h|sys/skipdisk.h|' \
113 ${WRKSRC}/meson.build
115 [FILE:782:descriptions/desc.primary]
116 QEMU is a fast processor emulator using dynamic translation to achieve
117 good emulation speed. QEMU has two operating modes:
119 * Full system emulation. In this mode, QEMU emulates a full system (for
120 example a PC), including a processor and various peripherials. It can
121 be used to launch different Operating Systems without rebooting the PC
122 or to debug system code.
123 * User mode emulation (Linux host only). In this mode, QEMU can launch
124 Linux processes compiled for one CPU on another CPU. It can be used to
125 launch the Wine Windows API emulator or to ease cross-compilation and
128 As QEMU requires no host kernel patches to run, it is safe and easy to use.
130 See also the preconfigured system images on http://oszoo.org/
131 Many live cd isos also work.
135 bb60f0341531181d6cc3969dd19a013d0427a87f918193970d9adb91131e56d0 127835148 qemu-8.0.0.tar.xz
138 [FILE:2936:manifests/plist.primary]
139 @sample etc/qemu-ifdown.sample
140 @sample etc/qemu-ifup.sample
149 %%ONLY-LINUX%%libexec/qemu-bridge-helper
150 %%ONLY-MIDNIGHTBSD%%bin/
168 qemu-system-loongarch64
170 qemu-system-microblaze
171 qemu-system-microblazeel
192 include/qemu-plugin.h
193 share/applications/qemu.desktop
194 share/icons/hicolor/128x128/apps/qemu.png
195 share/icons/hicolor/16x16/apps/qemu.png
196 share/icons/hicolor/24x24/apps/qemu.png
197 share/icons/hicolor/256x256/apps/qemu.png
198 share/icons/hicolor/32x32/apps/
201 share/icons/hicolor/48x48/apps/qemu.png
202 share/icons/hicolor/512x512/apps/qemu.png
203 share/icons/hicolor/64x64/apps/qemu.png
204 share/icons/hicolor/scalable/apps/qemu.svg
217 edk2-i386-secure-code.fd
221 edk2-x86_64-secure-code.fd
240 opensbi-riscv32-generic-fw_dynamic.bin
241 opensbi-riscv64-generic-fw_dynamic.bin
244 petalogix-s3adsp1800.dtb
260 u-boot-sam460-20100605.bin
263 vgabios-bochs-display.bin
274 50-edk2-i386-secure.json
275 50-edk2-x86_64-secure.json
317 [FILE:10463:manifests/plist.docs]
326 share/doc/qemu/_static/
330 documentation_options.js
341 share/doc/qemu/_static/css/
344 share/doc/qemu/_static/css/fonts/
345 Roboto-Slab-Bold.woff
346 Roboto-Slab-Bold.woff2
347 Roboto-Slab-Regular.woff
348 Roboto-Slab-Regular.woff2
349 fontawesome-webfont.eot
350 fontawesome-webfont.svg
351 fontawesome-webfont.ttf
352 fontawesome-webfont.woff
353 fontawesome-webfont.woff2
354 lato-bold-italic.woff
355 lato-bold-italic.woff2
358 lato-normal-italic.woff
359 lato-normal-italic.woff2
362 share/doc/qemu/_static/js/
364 html5shiv-printshiv.min.js
367 share/doc/qemu/about/
373 removed-features.html
374 share/doc/qemu/devel/
378 block-coroutine-wrapper.html
383 conflict-resolution.html
384 control-flow-integrity.html
401 multi-thread-tcg.html
409 secure-coding-practices.html
412 submitting-a-patch.html
413 submitting-a-pull-request.html
424 writing-monitor-commands.html
427 block-replication.txt
437 multi-thread-compression.txt
440 pci_expander_bridge.txt
447 qemu-option-trace.rst.inc
454 xen-save-devices-state.txt
455 share/doc/qemu/docs/_templates/footer.html
456 share/doc/qemu/docs/about/
463 share/doc/qemu/docs/config/
465 mach-virt-graphical.cfg
468 q35-virtio-graphical.cfg
469 q35-virtio-serial.cfg
470 share/doc/qemu/docs/devel/
476 block-coroutine-wrapper.rst
478 ci-definitions.rst.inc
484 conflict-resolution.rst
485 control-flow-integrity.rst
504 multiple-iothreads.txt
513 secure-coding-practices.rst
516 submitting-a-patch.rst
517 submitting-a-pull-request.rst
529 writing-monitor-commands.rst
530 share/doc/qemu/docs/interop/
538 live-block-operations.rst
548 qemu-storage-daemon-qmp-ref.rst
555 virtio-balloon-stats.rst
556 vnc-ledstate-pseudo-encoding.rst
557 share/doc/qemu/docs/specs/
561 acpi_hw_reduced_hotplug.rst
573 ppc-spapr-hotplug.rst
575 ppc-spapr-uv-hcalls.rst
580 sev-guest-firmware.rst
587 share/doc/qemu/docs/sphinx-static/
590 share/doc/qemu/docs/spin/
592 aio_notify_accept.promela
593 aio_notify_bug.promela
594 tcg-exclusive.promela
595 win32-qemu-event.promela
596 share/doc/qemu/docs/system/
600 confidential-guest-support.rst
602 cpu-models-mips.rst.inc
603 cpu-models-x86-abi.csv
604 cpu-models-x86.rst.inc
606 device-url-syntax.rst.inc
623 qemu-block-drivers.rst
624 qemu-block-drivers.rst.inc
632 target-i386-desc.rst.inc
646 virtio-net-failover.rst
648 share/doc/qemu/docs/system/arm/
682 share/doc/qemu/docs/system/devices/
695 share/doc/qemu/docs/system/i386/
696 amd-memory-encryption.rst
704 share/doc/qemu/docs/system/loongarch/virt.rst
705 share/doc/qemu/docs/system/openrisc/
710 share/doc/qemu/docs/system/ppc/
717 share/doc/qemu/docs/system/riscv/
718 microchip-icicle-kit.rst
722 share/doc/qemu/docs/system/s390x/
730 share/doc/qemu/docs/tools/
735 qemu-storage-daemon.rst
737 virtfs-proxy-helper.rst
738 share/doc/qemu/docs/user/
741 share/doc/qemu/interop/
748 live-block-operations.html
753 qemu-storage-daemon-qmp-ref.html
757 virtio-balloon-stats.html
758 vnc-ledstate-pseudo-encoding.html
759 share/doc/qemu/specs/
760 acpi_cpu_hotplug.html
763 acpi_hw_reduced_hotplug.html
764 acpi_mem_hotplug.html
766 acpi_pci_hotplug.html
769 ppc-spapr-hcalls.html
770 ppc-spapr-hotplug.html
772 ppc-spapr-uv-hcalls.html
775 sev-guest-firmware.html
777 share/doc/qemu/system/
781 confidential-guest-support.html
783 device-emulation.html
798 qemu-block-drivers.html
819 virtio-net-failover.html
821 share/doc/qemu/system/arm/
853 xlnx-versal-virt.html
855 share/doc/qemu/system/devices/
868 share/doc/qemu/system/i386/
869 amd-memory-encryption.html
877 share/doc/qemu/system/loongarch/virt.html
878 share/doc/qemu/system/openrisc/
883 share/doc/qemu/system/ppc/
890 share/doc/qemu/system/riscv/
891 microchip-icicle-kit.html
895 share/doc/qemu/system/s390x/
903 share/doc/qemu/tools/
908 qemu-storage-daemon.html
910 virtfs-proxy-helper.html
916 [FILE:333:manifests/plist.nls]
917 share/locale/bg/LC_MESSAGES/qemu.mo
918 share/locale/de_DE/LC_MESSAGES/qemu.mo
919 share/locale/fr_FR/LC_MESSAGES/qemu.mo
920 share/locale/hu/LC_MESSAGES/qemu.mo
921 share/locale/it/LC_MESSAGES/qemu.mo
922 share/locale/sv/LC_MESSAGES/qemu.mo
923 share/locale/tr/LC_MESSAGES/qemu.mo
924 share/locale/uk/LC_MESSAGES/qemu.mo
925 share/locale/zh_CN/LC_MESSAGES/qemu.mo
928 [FILE:416:manifests/plist.man]
929 %%ONLY-FREEBSD%%share/man/man7/qemu-ga-ref.7.gz
930 %%ONLY-FREEBSD%%share/man/man8/qemu-ga.8.gz
931 %%ONLY-LINUX%%share/man/man7/qemu-ga-ref.7.gz
932 %%ONLY-LINUX%%share/man/man8/qemu-ga.8.gz
935 qemu-storage-daemon.1.gz
938 qemu-block-drivers.7.gz
941 qemu-storage-daemon-qmp-ref.7.gz
947 [FILE:414:patches/patch-accel_tcg_translate-all.c]
948 --- accel/tcg/translate-all.c.orig 2023-04-19 16:31:47 UTC
949 +++ accel/tcg/translate-all.c
952 #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
953 #include <sys/param.h>
954 -#if __FreeBSD_version >= 700104
955 +#if defined(__MidnightBSD__) || __FreeBSD_version >= 700104
956 #define HAVE_KINFO_GETVMMAP
957 #define sigqueue sigqueue_freebsd /* avoid redefinition */
958 #include <sys/proc.h>
961 [FILE:546:patches/patch-configure]
962 --- configure.orig 2023-04-19 16:31:47 UTC
964 @@ -429,6 +429,8 @@ elif check_define __sun__ ; then
966 elif check_define __HAIKU__ ; then
968 +elif check_define __MidnightBSD__ ; then
970 elif check_define __FreeBSD__ ; then
972 elif check_define __FreeBSD_kernel__ && check_define __GLIBC__; then
973 @@ -470,6 +472,10 @@ dragonfly)
979 + make="${MAKE-gmake}"
986 [FILE:2507:patches/patch-meson.build]
987 --- meson.build.orig 2023-04-19 16:31:47 UTC
989 @@ -58,8 +58,8 @@ config_host_data = configuration_data()
991 qapi_trace_events = []
993 -bsd_oses = ['gnu/kfreebsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin']
994 -supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux']
995 +bsd_oses = ['midnightbsd', 'freebsd', 'netbsd', 'openbsd', 'dragonfly', 'darwin']
996 +supported_oses = ['windows', 'freebsd', 'netbsd', 'openbsd', 'darwin', 'sunos', 'linux', 'dragonfly', 'midnightbsd']
997 supported_cpus = ['ppc', 'ppc64', 's390x', 'riscv', 'x86', 'x86_64',
998 'arm', 'aarch64', 'loongarch64', 'mips', 'mips64', 'sparc64']
1000 @@ -441,7 +441,7 @@ if get_option('hax').allowed()
1001 accelerators += 'CONFIG_HAX'
1004 -if targetos == 'netbsd'
1005 +if targetos in [ 'netbsd', 'dragonfly' ]
1006 nvmm = cc.find_library('nvmm', required: get_option('nvmm'))
1008 accelerators += 'CONFIG_NVMM'
1009 @@ -889,7 +889,7 @@ if have_system and get_option('curses').
1013 - curses_dep_list = targetos == 'windows' ? ['ncurses', 'ncursesw'] : ['ncursesw']
1014 + curses_dep_list = targetos == 'windows' ? ['ncurses', 'ncursesw'] : ['ncurses']
1015 curses = dependency(curses_dep_list,
1017 method: 'pkg-config',
1018 @@ -912,15 +912,16 @@ if have_system and get_option('curses').
1019 has_curses_h = cc.has_header('curses.h', args: curses_compile_args)
1022 - curses_libname_list = (targetos == 'windows' ? ['pdcurses'] : ['ncursesw', 'cursesw'])
1023 + libtinfo = cc.find_library('tinfo', required: false, static: enable_static)
1024 + curses_libname_list = (targetos == 'windows' ? ['pdcurses'] : ['ncurses'])
1025 foreach curses_libname : curses_libname_list
1026 libcurses = cc.find_library(curses_libname,
1028 kwargs: static_kwargs)
1029 if libcurses.found()
1030 - if cc.links(curses_test, args: curses_compile_args, dependencies: libcurses)
1031 + if cc.links(curses_test, args: curses_compile_args, dependencies: [libncurses,libtinfo])
1032 curses = declare_dependency(compile_args: curses_compile_args,
1033 - dependencies: [libcurses])
1034 + dependencies: [libncurses, libtinfo])
1037 msg = 'curses library not usable'
1040 [FILE:385:patches/patch-meson_mesonbuild_mesonlib_universal.py]
1041 --- meson/mesonbuild/mesonlib/universal.py.orig 2023-04-19 16:32:31 UTC
1042 +++ meson/mesonbuild/mesonlib/universal.py
1043 @@ -658,7 +658,7 @@ def is_netbsd() -> bool:
1046 def is_freebsd() -> bool:
1047 - return platform.system().lower() == 'freebsd'
1048 + return platform.system().lower() in ('freebsd', 'midnightbsd')
1050 def is_irix() -> bool:
1051 return platform.system().startswith('irix')
1054 [FILE:454:patches/patch-net_tap-bsd.c]
1055 --- net/tap-bsd.c.orig 2023-04-19 16:31:47 UTC
1059 #if defined(__NetBSD__) || defined(__FreeBSD__)
1060 #include <sys/ioctl.h>
1061 +#include <sys/socket.h>
1063 #include <net/if_tap.h>
1065 +#if defined(__DragonFly)
1066 +#include <sys/ioctl.h>
1067 +#include <sys/socket.h>
1068 +#include <net/if.h>
1069 +#include <net/tap/if_tap.h>
1073 int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
1076 [FILE:828:patches/patch-roms_u-boot_include_compiler.h]
1077 --- roms/u-boot/include/compiler.h.orig 2023-04-19 16:32:34 UTC
1078 +++ roms/u-boot/include/compiler.h
1080 defined(__NetBSD__) || \
1081 defined(__FreeBSD__) || \
1082 defined(__sun__) || \
1083 + defined(__DragonFly__) || \
1085 # include <inttypes.h>
1086 #elif defined(__linux__) || defined(__WIN32__) || defined(__MINGW32__) || defined(__OpenBSD__)
1089 # include <endian.h>
1090 # include <byteswap.h>
1091 -#elif defined(__MACH__) || defined(__FreeBSD__)
1092 +#elif defined(__MACH__) || defined(__FreeBSD__) || defined(__DragonFly__)
1093 # include <machine/endian.h>
1096 +#if defined(__FreeBSD__) || defined(__DragonFly__)
1097 # include <sys/endian.h> /* htole32 and friends */
1098 # define __BYTE_ORDER BYTE_ORDER
1099 # define __LITTLE_ENDIAN LITTLE_ENDIAN
1102 [FILE:311:patches/patch-roms_u-boot_lib_bch.c]
1103 --- roms/u-boot/lib/bch.c.orig 2023-04-19 16:32:34 UTC
1104 +++ roms/u-boot/lib/bch.c
1106 #include <linux/bitops.h>
1109 -#if defined(__FreeBSD__)
1110 +#if defined(__FreeBSD__) || defined(__DragonFly__)
1111 #include <sys/endian.h>
1112 #elif defined(__APPLE__)
1113 #include <machine/endian.h>
1116 [FILE:344:patches/patch-util_getauxval.c]
1117 --- util/getauxval.c.orig 2023-04-19 16:31:47 UTC
1118 +++ util/getauxval.c
1119 @@ -98,7 +98,7 @@ unsigned long qemu_getauxval(unsigned lo
1123 -#elif defined(__FreeBSD__)
1124 +#elif defined(__MidnightBSD__) || (defined(__FreeBSD__) && __FreeBSD_version__ > 1200001)
1125 #include <sys/auxv.h>
1127 unsigned long qemu_getauxval(unsigned long type)
1130 [FILE:7685:files/pkg-message-single]
1134 - Needs to set net.link.tap.user_open sysctl in order to use /dev/tap*
1135 networking as non-root. Don't forget to adjust device node permissions in
1138 - slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you
1139 still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but
1140 i've been told that that's normal. (fixed on FreeSBIE 1.1.) And you have
1141 to wait a bit for dhclient to do its thing; traffic to address 10.0.2.2 is
1142 routed to 127.1 on the host.
1144 - Expect timer problems when guest kernel HZ is > hosts, for example time
1145 sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe
1146 with a FreeSBIE 1.0 guest, thats because its kernel is built with HZ=5000,
1147 and FreeBSD's default is 100... (no longer a problem with FreeSBIE 1.1.)
1148 The linux 2.6 kernel uses 1000 by default btw. (changed to 250 later, and
1149 recent linux kernels now no longer have a fixed HZ, aka `tickless
1150 kernel'...) Enabling /dev/rtc doesn't seem to help either (not included
1151 since it needs a patch to emulators/rtc.)
1153 - Update: the above problem has gotten worse with FreeBSD guests
1154 somewhere before 8.0, mainly since the kernel now usually wants
1155 double or even quadruple number of timer irqs compared to HZ if
1156 it detects an apic (and at least early versions of FreeBSD 8 had
1157 a bug that essentially halved qemu's clock rate too); the only
1158 reason you usually don't see symptoms of this with FreeBSD 8
1159 guests is they automatically reduce their HZ to 100 when running
1160 in a VM while the default for the host kernel is still HZ=1000.
1161 Workaround: you can disable the apic clock in the guest by setting
1163 hint.apic.0.clock="0"
1165 in loader.conf(5) (or manually at the loader prompt), if that
1166 doesn't work the only things you can do is either reduce the
1167 guest's HZ to, say, 100 by setting e.g.
1171 from the loader as above (which usually is a good idea in a VM
1172 anyway and FreeBSD 8 now does by itself as mentioned), or otherwise
1173 increase the host's HZ to 2000 or even 4000 from the loader in
1176 - The -smb option (smb-export local dir to guest using the default
1177 slirp networking) needs the samba port/package installed
1178 in addition to qemu. (SAMBA knob.)
1180 - If you want to use usb devices connected to the host in the guest
1181 yot need either recent 10-current (not tested yet much) or you can
1182 use usbredir over the network (see below); also unless you are
1183 running qemu as root you then need to fix permissions for /dev/ugen*
1184 device nodes: if you are on 5.x or later (devfs) put a rule in
1185 /etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs
1186 restart. Example devfs.rules:
1189 add path 'ugen*' mode 660 group operator
1191 corresponding rc.conf line:
1193 devfs_system_ruleset="ugen_ruleset"
1195 - If you want to test the new (in 0.15.0) usb network redirection (USBREDIR
1196 option) see this thread by Hans de Goede <hdegoede <at> redhat.com>:
1198 http://thread.gmane.org/gmane.comp.emulators.qemu/110176/focus=110183
1204 1) Start usbredirserver for a usb device:
1205 sudo usbredirserver 045e:0772
1206 2) Start qemu with usb2 support + a chardev talking to usbredirserver +
1207 a usb-redir device using this chardev:
1209 -readconfig docs/ich9-ehci-uhci.cfg \
1210 -chardev socket,id=usbredirchardev,host=localhost,port=4000 \
1211 -device usb-redir,chardev=usbredirchardev,id=usbredirdev ...
1213 [you would replace docs/ich9-ehci-uhci.cfg with e.g.
1214 /raven/share/doc/qemu/docs/ich9-ehci-uhci.cfg, but turns out
1215 ehci was broken for me here with FreeBSD guests and the previous
1216 qemu version at least, I got:
1218 FETCHENTRY: entry at 22C5484 is of type 2 which is not supported yet processing error - resetting ehci HC
1219 Assertion failed: (0), function ehci_advance_state, file /data/ports/emulators/qemu-devel/work/qemu-0.15.0/hw/usb-ehci.c, line 2045.
1221 The new qemu version works better tho.]
1223 - Still usb: since the hub is no longer attached to the uchi controller and
1224 the wakeup mechanism, resume interrupt is not implemented yet linux guests
1225 will suspend the bus, i.e. they wont see devices usb_add'ed after its
1226 (linux') uhci module got loaded. Workaround: either add devices before
1227 linux loads the module or rmmod and modprobe it afterwards. [Not sure
1228 if this still applies to the new libusb host code used on recent
1231 - If you build qemu wihout SDL and then get crashes running it try passing it
1232 -nographic. This should probably be default in that case...
1234 - qemu's network boot roms (-boot n) have a bug when bootfiles sizes are a
1235 multiple of blksize, if this affects you (like with FreeBSD's /boot/pxeboot)
1238 cp /boot/pxeboot pxeboot-qemu && chmod +w pxeboot-qemu && echo >>pxeboot-qemu
1240 and then use pxeboot-qemu. Actually you need recent btx code
1241 (from after 7.0 was released) because of the real mode boot
1242 problem, so use at least pxeboot from there. And I just did that
1243 for the pxeboot extracted out of
1245 ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/7.0-STABLE-200805-i386-bootonly.iso
1249 http://people.freebsd.org/~nox/qemu/pxeboot-qemu
1251 - If you use slirp (usernet, the default) and want to mount nfs into the guest
1252 and you are not running qemu as root, then mountd(8) on the exporting box
1253 needs to be run with -n in order to accept requests from ports >= 1024.
1255 - (not FreeBSD-specific:) There have been reports of qcow2 corruption with (at
1256 least) win2k guests on recent kvm (which uses similar qcow2 code than qemu
1257 now, see this thread:
1259 http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg00713.html -
1261 the consensus on that thread seems to be that qcow(2) code has always been
1262 experimental and you should use raw images if you want reliability; raw is
1263 also usually faster.) You should be able to migrate existing images to raw
1264 using qemu-img(1)'s convert function; raw doesn't support advanced features
1265 like snapshots tho. [a few important qcow2 bugfixed have been committed in
1266 the meantime so this _might_ be less of an issue now; and meanwhile there
1267 also is the new qed format - I don't know how stable that one is.]
1269 - (also not FreeBSD-specific:) It is recommended to pass raw images using the
1270 new -drive syntax, specifying format=raw explicitly in order to avoid
1271 malicious guests being able to exploit the format autodetection thats
1272 otherwise getting used. (Not that you should run malicious guests anyway,
1273 but this eleminates at least a known attack vector.)
1275 - qemu now has improved physical cdrom support, but still there is at
1276 least one known problem: you need to have the guest eject the disc if you
1277 want to change it/take it out, or otherwise the guest may continue using
1278 state (like size) of the old disc. (You can also do like `change ide1-cd0
1279 /dev/acd0' in the monitor after taking out the disc if a guest cannot eject
1282 - The default configuration location (qemu-ifup script etc.) has been changed
1283 from /etc to PREFIX/etc (usually /raven/etc). Move your files accordingly.
1285 - The pcap code (-net nic... -net pcap,ifname=...) should work properly now,
1286 with only one exception: Advanced features like TSO used on the host
1287 interface can cause oversize packets which now do get truncated to avoid
1288 confusing/panicing guests but of course still will cause retransmissions.
1289 So if you see slow throughput and `pcap_send: packet size > ..., truncating'
1290 messages on qemu's tty try disabling TSO etc on the host interface at least
1294 [FILE:20:files/qemu-ifdown.sample]
1299 [FILE:20:files/qemu-ifup.sample]
1304 [FILE:323:dragonfly/patch-hw-ppc_newworld.c]
1305 --- hw/ppc/mac_newworld.c.orig 2023-04-19 16:31:47 UTC
1306 +++ hw/ppc/mac_newworld.c
1308 #include "hw/sysbus.h"
1311 +/* FreeBSD headers define this */
1316 #define MAX_IDE_BUS 2
1317 #define CFG_ADDR 0xf0000510
1318 #define TBFREQ (100UL * 1000UL * 1000UL)
1321 [FILE:334:dragonfly/patch-hw_ppc_mac__oldworld.c]
1322 --- hw/ppc/mac_oldworld.c.orig 2023-04-19 16:31:47 UTC
1323 +++ hw/ppc/mac_oldworld.c
1326 #define GRACKLE_BASE 0xfec00000
1328 +/* FreeBSD headers define this */
1333 static void fw_cfg_boot_set(void *opaque, const char *boot_device,
1338 [FILE:906:dragonfly/patch-util_coroutine-ucontext.c]
1339 --- util/coroutine-ucontext.c.orig 2023-04-19 16:31:47 UTC
1340 +++ util/coroutine-ucontext.c
1341 @@ -225,7 +225,15 @@ Coroutine *qemu_coroutine_new(void)
1342 2, arg.i[0], arg.i[1]);
1344 /* swapcontext() in, siglongjmp() back out */
1345 - if (!sigsetjmp(old_env, 0)) {
1346 + /* Save signal mask in this sigsetjmp, because makecontext on DragonFly
1347 + * leaves all signals blocked when entering the new context with
1349 + * Workaround this, by just having the signal mask restored by the
1350 + * siglongjmp that brings us back from qemu_coroutine_new().
1351 + * XXX Remove this workaround when the makecontext behaviour is fixed
1354 + if (!sigsetjmp(old_env, 1)) {
1355 start_switch_fiber_asan(COROUTINE_YIELD, &fake_stack_save, co->stack,
1357 start_switch_fiber_tsan(&fake_stack_save,