Ravenports generated: 14 Dec 2020 13:25
[ravenports.git] / bucket_A9 / qemu
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               qemu
4 VERSION=                5.1.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-5.1.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                         python-Sphinx:single:python_default
25 BUILDRUN_DEPENDS=       nettle:primary:standard
26                         fontconfig:primary:standard
27                         freetype:primary:standard
28                         gnutls:primary:standard
29                         cyrus-sasl:primary:standard
30                         curl:primary:standard
31                         vde2:single:standard
32                         libepoxy:single:standard
33
34 USES=                   cpe gmake pkgconfig bison perl:build python:build
35                         jpeg png mesa gettext-runtime gettext-tools ncurses
36                         makeinfo
37 GNOME_COMPONENTS=       gdkpixbuf gtk2 vte
38 SDL_COMPONENTS=         sdl2
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-pcap
55                         --enable-docs
56                         --enable-debug
57                         --enable-debug-info
58                         --prefix={{PREFIX}}
59                         --cc={{CC}}
60                         --python={{PYTHON_CMD}}
61                         --localstatedir=/var
62                         --extra-cflags="-I{{WRKSRC}} -I{{LOCALBASE}}/include -DPREFIX=\\\"\"{{PREFIX}}\\\"\""
63                         --extra-ldflags="-L/usr/lib -L{{LOCALBASE}}/lib"
64
65 MAKE_ENV=               BSD_MAKE="{{MAKE}}"
66                         V=1
67
68 INSTALL_REQ_TOOLCHAIN=  yes
69 PLIST_SUB=              JQUERY=3.5.1
70
71 VAR_OPSYS[freebsd]=     CONFIGURE_ARGS=--enable-netmap
72                         CONFIGURE_ARGS=--disable-linux-user
73                         CONFIGURE_ARGS=--disable-linux-aio
74 VAR_OPSYS[linux]=       CONFIGURE_ARGS=--disable-netmap
75 VAR_OPSYS[dragonfly]=   CONFIGURE_ARGS=--disable-netmap
76                         CONFIGURE_ARGS=--disable-linux-user
77                         CONFIGURE_ARGS=--disable-linux-aio
78
79 post-patch:
80         ${REINPLACE_CMD} -e '/LIBS/s|-lprocstat|-lprocstat -lelf|' \
81                  -e '/libusb/s/ --atleast-version=1\.0\.[0-9]*//' \
82                 ${WRKSRC}/configure
83         ${REINPLACE_CMD} -E \
84                 -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing|" \
85                 -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
86                 ${WRKSRC}/Makefile.target
87         ${REINPLACE_CMD} -E \
88                 -e "s|^(CFLAGS=).*|\1${CFLAGS} -fno-strict-aliasing -I.|" \
89                 -e "s|^(LDFLAGS=).*|\1${LDFLAGS}|" \
90                 ${WRKSRC}/Makefile
91         ${REINPLACE_CMD} -E \
92                 -e "1s|^(#! )/usr/bin/perl|\1${PERL}|" \
93                 ${WRKSRC}/scripts/texi2pod.pl
94         # GNS3 (promiscuous multicast)
95         ${REINPLACE_CMD} -e 's|(buf\[0\] & 1) && (rctl & E1000_RCTL_MPE)|buf[0] \& 1|' \
96                 ${WRKSRC}/hw/net/e1000.c
97         # broken build for optionrom
98         ${REINPLACE_CMD} -e '/roms="optionrom"/d' ${WRKSRC}/configure
99         # silence some include warnings
100         ${MKDIR} ${WRKSRC}/bsd-user/dragonfly
101
102 pre-install:
103         # for some reason file is considered out-of-date
104         ${TOUCH} ${WRKSRC}/config-host.mak
105
106 post-patch-dragonfly:
107         ${REINPLACE_CMD} -e '/libs_qga=..glib_libs/ s|glib_libs|glib_libs -lintl|' \
108                 ${WRKSRC}/configure
109
110 post-install:
111         ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifup.sample \
112                 ${STAGEDIR}${PREFIX}/etc
113         ${INSTALL_SCRIPT} ${FILESDIR}/qemu-ifdown.sample \
114                 ${STAGEDIR}${PREFIX}/etc
115         ${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/qemu-*
116         (cd ${WRKSRC} && ${COPYTREE_SHARE} docs ${STAGEDIR}${STD_DOCDIR}/)
117         # remove empty directories
118         ${RM} -r ${STAGEDIR}/var
119
120 post-patch-freebsd:
121         ${REINPLACE_CMD} -e '/libs_qga=..glib_libs/ s|glib_libs|glib_libs -lintl|' \
122                 ${WRKSRC}/configure
123
124 [FILE:782:descriptions/desc.primary]
125 QEMU is a fast processor emulator using dynamic translation to achieve
126 good emulation speed.  QEMU has two operating modes:
127
128  * Full system emulation. In this mode, QEMU emulates a full system (for
129    example a PC), including a processor and various peripherials.  It can
130    be used to launch different Operating Systems without rebooting the PC
131    or to debug system code.
132  * User mode emulation (Linux host only). In this mode, QEMU can launch
133    Linux processes compiled for one CPU on another CPU. It can be used to
134    launch the Wine Windows API emulator or to ease cross-compilation and
135    cross-debugging.
136
137 As QEMU requires no host kernel patches to run, it is safe and easy to use.
138
139 See also the preconfigured system images on http://oszoo.org/
140 Many live cd isos also work.
141
142
143 [FILE:96:distinfo]
144 c9174eb5933d9eb5e61f541cd6d1184cd3118dfe4c5c4955bc1bdc4d390fa4e5     62911540 qemu-5.1.0.tar.xz
145
146
147 [FILE:3510:manifests/plist.primary]
148 @sample etc/qemu-ifdown.sample
149 @sample etc/qemu-ifup.sample
150 %%ONLY-LINUX%%bin/
151  ivshmem-client
152  ivshmem-server
153  qemu-aarch64
154  qemu-aarch64_be
155  qemu-alpha
156  qemu-arm
157  qemu-armeb
158  qemu-cris
159  qemu-hppa
160  qemu-m68k
161  qemu-microblaze
162  qemu-microblazeel
163  qemu-mips
164  qemu-mips64
165  qemu-mips64el
166  qemu-mipsel
167  qemu-mipsn32
168  qemu-mipsn32el
169  qemu-nios2
170  qemu-or1k
171  qemu-ppc
172  qemu-ppc64
173  qemu-ppc64abi32
174  qemu-ppc64le
175  qemu-pr-helper
176  qemu-riscv32
177  qemu-riscv64
178  qemu-s390x
179  qemu-sh4
180  qemu-sh4eb
181  qemu-sparc32plus
182  qemu-tilegx
183  qemu-xtensa
184  qemu-xtensaeb
185 %%ONLY-LINUX%%libexec/qemu-bridge-helper
186 bin/
187  elf2dmp
188  qemu-edid
189  qemu-ga
190  qemu-i386
191  qemu-img
192  qemu-io
193  qemu-nbd
194  qemu-sparc
195  qemu-sparc64
196  qemu-storage-daemon
197  qemu-system-aarch64
198  qemu-system-alpha
199  qemu-system-arm
200  qemu-system-avr
201  qemu-system-cris
202  qemu-system-hppa
203  qemu-system-i386
204  qemu-system-lm32
205  qemu-system-m68k
206  qemu-system-microblaze
207  qemu-system-microblazeel
208  qemu-system-mips
209  qemu-system-mips64
210  qemu-system-mips64el
211  qemu-system-mipsel
212  qemu-system-moxie
213  qemu-system-nios2
214  qemu-system-or1k
215  qemu-system-ppc
216  qemu-system-ppc64
217  qemu-system-riscv32
218  qemu-system-riscv64
219  qemu-system-rx
220  qemu-system-s390x
221  qemu-system-sh4
222  qemu-system-sh4eb
223  qemu-system-sparc
224  qemu-system-sparc64
225  qemu-system-tricore
226  qemu-system-unicore32
227  qemu-system-x86_64
228  qemu-system-xtensa
229  qemu-system-xtensaeb
230  qemu-x86_64
231 share/applications/qemu.desktop
232 share/icons/hicolor/128x128/apps/qemu.png
233 share/icons/hicolor/16x16/apps/qemu.png
234 share/icons/hicolor/24x24/apps/qemu.png
235 share/icons/hicolor/256x256/apps/qemu.png
236 share/icons/hicolor/32x32/apps/
237  qemu.bmp
238  qemu.png
239 share/icons/hicolor/48x48/apps/qemu.png
240 share/icons/hicolor/512x512/apps/qemu.png
241 share/icons/hicolor/64x64/apps/qemu.png
242 share/icons/hicolor/scalable/apps/qemu.svg
243 share/man/man1/
244  qemu-img.1.gz
245  qemu.1.gz
246 share/man/man7/
247  qemu-block-drivers.7.gz
248  qemu-cpu-models.7.gz
249  qemu-ga-ref.7.gz
250  qemu-qmp-ref.7.gz
251 share/man/man8/
252  qemu-ga.8.gz
253  qemu-nbd.8.gz
254 share/qemu/
255  QEMU,cgthree.bin
256  QEMU,tcx.bin
257  bamboo.dtb
258  bios-256k.bin
259  bios-microvm.bin
260  bios.bin
261  canyonlands.dtb
262  edk2-aarch64-code.fd
263  edk2-arm-code.fd
264  edk2-arm-vars.fd
265  edk2-i386-code.fd
266  edk2-i386-secure-code.fd
267  edk2-i386-vars.fd
268  edk2-licenses.txt
269  edk2-x86_64-code.fd
270  edk2-x86_64-secure-code.fd
271  efi-e1000.rom
272  efi-e1000e.rom
273  efi-eepro100.rom
274  efi-ne2k_pci.rom
275  efi-pcnet.rom
276  efi-rtl8139.rom
277  efi-virtio.rom
278  efi-vmxnet3.rom
279  hppa-firmware.img
280  kvmvapic.bin
281  linuxboot.bin
282  linuxboot_dma.bin
283  multiboot.bin
284  openbios-ppc
285  openbios-sparc32
286  openbios-sparc64
287  opensbi-riscv32-sifive_u-fw_jump.bin
288  opensbi-riscv32-virt-fw_jump.bin
289  opensbi-riscv64-sifive_u-fw_jump.bin
290  opensbi-riscv64-virt-fw_jump.bin
291  palcode-clipper
292  petalogix-ml605.dtb
293  petalogix-s3adsp1800.dtb
294  pvh.bin
295  pxe-e1000.rom
296  pxe-eepro100.rom
297  pxe-ne2k_pci.rom
298  pxe-pcnet.rom
299  pxe-rtl8139.rom
300  pxe-virtio.rom
301  qemu-nsis.bmp
302  qemu_vga.ndrv
303  s390-ccw.img
304  s390-netboot.img
305  sgabios.bin
306  skiboot.lid
307  slof.bin
308  trace-events-all
309  u-boot-sam460-20100605.bin
310  u-boot.e500
311  vgabios-ati.bin
312  vgabios-bochs-display.bin
313  vgabios-cirrus.bin
314  vgabios-qxl.bin
315  vgabios-ramfb.bin
316  vgabios-stdvga.bin
317  vgabios-virtio.bin
318  vgabios-vmware.bin
319  vgabios.bin
320 share/qemu/firmware/
321  50-edk2-i386-secure.json
322  50-edk2-x86_64-secure.json
323  60-edk2-aarch64.json
324  60-edk2-arm.json
325  60-edk2-i386.json
326  60-edk2-x86_64.json
327 share/qemu/keymaps/
328  ar
329  bepo
330  cz
331  da
332  de
333  de-ch
334  en-gb
335  en-us
336  es
337  et
338  fi
339  fo
340  fr
341  fr-be
342  fr-ca
343  fr-ch
344  hr
345  hu
346  is
347  it
348  ja
349  lt
350  lv
351  mk
352  nl
353  no
354  pl
355  pt
356  pt-br
357  ru
358  sl
359  sv
360  th
361  tr
362
363
364 [FILE:11393:manifests/plist.docs]
365 share/doc/qemu/index.html
366 share/doc/qemu/docs/
367  COLO-FT.txt
368  amd-memory-encryption.txt
369  barrier.txt
370  block-replication.txt
371  bootindex.txt
372  can.txt
373  ccid.txt
374  colo-proxy.txt
375  conf.py
376  cpu-hotplug.rst
377  defs.rst.inc
378  generic-loader.txt
379  hyperv.txt
380  igd-assign.txt
381  image-fuzzer.txt
382  index.html.in
383  index.rst
384  memory-hotplug.txt
385  microvm.rst
386  multi-thread-compression.txt
387  multiseat.txt
388  nvdimm.txt
389  pci_expander_bridge.txt
390  pcie.txt
391  pcie_pci_bridge.txt
392  pr-manager.rst
393  pvrdma.txt
394  qcow2-cache.txt
395  qdev-device-use.txt
396  qemu-option-trace.rst.inc
397  qemu_logo.pdf
398  qemupciserial.inf
399  rdma.txt
400  replay.txt
401  spice-port-fqdn.txt
402  throttle.txt
403  usb-storage.txt
404  usb2.txt
405  version.texi
406  virtio-balloon-stats.txt
407  virtio-net-failover.rst
408  virtio-pmem.rst
409  xbzrle.txt
410  xen-save-devices-state.txt
411 share/doc/qemu/docs/built/index.html
412 share/doc/qemu/docs/built/devel/
413  .buildinfo
414  atomics.html
415  bitops.html
416  clocks.html
417  decodetree.html
418  genindex.html
419  index.html
420  kconfig.html
421  loads-stores.html
422  memory.html
423  migration.html
424  multi-thread-tcg.html
425  objects.inv
426  reset.html
427  s390-dasd-ipl.html
428  search.html
429  searchindex.js
430  secure-coding-practices.html
431  stable-process.html
432  tcg-icount.html
433  tcg-plugins.html
434  tcg.html
435  testing.html
436 share/doc/qemu/docs/built/devel/_static/
437  alabaster.css
438  basic.css
439  custom.css
440  doctools.js
441  documentation_options.js
442  file.png
443  jquery-%%JQUERY%%.js
444  jquery.js
445  language_data.js
446  minus.png
447  plus.png
448  pygments.css
449  searchtools.js
450  underscore-1.3.1.js
451  underscore.js
452 share/doc/qemu/docs/built/interop/
453  .buildinfo
454  bitmaps.html
455  dbus-vmstate.html
456  dbus.html
457  genindex.html
458  index.html
459  live-block-operations.html
460  objects.inv
461  pr-helper.html
462  qemu-ga.8
463  qemu-ga.html
464  search.html
465  searchindex.js
466  vhost-user-gpu.html
467  vhost-user.html
468  vhost-vdpa.html
469 share/doc/qemu/docs/built/interop/_static/
470  alabaster.css
471  basic.css
472  custom.css
473  doctools.js
474  documentation_options.js
475  file.png
476  jquery-%%JQUERY%%.js
477  jquery.js
478  language_data.js
479  minus.png
480  plus.png
481  pygments.css
482  searchtools.js
483  underscore-1.3.1.js
484  underscore.js
485 share/doc/qemu/docs/built/specs/
486  .buildinfo
487  acpi_hest_ghes.html
488  acpi_hw_reduced_hotplug.html
489  genindex.html
490  index.html
491  objects.inv
492  ppc-spapr-xive.html
493  ppc-xive.html
494  search.html
495  searchindex.js
496  tpm.html
497 share/doc/qemu/docs/built/specs/_static/
498  alabaster.css
499  basic.css
500  custom.css
501  doctools.js
502  documentation_options.js
503  file.png
504  jquery-%%JQUERY%%.js
505  jquery.js
506  language_data.js
507  minus.png
508  plus.png
509  pygments.css
510  searchtools.js
511  underscore-1.3.1.js
512  underscore.js
513 share/doc/qemu/docs/built/system/
514  .buildinfo
515  build-platforms.html
516  deprecated.html
517  gdb.html
518  genindex.html
519  images.html
520  index.html
521  invocation.html
522  ivshmem.html
523  keys.html
524  license.html
525  linuxboot.html
526  managed-startup.html
527  monitor.html
528  mux-chardev.html
529  net.html
530  objects.inv
531  qemu-block-drivers.7
532  qemu-block-drivers.html
533  qemu-cpu-models.7
534  qemu-cpu-models.html
535  qemu-manpage.html
536  qemu.1
537  quickstart.html
538  search.html
539  searchindex.js
540  security.html
541  target-arm.html
542  target-avr.html
543  target-i386.html
544  target-m68k.html
545  target-mips.html
546  target-ppc.html
547  target-rx.html
548  target-s390x.html
549  target-sparc.html
550  target-sparc64.html
551  target-xtensa.html
552  targets.html
553  tls.html
554  usb.html
555  vnc-security.html
556 share/doc/qemu/docs/built/system/_static/
557  alabaster.css
558  basic.css
559  custom.css
560  doctools.js
561  documentation_options.js
562  file.png
563  jquery-%%JQUERY%%.js
564  jquery.js
565  language_data.js
566  minus.png
567  plus.png
568  pygments.css
569  searchtools.js
570  underscore-1.3.1.js
571  underscore.js
572 share/doc/qemu/docs/built/system/arm/
573  aspeed.html
574  collie.html
575  cpu-features.html
576  digic.html
577  gumstix.html
578  integratorcp.html
579  mps2.html
580  musca.html
581  musicpal.html
582  nseries.html
583  orangepi.html
584  palm.html
585  realview.html
586  stellaris.html
587  sx1.html
588  versatile.html
589  vexpress.html
590  virt.html
591  xscale.html
592 share/doc/qemu/docs/built/system/s390x/
593  3270.html
594  css.html
595  protvirt.html
596  vfio-ap.html
597  vfio-ccw.html
598 share/doc/qemu/docs/built/tools/
599  .buildinfo
600  genindex.html
601  index.html
602  objects.inv
603  qemu-img.1
604  qemu-img.html
605  qemu-nbd.8
606  qemu-nbd.html
607  qemu-trace-stap.1
608  qemu-trace-stap.html
609  search.html
610  searchindex.js
611  virtfs-proxy-helper.1
612  virtfs-proxy-helper.html
613  virtiofsd.1
614  virtiofsd.html
615 share/doc/qemu/docs/built/tools/_static/
616  alabaster.css
617  basic.css
618  custom.css
619  doctools.js
620  documentation_options.js
621  file.png
622  jquery-%%JQUERY%%.js
623  jquery.js
624  language_data.js
625  minus.png
626  plus.png
627  pygments.css
628  searchtools.js
629  underscore-1.3.1.js
630  underscore.js
631 share/doc/qemu/docs/built/user/
632  .buildinfo
633  genindex.html
634  index.html
635  main.html
636  objects.inv
637  search.html
638  searchindex.js
639 share/doc/qemu/docs/built/user/_static/
640  alabaster.css
641  basic.css
642  custom.css
643  doctools.js
644  documentation_options.js
645  file.png
646  jquery-%%JQUERY%%.js
647  jquery.js
648  language_data.js
649  minus.png
650  plus.png
651  pygments.css
652  searchtools.js
653  underscore-1.3.1.js
654  underscore.js
655 share/doc/qemu/docs/config/
656  ich9-ehci-uhci.cfg
657  mach-virt-graphical.cfg
658  mach-virt-serial.cfg
659  q35-emulated.cfg
660  q35-virtio-graphical.cfg
661  q35-virtio-serial.cfg
662 share/doc/qemu/docs/devel/
663  atomics.rst
664  bitops.rst
665  blkdebug.txt
666  blkverify.txt
667  build-system.txt
668  clocks.rst
669  conf.py
670  decodetree.rst
671  fuzzing.txt
672  index.rst
673  kconfig.rst
674  loads-stores.rst
675  lockcnt.txt
676  memory.rst
677  migration.rst
678  multi-thread-tcg.rst
679  multiple-iothreads.txt
680  qapi-code-gen.txt
681  rcu.txt
682  replay.txt
683  reset.rst
684  s390-dasd-ipl.rst
685  secure-coding-practices.rst
686  stable-process.rst
687  tcg-icount.rst
688  tcg-plugins.rst
689  tcg.rst
690  testing.rst
691  tracing.txt
692  virtio-migration.txt
693  writing-qmp-commands.txt
694 share/doc/qemu/docs/interop/
695  bitmaps.rst
696  conf.py
697  dbus-vmstate.rst
698  dbus.rst
699  firmware.json
700  index.rst
701  live-block-operations.rst
702  nbd.txt
703  parallels.txt
704  pr-helper.rst
705  prl-xml.txt
706  qcow2.txt
707  qed_spec.txt
708  qemu-ga-qapi.texi
709  qemu-ga-ref.7
710  qemu-ga-ref.7.pod
711  qemu-ga-ref.html
712  qemu-ga-ref.texi
713  qemu-ga-ref.txt
714  qemu-ga.rst
715  qemu-qmp-qapi.texi
716  qemu-qmp-ref.7
717  qemu-qmp-ref.7.pod
718  qemu-qmp-ref.html
719  qemu-qmp-ref.texi
720  qemu-qmp-ref.txt
721  qmp-intro.txt
722  qmp-spec.txt
723  vhost-user-gpu.rst
724  vhost-user.json
725  vhost-user.rst
726  vhost-vdpa.rst
727  vnc-ledstate-Pseudo-encoding.txt
728 share/doc/qemu/docs/specs/
729  acpi_cpu_hotplug.txt
730  acpi_hest_ghes.rst
731  acpi_hw_reduced_hotplug.rst
732  acpi_mem_hotplug.txt
733  acpi_nvdimm.txt
734  acpi_pci_hotplug.txt
735  conf.py
736  edu.txt
737  fw_cfg.txt
738  index.rst
739  ivshmem-spec.txt
740  pci-ids.txt
741  pci-serial.txt
742  pci-testdev.txt
743  ppc-spapr-hcalls.txt
744  ppc-spapr-hotplug.txt
745  ppc-spapr-uv-hcalls.txt
746  ppc-spapr-xive.rst
747  ppc-xive.rst
748  pvpanic.txt
749  rocker.txt
750  standard-vga.txt
751  tpm.rst
752  vmcoreinfo.txt
753  vmgenid.txt
754  vmw_pvscsi-spec.txt
755 share/doc/qemu/docs/sphinx/
756  hxtool.py
757  kerneldoc.py
758  kernellog.py
759  qmp_lexer.py
760 share/doc/qemu/docs/sphinx/__pycache__/
761  hxtool.cpython-38.pyc
762  kerneldoc.cpython-38.pyc
763  kernellog.cpython-38.pyc
764  qmp_lexer.cpython-%%PYTHON_SUFFIX%%.pyc
765 share/doc/qemu/docs/spin/
766  aio_notify.promela
767  aio_notify_accept.promela
768  aio_notify_bug.promela
769  tcg-exclusive.promela
770  win32-qemu-event.promela
771 share/doc/qemu/docs/system/
772  build-platforms.rst
773  conf.py
774  cpu-models-mips.rst.inc
775  cpu-models-x86.rst.inc
776  deprecated.rst
777  device-url-syntax.rst.inc
778  gdb.rst
779  images.rst
780  index.rst
781  invocation.rst
782  ivshmem.rst
783  keys.rst
784  keys.rst.inc
785  license.rst
786  linuxboot.rst
787  managed-startup.rst
788  monitor.rst
789  mux-chardev.rst
790  mux-chardev.rst.inc
791  net.rst
792  qemu-block-drivers.rst
793  qemu-block-drivers.rst.inc
794  qemu-cpu-models.rst
795  qemu-manpage.rst
796  quickstart.rst
797  security.rst
798  target-arm.rst
799  target-avr.rst
800  target-i386-desc.rst.inc
801  target-i386.rst
802  target-m68k.rst
803  target-mips.rst
804  target-ppc.rst
805  target-rx.rst
806  target-s390x.rst
807  target-sparc.rst
808  target-sparc64.rst
809  target-xtensa.rst
810  targets.rst
811  tls.rst
812  usb.rst
813  vnc-security.rst
814 share/doc/qemu/docs/system/arm/
815  aspeed.rst
816  collie.rst
817  cpu-features.rst
818  digic.rst
819  gumstix.rst
820  integratorcp.rst
821  mps2.rst
822  musca.rst
823  musicpal.rst
824  nseries.rst
825  orangepi.rst
826  palm.rst
827  realview.rst
828  stellaris.rst
829  sx1.rst
830  versatile.rst
831  vexpress.rst
832  virt.rst
833  xscale.rst
834 share/doc/qemu/docs/system/s390x/
835  3270.rst
836  css.rst
837  protvirt.rst
838  vfio-ap.rst
839  vfio-ccw.rst
840 share/doc/qemu/docs/tools/
841  conf.py
842  index.rst
843  qemu-img.rst
844  qemu-nbd.rst
845  qemu-trace-stap.rst
846  virtfs-proxy-helper.rst
847  virtiofsd.rst
848 share/doc/qemu/docs/user/
849  conf.py
850  index.rst
851  main.rst
852 share/doc/qemu/interop/
853  .buildinfo
854  bitmaps.html
855  dbus-vmstate.html
856  dbus.html
857  genindex.html
858  index.html
859  live-block-operations.html
860  objects.inv
861  pr-helper.html
862  qemu-ga-ref.html
863  qemu-ga-ref.txt
864  qemu-ga.html
865  qemu-qmp-ref.html
866  qemu-qmp-ref.txt
867  search.html
868  searchindex.js
869  vhost-user-gpu.html
870  vhost-user.html
871  vhost-vdpa.html
872 share/doc/qemu/interop/_static/
873  alabaster.css
874  basic.css
875  custom.css
876  doctools.js
877  documentation_options.js
878  file.png
879  jquery-%%JQUERY%%.js
880  jquery.js
881  language_data.js
882  minus.png
883  plus.png
884  pygments.css
885  searchtools.js
886  underscore-1.3.1.js
887  underscore.js
888 share/doc/qemu/specs/
889  .buildinfo
890  acpi_hest_ghes.html
891  acpi_hw_reduced_hotplug.html
892  genindex.html
893  index.html
894  objects.inv
895  ppc-spapr-xive.html
896  ppc-xive.html
897  search.html
898  searchindex.js
899  tpm.html
900 share/doc/qemu/specs/_static/
901  alabaster.css
902  basic.css
903  custom.css
904  doctools.js
905  documentation_options.js
906  file.png
907  jquery-%%JQUERY%%.js
908  jquery.js
909  language_data.js
910  minus.png
911  plus.png
912  pygments.css
913  searchtools.js
914  underscore-1.3.1.js
915  underscore.js
916 share/doc/qemu/system/
917  .buildinfo
918  build-platforms.html
919  deprecated.html
920  gdb.html
921  genindex.html
922  images.html
923  index.html
924  invocation.html
925  ivshmem.html
926  keys.html
927  license.html
928  linuxboot.html
929  managed-startup.html
930  monitor.html
931  mux-chardev.html
932  net.html
933  objects.inv
934  qemu-block-drivers.html
935  qemu-cpu-models.html
936  qemu-manpage.html
937  quickstart.html
938  search.html
939  searchindex.js
940  security.html
941  target-arm.html
942  target-avr.html
943  target-i386.html
944  target-m68k.html
945  target-mips.html
946  target-ppc.html
947  target-rx.html
948  target-s390x.html
949  target-sparc.html
950  target-sparc64.html
951  target-xtensa.html
952  targets.html
953  tls.html
954  usb.html
955  vnc-security.html
956 share/doc/qemu/system/_static/
957  alabaster.css
958  basic.css
959  custom.css
960  doctools.js
961  documentation_options.js
962  file.png
963  jquery-%%JQUERY%%.js
964  jquery.js
965  language_data.js
966  minus.png
967  plus.png
968  pygments.css
969  searchtools.js
970  underscore-1.3.1.js
971  underscore.js
972 share/doc/qemu/system/arm/
973  aspeed.html
974  collie.html
975  cpu-features.html
976  digic.html
977  gumstix.html
978  integratorcp.html
979  mps2.html
980  musca.html
981  musicpal.html
982  nseries.html
983  orangepi.html
984  palm.html
985  realview.html
986  stellaris.html
987  sx1.html
988  versatile.html
989  vexpress.html
990  virt.html
991  xscale.html
992 share/doc/qemu/system/s390x/
993  3270.html
994  css.html
995  protvirt.html
996  vfio-ap.html
997  vfio-ccw.html
998 share/doc/qemu/tools/
999  .buildinfo
1000  genindex.html
1001  index.html
1002  objects.inv
1003  qemu-img.html
1004  qemu-nbd.html
1005  qemu-trace-stap.html
1006  search.html
1007  searchindex.js
1008  virtfs-proxy-helper.html
1009  virtiofsd.html
1010 share/doc/qemu/tools/_static/
1011  alabaster.css
1012  basic.css
1013  custom.css
1014  doctools.js
1015  documentation_options.js
1016  file.png
1017  jquery-%%JQUERY%%.js
1018  jquery.js
1019  language_data.js
1020  minus.png
1021  plus.png
1022  pygments.css
1023  searchtools.js
1024  underscore-1.3.1.js
1025  underscore.js
1026 share/doc/qemu/user/
1027  .buildinfo
1028  genindex.html
1029  index.html
1030  main.html
1031  objects.inv
1032  search.html
1033  searchindex.js
1034 share/doc/qemu/user/_static/
1035  alabaster.css
1036  basic.css
1037  custom.css
1038  doctools.js
1039  documentation_options.js
1040  file.png
1041  jquery-%%JQUERY%%.js
1042  jquery.js
1043  language_data.js
1044  minus.png
1045  plus.png
1046  pygments.css
1047  searchtools.js
1048  underscore-1.3.1.js
1049  underscore.js
1050
1051
1052 [FILE:297:manifests/plist.nls]
1053 share/locale/bg/LC_MESSAGES/qemu.mo
1054 share/locale/de_DE/LC_MESSAGES/qemu.mo
1055 share/locale/fr_FR/LC_MESSAGES/qemu.mo
1056 share/locale/hu/LC_MESSAGES/qemu.mo
1057 share/locale/it/LC_MESSAGES/qemu.mo
1058 share/locale/sv/LC_MESSAGES/qemu.mo
1059 share/locale/tr/LC_MESSAGES/qemu.mo
1060 share/locale/zh_CN/LC_MESSAGES/qemu.mo
1061
1062
1063 [FILE:3366:patches/patch-configure]
1064 --- configure.orig      2020-08-11 19:17:15 UTC
1065 +++ configure
1066 @@ -501,6 +501,9 @@ numa=""
1067  tcmalloc="no"
1068  jemalloc="no"
1069  replication="yes"
1070 +pcap="no"
1071 +pcap_create="no"
1072 +bpf="no"
1073  bochs="yes"
1074  cloop="yes"
1075  dmg="yes"
1076 @@ -1191,6 +1194,10 @@ for opt do
1077    ;;
1078    --enable-vnc-png) vnc_png="yes"
1079    ;;
1080 +  --enable-pcap) pcap="yes"
1081 +  ;;
1082 +  --disable-pcap) pcap="no"
1083 +  ;;
1084    --disable-slirp) slirp="no"
1085    ;;
1086    --enable-slirp=git) slirp="git"
1087 @@ -3246,6 +3253,14 @@ if check_include "sys/signal.h" ; then
1088  fi
1089  
1090  ##########################################
1091 +# getifaddrs (for tests/test-io-channel-socket )
1092 +
1093 +have_ifaddrs_h=yes
1094 +if ! check_include "ifaddrs.h" ; then
1095 +  have_ifaddrs_h=no
1096 +fi
1097 +
1098 +##########################################
1099  # VTE probe
1100  
1101  if test "$vte" != "no"; then
1102 @@ -5252,7 +5267,7 @@ fi
1103  
1104  # check for libusb
1105  if test "$libusb" != "no" ; then
1106 -    if $pkg_config --atleast-version=1.0.13 libusb-1.0; then
1107 +    if $pkg_config libusb-1.0; then
1108          libusb="yes"
1109          libusb_cflags=$($pkg_config --cflags libusb-1.0)
1110          libusb_libs=$($pkg_config --libs libusb-1.0)
1111 @@ -6514,6 +6529,50 @@ EOF
1112      fi
1113  fi
1114  
1115 +##########################################
1116 +# pcap probe
1117 +
1118 +if test "$pcap" = "yes" -a "$pcap" != "no"; then
1119 +  cat > $TMPC << EOF
1120 +#include <pcap.h>
1121 +int main(void) { return (pcap_lib_version() == (char *)0 ? 1 : 0); }
1122 +EOF
1123 +  if test "$mingw32" = "no" ; then
1124 +    libpcap=-lpcap
1125 +  else
1126 +    libpcap=-lwpcap
1127 +  fi
1128 +  if compile_prog "" "$libpcap" ; then
1129 +    :
1130 +  else
1131 +    echo
1132 +    echo "Error: Could not find pcap"
1133 +    echo "Make sure to have the pcap libs and headers installed."
1134 +    echo
1135 +    exit 1
1136 +  fi
1137 +  cat > $TMPC << EOF
1138 +#include <pcap.h>
1139 +int main(void)
1140 +{
1141 +  char errbuf[PCAP_ERRBUF_SIZE];
1142 +  return (pcap_create("foo", errbuf) == (pcap_t *)0 ? 1 : 0);
1143 +}
1144 +EOF
1145 +  if compile_prog "" "$libpcap" ; then
1146 +    pcap_create="yes"
1147 +  fi
1148 +  cat > $TMPC << EOF
1149 +#define PCAP_DONT_INCLUDE_PCAP_BPF_H
1150 +#include <pcap.h>
1151 +#include <net/bpf.h>
1152 +int main(void) { return (BPF_MAJOR_VERSION); }
1153 +EOF
1154 +  if compile_prog ; then
1155 +    bpf="yes"
1156 +  fi
1157 +  libs_softmmu="$libpcap $libs_softmmu"
1158 +fi # test "$pcap"
1159  
1160  ##########################################
1161  # End of CC checks
1162 @@ -6910,6 +6969,7 @@ echo "Audio drivers     $audio_drv_list"
1163  echo "Block whitelist (rw) $block_drv_rw_whitelist"
1164  echo "Block whitelist (ro) $block_drv_ro_whitelist"
1165  echo "VirtFS support    $virtfs"
1166 +echo "pcap support      $pcap"
1167  echo "Multipath support $mpath"
1168  echo "VNC support       $vnc"
1169  if test "$vnc" = "yes" ; then
1170 @@ -7153,6 +7213,15 @@ fi
1171  if test "$want_tools" = "yes" ; then
1172    echo "CONFIG_TOOLS=y" >> $config_host_mak
1173  fi
1174 +if test "$pcap" = "yes" ; then
1175 +  echo "CONFIG_PCAP=y" >> $config_host_mak
1176 +  if test "$pcap_create" = "yes" ; then
1177 +    echo "CONFIG_PCAP_CREATE=y" >> $config_host_mak
1178 +  fi
1179 +  if test "$bpf" = "yes" ; then
1180 +    echo "CONFIG_BPF=y" >> $config_host_mak
1181 +  fi
1182 +fi
1183  if test "$slirp" != "no"; then
1184    echo "CONFIG_SLIRP=y" >> $config_host_mak
1185    echo "CONFIG_SMBD_COMMAND=\"$smbd\"" >> $config_host_mak
1186 @@ -7420,6 +7489,9 @@ fi
1187  if test "$have_fsxattr" = "yes" ; then
1188      echo "HAVE_FSXATTR=y" >> $config_host_mak
1189  fi
1190 +if test "$have_ifaddrs_h" = "yes" ; then
1191 +    echo "HAVE_IFADDRS_H=y" >> $config_host_mak
1192 +fi
1193  if test "$have_copy_file_range" = "yes" ; then
1194      echo "HAVE_COPY_FILE_RANGE=y" >> $config_host_mak
1195  fi
1196
1197
1198 [FILE:365:patches/patch-disas_libvixl_vixl_a64_disasm-a64.cc]
1199 --- disas/libvixl/vixl/a64/disasm-a64.cc.orig   2020-08-11 19:17:14 UTC
1200 +++ disas/libvixl/vixl/a64/disasm-a64.cc
1201 @@ -2693,7 +2693,7 @@ void Disassembler::AppendPCRelativeOffse
1202    if (offset < 0) {
1203      abs_offset = -abs_offset;
1204    }
1205 -  AppendToOutput("#%c0x%" PRIx64, sign, abs_offset);
1206 +  AppendToOutput("#%c0x%" PRIx64, sign, offset < 0 ? -offset : offset);
1207  }
1208  
1209  
1210
1211
1212 [FILE:582:patches/patch-include_net_net.h]
1213 --- include/net/net.h.orig      2020-08-11 19:17:15 UTC
1214 +++ include/net/net.h
1215 @@ -209,8 +209,8 @@ void netdev_add(QemuOpts *opts, Error **
1216  int net_hub_id_for_client(NetClientState *nc, int *id);
1217  NetClientState *net_hub_port_find(int hub_id);
1218  
1219 -#define DEFAULT_NETWORK_SCRIPT "/etc/qemu-ifup"
1220 -#define DEFAULT_NETWORK_DOWN_SCRIPT "/etc/qemu-ifdown"
1221 +#define DEFAULT_NETWORK_SCRIPT PREFIX "/etc/qemu-ifup"
1222 +#define DEFAULT_NETWORK_DOWN_SCRIPT PREFIX "/etc/qemu-ifdown"
1223  #define DEFAULT_BRIDGE_HELPER CONFIG_QEMU_HELPERDIR "/qemu-bridge-helper"
1224  #define DEFAULT_BRIDGE_INTERFACE "br0"
1225  
1226
1227
1228 [FILE:563:patches/patch-net_clients.h]
1229 --- net/clients.h.orig  2020-08-11 19:17:15 UTC
1230 +++ net/clients.h
1231 @@ -61,6 +61,12 @@ int net_init_netmap(const Netdev *netdev
1232  int net_init_vhost_user(const Netdev *netdev, const char *name,
1233                          NetClientState *peer, Error **errp);
1234  
1235 +#ifdef CONFIG_PCAP
1236 +int net_init_pcap(const Netdev *netdev, const char *name,
1237 +                    NetClientState *peer, Error **errp);
1238 +#endif
1239 +
1240 +
1241  int net_init_vhost_vdpa(const Netdev *netdev, const char *name,
1242                          NetClientState *peer, Error **errp);
1243  #endif /* QEMU_NET_CLIENTS_H */
1244
1245
1246 [FILE:6930:patches/patch-net_net.c]
1247 --- net/net.c.orig      2020-08-11 19:17:15 UTC
1248 +++ net/net.c
1249 @@ -55,6 +55,11 @@
1250  #include "net/filter.h"
1251  #include "qapi/string-output-visitor.h"
1252  
1253 +#include <sys/ioctl.h>
1254 +#if defined(__FreeBSD__) || defined(__DragonFly__)
1255 +#include <net/if.h>
1256 +#endif
1257 +
1258  /* Net bridge is currently not supported for W32. */
1259  #if !defined(_WIN32)
1260  # define CONFIG_NET_BRIDGE
1261 @@ -942,7 +947,225 @@ static int net_init_nic(const Netdev *ne
1262      return idx;
1263  }
1264  
1265 +#if defined(CONFIG_PCAP)
1266 +#if defined(CONFIG_BPF)
1267 +#define PCAP_DONT_INCLUDE_PCAP_BPF_H
1268 +#include <net/bpf.h>
1269 +#endif
1270 +#include <pcap.h>
1271 +
1272 +struct PCAPState {
1273 +    NetClientState     nc;
1274 +    pcap_t            *handle;
1275 +    int                max_eth_frame_size;
1276 +};
1277 +
1278 +static ssize_t pcap_receive(NetClientState *nc, const uint8_t *buf, size_t size)
1279 +{
1280 +    struct PCAPState *s = DO_UPCAST(struct PCAPState, nc, nc);
1281 +
1282 +    return pcap_inject(s->handle, (u_char*)buf, size);
1283 +}
1284 +
1285 +static void pcap_callback(u_char *user, struct pcap_pkthdr *phdr, u_char *pdata
1286 +               )
1287 +{
1288 +    NetClientState *nc = (NetClientState *)user;
1289 +
1290 +    int len = phdr->len;
1291 +#if defined(__FreeBSD__) || defined(__DragonFly__)
1292 +    struct PCAPState *s = DO_UPCAST(struct PCAPState, nc, nc);
1293 +    int max_eth_frame_size = s->max_eth_frame_size;
1294 +
1295 +    if (len > max_eth_frame_size) {
1296 +        fprintf(stderr,
1297 +            "pcap_send: packet size > %d (%d), truncating\n",
1298 +            max_eth_frame_size, len);
1299 +        len = max_eth_frame_size;
1300 +    }
1301 +#endif
1302 +    qemu_send_packet(nc, pdata, len);
1303 +}
1304 +
1305 +static void pcap_send(void *opaque)
1306 +{
1307 +    struct PCAPState *s = (struct PCAPState *)opaque;
1308 +
1309 +    for (;;) {
1310 +        if (pcap_dispatch(s->handle, 0, (pcap_handler)&pcap_callback, (u_char *)&s->nc) >= 0)
1311 +            break;
1312 +    }
1313 +}
1314 +
1315 +static void pcap_cleanup(NetClientState *nc)
1316 +{
1317 +    struct PCAPState *s = DO_UPCAST(struct PCAPState, nc, nc);
1318 +
1319 +    qemu_purge_queued_packets(nc);
1320 +    pcap_close(s->handle);
1321 +}
1322 +
1323 +static NetClientInfo net_pcap_info = {
1324 +    .type = NET_CLIENT_DRIVER_PCAP,
1325 +    .size = sizeof(struct PCAPState),
1326 +    .receive = pcap_receive,
1327 +//    .receive_raw = pcap_receive_raw,
1328 +//    .receive_iov = pcap_receive_iov,
1329 +//    .poll = pcap_poll,
1330 +    .cleanup = pcap_cleanup,
1331 +};
1332 +/*
1333 + * ... -net pcap,ifname="..."
1334 + */
1335 +
1336 +int net_init_pcap(const Netdev *netdev,
1337 +    const char *name, NetClientState *peer, Error **errp)
1338 +{
1339 +    const NetdevPcapOptions *pcap_opts;
1340 +    NetClientState *nc;
1341 +    struct PCAPState *s;
1342 +    const char *ifname;
1343 +    char errbuf[PCAP_ERRBUF_SIZE];
1344 +#if defined(_WIN32)
1345 +    HANDLE h;
1346 +#endif
1347 +    int i;
1348 +
1349 +    assert(netdev->type == NET_CLIENT_DRIVER_PCAP);
1350 +    pcap_opts = &netdev->u.pcap;
1351 +    if (!pcap_opts->has_ifname)
1352 +        return -1;
1353 +
1354 +    ifname = pcap_opts->ifname;
1355 +
1356 +    /* create the object */
1357 +    nc = qemu_new_net_client(&net_pcap_info, peer, "pcap", ifname);
1358 +    s = DO_UPCAST(struct PCAPState, nc, nc);
1359 +
1360 +    if (ifname == NULL && (ifname = pcap_lookupdev(errbuf)) == NULL) {
1361 +        fprintf(stderr, "qemu: pcap_create: %s\n", errbuf);
1362 +        goto fail;
1363 +    }
1364
1365 +#if defined(__FreeBSD__) || defined(__DragonFly__)
1366 +    /*
1367 +     * We want to avoid passing oversize packets to the guest, which
1368 +     * at least on FreeBSD can happen if the host interface uses tso
1369 +     * (seen with an em(4) in this case) - so find out the host
1370 +    * interface's mtu and assume the guest is configured the same.
1371 +     */
1372 +    s->max_eth_frame_size = 1514;
1373 +    i = socket(AF_INET, SOCK_DGRAM, 0);
1374 +    if (i >= 0) {
1375 +        struct ifreq ifr;
1376 +
1377 +        (void) memset(&ifr, 0, sizeof(ifr));
1378 +        strncpy(ifr.ifr_name, ifname, sizeof(ifr.ifr_name));
1379 +        if (ioctl(i, SIOCGIFMTU, &ifr) != -1)
1380 +            s->max_eth_frame_size = ifr.ifr_mtu + 14;
1381 +        close(i);
1382 +    }
1383 +#endif
1384 +
1385 +#if defined(CONFIG_PCAP_CREATE) || defined(_WIN32)
1386 +    /*
1387 +     * Create pcap handle for the device, set promiscuous mode and activate.
1388 +     */
1389 +    s->handle = (void *)pcap_create(ifname, errbuf);
1390 +    if (!s->handle) {
1391 +        fprintf(stderr, "qemu: pcap_create: %s\n", errbuf);
1392 +        goto fail;
1393 +    }
1394 +    if (pcap_set_promisc(s->handle, 1) != 0) {
1395 +        pcap_perror(s->handle, (char *)"qemu: pcap_set_promisc:");
1396 +        goto fail;
1397 +    }
1398 +   if (pcap_activate(s->handle) != 0) {
1399 +        pcap_perror(s->handle, (char *)"qemu: pcap_activate:");
1400 +        goto fail;
1401 +    }
1402 +#else
1403 +    /* Attempt to connect device. */
1404 +    s->handle = (void *)pcap_open_live(ifname, 65535, 1, 0, errbuf);
1405 +    if (!s->handle) {
1406 +        fprintf(stderr, "qemu: pcap_open_live: %s\n", errbuf);
1407 +        goto fail;
1408 +    }
1409 +#endif
1410 +
1411 +    /* Set non-blocking mode. */
1412 +    if (pcap_setnonblock(s->handle, 1, errbuf) < 0) {
1413 +        fprintf(stderr, "qemu: pcap_setnonblock: %s\n", errbuf);
1414 +        goto fail;
1415 +    }
1416 +
1417 +#if defined(_WIN32)
1418 +    /*
1419 +     * Tell the kernel that the packet has to be seen immediately.
1420 +     */
1421 +    if (pcap_setmintocopy(s->handle, 0) < 0) {
1422 +        fprintf(stderr, "qemu: pcap failed to set immediate mode\n");
1423 +        goto fail;
1424 +    }
1425 +#else /* !_WIN32 */
1426 +#if defined(CONFIG_BPF)
1427 +#if defined(BIOCIMMEDIATE)
1428 +    /*
1429 +     * Tell the kernel that the packet has to be seen immediately.
1430 +     */
1431 +    {
1432 +        unsigned int one = 1;
1433 +        if (ioctl(pcap_fileno(s->handle), BIOCIMMEDIATE, &one) < 0) {
1434 +            fprintf(stderr, "qemu: pcap failed to set immediate mode\n");
1435 +            goto fail;
1436 +        }
1437 +    }
1438 +#endif /* BIOCIMMEDIATE */
1439 +#if defined(BIOCFEEDBACK)
1440 +    /*
1441 +     * Tell the kernel that the sent packet has to be fed back.
1442 +     * This is necessary to connect host and guest.
1443 +     */
1444 +    {
1445 +        unsigned int one = 1;
1446 +        if (ioctl(pcap_fileno(s->handle), BIOCFEEDBACK, &one) < 0) {
1447 +            fprintf(stderr, "qemu: pcap failed to set feedback mode\n");
1448 +            goto fail;
1449 +        }
1450 +    }
1451 +#endif /* BIOCFEEDBACK */
1452 +#endif /* CONFIG_BPF */
1453 +#endif /* _WIN32 */
1454 +
1455 +    snprintf(s->nc.info_str, sizeof(s->nc.info_str), "pcap redirector");
1456 +
1457 +#if defined(_WIN32)
1458 +    if ((h = pcap_getevent(s->handle)) == NULL) {
1459 +        fprintf(stderr, "qemu: pcap_getevent failed\n");
1460 +        goto fail;
1461 +    }
1462 +    qemu_add_wait_object(h, pcap_send, s);
1463 +#else /* !_WIN32 */
1464 +    if ((i = pcap_get_selectable_fd(s->handle)) < 0) {
1465 +        fprintf(stderr, "qemu: pcap_get_selectable_fd failed\n");
1466 +        goto fail;
1467 +    }
1468 +    qemu_set_fd_handler(i, pcap_send, NULL, s);
1469 +#endif /* _WIN32 */
1470 +
1471 +    return 0;
1472 +
1473 +fail:
1474 +    if (s) {
1475 +        if (s->handle)
1476 +            pcap_close(s->handle);
1477 +    }
1478 +
1479 +    return -1;
1480 +}
1481  
1482 +#endif
1483
1484  static int (* const net_client_init_fun[NET_CLIENT_DRIVER__MAX])(
1485      const Netdev *netdev,
1486      const char *name,
1487 @@ -972,6 +1195,9 @@ static int (* const net_client_init_fun[
1488  #ifdef CONFIG_L2TPV3
1489          [NET_CLIENT_DRIVER_L2TPV3]    = net_init_l2tpv3,
1490  #endif
1491 +#ifdef CONFIG_PCAP
1492 +       [NET_CLIENT_DRIVER_PCAP]      = net_init_pcap,
1493 +#endif
1494  };
1495  
1496  
1497
1498
1499 [FILE:423:patches/patch-net_tap-bsd.c]
1500 --- net/tap-bsd.c.orig  2020-08-11 19:17:15 UTC
1501 +++ net/tap-bsd.c
1502 @@ -31,9 +31,16 @@
1503  
1504  #if defined(__NetBSD__) || defined(__FreeBSD__)
1505  #include <sys/ioctl.h>
1506 +#include <sys/socket.h>
1507  #include <net/if.h>
1508  #include <net/if_tap.h>
1509  #endif
1510 +#if defined(__DragonFly)
1511 +#include <sys/ioctl.h>
1512 +#include <sys/socket.h>
1513 +#include <net/if.h>
1514 +#include <net/tap/if_tap.h>
1515 +#endif
1516  
1517  #if defined(__OpenBSD__)
1518  #include <sys/param.h>
1519
1520
1521 [FILE:1028:patches/patch-qapi_net.json]
1522 --- qapi/net.json.orig  2020-08-11 19:17:15 UTC
1523 +++ qapi/net.json
1524 @@ -374,6 +374,19 @@
1525      '*helper': 'str' } }
1526  
1527  ##
1528 +# @NetdevPcapOptions:
1529 +#
1530 +# Use ifname as a source to capture
1531 +#
1532 +# @ifname: #required to determine which interface to capture
1533 +#
1534 +# Since: 1.2
1535 +##
1536 +{ 'struct': 'NetdevPcapOptions',
1537 +  'data': {
1538 +    '*ifname':     'str' } }
1539 +
1540 +##
1541  # @NetdevHubPortOptions:
1542  #
1543  # Connect two or more net clients through a software hub.
1544 @@ -461,7 +474,7 @@
1545  ##
1546  { 'enum': 'NetClientDriver',
1547    'data': [ 'none', 'nic', 'user', 'tap', 'l2tpv3', 'socket', 'vde',
1548 -            'bridge', 'hubport', 'netmap', 'vhost-user', 'vhost-vdpa' ] }
1549 +            'bridge', 'hubport', 'netmap', 'vhost-user', 'vhost-vdpa', 'pcap' ] }
1550  
1551  ##
1552  # @Netdev:
1553 @@ -484,6 +497,7 @@
1554      'user':     'NetdevUserOptions',
1555      'tap':      'NetdevTapOptions',
1556      'l2tpv3':   'NetdevL2TPv3Options',
1557 +    'pcap':     'NetdevPcapOptions',
1558      'socket':   'NetdevSocketOptions',
1559      'vde':      'NetdevVdeOptions',
1560      'bridge':   'NetdevBridgeOptions',
1561
1562
1563 [FILE:314:patches/patch-util_getauxval.c]
1564 --- util/getauxval.c.orig       2020-08-11 19:17:15 UTC
1565 +++ util/getauxval.c
1566 @@ -98,7 +98,7 @@ unsigned long qemu_getauxval(unsigned lo
1567      return 0;
1568  }
1569  
1570 -#elif defined(__FreeBSD__)
1571 +#elif defined(__FreeBSD__) && __FreeBSD_version__ > 1200001
1572  #include <sys/auxv.h>
1573  
1574  unsigned long qemu_getauxval(unsigned long type)
1575
1576
1577 [FILE:7685:files/pkg-message-single]
1578 FreeBSD host notes
1579 ==================
1580
1581 - Needs to set net.link.tap.user_open sysctl in order to use /dev/tap*
1582   networking as non-root.  Don't forget to adjust device node permissions in
1583   /etc/devfs.rules.
1584
1585 - slirp (usermode networking) is fixed now in cvs, on FreeSBIE 1.0 guests you
1586   still have to manually do: echo nameserver 10.0.2.3 >/etc/resolv.conf but
1587   i've been told that that's normal.  (fixed on FreeSBIE 1.1.) And you have
1588   to wait a bit for dhclient to do its thing; traffic to address 10.0.2.2 is
1589   routed to 127.1 on the host.
1590
1591 - Expect timer problems when guest kernel HZ is > hosts, for example time
1592   sleep 1 takes 49 seconds and booting sleeps for minutes at the acd0 probe
1593   with a FreeSBIE 1.0 guest, thats because its kernel is built with HZ=5000,
1594   and FreeBSD's default is 100...  (no longer a problem with FreeSBIE 1.1.)
1595   The linux 2.6 kernel uses 1000 by default btw.  (changed to 250 later, and
1596   recent linux kernels now no longer have a fixed HZ, aka `tickless
1597   kernel'...)  Enabling /dev/rtc doesn't seem to help either (not included
1598   since it needs a patch to emulators/rtc.)
1599
1600 - Update: the above problem has gotten worse with FreeBSD guests
1601   somewhere before 8.0, mainly since the kernel now usually wants
1602   double or even quadruple number of timer irqs compared to HZ if
1603   it detects an apic (and at least early versions of FreeBSD 8 had
1604   a bug that essentially halved qemu's clock rate too); the only
1605   reason you usually don't see symptoms of this with FreeBSD 8
1606   guests is they automatically reduce their HZ to 100 when running
1607   in a VM while the default for the host kernel is still HZ=1000.
1608   Workaround: you can disable the apic clock in the guest by setting
1609
1610     hint.apic.0.clock="0"
1611
1612   in loader.conf(5) (or manually at the loader prompt), if that
1613   doesn't work the only things you can do is either reduce the
1614   guest's HZ to, say, 100 by setting e.g.
1615
1616     kern.hz="100"
1617
1618   from the loader as above (which usually is a good idea in a VM
1619   anyway and FreeBSD 8 now does by itself as mentioned), or otherwise
1620   increase the host's HZ to 2000 or even 4000 from the loader in
1621   the same way.
1622
1623 - The -smb option (smb-export local dir to guest using the default
1624   slirp networking) needs the samba port/package installed
1625   in addition to qemu. (SAMBA knob.)
1626
1627 - If you want to use usb devices connected to the host in the guest
1628   yot need either recent 10-current (not tested yet much) or you can
1629   use usbredir over the network (see below); also unless you are
1630   running qemu as root you then need to fix permissions for /dev/ugen*
1631   device nodes: if you are on 5.x or later (devfs) put a rule in
1632   /etc/devfs.rules, activate it in /etc/rc.conf and run /etc/rc.d/devfs
1633   restart.  Example devfs.rules:
1634
1635     [ugen_ruleset=20]
1636     add path 'ugen*' mode 660 group operator
1637
1638   corresponding rc.conf line:
1639
1640     devfs_system_ruleset="ugen_ruleset"
1641
1642 - If you want to test the new (in 0.15.0) usb network redirection (USBREDIR
1643   option) see this thread by Hans de Goede <hdegoede <at> redhat.com>:
1644
1645     http://thread.gmane.org/gmane.comp.emulators.qemu/110176/focus=110183
1646
1647   Quote:
1648
1649   Example usage:
1650
1651   1) Start usbredirserver for a usb device:
1652   sudo usbredirserver 045e:0772
1653   2) Start qemu with usb2 support + a chardev talking to usbredirserver +
1654      a usb-redir device using this chardev:
1655   qemu -usb \
1656     -readconfig docs/ich9-ehci-uhci.cfg \
1657     -chardev socket,id=usbredirchardev,host=localhost,port=4000 \
1658     -device usb-redir,chardev=usbredirchardev,id=usbredirdev ...
1659
1660   [you would replace docs/ich9-ehci-uhci.cfg with e.g.
1661   /raven/share/doc/qemu/docs/ich9-ehci-uhci.cfg, but turns out
1662   ehci was broken for me here with FreeBSD guests and the previous
1663   qemu version at least, I got:
1664
1665     FETCHENTRY: entry at 22C5484 is of type 2 which is not supported yet processing error - resetting ehci HC
1666     Assertion failed: (0), function ehci_advance_state, file /data/ports/emulators/qemu-devel/work/qemu-0.15.0/hw/usb-ehci.c, line 2045.
1667
1668   The new qemu version works better tho.]
1669
1670 - Still usb: since the hub is no longer attached to the uchi controller and
1671   the wakeup mechanism, resume interrupt is not implemented yet linux guests
1672   will suspend the bus, i.e. they wont see devices usb_add'ed after its
1673   (linux') uhci module got loaded.  Workaround: either add devices before
1674   linux loads the module or rmmod and modprobe it afterwards.  [Not sure
1675   if this still applies to the new libusb host code used on recent
1676   10-current.]
1677
1678 - If you build qemu wihout SDL and then get crashes running it try passing it
1679   -nographic.  This should probably be default in that case...
1680
1681 - qemu's network boot roms (-boot n) have a bug when bootfiles sizes are a
1682   multiple of blksize, if this affects you (like with FreeBSD's /boot/pxeboot)
1683   you can do like
1684
1685     cp /boot/pxeboot pxeboot-qemu && chmod +w pxeboot-qemu && echo >>pxeboot-qemu
1686
1687   and then use pxeboot-qemu.  Actually you need recent btx code
1688   (from after 7.0 was released) because of the real mode boot
1689   problem, so use at least pxeboot from there.  And I just did that
1690   for the pxeboot extracted out of
1691
1692     ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/200805/7.0-STABLE-200805-i386-bootonly.iso
1693
1694   and placed it here:
1695
1696     http://people.freebsd.org/~nox/qemu/pxeboot-qemu
1697
1698 - If you use slirp (usernet, the default) and want to mount nfs into the guest
1699   and you are not running qemu as root, then mountd(8) on the exporting box
1700   needs to be run with -n in order to accept requests from ports >= 1024.
1701
1702 - (not FreeBSD-specific:) There have been reports of qcow2 corruption with (at
1703   least) win2k guests on recent kvm (which uses similar qcow2 code than qemu
1704   now, see this thread:
1705
1706     http://lists.gnu.org/archive/html/qemu-devel/2009-02/msg00713.html -
1707
1708   the consensus on that thread seems to be that qcow(2) code has always been
1709   experimental and you should use raw images if you want reliability; raw is
1710   also usually faster.)  You should be able to migrate existing images to raw
1711   using qemu-img(1)'s convert function; raw doesn't support advanced features
1712   like snapshots tho.  [a few important qcow2 bugfixed have been committed in
1713   the meantime so this _might_ be less of an issue now; and meanwhile there
1714   also is the new qed format - I don't know how stable that one is.]
1715
1716 - (also not FreeBSD-specific:)  It is recommended to pass raw images using the
1717   new -drive syntax, specifying format=raw explicitly in order to avoid
1718   malicious guests being able to exploit the format autodetection thats
1719   otherwise getting used.  (Not that you should run malicious guests anyway,
1720   but this eleminates at least a known attack vector.)
1721
1722 - qemu now has improved physical cdrom support, but still there is at
1723   least one known problem: you need to have the guest eject the disc if you
1724   want to change it/take it out, or otherwise the guest may continue using
1725   state (like size) of the old disc.  (You can also do like `change ide1-cd0
1726   /dev/acd0' in the monitor after taking out the disc if a guest cannot eject
1727   it itself.)
1728
1729 - The default configuration location (qemu-ifup script etc.) has been changed
1730   from /etc to PREFIX/etc (usually /raven/etc).  Move your files accordingly.
1731
1732 - The pcap code (-net nic... -net pcap,ifname=...) should work properly now,
1733   with only one exception:  Advanced features like TSO used on the host
1734   interface can cause oversize packets which now do get truncated to avoid
1735   confusing/panicing guests but of course still will cause retransmissions.
1736   So if you see slow throughput and `pcap_send: packet size > ..., truncating'
1737   messages on qemu's tty try disabling TSO etc on the host interface at least
1738   while using pcap.
1739
1740
1741 [FILE:20:files/qemu-ifdown.sample]
1742 #!/bin/sh
1743 exec true
1744
1745
1746 [FILE:20:files/qemu-ifup.sample]
1747 #!/bin/sh
1748 exec true
1749
1750
1751 [FILE:66:files/special.mk]
1752 .if "${ARCH_STANDARD}" == "x86_64"
1753 MAKE_ARGS+=     ARCH=x86_64
1754 .endif
1755
1756
1757 [FILE:436:dragonfly/patch-disas_libvixl_vixl_utils.h]
1758 --- disas/libvixl/vixl/utils.h.orig     2020-08-11 19:17:14 UTC
1759 +++ disas/libvixl/vixl/utils.h
1760 @@ -42,6 +42,13 @@ namespace vixl {
1761  #define PRINTF_CHECK(format_index, varargs_index)
1762  #endif
1763  
1764 +#ifndef INT64_C
1765 +#define INT32_C(c) c
1766 +#define INT64_C(c) (c ## LL)
1767 +#define UINT32_C(c) (c ## U)
1768 +#define UINT64_C(c) (c ## ULL)
1769 +#endif
1770 +
1771  // Check number width.
1772  inline bool is_intn(unsigned n, int64_t x) {
1773    VIXL_ASSERT((0 < n) && (n < 64));
1774
1775
1776 [FILE:323:dragonfly/patch-hw-ppc_newworld.c]
1777 --- hw/ppc/mac_newworld.c.orig  2020-08-11 19:17:15 UTC
1778 +++ hw/ppc/mac_newworld.c
1779 @@ -74,6 +74,11 @@
1780  #include "hw/sysbus.h"
1781  #include "trace.h"
1782  
1783 +/* FreeBSD headers define this */
1784 +#ifdef round_page
1785 +#undef round_page
1786 +#endif
1787 +
1788  #define MAX_IDE_BUS 2
1789  #define CFG_ADDR 0xf0000510
1790  #define TBFREQ (100UL * 1000UL * 1000UL)
1791
1792
1793 [FILE:334:dragonfly/patch-hw_ppc_mac__oldworld.c]
1794 --- hw/ppc/mac_oldworld.c.orig  2020-08-11 19:17:15 UTC
1795 +++ hw/ppc/mac_oldworld.c
1796 @@ -60,6 +60,11 @@
1797  
1798  #define GRACKLE_BASE 0xfec00000
1799  
1800 +/* FreeBSD headers define this */
1801 +#ifdef round_page
1802 +#undef round_page
1803 +#endif
1804 +
1805  static void fw_cfg_boot_set(void *opaque, const char *boot_device,
1806                              Error **errp)
1807  {
1808
1809
1810 [FILE:906:dragonfly/patch-util_coroutine-ucontext.c]
1811 --- util/coroutine-ucontext.c.orig      2020-08-11 19:17:15 UTC
1812 +++ util/coroutine-ucontext.c
1813 @@ -221,7 +221,15 @@ Coroutine *qemu_coroutine_new(void)
1814                  2, arg.i[0], arg.i[1]);
1815  
1816      /* swapcontext() in, siglongjmp() back out */
1817 -    if (!sigsetjmp(old_env, 0)) {
1818 +    /* Save signal mask in this sigsetjmp, because makecontext on DragonFly
1819 +     * leaves all signals blocked when entering the new context with
1820 +     * swapcontext.
1821 +     * Workaround this, by just having the signal mask restored by the
1822 +     * siglongjmp that brings us back from qemu_coroutine_new().
1823 +     * XXX Remove this workaround when the makecontext behaviour is fixed
1824 +     *     on DragonFly.
1825 +     */
1826 +    if (!sigsetjmp(old_env, 1)) {
1827          start_switch_fiber_asan(COROUTINE_YIELD, &fake_stack_save, co->stack,
1828                                  co->stack_size);
1829          start_switch_fiber_tsan(&fake_stack_save,
1830