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