Ravenports generated: 23 Dec 2021 12:42
[ravenports.git] / bucket_A9 / qemu
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               qemu
4 VERSION=                6.2.0
5 KEYWORDS=               emulators
6 VARIANTS=               standard
7 SDESC[standard]=        Fast CPU emulator and virtualizer for x86 platform
8 HOMEPAGE=               https://www.qemu.org/
9 CONTACT=                nobody
10
11 DOWNLOAD_GROUPS=        main
12 SITES[main]=            https://download.qemu.org/
13 DISTFILE[1]=            qemu-6.2.0.tar.xz:main
14 DF_INDEX=               1
15 SPKGS[standard]=        complete
16                         primary
17                         docs
18                         nls
19
20 OPTIONS_AVAILABLE=      none
21 OPTIONS_STANDARD=       none
22
23 BUILD_DEPENDS=          texi2html:primary:standard
24 BUILDRUN_DEPENDS=       nettle:primary:standard
25                         fontconfig:primary:standard
26                         freetype:primary:standard
27                         gnutls:primary:standard
28                         cyrus-sasl:primary:standard
29                         curl:primary:standard
30                         vde2:single:standard
31                         libepoxy:single:standard
32                         snappy:single:standard
33
34 USES=                   cpe gmake pkgconfig bison perl:build python:build
35                         jpeg png mesa gettext-runtime gettext-tools ncurses
36                         makeinfo ninja zstd lzo
37 GNOME_COMPONENTS=       gdkpixbuf gtk2 vte
38 SDL_COMPONENTS=         sdl2 image2
39 XORG_COMPONENTS=        x11 xext
40
41 LICENSE=                GPLv2:primary
42 LICENSE_TERMS=          primary:{{WRKSRC}}/LICENSE
43 LICENSE_FILE=           GPLv2:{{WRKSRC}}/COPYING
44 LICENSE_SCHEME=         solo
45
46 FPC_EQUIVALENT=         emulators/qemu
47
48 MUST_CONFIGURE=         yes
49 CONFIGURE_ARGS=         --disable-usb-redir
50                         --disable-stack-protector
51                         --disable-kvm
52                         --disable-xen
53                         --disable-vde
54                         --enable-nettle
55                         --enable-profiler
56                         --enable-curses
57                         --prefix={{PREFIX}}
58                         --cc={{CC}}
59                         --python={{PYTHON_CMD}}
60                         --localstatedir=/var
61
62 BUILD_WRKSRC=           {{WRKSRC}}/build
63 MAKE_ENV=               BSD_MAKE="{{MAKE}}"
64                         V=1
65
66 INSTALL_WRKSRC=         {{WRKSRC}}/build
67 PLIST_SUB=              JQUERY=3.5.1
68                         UNDERSCORE=1.13.1
69                         MAN="@comment "
70
71 CFLAGS=                 -I{{NCURSESBASE}}/include/ncursesw
72 VAR_OPSYS[freebsd]=     CONFIGURE_ARGS=--enable-netmap
73                         CONFIGURE_ARGS=--disable-linux-user
74                         CONFIGURE_ARGS=--disable-linux-aio
75 VAR_OPSYS[linux]=       CONFIGURE_ARGS=--disable-netmap
76 VAR_OPSYS[dragonfly]=   CONFIGURE_ARGS=--disable-netmap
77                         CONFIGURE_ARGS=--disable-linux-user
78                         CONFIGURE_ARGS=--disable-linux-aio
79
80 post-patch:
81         # silence some include warnings
82         ${MKDIR} ${WRKSRC}/bsd-user/dragonfly
83
84 pre-install:
85         # for some reason file is considered out-of-date
86         ${TOUCH} ${WRKSRC}/config-host.mak
87
88 post-install:
89         ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample \
90                 ${STAGEDIR}${PREFIX}/etc
91         ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample \
92                 ${STAGEDIR}${PREFIX}/etc
93         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-*
94         (cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${STD_DOCDIR}/)
95         # remove sphinx leftovers
96         ${RM} -r ${STAGEDIR}${STD_DOCDIR}/docs/sphinx
97         # remove empty directories
98         ${RM} -r ${STAGEDIR}/var
99
100 pre-configure-dragonfly:
101         # On dragonfly, userland programs can't include <sys/disk.h>
102         ${REINPLACE_CMD} -e 's|sys/disk\.h|sys/skipdisk.h|' \
103                 ${WRKSRC}/meson.build
104
105 [FILE:782:descriptions/desc.primary]
106 QEMU is a fast processor emulator using dynamic translation to achieve
107 good emulation speed.  QEMU has two operating modes:
108
109  * Full system emulation. In this mode, QEMU emulates a full system (for
110    example a PC), including a processor and various peripherials.  It can
111    be used to launch different Operating Systems without rebooting the PC
112    or to debug system code.
113  * User mode emulation (Linux host only). In this mode, QEMU can launch
114    Linux processes compiled for one CPU on another CPU. It can be used to
115    launch the Wine Windows API emulator or to ease cross-compilation and
116    cross-debugging.
117
118 As QEMU requires no host kernel patches to run, it is safe and easy to use.
119
120 See also the preconfigured system images on http://oszoo.org/
121 Many live cd isos also work.
122
123
124 [FILE:96:distinfo]
125 68e15d8e45ac56326e0b9a4afa8b49a3dfe8aba3488221d098c84698bca65b45    115667324 qemu-6.2.0.tar.xz
126
127
128 [FILE:3543:manifests/plist.primary]
129 @sample etc/qemu-ifdown.sample
130 @sample etc/qemu-ifup.sample
131 %%MAN%%share/man/man1/
132  qemu-img.1.gz
133  qemu-storage-daemon.1.gz
134  qemu.1.gz
135 %%MAN%%share/man/man7/
136  qemu-block-drivers.7.gz
137  qemu-cpu-models.7.gz
138  qemu-ga-ref.7.gz
139  qemu-qmp-ref.7.gz
140  qemu-storage-daemon-qmp-ref.7.gz
141 %%MAN%%share/man/man8/
142  qemu-ga.8.gz
143  qemu-nbd.8.gz
144  qemu-pr-helper.8.gz
145 %%ONLY-LINUX%%bin/
146  qemu-aarch64
147  qemu-aarch64_be
148  qemu-alpha
149  qemu-arm
150  qemu-armeb
151  qemu-cris
152  qemu-hexagon
153  qemu-hppa
154  qemu-m68k
155  qemu-microblaze
156  qemu-microblazeel
157  qemu-mips
158  qemu-mips64
159  qemu-mips64el
160  qemu-mipsel
161  qemu-mipsn32
162  qemu-mipsn32el
163  qemu-nios2
164  qemu-or1k
165  qemu-ppc
166  qemu-ppc64
167  qemu-ppc64le
168  qemu-pr-helper
169  qemu-riscv32
170  qemu-riscv64
171  qemu-s390x
172  qemu-sh4
173  qemu-sh4eb
174  qemu-sparc32plus
175  qemu-xtensa
176  qemu-xtensaeb
177 %%ONLY-LINUX%%libexec/qemu-bridge-helper
178 bin/
179  elf2dmp
180  qemu-edid
181  qemu-ga
182  qemu-img
183  qemu-io
184  qemu-nbd
185  qemu-storage-daemon
186  qemu-system-aarch64
187  qemu-system-alpha
188  qemu-system-arm
189  qemu-system-avr
190  qemu-system-cris
191  qemu-system-hppa
192  qemu-system-i386
193  qemu-system-m68k
194  qemu-system-microblaze
195  qemu-system-microblazeel
196  qemu-system-mips
197  qemu-system-mips64
198  qemu-system-mips64el
199  qemu-system-mipsel
200  qemu-system-nios2
201  qemu-system-or1k
202  qemu-system-ppc
203  qemu-system-ppc64
204  qemu-system-riscv32
205  qemu-system-riscv64
206  qemu-system-rx
207  qemu-system-s390x
208  qemu-system-sh4
209  qemu-system-sh4eb
210  qemu-system-sparc
211  qemu-system-sparc64
212  qemu-system-tricore
213  qemu-system-x86_64
214  qemu-system-xtensa
215  qemu-system-xtensaeb
216 include/qemu-plugin.h
217 share/applications/qemu.desktop
218 share/icons/hicolor/128x128/apps/qemu.png
219 share/icons/hicolor/16x16/apps/qemu.png
220 share/icons/hicolor/24x24/apps/qemu.png
221 share/icons/hicolor/256x256/apps/qemu.png
222 share/icons/hicolor/32x32/apps/
223  qemu.bmp
224  qemu.png
225 share/icons/hicolor/48x48/apps/qemu.png
226 share/icons/hicolor/512x512/apps/qemu.png
227 share/icons/hicolor/64x64/apps/qemu.png
228 share/icons/hicolor/scalable/apps/qemu.svg
229 share/qemu/
230  QEMU,cgthree.bin
231  QEMU,tcx.bin
232  bamboo.dtb
233  bios-256k.bin
234  bios-microvm.bin
235  bios.bin
236  canyonlands.dtb
237  edk2-aarch64-code.fd
238  edk2-arm-code.fd
239  edk2-arm-vars.fd
240  edk2-i386-code.fd
241  edk2-i386-secure-code.fd
242  edk2-i386-vars.fd
243  edk2-licenses.txt
244  edk2-x86_64-code.fd
245  edk2-x86_64-secure-code.fd
246  efi-e1000.rom
247  efi-e1000e.rom
248  efi-eepro100.rom
249  efi-ne2k_pci.rom
250  efi-pcnet.rom
251  efi-rtl8139.rom
252  efi-virtio.rom
253  efi-vmxnet3.rom
254  hppa-firmware.img
255  kvmvapic.bin
256  linuxboot.bin
257  linuxboot_dma.bin
258  multiboot.bin
259  multiboot_dma.bin
260  npcm7xx_bootrom.bin
261  openbios-ppc
262  openbios-sparc32
263  openbios-sparc64
264  opensbi-riscv32-generic-fw_dynamic.bin
265  opensbi-riscv32-generic-fw_dynamic.elf
266  opensbi-riscv64-generic-fw_dynamic.bin
267  opensbi-riscv64-generic-fw_dynamic.elf
268  palcode-clipper
269  petalogix-ml605.dtb
270  petalogix-s3adsp1800.dtb
271  pvh.bin
272  pxe-e1000.rom
273  pxe-eepro100.rom
274  pxe-ne2k_pci.rom
275  pxe-pcnet.rom
276  pxe-rtl8139.rom
277  pxe-virtio.rom
278  qboot.rom
279  qemu-nsis.bmp
280  qemu_vga.ndrv
281  s390-ccw.img
282  s390-netboot.img
283  sgabios.bin
284  skiboot.lid
285  slof.bin
286  trace-events-all
287  u-boot-sam460-20100605.bin
288  u-boot.e500
289  vgabios-ati.bin
290  vgabios-bochs-display.bin
291  vgabios-cirrus.bin
292  vgabios-qxl.bin
293  vgabios-ramfb.bin
294  vgabios-stdvga.bin
295  vgabios-virtio.bin
296  vgabios-vmware.bin
297  vgabios.bin
298 share/qemu/firmware/
299  50-edk2-i386-secure.json
300  50-edk2-x86_64-secure.json
301  60-edk2-aarch64.json
302  60-edk2-arm.json
303  60-edk2-i386.json
304  60-edk2-x86_64.json
305 share/qemu/keymaps/
306  ar
307  bepo
308  cz
309  da
310  de
311  de-ch
312  en-gb
313  en-us
314  es
315  et
316  fi
317  fo
318  fr
319  fr-be
320  fr-ca
321  fr-ch
322  hr
323  hu
324  is
325  it
326  ja
327  lt
328  lv
329  mk
330  nl
331  no
332  pl
333  pt
334  pt-br
335  ru
336  sl
337  sv
338  th
339  tr
340
341
342 [FILE:5064:manifests/plist.docs]
343 share/doc/qemu/docs/
344  COLO-FT.txt
345  amd-memory-encryption.txt
346  block-replication.txt
347  bypass-iommu.txt
348  can.txt
349  ccid.txt
350  colo-proxy.txt
351  conf.py
352  confidential-guest-support.txt
353  defs.rst.inc
354  hyperv.txt
355  igd-assign.txt
356  image-fuzzer.txt
357  index.rst
358  memory-hotplug.txt
359  meson.build
360  multi-thread-compression.txt
361  multiseat.txt
362  nvdimm.txt
363  papr-pef.txt
364  pci_expander_bridge.txt
365  pcie.txt
366  pcie_pci_bridge.txt
367  pvrdma.txt
368  qcow2-cache.txt
369  qdev-device-use.txt
370  qemu-option-trace.rst.inc
371  qemu_logo.pdf
372  qemupciserial.inf
373  rdma.txt
374  replay.txt
375  spice-port-fqdn.txt
376  throttle.txt
377  u2f.txt
378  virtio-balloon-stats.txt
379  xbzrle.txt
380  xen-save-devices-state.txt
381 share/doc/qemu/docs/_templates/footer.html
382 share/doc/qemu/docs/about/
383  build-platforms.rst
384  deprecated.rst
385  index.rst
386  license.rst
387  removed-features.rst
388 share/doc/qemu/docs/config/
389  ich9-ehci-uhci.cfg
390  mach-virt-graphical.cfg
391  mach-virt-serial.cfg
392  q35-emulated.cfg
393  q35-virtio-graphical.cfg
394  q35-virtio-serial.cfg
395 share/doc/qemu/docs/devel/
396  atomics.rst
397  bitops.rst
398  blkdebug.txt
399  blkverify.txt
400  block-coroutine-wrapper.rst
401  build-system.rst
402  ci-definitions.rst.inc
403  ci-jobs.rst.inc
404  ci-runners.rst.inc
405  ci.rst
406  clocks.rst
407  code-of-conduct.rst
408  conflict-resolution.rst
409  control-flow-integrity.rst
410  decodetree.rst
411  ebpf_rss.rst
412  fuzzing.rst
413  index.rst
414  kconfig.rst
415  loads-stores.rst
416  lockcnt.txt
417  memory.rst
418  migration.rst
419  modules.rst
420  multi-process.rst
421  multi-thread-tcg.rst
422  multiple-iothreads.txt
423  qapi-code-gen.rst
424  qgraph.rst
425  qom.rst
426  qtest.rst
427  rcu.txt
428  replay.txt
429  reset.rst
430  s390-dasd-ipl.rst
431  secure-coding-practices.rst
432  stable-process.rst
433  style.rst
434  submitting-a-patch.rst
435  submitting-a-pull-request.rst
436  tcg-icount.rst
437  tcg-plugins.rst
438  tcg.rst
439  testing.rst
440  tracing.rst
441  trivial-patches.rst
442  ui.rst
443  vfio-migration.rst
444  virtio-migration.txt
445  writing-monitor-commands.rst
446 share/doc/qemu/docs/interop/
447  barrier.rst
448  bitmaps.rst
449  dbus-vmstate.rst
450  dbus.rst
451  firmware.json
452  index.rst
453  live-block-operations.rst
454  nbd.txt
455  parallels.txt
456  pr-helper.rst
457  prl-xml.txt
458  qcow2.txt
459  qed_spec.txt
460  qemu-ga-ref.rst
461  qemu-ga.rst
462  qemu-qmp-ref.rst
463  qemu-storage-daemon-qmp-ref.rst
464  qmp-intro.txt
465  qmp-spec.txt
466  vhost-user-gpu.rst
467  vhost-user.json
468  vhost-user.rst
469  vhost-vdpa.rst
470  vnc-ledstate-Pseudo-encoding.txt
471 share/doc/qemu/docs/specs/
472  acpi_cpu_hotplug.rst
473  acpi_hest_ghes.rst
474  acpi_hw_reduced_hotplug.rst
475  acpi_mem_hotplug.rst
476  acpi_nvdimm.rst
477  acpi_pci_hotplug.rst
478  edu.txt
479  fw_cfg.txt
480  index.rst
481  ivshmem-spec.txt
482  pci-ids.txt
483  pci-serial.txt
484  pci-testdev.txt
485  ppc-spapr-hcalls.txt
486  ppc-spapr-hotplug.txt
487  ppc-spapr-numa.rst
488  ppc-spapr-uv-hcalls.txt
489  ppc-spapr-xive.rst
490  ppc-xive.rst
491  pvpanic.txt
492  rocker.txt
493  standard-vga.txt
494  tpm.rst
495  virt-ctlr.txt
496  vmcoreinfo.txt
497  vmgenid.txt
498  vmw_pvscsi-spec.txt
499 share/doc/qemu/docs/sphinx-static/
500  custom.js
501  theme_overrides.css
502 share/doc/qemu/docs/spin/
503  aio_notify.promela
504  aio_notify_accept.promela
505  aio_notify_bug.promela
506  tcg-exclusive.promela
507  win32-qemu-event.promela
508 share/doc/qemu/docs/system/
509  authz.rst
510  barrier.rst
511  bootindex.rst
512  cpu-hotplug.rst
513  cpu-models-mips.rst.inc
514  cpu-models-x86-abi.csv
515  cpu-models-x86.rst.inc
516  device-emulation.rst
517  device-url-syntax.rst.inc
518  gdb.rst
519  generic-loader.rst
520  guest-loader.rst
521  images.rst
522  index.rst
523  invocation.rst
524  keys.rst
525  keys.rst.inc
526  linuxboot.rst
527  managed-startup.rst
528  monitor.rst
529  multi-process.rst
530  mux-chardev.rst
531  mux-chardev.rst.inc
532  pr-manager.rst
533  qemu-block-drivers.rst
534  qemu-block-drivers.rst.inc
535  qemu-cpu-models.rst
536  qemu-manpage.rst
537  quickstart.rst
538  secrets.rst
539  security.rst
540  target-arm.rst
541  target-avr.rst
542  target-i386-desc.rst.inc
543  target-i386.rst
544  target-m68k.rst
545  target-mips.rst
546  target-ppc.rst
547  target-riscv.rst
548  target-rx.rst
549  target-s390x.rst
550  target-sparc.rst
551  target-sparc64.rst
552  target-xtensa.rst
553  targets.rst
554  tls.rst
555  virtio-net-failover.rst
556  vnc-security.rst
557 share/doc/qemu/docs/system/arm/
558  aspeed.rst
559  collie.rst
560  cpu-features.rst
561  cubieboard.rst
562  digic.rst
563  emcraft-sf2.rst
564  emulation.rst
565  gumstix.rst
566  highbank.rst
567  imx25-pdk.rst
568  integratorcp.rst
569  kzm.rst
570  mainstone.rst
571  mps2.rst
572  musca.rst
573  musicpal.rst
574  nrf.rst
575  nseries.rst
576  nuvoton.rst
577  orangepi.rst
578  palm.rst
579  raspi.rst
580  realview.rst
581  sabrelite.rst
582  sbsa.rst
583  stellaris.rst
584  stm32.rst
585  sx1.rst
586  versatile.rst
587  vexpress.rst
588  virt.rst
589  xlnx-versal-virt.rst
590  xscale.rst
591 share/doc/qemu/docs/system/devices/
592  ivshmem.rst
593  net.rst
594  nvme.rst
595  usb.rst
596  vhost-user-rng.rst
597  vhost-user.rst
598  virtio-pmem.rst
599 share/doc/qemu/docs/system/i386/
600  cpu.rst
601  kvm-pv.rst
602  microvm.rst
603  pc.rst
604  sgx.rst
605 share/doc/qemu/docs/system/ppc/
606  embedded.rst
607  powermac.rst
608  powernv.rst
609  ppce500.rst
610  prep.rst
611  pseries.rst
612 share/doc/qemu/docs/system/riscv/
613  microchip-icicle-kit.rst
614  shakti-c.rst
615  sifive_u.rst
616  virt.rst
617 share/doc/qemu/docs/system/s390x/
618  3270.rst
619  bootdevices.rst
620  css.rst
621  protvirt.rst
622  vfio-ap.rst
623  vfio-ccw.rst
624 share/doc/qemu/docs/tools/
625  index.rst
626  qemu-img.rst
627  qemu-nbd.rst
628  qemu-pr-helper.rst
629  qemu-storage-daemon.rst
630  qemu-trace-stap.rst
631  virtfs-proxy-helper.rst
632  virtiofsd.rst
633 share/doc/qemu/docs/user/
634  index.rst
635  main.rst
636
637
638 [FILE:297:manifests/plist.nls]
639 share/locale/bg/LC_MESSAGES/qemu.mo
640 share/locale/de_DE/LC_MESSAGES/qemu.mo
641 share/locale/fr_FR/LC_MESSAGES/qemu.mo
642 share/locale/hu/LC_MESSAGES/qemu.mo
643 share/locale/it/LC_MESSAGES/qemu.mo
644 share/locale/sv/LC_MESSAGES/qemu.mo
645 share/locale/tr/LC_MESSAGES/qemu.mo
646 share/locale/zh_CN/LC_MESSAGES/qemu.mo
647
648
649 [FILE:365:patches/patch-disas_libvixl_vixl_a64_disasm-a64.cc]
650 --- disas/libvixl/vixl/a64/disasm-a64.cc.orig   2021-12-14 20:42:01 UTC
651 +++ disas/libvixl/vixl/a64/disasm-a64.cc
652 @@ -2693,7 +2693,7 @@ void Disassembler::AppendPCRelativeOffse
653    if (offset < 0) {
654      abs_offset = -abs_offset;
655    }
656 -  AppendToOutput("#%c0x%" PRIx64, sign, abs_offset);
657 +  AppendToOutput("#%c0x%" PRIx64, sign, offset < 0 ? -offset : offset);
658  }
659  
660  
661
662
663 [FILE:1232:patches/patch-meson.build]
664 --- meson.build.orig    2021-12-14 20:42:02 UTC
665 +++ meson.build
666 @@ -722,15 +722,16 @@ if have_system and not get_option('curse
667        has_curses_h = cc.has_header('curses.h', args: curses_compile_args)
668      endif
669      if has_curses_h
670 -      curses_libname_list = (targetos == 'windows' ? ['pdcurses'] : ['ncursesw', 'cursesw'])
671 +      libtinfo = cc.find_library('tinfow', required: false, static: enable_static)
672 +      curses_libname_list = (targetos == 'windows' ? ['pdcurses'] : ['ncursesw'])
673        foreach curses_libname : curses_libname_list
674          libcurses = cc.find_library(curses_libname,
675                                      required: false,
676                                      kwargs: static_kwargs)
677          if libcurses.found()
678 -          if cc.links(curses_test, args: curses_compile_args, dependencies: libcurses)
679 +          if cc.links(curses_test, args: curses_compile_args, dependencies: [libcurses,libtinfo])
680              curses = declare_dependency(compile_args: curses_compile_args,
681 -                                        dependencies: [libcurses])
682 +                                        dependencies: [libcurses, libtinfo])
683              break
684            else
685              msg = 'curses library not usable'
686
687
688 [FILE:454:patches/patch-net_tap-bsd.c]
689 --- net/tap-bsd.c.orig  2021-12-14 20:42:02 UTC
690 +++ net/tap-bsd.c
691 @@ -31,9 +31,16 @@
692  
693  #if defined(__NetBSD__) || defined(__FreeBSD__)
694  #include <sys/ioctl.h>
695 +#include <sys/socket.h>
696  #include <net/if.h>
697  #include <net/if_tap.h>
698  #endif
699 +#if defined(__DragonFly)
700 +#include <sys/ioctl.h>
701 +#include <sys/socket.h>
702 +#include <net/if.h>
703 +#include <net/tap/if_tap.h>
704 +#endif
705  
706  #ifndef __FreeBSD__
707  int tap_open(char *ifname, int ifname_size, int *vnet_hdr,
708
709
710 [FILE:314:patches/patch-util_getauxval.c]
711 --- util/getauxval.c.orig       2021-12-14 20:42:01 UTC
712 +++ util/getauxval.c
713 @@ -98,7 +98,7 @@ unsigned long qemu_getauxval(unsigned lo
714      return 0;
715  }
716  
717 -#elif defined(__FreeBSD__)
718 +#elif defined(__FreeBSD__) && __FreeBSD_version__ > 1200001
719  #include <sys/auxv.h>
720  
721  unsigned long qemu_getauxval(unsigned long type)
722
723
724 [FILE:7685:files/pkg-message-single]
725 FreeBSD host notes
726 ==================
727
728 - Needs to set net.link.tap.user_open sysctl in order to use /dev/tap*
729   networking as non-root.  Don't forget to adjust device node permissions in
730   /etc/devfs.rules.
731
732 - slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you
733   still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but
734   i've been told that that's normal.  (fixed on FreeSBIE 1.1.) And you have
735   to wait a bit for dhclient to do its thing; traffic to address 10.0.2.2 is
736   routed to 127.1 on the host.
737
738 - Expect timer problems when guest kernel HZ is > hosts, for example time
739   sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe
740   with a FreeSBIE 1.0 guest, thats because its kernel is built with HZ=5000,
741   and FreeBSD's default is 100...  (no longer a problem with FreeSBIE 1.1.)
742   The linux 2.6 kernel uses 1000 by default btw.  (changed to 250 later, and
743   recent linux kernels now no longer have a fixed HZ, aka `tickless
744   kernel'...)  Enabling /dev/rtc doesn't seem to help either (not included
745   since it needs a patch to emulators/rtc.)
746
747 - Update: the above problem has gotten worse with FreeBSD guests
748   somewhere before 8.0, mainly since the kernel now usually wants
749   double or even quadruple number of timer irqs compared to HZ if
750   it detects an apic (and at least early versions of FreeBSD 8 had
751   a bug that essentially halved qemu's clock rate too); the only
752   reason you usually don't see symptoms of this with FreeBSD 8
753   guests is they automatically reduce their HZ to 100 when running
754   in a VM while the default for the host kernel is still HZ=1000.
755   Workaround: you can disable the apic clock in the guest by setting
756
757     hint.apic.0.clock="0"
758
759   in loader.conf(5) (or manually at the loader prompt), if that
760   doesn't work the only things you can do is either reduce the
761   guest's HZ to, say, 100 by setting e.g.
762
763     kern.hz="100"
764
765   from the loader as above (which usually is a good idea in a VM
766   anyway and FreeBSD 8 now does by itself as mentioned), or otherwise
767   increase the host's HZ to 2000 or even 4000 from the loader in
768   the same way.
769
770 - The -smb option (smb-export local dir to guest using the default
771   slirp networking) needs the samba port/package installed
772   in addition to qemu. (SAMBA knob.)
773
774 - If you want to use usb devices connected to the host in the guest
775   yot need either recent 10-current (not tested yet much) or you can
776   use usbredir over the network (see below); also unless you are
777   running qemu as root you then need to fix permissions for /dev/ugen*
778   device nodes: if you are on 5.x or later (devfs) put a rule in
779   /etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs
780   restart.  Example devfs.rules:
781
782     [ugen_ruleset=20]
783     add path 'ugen*' mode 660 group operator
784
785   corresponding rc.conf line:
786
787     devfs_system_ruleset="ugen_ruleset"
788
789 - If you want to test the new (in 0.15.0) usb network redirection (USBREDIR
790   option) see this thread by Hans de Goede <hdegoede <at> redhat.com>:
791
792     http://thread.gmane.org/gmane.comp.emulators.qemu/110176/focus=110183
793
794   Quote:
795
796   Example usage:
797
798   1) Start usbredirserver for a usb device:
799   sudo usbredirserver 045e:0772
800   2) Start qemu with usb2 support + a chardev talking to usbredirserver +
801      a usb-redir device using this chardev:
802   qemu -usb \
803     -readconfig docs/ich9-ehci-uhci.cfg \
804     -chardev socket,id=usbredirchardev,host=localhost,port=4000 \
805     -device usb-redir,chardev=usbredirchardev,id=usbredirdev ...
806
807   [you would replace docs/ich9-ehci-uhci.cfg with e.g.
808   /raven/share/doc/qemu/docs/ich9-ehci-uhci.cfg, but turns out
809   ehci was broken for me here with FreeBSD guests and the previous
810   qemu version at least, I got:
811
812     FETCHENTRY: entry at 22C5484 is of type 2 which is not supported yet processing error - resetting ehci HC
813     Assertion failed: (0), function ehci_advance_state, file /data/ports/emulators/qemu-devel/work/qemu-0.15.0/hw/usb-ehci.c, line 2045.
814
815   The new qemu version works better tho.]
816
817 - Still usb: since the hub is no longer attached to the uchi controller and
818   the wakeup mechanism, resume interrupt is not implemented yet linux guests
819   will suspend the bus, i.e. they wont see devices usb_add'ed after its
820   (linux') uhci module got loaded.  Workaround: either add devices before
821   linux loads the module or rmmod and modprobe it afterwards.  [Not sure
822   if this still applies to the new libusb host code used on recent
823   10-current.]
824
825 - If you build qemu wihout SDL and then get crashes running it try passing it
826   -nographic.  This should probably be default in that case...
827
828 - qemu's network boot roms (-boot n) have a bug when bootfiles sizes are a
829   multiple of blksize, if this affects you (like with FreeBSD's /boot/pxeboot)
830   you can do like
831
832     cp /boot/pxeboot pxeboot-qemu && chmod +w pxeboot-qemu && echo >>pxeboot-qemu
833
834   and then use pxeboot-qemu.  Actually you need recent btx code
835   (from after 7.0 was released) because of the real mode boot
836   problem, so use at least pxeboot from there.  And I just did that
837   for the pxeboot extracted out of
838
839     ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/7.0-STABLE-200805-i386-bootonly.iso
840
841   and placed it here:
842
843     http://people.freebsd.org/~nox/qemu/pxeboot-qemu
844
845 - If you use slirp (usernet, the default) and want to mount nfs into the guest
846   and you are not running qemu as root, then mountd(8) on the exporting box
847   needs to be run with -n in order to accept requests from ports >= 1024.
848
849 - (not FreeBSD-specific:) There have been reports of qcow2 corruption with (at
850   least) win2k guests on recent kvm (which uses similar qcow2 code than qemu
851   now, see this thread:
852
853     http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg00713.html -
854
855   the consensus on that thread seems to be that qcow(2) code has always been
856   experimental and you should use raw images if you want reliability; raw is
857   also usually faster.)  You should be able to migrate existing images to raw
858   using qemu-img(1)'s convert function; raw doesn't support advanced features
859   like snapshots tho.  [a few important qcow2 bugfixed have been committed in
860   the meantime so this _might_ be less of an issue now; and meanwhile there
861   also is the new qed format - I don't know how stable that one is.]
862
863 - (also not FreeBSD-specific:)  It is recommended to pass raw images using the
864   new -drive syntax, specifying format=raw explicitly in order to avoid
865   malicious guests being able to exploit the format autodetection thats
866   otherwise getting used.  (Not that you should run malicious guests anyway,
867   but this eleminates at least a known attack vector.)
868
869 - qemu now has improved physical cdrom support, but still there is at
870   least one known problem: you need to have the guest eject the disc if you
871   want to change it/take it out, or otherwise the guest may continue using
872   state (like size) of the old disc.  (You can also do like `change ide1-cd0
873   /dev/acd0' in the monitor after taking out the disc if a guest cannot eject
874   it itself.)
875
876 - The default configuration location (qemu-ifup script etc.) has been changed
877   from /etc to PREFIX/etc (usually /raven/etc).  Move your files accordingly.
878
879 - The pcap code (-net nic... -net pcap,ifname=...) should work properly now,
880   with only one exception:  Advanced features like TSO used on the host
881   interface can cause oversize packets which now do get truncated to avoid
882   confusing/panicing guests but of course still will cause retransmissions.
883   So if you see slow throughput and `pcap_send: packet size > ..., truncating'
884   messages on qemu's tty try disabling TSO etc on the host interface at least
885   while using pcap.
886
887
888 [FILE:20:files/qemu-ifdown.sample]
889 #!/bin/sh
890 exec true
891
892
893 [FILE:20:files/qemu-ifup.sample]
894 #!/bin/sh
895 exec true
896
897
898 [FILE:436:dragonfly/patch-disas_libvixl_vixl_utils.h]
899 --- disas/libvixl/vixl/utils.h.orig     2021-12-14 20:42:02 UTC
900 +++ disas/libvixl/vixl/utils.h
901 @@ -42,6 +42,13 @@ namespace vixl {
902  #define PRINTF_CHECK(format_index, varargs_index)
903  #endif
904  
905 +#ifndef INT64_C
906 +#define INT32_C(c) c
907 +#define INT64_C(c) (c ## LL)
908 +#define UINT32_C(c) (c ## U)
909 +#define UINT64_C(c) (c ## ULL)
910 +#endif
911 +
912  // Check number width.
913  inline bool is_intn(unsigned n, int64_t x) {
914    VIXL_ASSERT((0 < n) && (n < 64));
915
916
917 [FILE:323:dragonfly/patch-hw-ppc_newworld.c]
918 --- hw/ppc/mac_newworld.c.orig  2021-12-14 20:42:02 UTC
919 +++ hw/ppc/mac_newworld.c
920 @@ -73,6 +73,11 @@
921  #include "hw/sysbus.h"
922  #include "trace.h"
923  
924 +/* FreeBSD headers define this */
925 +#ifdef round_page
926 +#undef round_page
927 +#endif
928 +
929  #define MAX_IDE_BUS 2
930  #define CFG_ADDR 0xf0000510
931  #define TBFREQ (100UL * 1000UL * 1000UL)
932
933
934 [FILE:358:dragonfly/patch-hw_ppc_mac__oldworld.c]
935 --- hw/ppc/mac_oldworld.c.orig  2021-12-14 20:42:02 UTC
936 +++ hw/ppc/mac_oldworld.c
937 @@ -61,6 +61,11 @@
938  #define PROM_BASE 0xffc00000
939  #define PROM_SIZE (4 * MiB)
940  
941 +/* FreeBSD headers define this */
942 +#ifdef round_page
943 +#undef round_page
944 +#endif
945 +
946  static void fw_cfg_boot_set(void *opaque, const char *boot_device,
947                              Error **errp)
948  {
949
950
951 [FILE:906:dragonfly/patch-util_coroutine-ucontext.c]
952 --- util/coroutine-ucontext.c.orig      2021-12-14 20:42:01 UTC
953 +++ util/coroutine-ucontext.c
954 @@ -221,7 +221,15 @@ Coroutine *qemu_coroutine_new(void)
955                  2, arg.i[0], arg.i[1]);
956  
957      /* swapcontext() in, siglongjmp() back out */
958 -    if (!sigsetjmp(old_env, 0)) {
959 +    /* Save signal mask in this sigsetjmp, because makecontext on DragonFly
960 +     * leaves all signals blocked when entering the new context with
961 +     * swapcontext.
962 +     * Workaround this, by just having the signal mask restored by the
963 +     * siglongjmp that brings us back from qemu_coroutine_new().
964 +     * XXX Remove this workaround when the makecontext behaviour is fixed
965 +     *     on DragonFly.
966 +     */
967 +    if (!sigsetjmp(old_env, 1)) {
968          start_switch_fiber_asan(COROUTINE_YIELD, &fake_stack_save, co->stack,
969                                  co->stack_size);
970          start_switch_fiber_tsan(&fake_stack_save,
971