summaryrefslogtreecommitdiff
path: root/sysutils
diff options
context:
space:
mode:
authorwiz <wiz@pkgsrc.org>2016-12-29 19:13:01 +0000
committerwiz <wiz@pkgsrc.org>2016-12-29 19:13:01 +0000
commitd465bb41c53d37c6b05d92b59b3ef64e6c25bbd0 (patch)
tree0d0193725b58b63987fbcb2a0564a43e8f2d4ff9 /sysutils
parentd48e7c2f1dec4aeed186878079fb10b0eb2f2205 (diff)
downloadpkgsrc-d465bb41c53d37c6b05d92b59b3ef64e6c25bbd0.tar.gz
Remove xenkernel and tools versions 3, 33, and 41.
As discussed on pkgsrc-users.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile9
-rw-r--r--sysutils/xenkernel3/DESCR14
-rw-r--r--sysutils/xenkernel3/MESSAGE7
-rw-r--r--sysutils/xenkernel3/MESSAGE.i3869
-rw-r--r--sysutils/xenkernel3/Makefile101
-rw-r--r--sysutils/xenkernel3/PLIST3
-rw-r--r--sysutils/xenkernel3/PLIST.i3863
-rw-r--r--sysutils/xenkernel3/distinfo24
-rw-r--r--sysutils/xenkernel3/patches/patch-SA4583513
-rw-r--r--sysutils/xenkernel3/patches/patch-aa13
-rw-r--r--sysutils/xenkernel3/patches/patch-ac18
-rw-r--r--sysutils/xenkernel3/patches/patch-ae36
-rw-r--r--sysutils/xenkernel3/patches/patch-ba14
-rw-r--r--sysutils/xenkernel3/patches/patch-bb18
-rw-r--r--sysutils/xenkernel3/patches/patch-bc166
-rw-r--r--sysutils/xenkernel3/patches/patch-bd112
-rw-r--r--sysutils/xenkernel3/patches/patch-cw25
-rw-r--r--sysutils/xenkernel3/patches/patch-da24
-rw-r--r--sysutils/xenkernel3/patches/patch-db15
-rw-r--r--sysutils/xenkernel3/patches/patch-dc16
-rw-r--r--sysutils/xenkernel3/patches/patch-gcc-version14
-rw-r--r--sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c13
-rw-r--r--sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c26
-rw-r--r--sysutils/xenkernel3/patches/patch-xen_arch_x86_x86__64_entry.S13
-rw-r--r--sysutils/xenkernel3/patches/patch-xen_common_libelf_libelf-private.h10
-rw-r--r--sysutils/xenkernel3/patches/patch-xen_include_xen_compat.h57
-rw-r--r--sysutils/xenkernel33/DESCR13
-rw-r--r--sysutils/xenkernel33/MESSAGE7
-rw-r--r--sysutils/xenkernel33/Makefile75
-rw-r--r--sysutils/xenkernel33/PLIST3
-rw-r--r--sysutils/xenkernel33/distinfo20
-rw-r--r--sysutils/xenkernel33/patches/patch-CVE-2012-343215
-rw-r--r--sysutils/xenkernel33/patches/patch-Config.mk13
-rw-r--r--sysutils/xenkernel33/patches/patch-SA4583513
-rw-r--r--sysutils/xenkernel33/patches/patch-aa13
-rw-r--r--sysutils/xenkernel33/patches/patch-ab15
-rw-r--r--sysutils/xenkernel33/patches/patch-ac18
-rw-r--r--sysutils/xenkernel33/patches/patch-ad32
-rw-r--r--sysutils/xenkernel33/patches/patch-ae31
-rw-r--r--sysutils/xenkernel33/patches/patch-compat_memory_c31
-rw-r--r--sysutils/xenkernel33/patches/patch-include_xen_compat_h89
-rw-r--r--sysutils/xenkernel33/patches/patch-xen_Makefile13
-rw-r--r--sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk12
-rw-r--r--sysutils/xenkernel33/patches/patch-xen_arch_x86_x86__64_entry.S13
-rw-r--r--sysutils/xenkernel33/patches/patch-xen_common_libelf_libelf-private.h10
-rw-r--r--sysutils/xenkernel41/DESCR12
-rw-r--r--sysutils/xenkernel41/MESSAGE7
-rw-r--r--sysutils/xenkernel41/Makefile61
-rw-r--r--sysutils/xenkernel41/PLIST3
-rw-r--r--sysutils/xenkernel41/distinfo56
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-144227
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-4355_1120
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-4355_271
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-4355_336
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-4355_424
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-436120
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-436821
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-449480
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-455333
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-6885_128
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2013-6885_212
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-166617
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-312426
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-402126
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-715434
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-715539
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-715625
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-859427
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-8595158
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-8866115
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-886790
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2014-903046
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2015-204453
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2015-204542
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2015-215122
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2015-2752108
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2015-2756142
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2015-783545
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2015-796935
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2015-797135
-rw-r--r--sysutils/xenkernel41/patches/patch-CVE-2015-833920
-rw-r--r--sysutils/xenkernel41/patches/patch-Config.mk13
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-16642
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-18290
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-18537
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-187-144
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-187-2152
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-191142
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-19267
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-19549
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-20057
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-20273
-rw-r--r--sysutils/xenkernel41/patches/patch-XSA-20471
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_Makefile13
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_arch_x86_Rules.mk12
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_arch_x86_cpu_mcheck_vmce.c31
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_arch_x86_time.c26
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_drivers_char_console_c12
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c13
-rw-r--r--sysutils/xenkernel41/patches/patch-xen_include_xen_stdarg.h25
-rw-r--r--sysutils/xentools3-hvm/DESCR4
-rw-r--r--sysutils/xentools3-hvm/Makefile126
-rw-r--r--sysutils/xentools3-hvm/PLIST40
-rw-r--r--sysutils/xentools3-hvm/distinfo28
-rw-r--r--sysutils/xentools3-hvm/files/NetBSD.mk2
-rw-r--r--sysutils/xentools3-hvm/files/elf_machdep.h41
-rw-r--r--sysutils/xentools3-hvm/files/hvm-nbsd68
-rw-r--r--sysutils/xentools3-hvm/files/int_types.h73
-rwxr-xr-xsysutils/xentools3-hvm/files/qemu-ifup-nbsd3
-rw-r--r--sysutils/xentools3-hvm/files/xenio.h105
-rw-r--r--sysutils/xentools3-hvm/files/xenio3.h89
-rw-r--r--sysutils/xentools3-hvm/patches/patch-.._patch-Config.mk26
-rw-r--r--sysutils/xentools3-hvm/patches/patch-aa61
-rw-r--r--sysutils/xentools3-hvm/patches/patch-an24
-rw-r--r--sysutils/xentools3-hvm/patches/patch-ao39
-rw-r--r--sysutils/xentools3-hvm/patches/patch-ap12
-rw-r--r--sysutils/xentools3-hvm/patches/patch-ar178
-rw-r--r--sysutils/xentools3-hvm/patches/patch-as26
-rw-r--r--sysutils/xentools3-hvm/patches/patch-at13
-rw-r--r--sysutils/xentools3-hvm/patches/patch-au16
-rw-r--r--sysutils/xentools3-hvm/patches/patch-av12
-rw-r--r--sysutils/xentools3-hvm/patches/patch-aw32
-rw-r--r--sysutils/xentools3-hvm/patches/patch-ax14
-rw-r--r--sysutils/xentools3-hvm/patches/patch-ay31
-rw-r--r--sysutils/xentools3-hvm/patches/patch-ba15
-rw-r--r--sysutils/xentools3-hvm/patches/patch-bb19
-rw-r--r--sysutils/xentools3-hvm/patches/patch-bv14
-rw-r--r--sysutils/xentools3-hvm/patches/patch-ck9
-rw-r--r--sysutils/xentools3-hvm/patches/patch-cl12
-rw-r--r--sysutils/xentools3-hvm/patches/patch-cp14
-rw-r--r--sysutils/xentools3-hvm/patches/patch-cq757
-rw-r--r--sysutils/xentools3-hvm/patches/patch-python_xen_util_xmlrpcclient.py28
-rw-r--r--sysutils/xentools3-hvm/patches/patch-python_xen_util_xmlrpclib2.py14
-rw-r--r--sysutils/xentools3/DESCR5
-rw-r--r--sysutils/xentools3/MESSAGE.NetBSD17
-rw-r--r--sysutils/xentools3/Makefile212
-rw-r--r--sysutils/xentools3/PLIST371
-rw-r--r--sysutils/xentools3/buildlink3.mk12
-rw-r--r--sysutils/xentools3/distinfo71
-rw-r--r--sysutils/xentools3/files/NetBSD.mk2
-rw-r--r--sysutils/xentools3/files/block-nbsd88
-rw-r--r--sysutils/xentools3/files/netbsd1-nbsd61
-rw-r--r--sysutils/xentools3/files/vif-bridge-nbsd38
-rwxr-xr-xsysutils/xentools3/files/vif-ip-nbsd36
-rw-r--r--sysutils/xentools3/files/xen-subr-nbsd11
-rw-r--r--sysutils/xentools3/files/xenbackendd.c319
-rw-r--r--sysutils/xentools3/files/xenbackendd.sh17
-rw-r--r--sysutils/xentools3/files/xend.sh30
-rw-r--r--sysutils/xentools3/files/xendomains.sh136
-rw-r--r--sysutils/xentools3/files/xenio.h105
-rw-r--r--sysutils/xentools3/files/xenio3.h89
-rw-r--r--sysutils/xentools3/patches/patch-.._patch-Config.mk26
-rw-r--r--sysutils/xentools3/patches/patch-.._xen_patch-common_libelf_libelf-private.h10
-rw-r--r--sysutils/xentools3/patches/patch-aa59
-rw-r--r--sysutils/xentools3/patches/patch-ab284
-rw-r--r--sysutils/xentools3/patches/patch-ac13
-rw-r--r--sysutils/xentools3/patches/patch-ad161
-rw-r--r--sysutils/xentools3/patches/patch-al28
-rw-r--r--sysutils/xentools3/patches/patch-as45
-rw-r--r--sysutils/xentools3/patches/patch-au16
-rw-r--r--sysutils/xentools3/patches/patch-av12
-rw-r--r--sysutils/xentools3/patches/patch-aw42
-rw-r--r--sysutils/xentools3/patches/patch-ax14
-rw-r--r--sysutils/xentools3/patches/patch-ba47
-rw-r--r--sysutils/xentools3/patches/patch-bb13
-rw-r--r--sysutils/xentools3/patches/patch-bc22
-rw-r--r--sysutils/xentools3/patches/patch-be16
-rw-r--r--sysutils/xentools3/patches/patch-bf13
-rw-r--r--sysutils/xentools3/patches/patch-bg13
-rw-r--r--sysutils/xentools3/patches/patch-bh13
-rw-r--r--sysutils/xentools3/patches/patch-bo25
-rw-r--r--sysutils/xentools3/patches/patch-br16
-rw-r--r--sysutils/xentools3/patches/patch-bs49
-rw-r--r--sysutils/xentools3/patches/patch-bt78
-rw-r--r--sysutils/xentools3/patches/patch-bw15
-rw-r--r--sysutils/xentools3/patches/patch-ca57
-rw-r--r--sysutils/xentools3/patches/patch-cb12
-rw-r--r--sysutils/xentools3/patches/patch-cc24
-rw-r--r--sysutils/xentools3/patches/patch-cd17
-rw-r--r--sysutils/xentools3/patches/patch-cf21
-rw-r--r--sysutils/xentools3/patches/patch-cg65
-rw-r--r--sysutils/xentools3/patches/patch-ch102
-rw-r--r--sysutils/xentools3/patches/patch-cj33
-rw-r--r--sysutils/xentools3/patches/patch-ck16
-rw-r--r--sysutils/xentools3/patches/patch-cm47
-rw-r--r--sysutils/xentools3/patches/patch-cn36
-rw-r--r--sysutils/xentools3/patches/patch-co40
-rw-r--r--sysutils/xentools3/patches/patch-cp14
-rw-r--r--sysutils/xentools3/patches/patch-cq16
-rw-r--r--sysutils/xentools3/patches/patch-cr22
-rw-r--r--sysutils/xentools3/patches/patch-cs21
-rw-r--r--sysutils/xentools3/patches/patch-ct56
-rw-r--r--sysutils/xentools3/patches/patch-cu13
-rw-r--r--sysutils/xentools3/patches/patch-cv13
-rw-r--r--sysutils/xentools3/patches/patch-cw12
-rw-r--r--sysutils/xentools3/patches/patch-cx20
-rw-r--r--sysutils/xentools3/patches/patch-cy13
-rw-r--r--sysutils/xentools3/patches/patch-cz15
-rw-r--r--sysutils/xentools3/patches/patch-da36
-rw-r--r--sysutils/xentools3/patches/patch-db16
-rw-r--r--sysutils/xentools3/patches/patch-dc31
-rw-r--r--sysutils/xentools3/patches/patch-dd37
-rw-r--r--sysutils/xentools3/patches/patch-de13
-rw-r--r--sysutils/xentools3/patches/patch-df31
-rw-r--r--sysutils/xentools3/patches/patch-dg41
-rw-r--r--sysutils/xentools3/patches/patch-dh22
-rw-r--r--sysutils/xentools3/patches/patch-di58
-rw-r--r--sysutils/xentools3/patches/patch-dj46
-rw-r--r--sysutils/xentools3/patches/patch-dk13
-rw-r--r--sysutils/xentools3/patches/patch-dl40
-rw-r--r--sysutils/xentools3/patches/patch-dm186
-rw-r--r--sysutils/xentools3/patches/patch-dn21
-rw-r--r--sysutils/xentools3/patches/patch-libfsimage_ufs_ufs.h13
-rw-r--r--sysutils/xentools3/patches/patch-libxc_xc__dom__x86.c22
-rw-r--r--sysutils/xentools3/patches/patch-python_xen_util_xmlrpcclient.py28
-rw-r--r--sysutils/xentools3/patches/patch-python_xen_util_xmlrpclib2.py14
-rw-r--r--sysutils/xentools33/DESCR5
-rw-r--r--sysutils/xentools33/MESSAGE.NetBSD17
-rw-r--r--sysutils/xentools33/Makefile218
-rw-r--r--sysutils/xentools33/PLIST552
-rw-r--r--sysutils/xentools33/distinfo68
-rw-r--r--sysutils/xentools33/files/blk_netbsd.c39
-rw-r--r--sysutils/xentools33/files/blktapctrl_netbsd.c16
-rw-r--r--sysutils/xentools33/files/block-nbsd88
-rw-r--r--sysutils/xentools33/files/hvm-nbsd68
-rw-r--r--sysutils/xentools33/files/netbsd1-nbsd48
-rwxr-xr-xsysutils/xentools33/files/qemu-ifup-nbsd3
-rw-r--r--sysutils/xentools33/files/vif-bridge-nbsd38
-rwxr-xr-xsysutils/xentools33/files/vif-ip-nbsd36
-rw-r--r--sysutils/xentools33/files/xen-subr-nbsd11
-rw-r--r--sysutils/xentools33/files/xenbackendd.c319
-rw-r--r--sysutils/xentools33/files/xenbackendd.sh17
-rw-r--r--sysutils/xentools33/files/xend.sh30
-rw-r--r--sysutils/xentools33/files/xendomains.sh136
-rw-r--r--sysutils/xentools33/patches/patch-.._xen_patch-common_libelf_libelf-private.h10
-rw-r--r--sysutils/xentools33/patches/patch-CVE-2011-158384
-rw-r--r--sysutils/xentools33/patches/patch-aa22
-rw-r--r--sysutils/xentools33/patches/patch-ab40
-rw-r--r--sysutils/xentools33/patches/patch-ac24
-rw-r--r--sysutils/xentools33/patches/patch-ad18
-rw-r--r--sysutils/xentools33/patches/patch-ae32
-rw-r--r--sysutils/xentools33/patches/patch-af46
-rw-r--r--sysutils/xentools33/patches/patch-ag37
-rw-r--r--sysutils/xentools33/patches/patch-ah23
-rw-r--r--sysutils/xentools33/patches/patch-ai16
-rw-r--r--sysutils/xentools33/patches/patch-aj58
-rw-r--r--sysutils/xentools33/patches/patch-ak34
-rw-r--r--sysutils/xentools33/patches/patch-al15
-rw-r--r--sysutils/xentools33/patches/patch-ba45
-rw-r--r--sysutils/xentools33/patches/patch-bb13
-rw-r--r--sysutils/xentools33/patches/patch-bc22
-rw-r--r--sysutils/xentools33/patches/patch-bd13
-rw-r--r--sysutils/xentools33/patches/patch-be13
-rw-r--r--sysutils/xentools33/patches/patch-bf13
-rw-r--r--sysutils/xentools33/patches/patch-bg15
-rw-r--r--sysutils/xentools33/patches/patch-bh19
-rw-r--r--sysutils/xentools33/patches/patch-bi43
-rw-r--r--sysutils/xentools33/patches/patch-bj56
-rw-r--r--sysutils/xentools33/patches/patch-bk13
-rw-r--r--sysutils/xentools33/patches/patch-blktap_drivers_block-qcow.c14
-rw-r--r--sysutils/xentools33/patches/patch-blktaplib_h13
-rw-r--r--sysutils/xentools33/patches/patch-ca17
-rw-r--r--sysutils/xentools33/patches/patch-cb90
-rw-r--r--sysutils/xentools33/patches/patch-cc47
-rw-r--r--sysutils/xentools33/patches/patch-cd36
-rw-r--r--sysutils/xentools33/patches/patch-ce40
-rw-r--r--sysutils/xentools33/patches/patch-cf12
-rw-r--r--sysutils/xentools33/patches/patch-cg15
-rw-r--r--sysutils/xentools33/patches/patch-da34
-rw-r--r--sysutils/xentools33/patches/patch-db22
-rw-r--r--sysutils/xentools33/patches/patch-dc23
-rw-r--r--sysutils/xentools33/patches/patch-dd15
-rw-r--r--sysutils/xentools33/patches/patch-de119
-rw-r--r--sysutils/xentools33/patches/patch-df51
-rw-r--r--sysutils/xentools33/patches/patch-ea13
-rw-r--r--sysutils/xentools33/patches/patch-eb13
-rw-r--r--sysutils/xentools33/patches/patch-ec13
-rw-r--r--sysutils/xentools33/patches/patch-ed24
-rw-r--r--sysutils/xentools33/patches/patch-ee22
-rw-r--r--sysutils/xentools33/patches/patch-ef17
-rw-r--r--sysutils/xentools33/patches/patch-eg16
-rw-r--r--sysutils/xentools33/patches/patch-fa24
-rw-r--r--sysutils/xentools33/patches/patch-fb36
-rw-r--r--sysutils/xentools33/patches/patch-fc35
-rw-r--r--sysutils/xentools33/patches/patch-fd66
-rw-r--r--sysutils/xentools33/patches/patch-fe37
-rw-r--r--sysutils/xentools33/patches/patch-ff36
-rw-r--r--sysutils/xentools33/patches/patch-fg47
-rw-r--r--sysutils/xentools33/patches/patch-fs-back_Makefile13
-rw-r--r--sysutils/xentools33/patches/patch-io_ring_h17
-rw-r--r--sysutils/xentools33/patches/patch-ioemu_block-vvfat.c13
-rw-r--r--sysutils/xentools33/patches/patch-libfsimage_ufs_ufs.h13
-rw-r--r--sysutils/xentools33/patches/patch-python_xen_util_xmlrpcclient.py26
-rw-r--r--sysutils/xentools33/patches/patch-python_xen_util_xmlrpclib2.py14
-rw-r--r--sysutils/xentools33/patches/patch-qemu-e1000-CVSE-2012-002939
-rw-r--r--sysutils/xentools33/patches/patch-qemu-phy-devices91
-rw-r--r--sysutils/xentools41/DESCR5
-rw-r--r--sysutils/xentools41/MESSAGE.NetBSD17
-rw-r--r--sysutils/xentools41/Makefile204
-rw-r--r--sysutils/xentools41/PLIST756
-rw-r--r--sysutils/xentools41/distinfo74
-rw-r--r--sysutils/xentools41/files/blk_netbsd.c39
-rw-r--r--sysutils/xentools41/files/blktapctrl_netbsd.c16
-rw-r--r--sysutils/xentools41/files/xen-watchdog.sh17
-rw-r--r--sysutils/xentools41/files/xencommons.sh120
-rw-r--r--sysutils/xentools41/files/xend.sh16
-rw-r--r--sysutils/xentools41/files/xendomains.sh129
-rw-r--r--sysutils/xentools41/patches/patch-.._.._ipxe_src_arch_i386_include_librm.h16
-rw-r--r--sysutils/xentools41/patches/patch-.._.._ipxe_src_core_settings.c34
-rw-r--r--sysutils/xentools41/patches/patch-.._.._ipxe_src_net_tls.c69
-rw-r--r--sysutils/xentools41/patches/patch-.._Config.mk22
-rw-r--r--sysutils/xentools41/patches/patch-CVE-2014-195014
-rw-r--r--sysutils/xentools41/patches/patch-CVE-2015-275283
-rw-r--r--sysutils/xentools41/patches/patch-CVE-2015-2756142
-rw-r--r--sysutils/xentools41/patches/patch-CVE-2015-8550134
-rw-r--r--sysutils/xentools41/patches/patch-CVE-2015-855421
-rw-r--r--sysutils/xentools41/patches/patch-XSA-19769
-rw-r--r--sysutils/xentools41/patches/patch-XSA-19858
-rw-r--r--sysutils/xentools41/patches/patch-XSA-19990
-rw-r--r--sysutils/xentools41/patches/patch-aa12
-rw-r--r--sysutils/xentools41/patches/patch-ab16
-rw-r--r--sysutils/xentools41/patches/patch-ac13
-rw-r--r--sysutils/xentools41/patches/patch-ad13
-rw-r--r--sysutils/xentools41/patches/patch-ae14
-rw-r--r--sysutils/xentools41/patches/patch-af26
-rw-r--r--sysutils/xentools41/patches/patch-ag23
-rw-r--r--sysutils/xentools41/patches/patch-ah40
-rw-r--r--sysutils/xentools41/patches/patch-ai18
-rw-r--r--sysutils/xentools41/patches/patch-aj16
-rw-r--r--sysutils/xentools41/patches/patch-ak16
-rw-r--r--sysutils/xentools41/patches/patch-al12
-rw-r--r--sysutils/xentools41/patches/patch-am13
-rw-r--r--sysutils/xentools41/patches/patch-ba56
-rw-r--r--sysutils/xentools41/patches/patch-bb213
-rw-r--r--sysutils/xentools41/patches/patch-bc110
-rw-r--r--sysutils/xentools41/patches/patch-ca47
-rw-r--r--sysutils/xentools41/patches/patch-cb36
-rw-r--r--sysutils/xentools41/patches/patch-cc40
-rw-r--r--sysutils/xentools41/patches/patch-cd13
-rw-r--r--sysutils/xentools41/patches/patch-ce24
-rw-r--r--sysutils/xentools41/patches/patch-cf17
-rw-r--r--sysutils/xentools41/patches/patch-cg22
-rw-r--r--sysutils/xentools41/patches/patch-ch16
-rw-r--r--sysutils/xentools41/patches/patch-config_StdGNU.mk15
-rw-r--r--sysutils/xentools41/patches/patch-da42
-rw-r--r--sysutils/xentools41/patches/patch-db85
-rw-r--r--sysutils/xentools41/patches/patch-dc34
-rw-r--r--sysutils/xentools41/patches/patch-dd11
-rw-r--r--sysutils/xentools41/patches/patch-de11
-rw-r--r--sysutils/xentools41/patches/patch-df37
-rw-r--r--sysutils/xentools41/patches/patch-firmware_hvmloader_Makefile13
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c13
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h18
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_piix4acpi.c17
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c13
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c15
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h12
-rw-r--r--sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak34
-rw-r--r--sysutils/xentools41/patches/patch-libfsimage_ufs_ufs.h13
-rw-r--r--sysutils/xentools41/patches/patch-libxl_libxl_create.c40
-rw-r--r--sysutils/xentools41/patches/patch-libxl_libxl_internal.h16
-rw-r--r--sysutils/xentools41/patches/patch-libxl_xl__cmdimpl.c13
-rw-r--r--sysutils/xentools41/patches/patch-ocaml_Makefile.rules13
-rw-r--r--sysutils/xentools41/patches/patch-ocaml_common.make13
-rw-r--r--sysutils/xentools41/patches/patch-ocaml_libs_xb_xs__ring__stubs.c26
-rw-r--r--sysutils/xentools41/patches/patch-ocaml_xenstored_define.ml20
-rw-r--r--sysutils/xentools41/patches/patch-ocaml_xenstored_utils.ml13
-rw-r--r--sysutils/xentools41/patches/patch-qemu-phy-devices97
-rw-r--r--sysutils/xentools41/patches/patch-xenstat_libxenstat_Makefile30
-rw-r--r--sysutils/xentools41/patches/patch-xenstat_xentop_Makefile15
-rw-r--r--sysutils/xentools41/patches/patch-xenstore_Makefile29
-rw-r--r--sysutils/xentools41/version.mk6
372 files changed, 1 insertions, 17132 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 479eb787987..3f05bca6880 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.684 2016/10/17 15:48:12 taca Exp $
+# $NetBSD: Makefile,v 1.685 2016/12/29 19:13:01 wiz Exp $
#
COMMENT= System utilities
@@ -643,17 +643,10 @@ SUBDIR+= xc5k-firmware
SUBDIR+= xcdroast
SUBDIR+= xdu
SUBDIR+= xe-guest-utilities
-SUBDIR+= xenkernel3
-SUBDIR+= xenkernel33
-SUBDIR+= xenkernel41
SUBDIR+= xenkernel42
SUBDIR+= xenkernel45
SUBDIR+= xenkernel46
SUBDIR+= xenstoretools
-SUBDIR+= xentools3
-SUBDIR+= xentools3-hvm
-SUBDIR+= xentools33
-SUBDIR+= xentools41
SUBDIR+= xentools42
SUBDIR+= xentools45
SUBDIR+= xentools46
diff --git a/sysutils/xenkernel3/DESCR b/sysutils/xenkernel3/DESCR
deleted file mode 100644
index 402f7f4d99f..00000000000
--- a/sysutils/xenkernel3/DESCR
+++ /dev/null
@@ -1,14 +0,0 @@
-Xen is a virtual machine monitor for x86 hardware (runs only on
-i686-class CPUs), which supports running multiple guests operating
-systems on a single machine. Guest OSes (also called "domains")
-require a modified kernel which supports Xen hypercalls in replacement
-to access to the physical hardware. At boot, the xen kernel is loaded
-(via grub) along with the guest kernel for the first domain (called
-domain0). domain0 has privileges to access the physical hardware (PCI
-and ISA devices), administrate other domains and provide virtual
-devices (disks and network) to other domains.
-
-This package contains the 3.1 Xen3 kernel itself. PCI passthrough is
-supported. Both non-PAE and PAE versions of xen are provided for
-i386; one must use XEN3_DOM[0U] and XEN3PAE_DOM[0U] kernels, respectively.
-3.1 is no longer maintained upstream.
diff --git a/sysutils/xenkernel3/MESSAGE b/sysutils/xenkernel3/MESSAGE
deleted file mode 100644
index ffa69785ba8..00000000000
--- a/sysutils/xenkernel3/MESSAGE
+++ /dev/null
@@ -1,7 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.1 2011/11/20 03:48:10 jym Exp $
-
-The Xen hypervisor is installed under the following locations:
- ${XENKERNELDIR}/xen.gz (standard hypervisor)
- ${XENKERNELDIR}/xen-debug.gz (debug hypervisor)
-===========================================================================
diff --git a/sysutils/xenkernel3/MESSAGE.i386 b/sysutils/xenkernel3/MESSAGE.i386
deleted file mode 100644
index 7710c0ae153..00000000000
--- a/sysutils/xenkernel3/MESSAGE.i386
+++ /dev/null
@@ -1,9 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE.i386,v 1.1 2011/11/20 03:48:10 jym Exp $
-
-The Xen hypervisor is installed under the following locations:
- ${XENKERNELDIR}/xen.gz (standard hypervisor)
- ${XENKERNELDIR}/xen-debug.gz (debug hypervisor)
- ${XENKERNELDIR}/xen-PAE.gz (PAE standard hypervisor)
- ${XENKERNELDIR}/xen-PAE-debug.gz (PAE debug hypervisor)
-===========================================================================
diff --git a/sysutils/xenkernel3/Makefile b/sysutils/xenkernel3/Makefile
deleted file mode 100644
index 57872991812..00000000000
--- a/sysutils/xenkernel3/Makefile
+++ /dev/null
@@ -1,101 +0,0 @@
-# $NetBSD: Makefile,v 1.32 2016/07/09 13:04:07 wiz Exp $
-
-VERSION= 3.1.4
-DISTNAME= xen-${VERSION}
-PKGNAME= xenkernel3-${VERSION}
-PKGREVISION= 8
-CATEGORIES= sysutils
-MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
-
-MAINTAINER= bouyer@NetBSD.org
-HOMEPAGE= http://xen.org/
-COMMENT= Xen3 Kernel
-
-ONLY_FOR_PLATFORM= Linux-2.[46]*-i386 NetBSD-*-i386 Linux-2.[46]*-x86_64 NetBSD-*-x86_64
-CONFLICTS= xenkernel30-[0-9]*
-
-LICENSE= gnu-gpl-v2
-
-WRKSRC= ${WRKDIR}/xen-${VERSION}
-
-NO_CONFIGURE= yes
-USE_TOOLS+= gmake
-
-PYTHON_FOR_BUILD_ONLY= YES
-PY_PATCHPLIST= NO
-PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # not yet ported as of 3.1.4
-
-SUBST_CLASSES+= py
-SUBST_STAGE.py= pre-build
-SUBST_FILES.py= xen/include/public/foreign/Makefile
-SUBST_FILES.py+= xen/tools/get-fields.sh
-SUBST_SED.py= -e "s,python,${PYTHONBIN},g"
-
-#PY_PATCHPLIST doesn't work because we have NO_CONFIGURE
-SUBST_CLASSES+= py2
-SUBST_STAGE.py2= pre-build
-SUBST_FILES.py2= xen/tools/compat-build-source.py
-SUBST_FILES.py2+= xen/tools/compat-build-header.py
-SUBST_SED.py2= -e "s,/usr/bin/python,${PYTHONBIN},g"
-
-.if ${MACHINE_ARCH} == "x86_64"
-USE_TOOLS+= bash
-SUBST_CLASSES+= bash
-SUBST_STAGE.bash= pre-build
-SUBST_FILES.bash= xen/include/Makefile
-SUBST_SED.bash= -e "s,/bin/bash,${PREFIX}/bin/bash,g"
-.endif
-
-.if ${MACHINE_ARCH} == "i386"
-PLIST_SRC= PLIST.i386 PLIST
-.else
-PLIST_SRC= PLIST
-.endif
-
-INSTALLATION_DIRS+= xen3-kernel
-XENKERNELDIR= ${PREFIX}/xen3-kernel
-
-MESSAGE_SUBST+= XENKERNELDIR=${XENKERNELDIR:Q}
-
-.include "../../mk/compiler.mk"
-.if !empty(PKGSRC_COMPILER:Mclang)
-EXTRA_CFLAGS+= -Wno-error=ignored-attributes -Wno-error=format \
- -Wno-error=tautological-compare \
- -Wno-error=parentheses-equality \
- -Wno-error=sometimes-uninitialized -no-integrated-as \
- -ffreestanding -Wno-error=unused-function
-BUILDLINK_TRANSFORM+= rm:-fno-reorder-blocks
-.elif !empty(PKGSRC_COMPILER:Mgcc)
-EXTRA_CFLAGS+= -Wno-error=unused-but-set-variable
-.endif
-
-do-build:
- cd ${WRKSRC} && \
- EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=n debug=n xen
- ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen.gz
- cd ${WRKSRC} && ${GMAKE} clean && \
- EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=n debug=y xen
- ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-debug.gz
-.if ${MACHINE_ARCH} == "i386"
- cd ${WRKSRC} && ${GMAKE} clean && \
- EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=y debug=n xen
- ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-PAE.gz
- cd ${WRKSRC} && ${GMAKE} clean && \
- EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} XEN_TARGET_X86_PAE=y debug=y xen
- ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-PAE-debug.gz
-.endif
-
-do-install:
- ${INSTALL_DATA} ${WRKDIR}/xen.gz \
- ${DESTDIR}${XENKERNELDIR}/xen.gz
- ${INSTALL_DATA} ${WRKDIR}/xen-debug.gz \
- ${DESTDIR}${XENKERNELDIR}/xen-debug.gz
-.if ${MACHINE_ARCH} == "i386"
- ${INSTALL_DATA} ${WRKDIR}/xen-PAE.gz \
- ${DESTDIR}${XENKERNELDIR}/xen-PAE.gz
- ${INSTALL_DATA} ${WRKDIR}/xen-PAE-debug.gz \
- ${DESTDIR}${XENKERNELDIR}/xen-PAE-debug.gz
-.endif
-
-.include "../../lang/python/application.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xenkernel3/PLIST b/sysutils/xenkernel3/PLIST
deleted file mode 100644
index a0a9dcea449..00000000000
--- a/sysutils/xenkernel3/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.3 2009/06/14 18:16:21 joerg Exp $
-xen3-kernel/xen.gz
-xen3-kernel/xen-debug.gz
diff --git a/sysutils/xenkernel3/PLIST.i386 b/sysutils/xenkernel3/PLIST.i386
deleted file mode 100644
index 7bfae0d2b1c..00000000000
--- a/sysutils/xenkernel3/PLIST.i386
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST.i386,v 1.1 2009/02/13 22:34:52 bouyer Exp $
-xen3-kernel/xen-PAE.gz
-xen3-kernel/xen-PAE-debug.gz
diff --git a/sysutils/xenkernel3/distinfo b/sysutils/xenkernel3/distinfo
deleted file mode 100644
index bd67213d3bc..00000000000
--- a/sysutils/xenkernel3/distinfo
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: distinfo,v 1.21 2016/03/01 20:09:03 joerg Exp $
-
-SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d
-RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859
-SHA512 (xen-3.1.4.tar.gz) = 25f797c1c47a807573b4d2d0a12b5b15185d1b1e463e5db46d4bc3843bde7d913ac66440d084dfd12d3968dfbe88738fe84c28047c31c12551530bb157788b1d
-Size (xen-3.1.4.tar.gz) = 6894493 bytes
-SHA1 (patch-SA45835) = 7af53cb3da8720954242c4c90165bceef362c184
-SHA1 (patch-aa) = 1be644e7edd3735c2850d3e581002f53bd50eb59
-SHA1 (patch-ac) = 4c237984832ef5532e0451845e8075b95744e48d
-SHA1 (patch-ae) = 902629e6dcebca4fe98a915b465ba063dc554e64
-SHA1 (patch-ba) = cadfa6f2626e95c9ccb85ae7e3a8a7f318ea343f
-SHA1 (patch-bb) = 7338e5a512c909d4b043654dab882761de274f94
-SHA1 (patch-bc) = fa35699da6ad2a4950418a02432c2ccdb5d34844
-SHA1 (patch-bd) = 2a07955b1285d288458066813f8ebc801b8038c1
-SHA1 (patch-cw) = b08804b3a6df64194d662c92af1f0738a52e67b2
-SHA1 (patch-da) = 6db74e00d15615e71936fa8637a05159f378b454
-SHA1 (patch-db) = 8e7b563fd816669fd39e1e8bf5137b5937060968
-SHA1 (patch-dc) = 606ad2af582b88ddfd250b952831af9d3b2b1f5d
-SHA1 (patch-gcc-version) = 1174ace3eee1d3707a2935498ac5a39671913f9f
-SHA1 (patch-xen_arch_x86_hvm_io.c) = 0f6dfc3b3857c2ab43fabf2c9693e2932b442931
-SHA1 (patch-xen_arch_x86_string.c) = 363d521a627d07cd9caffcfe1c529342b3b67321
-SHA1 (patch-xen_arch_x86_x86__64_entry.S) = 07d51949e979267601e65109f1e8ce4da93c085c
-SHA1 (patch-xen_common_libelf_libelf-private.h) = c364d8f247342c62d0d32fe9f4714f83f977719a
-SHA1 (patch-xen_include_xen_compat.h) = d9a4524088e034cf718f17f20f856bd907271b29
diff --git a/sysutils/xenkernel3/patches/patch-SA45835 b/sysutils/xenkernel3/patches/patch-SA45835
deleted file mode 100644
index bc56ae452b3..00000000000
--- a/sysutils/xenkernel3/patches/patch-SA45835
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-SA45835,v 1.1 2011/09/10 18:35:51 bouyer Exp $
-
---- xen/include/asm-x86/x86_64/uaccess.h.orig 2008-04-25 15:03:12.000000000 +0200
-+++ xen/include/asm-x86/x86_64/uaccess.h 2011-09-10 20:26:42.000000000 +0200
-@@ -8,7 +8,7 @@
- * non-canonical address (and thus fault) before ever reaching VIRT_START.
- */
- #define __addr_ok(addr) \
-- (((unsigned long)(addr) < (1UL<<48)) || \
-+ (((unsigned long)(addr) < (1UL<<47)) || \
- ((unsigned long)(addr) >= HYPERVISOR_VIRT_END))
-
- #define access_ok(addr, size) (__addr_ok(addr))
diff --git a/sysutils/xenkernel3/patches/patch-aa b/sysutils/xenkernel3/patches/patch-aa
deleted file mode 100644
index d9378da2bb5..00000000000
--- a/sysutils/xenkernel3/patches/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-aa,v 1.1 2007/08/17 17:26:04 bouyer Exp $
-
---- xen/include/asm-x86/page.h.orig 2007-08-16 22:23:58.000000000 +0200
-+++ xen/include/asm-x86/page.h 2007-08-16 22:24:43.000000000 +0200
-@@ -331,7 +331,7 @@
- * WARNING: This will need to be disabled to run OSes that use the spare PTE
- * bits themselves (e.g., *BSD).
- */
--#ifndef NDEBUG
-+#if 0
- #define _PAGE_GNTTAB _PAGE_AVAIL2
- #else
- #define _PAGE_GNTTAB 0
diff --git a/sysutils/xenkernel3/patches/patch-ac b/sysutils/xenkernel3/patches/patch-ac
deleted file mode 100644
index f088fdfc14a..00000000000
--- a/sysutils/xenkernel3/patches/patch-ac
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-ac,v 1.3 2011/03/24 12:43:53 drochner Exp $
-
-CVE-2011-1166
-
---- xen/arch/x86/domain.c.orig 2008-04-25 13:03:12.000000000 +0000
-+++ xen/arch/x86/domain.c
-@@ -701,6 +701,11 @@ int arch_set_info_guest(
-
- v->arch.guest_table_user = pagetable_from_pfn(cr3_pfn);
- }
-+ else if ( !(flags & VGCF_in_kernel) )
-+ {
-+ destroy_gdt(v);
-+ return -EINVAL;
-+ }
- #endif
- }
- #ifdef CONFIG_COMPAT
diff --git a/sysutils/xenkernel3/patches/patch-ae b/sysutils/xenkernel3/patches/patch-ae
deleted file mode 100644
index aa3c5a61a33..00000000000
--- a/sysutils/xenkernel3/patches/patch-ae
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD: patch-ae,v 1.4 2014/05/14 20:21:19 bouyer Exp $
-- protect Xen's stdarg.h from multiple inclusion.
-- build fix for stdarg under NetBSD.
-
-Both backported from upstream.
-
-http://xenbits.xensource.com/hg/xen-unstable.hg/file/a574bf2f5059/xen/include/xen/stdarg.h
---- xen/include/xen/stdarg.h.orig 2008-04-25 15:03:12.000000000 +0200
-+++ xen/include/xen/stdarg.h 2014-05-14 16:11:10.000000000 +0200
-@@ -1,5 +1,26 @@
-+#ifndef __XEN_STDARG_H__
-+#define __XEN_STDARG_H__
-+
- #if defined(__OpenBSD__)
- # include "/usr/include/stdarg.h"
-+#elif defined (__NetBSD__)
-+#ifdef __GNUC__
-+#define __GNUC_PREREQ__(x, y) \
-+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
-+ (__GNUC__ > (x)))
-+#else
-+#define __GNUC_PREREQ__(x, y) 0
-+#endif
-+ typedef __builtin_va_list va_list;
-+#if __GNUC_PREREQ__(4, 5)
-+# define va_start(ap, last) __builtin_va_start((ap), (last))
-+#else
-+# define va_start(ap, last) __builtin_stdarg_start((ap), (last))
-+#endif /* __GNUC_PREREQ__ */
-+# define va_end(ap) __builtin_va_end(ap)
-+# define va_arg __builtin_va_arg
- #else
- # include <stdarg.h>
- #endif
-+
-+#endif /* __XEN_STDARG_H__ */
diff --git a/sysutils/xenkernel3/patches/patch-ba b/sysutils/xenkernel3/patches/patch-ba
deleted file mode 100644
index d5db3fd6a14..00000000000
--- a/sysutils/xenkernel3/patches/patch-ba
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ba,v 1.5 2008/04/27 19:59:40 bouyer Exp $
-
---- xen/arch/x86/domain_build.c.orig 2008-04-25 15:03:12.000000000 +0200
-+++ xen/arch/x86/domain_build.c 2008-04-26 18:23:30.000000000 +0200
-@@ -308,6 +308,9 @@
- parms.pae ? ", PAE" : "",
- elf_msb(&elf) ? "msb" : "lsb",
- elf.pstart, elf.pend);
-+ if ( elf.bsd_symtab_pstart )
-+ printk(" Dom0 symbol map 0x%" PRIx64 " -> 0x%" PRIx64 "\n",
-+ elf.bsd_symtab_pstart, elf.bsd_symtab_pend);
-
- if ( !compatible )
- {
diff --git a/sysutils/xenkernel3/patches/patch-bb b/sysutils/xenkernel3/patches/patch-bb
deleted file mode 100644
index 5ac259dd624..00000000000
--- a/sysutils/xenkernel3/patches/patch-bb
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-bb,v 1.1 2007/08/17 17:26:04 bouyer Exp $
-
---- xen/common/libelf/libelf-dominfo.c.orig 2007-05-18 16:45:21.000000000 +0200
-+++ xen/common/libelf/libelf-dominfo.c 2007-08-16 21:43:18.000000000 +0200
-@@ -378,6 +378,13 @@
- if ( parms->virt_entry == UNSET_ADDR )
- parms->virt_entry = elf_uval(elf, elf->ehdr, e_entry);
-
-+ if ( parms->bsd_symtab )
-+ {
-+ elf_parse_bsdsyms(elf, parms->virt_kend);
-+ if ( elf->bsd_symtab_pend )
-+ parms->virt_kend = elf->bsd_symtab_pend + parms->virt_offset;
-+ }
-+
- elf_msg(elf, "%s: addresses:\n", __FUNCTION__);
- elf_msg(elf, " virt_base = 0x%" PRIx64 "\n", parms->virt_base);
- elf_msg(elf, " elf_paddr_offset = 0x%" PRIx64 "\n", parms->elf_paddr_offset);
diff --git a/sysutils/xenkernel3/patches/patch-bc b/sysutils/xenkernel3/patches/patch-bc
deleted file mode 100644
index 151123f0f2d..00000000000
--- a/sysutils/xenkernel3/patches/patch-bc
+++ /dev/null
@@ -1,166 +0,0 @@
-$NetBSD: patch-bc,v 1.1 2007/08/17 17:26:05 bouyer Exp $
-
---- xen/common/libelf/libelf-loader.c.orig 2007-05-18 16:45:21.000000000 +0200
-+++ xen/common/libelf/libelf-loader.c 2007-08-16 21:43:18.000000000 +0200
-@@ -20,11 +20,15 @@
- memset(elf, 0, sizeof(*elf));
- elf->image = image;
- elf->size = size;
-- elf->ehdr = (elf_ehdr *) image;
-+ elf->ehdr = (elf_ehdr *)image;
- elf->class = elf->ehdr->e32.e_ident[EI_CLASS];
- elf->data = elf->ehdr->e32.e_ident[EI_DATA];
-
-- /* sanity check phdr */
-+#ifdef VERBOSE
-+ elf_set_verbose(elf);
-+#endif
-+
-+ /* Sanity check phdr. */
- offset = elf_uval(elf, elf->ehdr, e_phoff) +
- elf_uval(elf, elf->ehdr, e_phentsize) * elf_phdr_count(elf);
- if ( offset > elf->size )
-@@ -34,7 +38,7 @@
- return -1;
- }
-
-- /* sanity check shdr */
-+ /* Sanity check shdr. */
- offset = elf_uval(elf, elf->ehdr, e_shoff) +
- elf_uval(elf, elf->ehdr, e_shentsize) * elf_shdr_count(elf);
- if ( offset > elf->size )
-@@ -44,13 +48,13 @@
- return -1;
- }
-
-- /* find section string table */
-+ /* Find section string table. */
- section = elf_uval(elf, elf->ehdr, e_shstrndx);
- shdr = elf_shdr_by_index(elf, section);
- if ( shdr != NULL )
- elf->sec_strtab = elf_section_start(elf, shdr);
-
-- /* find symbol table, symbol string table */
-+ /* Find symbol table and symbol string table. */
- count = elf_shdr_count(elf);
- for ( i = 0; i < count; i++ )
- {
-@@ -67,6 +71,7 @@
- elf->sym_strtab = elf_section_start(elf, shdr);
- break;
- }
-+
- return 0;
- }
-
-@@ -83,6 +88,101 @@
- }
- #endif
-
-+/* Calculate the required additional kernel space for the elf image */
-+void elf_parse_bsdsyms(struct elf_binary *elf, uint64_t pstart)
-+{
-+ uint64_t sz;
-+ const elf_shdr *shdr;
-+ int i, type;
-+
-+ if ( !elf->sym_tab )
-+ return;
-+
-+ pstart = elf_round_up(elf, pstart);
-+
-+ /* Space to store the size of the elf image */
-+ sz = sizeof(uint32_t);
-+
-+ /* Space for the elf and elf section headers */
-+ sz += (elf_uval(elf, elf->ehdr, e_ehsize) +
-+ elf_shdr_count(elf) * elf_uval(elf, elf->ehdr, e_shentsize));
-+ sz = elf_round_up(elf, sz);
-+
-+ /* Space for the symbol and string tables. */
-+ for ( i = 0; i < elf_shdr_count(elf); i++ )
-+ {
-+ shdr = elf_shdr_by_index(elf, i);
-+ type = elf_uval(elf, (elf_shdr *)shdr, sh_type);
-+ if ( (type == SHT_STRTAB) || (type == SHT_SYMTAB) )
-+ sz = elf_round_up(elf, sz + elf_uval(elf, shdr, sh_size));
-+ }
-+
-+ elf->bsd_symtab_pstart = pstart;
-+ elf->bsd_symtab_pend = pstart + sz;
-+}
-+
-+static void elf_load_bsdsyms(struct elf_binary *elf)
-+{
-+ elf_ehdr *sym_ehdr;
-+ unsigned long sz;
-+ char *maxva, *symbase, *symtab_addr;
-+ elf_shdr *shdr;
-+ int i, type;
-+
-+ if ( !elf->bsd_symtab_pstart )
-+ return;
-+
-+#define elf_hdr_elm(_elf, _hdr, _elm, _val) \
-+do { \
-+ if ( elf_64bit(_elf) ) \
-+ (_hdr)->e64._elm = _val; \
-+ else \
-+ (_hdr)->e32._elm = _val; \
-+} while ( 0 )
-+
-+ symbase = elf_get_ptr(elf, elf->bsd_symtab_pstart);
-+ symtab_addr = maxva = symbase + sizeof(uint32_t);
-+
-+ /* Set up Elf header. */
-+ sym_ehdr = (elf_ehdr *)symtab_addr;
-+ sz = elf_uval(elf, elf->ehdr, e_ehsize);
-+ memcpy(sym_ehdr, elf->ehdr, sz);
-+ maxva += sz; /* no round up */
-+
-+ elf_hdr_elm(elf, sym_ehdr, e_phoff, 0);
-+ elf_hdr_elm(elf, sym_ehdr, e_shoff, elf_uval(elf, elf->ehdr, e_ehsize));
-+ elf_hdr_elm(elf, sym_ehdr, e_phentsize, 0);
-+ elf_hdr_elm(elf, sym_ehdr, e_phnum, 0);
-+
-+ /* Copy Elf section headers. */
-+ shdr = (elf_shdr *)maxva;
-+ sz = elf_shdr_count(elf) * elf_uval(elf, elf->ehdr, e_shentsize);
-+ memcpy(shdr, elf->image + elf_uval(elf, elf->ehdr, e_shoff), sz);
-+ maxva = (char *)(long)elf_round_up(elf, (long)maxva + sz);
-+
-+ for ( i = 0; i < elf_shdr_count(elf); i++ )
-+ {
-+ type = elf_uval(elf, shdr, sh_type);
-+ if ( (type == SHT_STRTAB) || (type == SHT_SYMTAB) )
-+ {
-+ elf_msg(elf, "%s: shdr %i at 0x%p -> 0x%p\n", __func__, i,
-+ elf_section_start(elf, shdr), maxva);
-+ sz = elf_uval(elf, shdr, sh_size);
-+ memcpy(maxva, elf_section_start(elf, shdr), sz);
-+ /* Mangled to be based on ELF header location. */
-+ elf_hdr_elm(elf, shdr, sh_offset, maxva - symtab_addr);
-+ maxva = (char *)(long)elf_round_up(elf, (long)maxva + sz);
-+ }
-+ shdr = (elf_shdr *)((long)shdr +
-+ (long)elf_uval(elf, elf->ehdr, e_shentsize));
-+ }
-+
-+ /* Write down the actual sym size. */
-+ *(uint32_t *)symbase = maxva - symtab_addr;
-+
-+#undef elf_ehdr_elm
-+}
-+
- void elf_parse_binary(struct elf_binary *elf)
- {
- const elf_phdr *phdr;
-@@ -133,6 +233,8 @@
- memcpy(dest, elf->image + offset, filesz);
- memset(dest + filesz, 0, memsz - filesz);
- }
-+
-+ elf_load_bsdsyms(elf);
- }
-
- void *elf_get_ptr(struct elf_binary *elf, unsigned long addr)
diff --git a/sysutils/xenkernel3/patches/patch-bd b/sysutils/xenkernel3/patches/patch-bd
deleted file mode 100644
index c740a75eaac..00000000000
--- a/sysutils/xenkernel3/patches/patch-bd
+++ /dev/null
@@ -1,112 +0,0 @@
-$NetBSD: patch-bd,v 1.1 2007/08/17 17:26:05 bouyer Exp $
-
---- xen/include/public/libelf.h.orig 2007-05-18 16:45:21.000000000 +0200
-+++ xen/include/public/libelf.h 2007-08-16 21:43:18.000000000 +0200
-@@ -69,6 +69,9 @@
- uint64_t pend;
- uint64_t reloc_offset;
-
-+ uint64_t bsd_symtab_pstart;
-+ uint64_t bsd_symtab_pend;
-+
- #ifndef __XEN__
- /* misc */
- FILE *log;
-@@ -91,33 +94,32 @@
- #define elf_lsb(elf) (ELFDATA2LSB == (elf)->data)
- #define elf_swap(elf) (NATIVE_ELFDATA != (elf)->data)
-
--#define elf_uval(elf, str, elem) \
-- ((ELFCLASS64 == (elf)->class) \
-- ? elf_access_unsigned((elf), (str), \
-- offsetof(typeof(*(str)),e64.elem), \
-- sizeof((str)->e64.elem)) \
-- : elf_access_unsigned((elf), (str), \
-- offsetof(typeof(*(str)),e32.elem), \
-- sizeof((str)->e32.elem)))
--
--#define elf_sval(elf, str, elem) \
-- ((ELFCLASS64 == (elf)->class) \
-- ? elf_access_signed((elf), (str), \
-- offsetof(typeof(*(str)),e64.elem), \
-- sizeof((str)->e64.elem)) \
-- : elf_access_signed((elf), (str), \
-- offsetof(typeof(*(str)),e32.elem), \
-- sizeof((str)->e32.elem)))
--
--#define elf_size(elf, str) \
-- ((ELFCLASS64 == (elf)->class) \
-- ? sizeof((str)->e64) \
-- : sizeof((str)->e32))
-+#define elf_uval(elf, str, elem) \
-+ ((ELFCLASS64 == (elf)->class) \
-+ ? elf_access_unsigned((elf), (str), \
-+ offsetof(typeof(*(str)),e64.elem), \
-+ sizeof((str)->e64.elem)) \
-+ : elf_access_unsigned((elf), (str), \
-+ offsetof(typeof(*(str)),e32.elem), \
-+ sizeof((str)->e32.elem)))
-+
-+#define elf_sval(elf, str, elem) \
-+ ((ELFCLASS64 == (elf)->class) \
-+ ? elf_access_signed((elf), (str), \
-+ offsetof(typeof(*(str)),e64.elem), \
-+ sizeof((str)->e64.elem)) \
-+ : elf_access_signed((elf), (str), \
-+ offsetof(typeof(*(str)),e32.elem), \
-+ sizeof((str)->e32.elem)))
-+
-+#define elf_size(elf, str) \
-+ ((ELFCLASS64 == (elf)->class) \
-+ ? sizeof((str)->e64) : sizeof((str)->e32))
-
- uint64_t elf_access_unsigned(struct elf_binary *elf, const void *ptr,
-- uint64_t offset, size_t size);
-+ uint64_t offset, size_t size);
- int64_t elf_access_signed(struct elf_binary *elf, const void *ptr,
-- uint64_t offset, size_t size);
-+ uint64_t offset, size_t size);
-
- uint64_t elf_round_up(struct elf_binary *elf, uint64_t addr);
-
-@@ -165,6 +167,8 @@
- void *elf_get_ptr(struct elf_binary *elf, unsigned long addr);
- uint64_t elf_lookup_addr(struct elf_binary *elf, const char *symbol);
-
-+void elf_parse_bsdsyms(struct elf_binary *elf, uint64_t pstart); /* private */
-+
- /* ------------------------------------------------------------------------ */
- /* xc_libelf_relocate.c */
-
-@@ -185,8 +189,8 @@
- enum xen_elfnote_type type;
- const char *name;
- union {
-- const char *str;
-- uint64_t num;
-+ const char *str;
-+ uint64_t num;
- } data;
- };
-
-@@ -228,14 +232,14 @@
- }
-
- int elf_xen_parse_features(const char *features,
-- uint32_t *supported,
-- uint32_t *required);
-+ uint32_t *supported,
-+ uint32_t *required);
- int elf_xen_parse_note(struct elf_binary *elf,
-- struct elf_dom_parms *parms,
-- const elf_note *note);
-+ struct elf_dom_parms *parms,
-+ const elf_note *note);
- int elf_xen_parse_guest_info(struct elf_binary *elf,
-- struct elf_dom_parms *parms);
-+ struct elf_dom_parms *parms);
- int elf_xen_parse(struct elf_binary *elf,
-- struct elf_dom_parms *parms);
-+ struct elf_dom_parms *parms);
-
- #endif /* __XC_LIBELF__ */
diff --git a/sysutils/xenkernel3/patches/patch-cw b/sysutils/xenkernel3/patches/patch-cw
deleted file mode 100644
index 7a2a1e21007..00000000000
--- a/sysutils/xenkernel3/patches/patch-cw
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-cw,v 1.3 2013/04/11 19:57:51 joerg Exp $
-
---- Config.mk.orig 2007-11-21 13:26:05.000000000 +0100
-+++ Config.mk 2007-11-21 13:26:40.000000000 +0100
-@@ -4,7 +4,8 @@
- debug ?= n
-
- XEN_COMPILE_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/ \
-- -e s/ppc/powerpc/ -e s/i86pc/x86_32/)
-+ -e s/ppc/powerpc/ -e s/i86pc/x86_32/ \
-+ -e s/amd64/x86_64/)
- XEN_TARGET_ARCH ?= $(XEN_COMPILE_ARCH)
- XEN_OS ?= $(shell uname -s)
-
-@@ -72,8 +73,8 @@ CFLAGS += -Wall -Wstrict-prototypes
- # result of any casted expression causes a warning.
- CFLAGS += -Wno-unused-value
-
--HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
--CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
-+HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,) ${EXTRA_CFLAGS}
-+CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,) ${EXTRA_CFLAGS}
-
- LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
- CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
diff --git a/sysutils/xenkernel3/patches/patch-da b/sysutils/xenkernel3/patches/patch-da
deleted file mode 100644
index cf7226d1eaf..00000000000
--- a/sysutils/xenkernel3/patches/patch-da
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-da,v 1.1 2009/01/24 18:57:59 bouyer Exp $
-
-some device have I/O space but no mem space so checking iomem to grant
-privileges is not enough.
-
---- xen/include/xen/iocap.h.orig 2009-01-24 17:21:41.000000000 +0100
-+++ xen/include/xen/iocap.h 2009-01-24 17:22:05.000000000 +0100
-@@ -29,7 +29,7 @@
- rangeset_contains_singleton((d)->irq_caps, i)
-
- #define multipage_allocation_permitted(d) \
-- (!rangeset_is_empty((d)->iomem_caps))
-+ (!rangeset_is_empty((d)->iomem_caps) || !rangeset_is_empty((d)->arch.ioport_caps))
-
- /*
- * Until TLB flushing issues are sorted out we consider it unsafe for
-@@ -37,6 +37,6 @@
- * operations.
- */
- #define grant_operation_permitted(d) \
-- (!rangeset_is_empty((d)->iomem_caps))
-+ (!rangeset_is_empty((d)->iomem_caps) || !rangeset_is_empty((d)->arch.ioport_caps))
-
- #endif /* __XEN_IOCAP_H__ */
diff --git a/sysutils/xenkernel3/patches/patch-db b/sysutils/xenkernel3/patches/patch-db
deleted file mode 100644
index cd44ad868cf..00000000000
--- a/sysutils/xenkernel3/patches/patch-db
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-db,v 1.1 2009/01/24 18:57:59 bouyer Exp $
-
-some device have I/O space but no mem space so checking iomem to grant
-privileges is not enough.
-
---- xen/include/asm-x86/iocap.h.orig 2009-01-24 17:22:41.000000000 +0100
-+++ xen/include/asm-x86/iocap.h 2009-01-24 17:23:24.000000000 +0100
-@@ -15,6 +15,6 @@
- rangeset_contains_range((d)->arch.ioport_caps, s, e)
-
- #define cache_flush_permitted(d) \
-- (!rangeset_is_empty((d)->iomem_caps))
-+ (!rangeset_is_empty((d)->iomem_caps) || !rangeset_is_empty((d)->arch.ioport_caps))
-
- #endif /* __X86_IOCAP_H__ */
diff --git a/sysutils/xenkernel3/patches/patch-dc b/sysutils/xenkernel3/patches/patch-dc
deleted file mode 100644
index 50e3e205072..00000000000
--- a/sysutils/xenkernel3/patches/patch-dc
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-dc,v 1.1 2010/12/07 18:43:49 bouyer Exp $
-
-Fix for CVE-2010-4255, from the xen-devel list and adapted for Xen 3.1
-
---- xen/arch/x86/traps.c.orig 2010-12-07 12:53:20.000000000 +0100
-+++ xen/arch/x86/traps.c 2010-12-07 13:11:36.000000000 +0100
-@@ -950,7 +950,8 @@
- {
- if ( paging_mode_external(d) && guest_mode(regs) )
- return paging_fault(addr, regs);
-- if ( (addr >= GDT_LDT_VIRT_START) && (addr < GDT_LDT_VIRT_END) )
-+ if ( !(regs->error_code & PFEC_user_mode) &&
-+ (addr >= GDT_LDT_VIRT_START) && (addr < GDT_LDT_VIRT_END) )
- return handle_gdt_ldt_mapping_fault(
- addr - GDT_LDT_VIRT_START, regs);
- return 0;
diff --git a/sysutils/xenkernel3/patches/patch-gcc-version b/sysutils/xenkernel3/patches/patch-gcc-version
deleted file mode 100644
index bd5925c6dc1..00000000000
--- a/sysutils/xenkernel3/patches/patch-gcc-version
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-gcc-version,v 1.1 2011/11/20 03:43:30 jym Exp $
-Improve the pattern matching a bit for compiler version. Otherwise we
-get garbage in the match, and sed will choke on it.
---- ./xen/Makefile.orig 2008-04-25 13:03:12.000000000 +0000
-+++ ./xen/Makefile
-@@ -115,7 +115,7 @@ include/xen/compile.h: include/xen/compi
- -e 's/@@whoami@@/$(USER)/g' \
- -e 's/@@domain@@/$(shell ([ -x /bin/dnsdomainname ] && /bin/dnsdomainname) || ([ -x /bin/domainname ] && /bin/domainname || echo [unknown]))/g' \
- -e 's/@@hostname@@/$(shell hostname)/g' \
-- -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | grep -i "gcc.*version")!g' \
-+ -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | grep -i "gcc.* version ")!g' \
- -e 's/@@version@@/$(XEN_VERSION)/g' \
- -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
- -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
diff --git a/sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c b/sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c
deleted file mode 100644
index 5ba1fd338c6..00000000000
--- a/sysutils/xenkernel3/patches/patch-xen_arch_x86_hvm_io.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-xen_arch_x86_hvm_io.c,v 1.1 2013/04/11 19:57:51 joerg Exp $
-
---- xen/arch/x86/hvm/io.c.orig 2013-03-25 12:44:51.000000000 +0000
-+++ xen/arch/x86/hvm/io.c
-@@ -338,7 +338,7 @@ static inline void set_eflags_OF(int siz
-
- if ( instr == INSTR_ADD )
- {
-- if ((src ^ result) & (dst ^ result) & mask);
-+ if ((src ^ result) & (dst ^ result) & mask)
- regs->eflags |= X86_EFLAGS_OF;
- }
- else
diff --git a/sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c b/sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c
deleted file mode 100644
index 429fdb33315..00000000000
--- a/sysutils/xenkernel3/patches/patch-xen_arch_x86_string.c
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-xen_arch_x86_string.c,v 1.1 2013/04/11 19:57:51 joerg Exp $
-
---- xen/arch/x86/string.c.orig 2013-03-25 12:54:07.000000000 +0000
-+++ xen/arch/x86/string.c
-@@ -8,6 +8,21 @@
- #include <xen/config.h>
- #include <xen/lib.h>
-
-+#undef memcmp
-+int
-+memcmp(const void *s1, const void *s2, size_t n)
-+{
-+ const unsigned char *p1 = s1;
-+ const unsigned char *p2 = s2;
-+ while (n-- != 0) {
-+ if (*p1 != *p2)
-+ return *p1 - *p2;
-+ ++p1;
-+ ++p2;
-+ }
-+ return 0;
-+}
-+
- #undef memcpy
- void *memcpy(void *dest, const void *src, size_t n)
- {
diff --git a/sysutils/xenkernel3/patches/patch-xen_arch_x86_x86__64_entry.S b/sysutils/xenkernel3/patches/patch-xen_arch_x86_x86__64_entry.S
deleted file mode 100644
index 4f3c881e84e..00000000000
--- a/sysutils/xenkernel3/patches/patch-xen_arch_x86_x86__64_entry.S
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-xen_arch_x86_x86__64_entry.S,v 1.1 2016/03/01 20:09:03 joerg Exp $
-
---- xen/arch/x86/x86_64/entry.S.orig 2016-03-01 12:46:20.394327040 +0000
-+++ xen/arch/x86/x86_64/entry.S
-@@ -47,7 +47,7 @@ restore_all_guest:
- addq $8,%rsp
- popq %rcx # RIP
- popq %r11 # CS
-- cmpw $FLAT_KERNEL_CS32,%r11
-+ cmpw $FLAT_KERNEL_CS32,%r11w
- popq %r11 # RFLAGS
- popq %rsp # RSP
- je 1f
diff --git a/sysutils/xenkernel3/patches/patch-xen_common_libelf_libelf-private.h b/sysutils/xenkernel3/patches/patch-xen_common_libelf_libelf-private.h
deleted file mode 100644
index 42ae5bf395d..00000000000
--- a/sysutils/xenkernel3/patches/patch-xen_common_libelf_libelf-private.h
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-xen_common_libelf_libelf-private.h,v 1.1 2013/07/13 19:43:21 joerg Exp $
-
---- xen/common/libelf/libelf-private.h.orig 2013-07-12 18:07:36.000000000 +0000
-+++ xen/common/libelf/libelf-private.h
-@@ -1,4 +1,4 @@
--#ifndef __LIBELF_PRIVATE_H__
-+#ifndef __LIBELF_PRIVATE_H_
- #define __LIBELF_PRIVATE_H_
-
- #ifdef __XEN__
diff --git a/sysutils/xenkernel3/patches/patch-xen_include_xen_compat.h b/sysutils/xenkernel3/patches/patch-xen_include_xen_compat.h
deleted file mode 100644
index a276feca178..00000000000
--- a/sysutils/xenkernel3/patches/patch-xen_include_xen_compat.h
+++ /dev/null
@@ -1,57 +0,0 @@
-$NetBSD: patch-xen_include_xen_compat.h,v 1.1 2014/05/14 20:21:19 bouyer Exp $
-
---- xen/include/xen/compat.h.orig 2008-04-25 15:03:12.000000000 +0200
-+++ xen/include/xen/compat.h 2014-05-14 16:24:55.000000000 +0200
-@@ -126,12 +126,8 @@
- })
-
-
--#define CHECK_TYPE(name) \
-- typedef int __checkT ## name[1 - ((xen_ ## name ## _t *)0 != \
-- (compat_ ## name ## _t *)0) * 2]
--#define CHECK_TYPE_(k, n) \
-- typedef int __checkT ## k ## _ ## n[1 - ((k xen_ ## n *)0 != \
-- (k compat_ ## n *)0) * 2]
-+#define CHECK_TYPE(name) /**/
-+#define CHECK_TYPE_(k, n) /**/
-
- #define CHECK_SIZE(name) \
- typedef int __checkS ## name[1 - (sizeof(xen_ ## name ## _t) != \
-@@ -140,30 +136,13 @@
- typedef int __checkS ## k ## _ ## n[1 - (sizeof(k xen_ ## n) != \
- sizeof(k compat_ ## n)) * 2]
-
--#define CHECK_FIELD(t, f) \
-- typedef int __checkF ## t ## __ ## f[1 - (&((xen_ ## t ## _t *)0)->f != \
-- &((compat_ ## t ## _t *)0)->f) * 2]
--#define CHECK_FIELD_(k, n, f) \
-- typedef int __checkF ## k ## _ ## n ## __ ## f[1 - (&((k xen_ ## n *)0)->f != \
-- &((k compat_ ## n *)0)->f) * 2]
--
--#define CHECK_SUBFIELD_1(t, f1, f2) \
-- typedef int __checkF1 ## t ## __ ## f1 ## __ ## f2 \
-- [1 - (&((xen_ ## t ## _t *)0)->f1.f2 != \
-- &((compat_ ## t ## _t *)0)->f1.f2) * 2]
--#define CHECK_SUBFIELD_1_(k, n, f1, f2) \
-- typedef int __checkF1 ## k ## _ ## n ## __ ## f1 ## __ ## f2 \
-- [1 - (&((k xen_ ## n *)0)->f1.f2 != \
-- &((k compat_ ## n *)0)->f1.f2) * 2]
--
--#define CHECK_SUBFIELD_2(t, f1, f2, f3) \
-- typedef int __checkF2 ## t ## __ ## f1 ## __ ## f2 ## __ ## f3 \
-- [1 - (&((xen_ ## t ## _t *)0)->f1.f2.f3 != \
-- &((compat_ ## t ## _t *)0)->f1.f2.f3) * 2]
--#define CHECK_SUBFIELD_2_(k, n, f1, f2, f3) \
-- typedef int __checkF2 ## k ## _ ## n ## __ ## f1 ## __ ## f2 ## __ ## f3 \
-- [1 - (&((k xen_ ## n *)0)->f1.f2.f3 != \
-- &((k compat_ ## n *)0)->f1.f2.f3) * 2]
-+#define CHECK_FIELD(t, f) /**/
-+#define CHECK_FIELD_(k, n, f) /**/
-+#define CHECK_SUBFIELD_1(t, f1, f2) /**/
-+#define CHECK_SUBFIELD_1_(k, n, f1, f2) /**/
-+
-+#define CHECK_SUBFIELD_2(t, f1, f2, f3) /**/
-+#define CHECK_SUBFIELD_2_(k, n, f1, f2, f3) /**/
-
- int hypercall_xlat_continuation(unsigned int *id, unsigned int mask, ...);
-
diff --git a/sysutils/xenkernel33/DESCR b/sysutils/xenkernel33/DESCR
deleted file mode 100644
index 86b465030ab..00000000000
--- a/sysutils/xenkernel33/DESCR
+++ /dev/null
@@ -1,13 +0,0 @@
-Xen is a virtual machine monitor for x86 hardware (runs only on
-i686-class CPUs), which supports running multiple guests operating
-systems on a single machine. Guest OSes (also called "domains")
-require a modified kernel which supports Xen hypercalls in replacement
-to access to the physical hardware. At boot, the xen kernel is loaded
-(via grub) along with the guest kernel for the first domain (called
-domain0). domain0 has privileges to access the physical hardware (PCI
-and ISA devices), administrate other domains and provide virtual
-devices (disks and network) to other domains.
-
-This package contains the 3.3 Xen3 kernel itself. PCI passthrough is
-not supported. PAE is mandatory; on i386 one must use XEN3PAE_DOM[0U].
-3.3 is no longer maintained upstream.
diff --git a/sysutils/xenkernel33/MESSAGE b/sysutils/xenkernel33/MESSAGE
deleted file mode 100644
index 29aa113d011..00000000000
--- a/sysutils/xenkernel33/MESSAGE
+++ /dev/null
@@ -1,7 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.1 2011/11/20 03:21:37 jym Exp $
-
-The Xen hypervisor is installed under the following locations:
- ${XENKERNELDIR}/xen.gz (standard hypervisor)
- ${XENKERNELDIR}/xen-debug.gz (debug hypervisor)
-===========================================================================
diff --git a/sysutils/xenkernel33/Makefile b/sysutils/xenkernel33/Makefile
deleted file mode 100644
index 2f5789af8fd..00000000000
--- a/sysutils/xenkernel33/Makefile
+++ /dev/null
@@ -1,75 +0,0 @@
-# $NetBSD: Makefile,v 1.31 2016/07/09 13:04:08 wiz Exp $
-
-VERSION= 3.3.2
-DISTNAME= xen-${VERSION}
-PKGNAME= xenkernel33-${VERSION}
-PKGREVISION= 7
-CATEGORIES= sysutils
-MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
-
-MAINTAINER= cegger@NetBSD.org
-HOMEPAGE= http://xen.org/
-COMMENT= Xen 3.3.2 Kernel
-
-LICENSE= gnu-gpl-v2
-
-ONLY_FOR_PLATFORM= Linux-2.6*-i386 Linux-2.6*-x86_64
-ONLY_FOR_PLATFORM+= NetBSD-[5-9].*-x86_64 NetBSD-[5-9].*-i386
-
-CONFLICTS= xenkernel30-* xentools30-*
-CONFLICTS+= xenkernel3-* xentools3-*
-CONFLICTS+= xenkernel32-* xentools32-*
-
-WRKSRC= ${WRKDIR}/xen-${VERSION}
-
-NO_CONFIGURE= yes
-USE_TOOLS+= gmake
-
-PYTHON_FOR_BUILD_ONLY= yes
-PY_PATCHPLIST= NO
-PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # not yet ported as of 3.3.2
-
-SUBST_CLASSES+= py
-SUBST_STAGE.py= pre-build
-SUBST_FILES.py+= xen/tools/get-fields.sh
-SUBST_SED.py= -e "s,python,${PYTHONBIN},g"
-
-#PY_PATCHPLIST doesn't work because we have NO_CONFIGURE
-SUBST_CLASSES+= py2
-SUBST_STAGE.py2= pre-build
-SUBST_FILES.py2= xen/tools/compat-build-source.py
-SUBST_FILES.py2+= xen/tools/compat-build-header.py
-SUBST_SED.py2= -e "s,/usr/bin/env python,${PYTHONBIN},g"
-
-INSTALLATION_DIRS= xen3-kernel
-XENKERNELDIR= ${PREFIX}/${INSTALLATION_DIRS}
-
-MESSAGE_SUBST+= XENKERNELDIR=${XENKERNELDIR:Q}
-
-.include "../../mk/compiler.mk"
-.if !empty(PKGSRC_COMPILER:Mclang)
-EXTRA_CFLAGS+= -Qunused-arguments -no-integrated-as -Wno-error=format \
- -Wno-error=parentheses-equality -Wno-error=enum-conversion \
- -Wno-error=tautological-compare -Wno-error=unused-function \
- -Wno-error=unused-local-typedef
-BUILDLINK_TRANSFORM+= rm:-fno-reorder-blocks
-.elif !empty(PKGSRC_COMPILER:Mgcc)
-EXTRA_CFLAGS+= -Wno-error=unused-but-set-variable \
- -Wno-error=unused-local-typedefs
-.endif
-
-do-build:
- cd ${WRKSRC} && EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} debug=n xen
- ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen.gz
- cd ${WRKSRC} && ${GMAKE} clean
- cd ${WRKSRC} && EXTRA_CFLAGS=${EXTRA_CFLAGS:Q} ${GMAKE} debug=y xen
- ${CP} ${WRKSRC}/dist/install/boot/xen.gz ${WRKDIR}/xen-debug.gz
-
-do-install:
- ${INSTALL_DATA} ${WRKDIR}/xen.gz \
- ${DESTDIR}${XENKERNELDIR}/xen.gz
- ${INSTALL_DATA} ${WRKDIR}/xen-debug.gz \
- ${DESTDIR}${XENKERNELDIR}/xen-debug.gz
-
-.include "../../lang/python/application.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xenkernel33/PLIST b/sysutils/xenkernel33/PLIST
deleted file mode 100644
index 6da47ebadc2..00000000000
--- a/sysutils/xenkernel33/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2008/08/07 20:31:34 cegger Exp $
-xen3-kernel/xen.gz
-xen3-kernel/xen-debug.gz
diff --git a/sysutils/xenkernel33/distinfo b/sysutils/xenkernel33/distinfo
deleted file mode 100644
index 4a9e40cef77..00000000000
--- a/sysutils/xenkernel33/distinfo
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: distinfo,v 1.20 2016/03/01 20:09:04 joerg Exp $
-
-SHA1 (xen-3.3.2.tar.gz) = 7f438e73ac81b25cf5e1570709e87001066bafe4
-RMD160 (xen-3.3.2.tar.gz) = 28faa56286f2a418e35dcba6079570ea871d6c7b
-SHA512 (xen-3.3.2.tar.gz) = e080dd9599a6bdd91be924c87316ac1ed825040d258c07ebf6035d84f909b5f81b7b0e4383b358b561a5aba6bff6940d2e8013f6e2ca503f428bdf377820911c
-Size (xen-3.3.2.tar.gz) = 11357576 bytes
-SHA1 (patch-CVE-2012-3432) = aed03164e9d05379c0a768bf29643c3e94eefce1
-SHA1 (patch-Config.mk) = a70e4e1f19d8a8f935a3f2b1b9d24e23e845b920
-SHA1 (patch-SA45835) = 7d27c26ba947354bb5e279f3add9eb073a151477
-SHA1 (patch-aa) = 0d11c758ad0a0ca657bf2e0f89ca23ff67b76bb7
-SHA1 (patch-ab) = bba70c6a0f884a4bbfd2ce56e41ce0d649300edc
-SHA1 (patch-ac) = ed1dc87e4f1d80112befc63372bc91ee621f57e6
-SHA1 (patch-ad) = e53ac3abf2a6a10c60cf288b994b3cf52a0d6486
-SHA1 (patch-ae) = 9608381987e82b05ea34e16f82b88189cc415653
-SHA1 (patch-compat_memory_c) = f45daded92c0dac30213d6d7dcc81ac72ead7c47
-SHA1 (patch-include_xen_compat_h) = 96ba96ba31792f48c989f033f7706f09fd1171c2
-SHA1 (patch-xen_Makefile) = 30d27b40fb8f5c4ee663a6a82abf36db3b7ebd1c
-SHA1 (patch-xen_arch_x86_Rules.mk) = 81bdc8a653b57b5fcb9ae7d835f0284ab800dc21
-SHA1 (patch-xen_arch_x86_x86__64_entry.S) = 9bb46e2b8ba173725c62b39aba2941463d85245d
-SHA1 (patch-xen_common_libelf_libelf-private.h) = c364d8f247342c62d0d32fe9f4714f83f977719a
diff --git a/sysutils/xenkernel33/patches/patch-CVE-2012-3432 b/sysutils/xenkernel33/patches/patch-CVE-2012-3432
deleted file mode 100644
index 82cd57fba5b..00000000000
--- a/sysutils/xenkernel33/patches/patch-CVE-2012-3432
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-CVE-2012-3432,v 1.1 2012/07/28 12:02:16 drochner Exp $
-
-see http://lists.xen.org/archives/html/xen-devel/2012-07/msg01649.html
-
---- xen/arch/x86/hvm/io.c.orig 2009-08-06 12:56:41.000000000 +0000
-+++ xen/arch/x86/hvm/io.c
-@@ -181,6 +181,8 @@ int handle_mmio(void)
-
- rc = hvm_emulate_one(&ctxt);
-
-+ if ( rc != X86EMUL_RETRY )
-+ curr->arch.hvm_vcpu.io_state = HVMIO_none;
- if ( curr->arch.hvm_vcpu.io_state == HVMIO_awaiting_completion )
- curr->arch.hvm_vcpu.io_state = HVMIO_handle_mmio_awaiting_completion;
- else
diff --git a/sysutils/xenkernel33/patches/patch-Config.mk b/sysutils/xenkernel33/patches/patch-Config.mk
deleted file mode 100644
index 8f9b905cc68..00000000000
--- a/sysutils/xenkernel33/patches/patch-Config.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-Config.mk,v 1.1 2013/04/11 19:57:51 joerg Exp $
-
---- Config.mk.orig 2009-08-06 13:17:07.000000000 +0000
-+++ Config.mk
-@@ -16,6 +16,8 @@ SHELL ?= /bin/sh
- HOSTCC = gcc
- HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
- HOSTCFLAGS += -fno-strict-aliasing
-+HOSTCFLAGS += ${EXTRA_CFLAGS}
-+CFLAGS += ${EXTRA_CFLAGS}
-
- DISTDIR ?= $(XEN_ROOT)/dist
- DESTDIR ?= /
diff --git a/sysutils/xenkernel33/patches/patch-SA45835 b/sysutils/xenkernel33/patches/patch-SA45835
deleted file mode 100644
index e66005476f2..00000000000
--- a/sysutils/xenkernel33/patches/patch-SA45835
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-SA45835,v 1.1 2011/09/10 18:35:51 bouyer Exp $
-
---- xen/include/asm-x86/x86_64/uaccess.h.orig 2011-09-10 20:10:52.000000000 +0200
-+++ xen/include/asm-x86/x86_64/uaccess.h 2011-09-10 20:11:28.000000000 +0200
-@@ -19,7 +19,7 @@
- * non-canonical address (and thus fault) before ever reaching VIRT_START.
- */
- #define __addr_ok(addr) \
-- (((unsigned long)(addr) < (1UL<<48)) || \
-+ (((unsigned long)(addr) < (1UL<<47)) || \
- ((unsigned long)(addr) >= HYPERVISOR_VIRT_END))
-
- #define access_ok(addr, size) \
diff --git a/sysutils/xenkernel33/patches/patch-aa b/sysutils/xenkernel33/patches/patch-aa
deleted file mode 100644
index 97bfa279df2..00000000000
--- a/sysutils/xenkernel33/patches/patch-aa
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2009/01/13 13:48:33 cegger Exp $
-
---- xen/include/asm-x86/page.h.orig 2009-01-05 11:27:00.000000000 +0000
-+++ xen/include/asm-x86/page.h
-@@ -301,7 +301,7 @@ void setup_idle_pagetable(void);
- * WARNING: This will need to be disabled to run OSes that use the spare PTE
- * bits themselves (e.g., *BSD).
- */
--#ifdef NDEBUG
-+#if 1
- #undef _PAGE_GNTTAB
- #endif
- #ifndef _PAGE_GNTTAB
diff --git a/sysutils/xenkernel33/patches/patch-ab b/sysutils/xenkernel33/patches/patch-ab
deleted file mode 100644
index 292bffded89..00000000000
--- a/sysutils/xenkernel33/patches/patch-ab
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ab,v 1.1 2010/12/07 18:44:25 bouyer Exp $
-
-Fix for CVE-2010-4255, from the xen-devel list
-
---- xen/arch/x86/traps.c.orig 2010-12-07 13:28:23.000000000 +0100
-+++ xen/arch/x86/traps.c 2010-12-07 13:28:43.000000000 +0100
-@@ -1157,7 +1157,7 @@
- trace_trap_two_addr(TRC_PV_PAGING_FIXUP, regs->eip, addr);
- return ret;
- }
-- if ( !(regs->error_code & PFEC_reserved_bit) &&
-+ if ( !(regs->error_code & (PFEC_user_mode | PFEC_reserved_bit)) &&
- (addr >= GDT_LDT_VIRT_START) && (addr < GDT_LDT_VIRT_END) )
- return handle_gdt_ldt_mapping_fault(
- addr - GDT_LDT_VIRT_START, regs);
diff --git a/sysutils/xenkernel33/patches/patch-ac b/sysutils/xenkernel33/patches/patch-ac
deleted file mode 100644
index 8a4210e9f3d..00000000000
--- a/sysutils/xenkernel33/patches/patch-ac
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-ac,v 1.1 2011/03/24 12:04:57 drochner Exp $
-
-CVE-2011-1166
-
---- xen/arch/x86/domain.c.orig 2009-08-06 12:56:41.000000000 +0000
-+++ xen/arch/x86/domain.c
-@@ -680,6 +680,11 @@ int arch_set_info_guest(
-
- v->arch.guest_table_user = pagetable_from_pfn(cr3_pfn);
- }
-+ else if ( !(flags & VGCF_in_kernel) )
-+ {
-+ destroy_gdt(v);
-+ return -EINVAL;
-+ }
- #endif
- }
- #ifdef CONFIG_COMPAT
diff --git a/sysutils/xenkernel33/patches/patch-ad b/sysutils/xenkernel33/patches/patch-ad
deleted file mode 100644
index cf9e7c69ed3..00000000000
--- a/sysutils/xenkernel33/patches/patch-ad
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-ad,v 1.1 2011/04/04 09:07:06 hauke Exp $
-
-Turn this non-fatal condition from a panic into a warning, pulling up a 3.4 change
-<http://xenbits.xensource.com/hg/staging/xen-3.4-testing.hg/rev/60ed1226a37c#>
-as proposed by cegger.
-
---- xen/arch/x86/cpu/mcheck/amd_nonfatal.c.orig 2009-08-06 12:56:41.000000000 +0000
-+++ xen/arch/x86/cpu/mcheck/amd_nonfatal.c
-@@ -208,14 +208,19 @@ static void mce_amd_work_fn(void *data)
-
- /* HW does not count *all* kinds of correctable errors.
- * Thus it is possible, that the polling routine finds an
-- * correctable error even if the HW reports nothing.
-- * However, the other way around is not possible (= BUG).
-- */
-+ * correctable error even if the HW reports nothing. */
- if (counter > 0) {
- /* HW reported correctable errors,
- * the polling routine did not find...
- */
-- BUG_ON(adjust == 0);
-+ if (adjust == 0) {
-+ printk("CPU counter reports %"PRIu32
-+ " correctable hardware error%s that %s"
-+ " not reported by the status MSRs\n",
-+ counter,
-+ (counter == 1 ? "" : "s"),
-+ (counter == 1 ? "was" : "were"));
-+ }
- /* subtract 1 to not double count the error
- * from the polling service routine */
- adjust += (counter - 1);
diff --git a/sysutils/xenkernel33/patches/patch-ae b/sysutils/xenkernel33/patches/patch-ae
deleted file mode 100644
index b7be0d47f6c..00000000000
--- a/sysutils/xenkernel33/patches/patch-ae
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2012/01/05 12:02:38 cegger Exp $
-
---- xen/include/xen/stdarg.h.orig 2012-01-05 11:29:11.000000000 +0000
-+++ xen/include/xen/stdarg.h
-@@ -1,5 +1,26 @@
-+#ifndef __XEN_STDARG_H__
-+#define __XEN_STDARG_H__
-+
- #if defined(__OpenBSD__)
- # include "/usr/include/stdarg.h"
-+#elif defined (__NetBSD__)
-+ /* Why not just include stdarg.h like everyone else? should explain */
-+ typedef __builtin_va_list va_list;
-+# ifdef __GNUC__
-+# define __GNUC_PREREQ__(x, y) \
-+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
-+ (__GNUC__ > (x)))
-+# else
-+# define __GNUC_PREREQ__(x, y) 0
-+# endif
-+# if !__GNUC_PREREQ__(4, 5)
-+# define __builtin_va_start(ap, last) __builtin_stdarg_start((ap), (last))
-+# endif
-+# define va_start(ap, last) __builtin_va_start((ap), (last))
-+# define va_end(ap) __builtin_va_end(ap)
-+# define va_arg __builtin_va_arg
- #else
- # include <stdarg.h>
- #endif
-+
-+#endif /* __XEN_STDARG_H__ */
diff --git a/sysutils/xenkernel33/patches/patch-compat_memory_c b/sysutils/xenkernel33/patches/patch-compat_memory_c
deleted file mode 100644
index c91d5bf200a..00000000000
--- a/sysutils/xenkernel33/patches/patch-compat_memory_c
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-compat_memory_c,v 1.1 2012/01/05 12:02:38 cegger Exp $
-
---- xen/common/compat/memory.c.orig 2009-08-06 12:56:41.000000000 +0000
-+++ xen/common/compat/memory.c
-@@ -7,6 +7,12 @@
- #include <asm/current.h>
- #include <compat/memory.h>
-
-+#define xen_domid_t domid_t
-+#define compat_domid_t domid_compat_t
-+CHECK_TYPE(domid);
-+#undef compat_domid_t
-+#undef xen_domid_t
-+
- int compat_memory_op(unsigned int cmd, XEN_GUEST_HANDLE(void) compat)
- {
- int rc, split, op = cmd & MEMOP_CMD_MASK;
-@@ -171,13 +177,6 @@ int compat_memory_op(unsigned int cmd, X
- case XENMEM_current_reservation:
- case XENMEM_maximum_reservation:
- case XENMEM_maximum_gpfn:
-- {
--#define xen_domid_t domid_t
--#define compat_domid_t domid_compat_t
-- CHECK_TYPE(domid);
--#undef compat_domid_t
--#undef xen_domid_t
-- }
- case XENMEM_maximum_ram_page:
- nat.hnd = compat;
- break;
diff --git a/sysutils/xenkernel33/patches/patch-include_xen_compat_h b/sysutils/xenkernel33/patches/patch-include_xen_compat_h
deleted file mode 100644
index 52f27252c28..00000000000
--- a/sysutils/xenkernel33/patches/patch-include_xen_compat_h
+++ /dev/null
@@ -1,89 +0,0 @@
-$NetBSD: patch-include_xen_compat_h,v 1.1 2012/01/05 12:02:38 cegger Exp $
-
---- xen/include/xen/compat.h.orig 2009-08-06 12:56:43.000000000 +0000
-+++ xen/include/xen/compat.h
-@@ -128,44 +128,61 @@
- })
-
-
-+#define CHECK_NAME(name, tag) __check ## tag ## name
-+#define CHECK_NAME_(k, n, tag) __check ## tag ## k ## _ ## n
-+
- #define CHECK_TYPE(name) \
-- typedef int __checkT ## name[1 - ((xen_ ## name ## _t *)0 != \
-- (compat_ ## name ## _t *)0) * 2]
-+static inline int CHECK_NAME(name, T)(xen_ ## name ## _t *x, \
-+ compat_ ## name ## _t *c) \
-+{ \
-+ return x == c; \
-+}
- #define CHECK_TYPE_(k, n) \
-- typedef int __checkT ## k ## _ ## n[1 - ((k xen_ ## n *)0 != \
-- (k compat_ ## n *)0) * 2]
-+static inline int CHECK_NAME_(k, n, T)(k xen_ ## n *x, \
-+ k compat_ ## n *c) \
-+{ \
-+ return x == c; \
-+}
-
- #define CHECK_SIZE(name) \
-- typedef int __checkS ## name[1 - (sizeof(xen_ ## name ## _t) != \
-- sizeof(compat_ ## name ## _t)) * 2]
-+ typedef int CHECK_NAME(name, S)[1 - (sizeof(xen_ ## name ## _t) != \
-+ sizeof(compat_ ## name ## _t)) * 2]
- #define CHECK_SIZE_(k, n) \
-- typedef int __checkS ## k ## _ ## n[1 - (sizeof(k xen_ ## n) != \
-+ typedef int CHECK_NAME_(k, n, S)[1 - (sizeof(k xen_ ## n) != \
- sizeof(k compat_ ## n)) * 2]
-
-+#define CHECK_FIELD_COMMON(name, t, f) \
-+static inline int name(xen_ ## t ## _t *x, compat_ ## t ## _t *c) \
-+{ \
-+ BUILD_BUG_ON(offsetof(xen_ ## t ## _t, f) != \
-+ offsetof(compat_ ## t ## _t, f)); \
-+ return &x->f == &c->f; \
-+}
-+#define CHECK_FIELD_COMMON_(k, name, n, f) \
-+static inline int name(k xen_ ## n *x, k compat_ ## n *c) \
-+{ \
-+ BUILD_BUG_ON(offsetof(k xen_ ## n, f) != \
-+ offsetof(k compat_ ## n, f)); \
-+ return &x->f == &c->f; \
-+}
-+
- #define CHECK_FIELD(t, f) \
-- typedef int __checkF ## t ## __ ## f[1 - (&((xen_ ## t ## _t *)0)->f != \
-- &((compat_ ## t ## _t *)0)->f) * 2]
-+ CHECK_FIELD_COMMON(CHECK_NAME(t ## __ ## f, F), t, f)
- #define CHECK_FIELD_(k, n, f) \
-- typedef int __checkF ## k ## _ ## n ## __ ## f[1 - (&((k xen_ ## n *)0)->f != \
-- &((k compat_ ## n *)0)->f) * 2]
-+ CHECK_FIELD_COMMON_(k, CHECK_NAME_(k, n ## __ ## f, F), n, f)
-
- #define CHECK_SUBFIELD_1(t, f1, f2) \
-- typedef int __checkF1 ## t ## __ ## f1 ## __ ## f2 \
-- [1 - (&((xen_ ## t ## _t *)0)->f1.f2 != \
-- &((compat_ ## t ## _t *)0)->f1.f2) * 2]
-+ CHECK_FIELD_COMMON(CHECK_NAME(t ## __ ## f1 ## __ ## f2, F1), t, f1.f2)
- #define CHECK_SUBFIELD_1_(k, n, f1, f2) \
-- typedef int __checkF1 ## k ## _ ## n ## __ ## f1 ## __ ## f2 \
-- [1 - (&((k xen_ ## n *)0)->f1.f2 != \
-- &((k compat_ ## n *)0)->f1.f2) * 2]
-+ CHECK_FIELD_COMMON_(k, CHECK_NAME_(k, n ## __ ## f1 ## __ ## f2, F1), \
-+ n, f1.f2)
-
- #define CHECK_SUBFIELD_2(t, f1, f2, f3) \
-- typedef int __checkF2 ## t ## __ ## f1 ## __ ## f2 ## __ ## f3 \
-- [1 - (&((xen_ ## t ## _t *)0)->f1.f2.f3 != \
-- &((compat_ ## t ## _t *)0)->f1.f2.f3) * 2]
-+ CHECK_FIELD_COMMON(CHECK_NAME(t ## __ ## f1 ## __ ## f2 ## __ ## f3, F2), \
-+ t, f1.f2.f3)
- #define CHECK_SUBFIELD_2_(k, n, f1, f2, f3) \
-- typedef int __checkF2 ## k ## _ ## n ## __ ## f1 ## __ ## f2 ## __ ## f3 \
-- [1 - (&((k xen_ ## n *)0)->f1.f2.f3 != \
-- &((k compat_ ## n *)0)->f1.f2.f3) * 2]
-+ CHECK_FIELD_COMMON_(k, CHECK_NAME_(k, n ## __ ## f1 ## __ ## f2 ## __ ## \
-+ f3, F2), n, f1.f2.f3)
-
- int hypercall_xlat_continuation(unsigned int *id, unsigned int mask, ...);
-
diff --git a/sysutils/xenkernel33/patches/patch-xen_Makefile b/sysutils/xenkernel33/patches/patch-xen_Makefile
deleted file mode 100644
index d71d57aeb4b..00000000000
--- a/sysutils/xenkernel33/patches/patch-xen_Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-xen_Makefile,v 1.1 2013/04/11 19:57:51 joerg Exp $
-
---- xen/Makefile.orig 2009-08-06 12:56:39.000000000 +0000
-+++ xen/Makefile
-@@ -87,7 +87,7 @@ include/xen/compile.h: include/xen/compi
- -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
- -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
- -e 's/@@hostname@@/$(shell hostname)/g' \
-- -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)!g' \
-+ -e 's!@@compiler@@!$(shell $(CC) $(EXTRA_CFLAGS) $(CFLAGS) -v 2>&1 | tail -1)!g' \
- -e 's/@@version@@/$(XEN_VERSION)/g' \
- -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
- -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
diff --git a/sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk b/sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk
deleted file mode 100644
index d248072ff63..00000000000
--- a/sysutils/xenkernel33/patches/patch-xen_arch_x86_Rules.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-xen_arch_x86_Rules.mk,v 1.1 2013/04/11 19:57:51 joerg Exp $
-
---- xen/arch/x86/Rules.mk.orig 2009-08-06 12:56:40.000000000 +0000
-+++ xen/arch/x86/Rules.mk
-@@ -21,6 +21,7 @@ CFLAGS += -iwithprefix include -Werror -
- CFLAGS += -I$(BASEDIR)/include
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
-+CFLAGS += $(EXTRA_CFLAGS)
-
- # Prevent floating-point variables from creeping into Xen.
- CFLAGS += -msoft-float
diff --git a/sysutils/xenkernel33/patches/patch-xen_arch_x86_x86__64_entry.S b/sysutils/xenkernel33/patches/patch-xen_arch_x86_x86__64_entry.S
deleted file mode 100644
index c350388e1ac..00000000000
--- a/sysutils/xenkernel33/patches/patch-xen_arch_x86_x86__64_entry.S
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-xen_arch_x86_x86__64_entry.S,v 1.1 2016/03/01 20:09:04 joerg Exp $
-
---- xen/arch/x86/x86_64/entry.S.orig 2016-03-01 12:46:35.754573228 +0000
-+++ xen/arch/x86/x86_64/entry.S
-@@ -54,7 +54,7 @@ restore_all_guest:
- addq $8,%rsp
- popq %rcx # RIP
- popq %r11 # CS
-- cmpw $FLAT_USER_CS32,%r11
-+ cmpw $FLAT_USER_CS32,%r11w
- popq %r11 # RFLAGS
- popq %rsp # RSP
- je 1f
diff --git a/sysutils/xenkernel33/patches/patch-xen_common_libelf_libelf-private.h b/sysutils/xenkernel33/patches/patch-xen_common_libelf_libelf-private.h
deleted file mode 100644
index 42ae5bf395d..00000000000
--- a/sysutils/xenkernel33/patches/patch-xen_common_libelf_libelf-private.h
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-xen_common_libelf_libelf-private.h,v 1.1 2013/07/13 19:43:21 joerg Exp $
-
---- xen/common/libelf/libelf-private.h.orig 2013-07-12 18:07:36.000000000 +0000
-+++ xen/common/libelf/libelf-private.h
-@@ -1,4 +1,4 @@
--#ifndef __LIBELF_PRIVATE_H__
-+#ifndef __LIBELF_PRIVATE_H_
- #define __LIBELF_PRIVATE_H_
-
- #ifdef __XEN__
diff --git a/sysutils/xenkernel41/DESCR b/sysutils/xenkernel41/DESCR
deleted file mode 100644
index 543eb12f86e..00000000000
--- a/sysutils/xenkernel41/DESCR
+++ /dev/null
@@ -1,12 +0,0 @@
-Xen is a virtual machine monitor which supports running multiple
-guests operating systems on a single machine. Guest OSes (also
-called "domains") require a modified kernel which supports Xen
-hypercalls in replacement to access to the physical hardware. At
-boot, the xen kernel is loaded along with the guest kernel for the
-first domain (called domain0). domain0 has privileges to access
-the physical hardware (PCI and ISA devices), administrate other
-domains and provide virtual devices (disks and network) to other
-domains.
-
-This package contains the 4.1 Xen4 kernel itself. PCI passthrough is
-not supported. PAE is mandatory; on i386 one must use XEN3PAE_DOM0[0U].
diff --git a/sysutils/xenkernel41/MESSAGE b/sysutils/xenkernel41/MESSAGE
deleted file mode 100644
index 1339881d91c..00000000000
--- a/sysutils/xenkernel41/MESSAGE
+++ /dev/null
@@ -1,7 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE,v 1.1 2011/11/20 03:12:44 jym Exp $
-
-The Xen hypervisor is installed under the following locations:
- ${XENKERNELDIR}/xen.gz (standard hypervisor)
- ${XENKERNELDIR}/xen-debug.gz (debug hypervisor)
-===========================================================================
diff --git a/sysutils/xenkernel41/Makefile b/sysutils/xenkernel41/Makefile
deleted file mode 100644
index 3428da24c71..00000000000
--- a/sysutils/xenkernel41/Makefile
+++ /dev/null
@@ -1,61 +0,0 @@
-# $NetBSD: Makefile,v 1.54 2016/12/21 15:35:44 bouyer Exp $
-
-VERSION= 4.1.6.1
-DISTNAME= xen-${VERSION}
-PKGNAME= xenkernel41-${VERSION}
-PKGREVISION= 23
-CATEGORIES= sysutils
-MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
-
-MAINTAINER= cegger@NetBSD.org
-HOMEPAGE= http://xen.org/
-COMMENT= Xen 4.1.x Kernel
-
-LICENSE= gnu-gpl-v2
-
-ONLY_FOR_PLATFORM= Linux-2.6*-i386 Linux-2.6*-x86_64
-ONLY_FOR_PLATFORM+= NetBSD-[5-9].*-x86_64 NetBSD-[5-9].*-i386
-
-NO_CONFIGURE= yes
-USE_TOOLS+= gmake
-
-PYTHON_FOR_BUILD_ONLY= yes
-PY_PATCHPLIST= NO
-PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # not yet ported as of 4.1.6.1
-
-# XXX Why does this not work?
-# See work/xen-4.1.2/Config.mk:41 why PYTHON must be set and what for
-MAKE_ENV+= PYTHON=${PYTHONBIN:Q}
-MAKE_ENV+= OCAML_TOOLS=no
-
-INSTALLATION_DIRS= xen41-kernel
-XENKERNELDIR= ${PREFIX}/${INSTALLATION_DIRS}
-
-MESSAGE_SUBST+= XENKERNELDIR=${XENKERNELDIR:Q}
-
-.include "../../mk/compiler.mk"
-.if !empty(PKGSRC_COMPILER:Mclang)
-EXTRA_CFLAGS+= -Qunused-arguments -no-integrated-as -Wno-error=format \
- -Wno-error=parentheses-equality -Wno-error=enum-conversion \
- -Wno-error=unused-function \
- -Wno-error=tautological-pointer-compare \
- -Wno-error=pointer-bool-conversion
-.endif
-
-MAKE_ENV+= EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
-
-do-build:
- cd ${WRKSRC}/xen && ${BUILD_MAKE_CMD} debug=n build
- ${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen.gz
- cd ${WRKSRC}/xen && ${MAKE_PROGRAM} clean
- cd ${WRKSRC}/xen && ${BUILD_MAKE_CMD} debug=y build
- ${CP} ${WRKSRC}/xen/xen.gz ${WRKDIR}/xen-debug.gz
-
-do-install:
- ${INSTALL_DATA} ${WRKDIR}/xen.gz \
- ${DESTDIR}${XENKERNELDIR}/xen.gz
- ${INSTALL_DATA} ${WRKDIR}/xen-debug.gz \
- ${DESTDIR}${XENKERNELDIR}/xen-debug.gz
-
-.include "../../lang/python/application.mk"
-.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xenkernel41/PLIST b/sysutils/xenkernel41/PLIST
deleted file mode 100644
index 886fa82240d..00000000000
--- a/sysutils/xenkernel41/PLIST
+++ /dev/null
@@ -1,3 +0,0 @@
-@comment $NetBSD: PLIST,v 1.1.1.1 2011/04/06 09:05:53 cegger Exp $
-xen41-kernel/xen-debug.gz
-xen41-kernel/xen.gz
diff --git a/sysutils/xenkernel41/distinfo b/sysutils/xenkernel41/distinfo
deleted file mode 100644
index 86eecde8161..00000000000
--- a/sysutils/xenkernel41/distinfo
+++ /dev/null
@@ -1,56 +0,0 @@
-$NetBSD: distinfo,v 1.47 2016/12/21 15:35:44 bouyer Exp $
-
-SHA1 (xen-4.1.6.1.tar.gz) = e5f15feb0821578817a65ede16110c6eac01abd0
-RMD160 (xen-4.1.6.1.tar.gz) = bff11421fc44a26f2cc3156713267abcb36d7a19
-SHA512 (xen-4.1.6.1.tar.gz) = 5f6106514ffb57708009e3d6763824b13d9038699048d1a91fa09ad223e0391b92b6ea0f25714a0bbf8ac8373c58fc7871ca0bce9c3ff7873d41fb2eeae13ed8
-Size (xen-4.1.6.1.tar.gz) = 10428485 bytes
-SHA1 (patch-CVE-2013-1442) = 7aa43513ea7cddc50b4e6802412cfc2903cce8e1
-SHA1 (patch-CVE-2013-4355_1) = 56dde995d7df4f18576040007fd5532de61d9069
-SHA1 (patch-CVE-2013-4355_2) = 70fd2f2e45a05a53d8ce7d0bd72b18165dd13509
-SHA1 (patch-CVE-2013-4355_3) = 93f7bf877945e585fb906dbfc8159e688813c12f
-SHA1 (patch-CVE-2013-4355_4) = 88f478997d2631ec41adfd42a9d79f2d87bb44d8
-SHA1 (patch-CVE-2013-4361) = b9074af976ba98c02aeb84288a10527bf7693241
-SHA1 (patch-CVE-2013-4368) = 77caf392b472e5586eb2fa6a37d173cd856f6f15
-SHA1 (patch-CVE-2013-4494) = d74dfc898d1128f3c205bd178c8cf663935711e3
-SHA1 (patch-CVE-2013-4553) = 6708dcef1737b119a3fcf2e3414c22c115cbacc1
-SHA1 (patch-CVE-2013-6885_1) = 18d155b2c76119988be32cfd43e3c4aa6a507b9d
-SHA1 (patch-CVE-2013-6885_2) = be3c99ba3e349492d45cd4f2fce0acc26ac1a96d
-SHA1 (patch-CVE-2014-1666) = acf27080799d4aae6a03b556caadb01081d5314e
-SHA1 (patch-CVE-2014-3124) = 0643b9b2b4bb3a976f59ec081e25f2b466e4fdba
-SHA1 (patch-CVE-2014-4021) = ee8ee800b35f7eaa242b06536c1ffa6568305b36
-SHA1 (patch-CVE-2014-7154) = 5f0541559d911778aa5267bb5c0e1e8a9a3904e2
-SHA1 (patch-CVE-2014-7155) = 0f1aa6a5d4fdb8403fc1e01b884491a63de501f8
-SHA1 (patch-CVE-2014-7156) = 85043bdcf2644227d135f725cb442aade565c9d6
-SHA1 (patch-CVE-2014-8594) = 39d9d220d89c2356fa745dad5bf8c7ef5e8f2516
-SHA1 (patch-CVE-2014-8595) = 46bd285b7eb8f2e23984f7917b12af2191bfef80
-SHA1 (patch-CVE-2014-8866) = ee0bc3afb767b50e973d6065b84adc7e51949def
-SHA1 (patch-CVE-2014-8867) = 576433746660f62b753088a66c5315a1a2ff8f76
-SHA1 (patch-CVE-2014-9030) = f52c302585b0f4b074f7562e6b8cddacb26deee4
-SHA1 (patch-CVE-2015-2044) = 00d32273d0a9f51927ff94a13f916382c3126e60
-SHA1 (patch-CVE-2015-2045) = e1874bbde0cce7db4ee9260440f5280d404027d7
-SHA1 (patch-CVE-2015-2151) = aed92f50d162febc3074f7edecaf6ca418d0b42c
-SHA1 (patch-CVE-2015-2752) = 37f44989a3b3c69dea8e9de9fc34ffd5c2e8b087
-SHA1 (patch-CVE-2015-2756) = b3b133d42229ecc8c308644b17e5317cd77f9a98
-SHA1 (patch-CVE-2015-7835) = d66fe84abfb921bf435c1ed9b077012937d0c71e
-SHA1 (patch-CVE-2015-7969) = 4eb96025afae4be547f74b9e71a7d8a3a37fc60b
-SHA1 (patch-CVE-2015-7971) = 0d0d36ad99f313afb96111a832eb65ddeaf8010e
-SHA1 (patch-CVE-2015-8339) = e5485ab9e73fa9a63c566505b8de805530ac678e
-SHA1 (patch-Config.mk) = a43ed1b3304d6383dc093acd128a7f373d0ca266
-SHA1 (patch-XSA-166) = 24fccf8e30ccf910a128e5e0365800191a90524c
-SHA1 (patch-XSA-182) = 70a7a6175a4b87ffaf72cbc5a3932f076efa3f9c
-SHA1 (patch-XSA-185) = a2313922aa4dad734b96c80f64fe54eca3c14019
-SHA1 (patch-XSA-187-1) = 55ea0c2d9c7d8d9476a5ab97342ff552be4faf56
-SHA1 (patch-XSA-187-2) = e21b24771fa9417f593b8f6d1550660bbad36b98
-SHA1 (patch-XSA-191) = 5da559e104543b8d22ea60378d9160d2ad83b8d0
-SHA1 (patch-XSA-192) = b0f2801fe6db91c2a98b82897cdee057062c6c2b
-SHA1 (patch-XSA-195) = a04295b397126e1cc1f129bb3cb9fb872fcbb373
-SHA1 (patch-XSA-200) = 2e5f6e3596fa754030af29a1dc8fafb738ad1da4
-SHA1 (patch-XSA-202) = ceb6f02eb7f1a41243c6e47c4f1bbbc9626a8da5
-SHA1 (patch-XSA-204) = 99e2b88b551d80724fcc27f925fbf65d3fc468de
-SHA1 (patch-xen_Makefile) = d1c7e4860221f93d90818f45a77748882486f92b
-SHA1 (patch-xen_arch_x86_Rules.mk) = 6b9b4bfa28924f7d3f6c793a389f1a7ac9d228e2
-SHA1 (patch-xen_arch_x86_cpu_mcheck_vmce.c) = 5afd01780a13654f1d21bf1562f6431c8370be0b
-SHA1 (patch-xen_arch_x86_time.c) = 2c69ac1cb5e0ca06c4f70acb91d2723a32ce98a9
-SHA1 (patch-xen_drivers_char_console_c) = 0fe186369602ccffaeec6f4bfbee8bb4298d3ff0
-SHA1 (patch-xen_drivers_passthrough_vtd_x86_ats.c) = 012ccbb27069c4f2e0361bd127397fdd22027f29
-SHA1 (patch-xen_include_xen_stdarg.h) = e9df974a9b783ed442ab17497198432cb9844b70
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-1442 b/sysutils/xenkernel41/patches/patch-CVE-2013-1442
deleted file mode 100644
index fad8b9e6581..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-1442
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-CVE-2013-1442,v 1.1 2013/10/01 14:54:44 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-devel/2013-09/msg02523.html
-
---- xen/arch/x86/i387.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/arch/x86/i387.c 2013-09-30 15:23:07.000000000 +0000
-@@ -103,9 +103,9 @@ void setup_fpu(struct vcpu *v)
- {
- /*
- * XCR0 normally represents what guest OS set. In case of Xen itself,
-- * we set all supported feature mask before doing save/restore.
-+ * we set all supported feature mask before restoring.
- */
-- set_xcr0(v->arch.xcr0_accum);
-+ set_xcr0(xfeature_mask);
- xrstor(v);
- set_xcr0(v->arch.xcr0);
- }
-@@ -149,7 +149,7 @@ void save_init_fpu(struct vcpu *v)
- if ( xsave_enabled(v) )
- {
- /* XCR0 normally represents what guest OS set. In case of Xen itself,
-- * we set all accumulated feature mask before doing save/restore.
-+ * we set all accumulated feature mask before saving.
- */
- set_xcr0(v->arch.xcr0_accum);
- if ( cpu_has_xsaveopt )
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-4355_1 b/sysutils/xenkernel41/patches/patch-CVE-2013-4355_1
deleted file mode 100644
index 202e85d183e..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-4355_1
+++ /dev/null
@@ -1,120 +0,0 @@
-$NetBSD: patch-CVE-2013-4355_1,v 1.5 2014/10/01 17:18:22 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-devel/2013-09/msg03160.html
-also fixes
-http://lists.xenproject.org/archives/html/xen-devel/2013-11/msg03827.html
-(CVE-2013-4554)
-also fixes
-http://lists.xenproject.org/archives/html/xen-devel/2014-03/msg03177.html
-(CVE-2014-2599)
-also fixes
-http://lists.xenproject.org/archives/html/xen-devel/2014-04/msg03853.html
-(CVE-2014-3124)
-also fixes
-http://lists.xenproject.org/archives/html/xen-devel/2014-10/msg00065.html
-(CVE-2014-7188)
-
---- xen/arch/x86/hvm/hvm.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/arch/x86/hvm/hvm.c 2014-10-01 16:40:48.000000000 +0000
-@@ -1961,11 +1961,7 @@ void hvm_task_switch(
-
- rc = hvm_copy_from_guest_virt(
- &tss, prev_tr.base, sizeof(tss), PFEC_page_present);
-- if ( rc == HVMCOPY_bad_gva_to_gfn )
-- goto out;
-- if ( rc == HVMCOPY_gfn_paged_out )
-- goto out;
-- if ( rc == HVMCOPY_gfn_shared )
-+ if ( rc != HVMCOPY_okay )
- goto out;
-
- eflags = regs->eflags;
-@@ -2010,13 +2006,11 @@ void hvm_task_switch(
-
- rc = hvm_copy_from_guest_virt(
- &tss, tr.base, sizeof(tss), PFEC_page_present);
-- if ( rc == HVMCOPY_bad_gva_to_gfn )
-- goto out;
-- if ( rc == HVMCOPY_gfn_paged_out )
-- goto out;
-- /* Note: this could be optimised, if the callee functions knew we want RO
-- * access */
-- if ( rc == HVMCOPY_gfn_shared )
-+ /*
-+ * Note: The HVMCOPY_gfn_shared case could be optimised, if the callee
-+ * functions knew we want RO access.
-+ */
-+ if ( rc != HVMCOPY_okay )
- goto out;
-
-
-@@ -2409,7 +2403,7 @@ int hvm_msr_read_intercept(unsigned int
- *msr_content = vcpu_vlapic(v)->hw.apic_base_msr;
- break;
-
-- case MSR_IA32_APICBASE_MSR ... MSR_IA32_APICBASE_MSR + 0x3ff:
-+ case MSR_IA32_APICBASE_MSR ... MSR_IA32_APICBASE_MSR + 0xff:
- if ( hvm_x2apic_msr_read(v, msr, msr_content) )
- goto gp_fault;
- break;
-@@ -2529,7 +2523,7 @@ int hvm_msr_write_intercept(unsigned int
- vlapic_tdt_msr_set(vcpu_vlapic(v), msr_content);
- break;
-
-- case MSR_IA32_APICBASE_MSR ... MSR_IA32_APICBASE_MSR + 0x3ff:
-+ case MSR_IA32_APICBASE_MSR ... MSR_IA32_APICBASE_MSR + 0xff:
- if ( hvm_x2apic_msr_write(v, msr, msr_content) )
- goto gp_fault;
- break;
-@@ -2834,7 +2828,7 @@ int hvm_do_hypercall(struct cpu_user_reg
- case 4:
- case 2:
- hvm_get_segment_register(curr, x86_seg_ss, &sreg);
-- if ( unlikely(sreg.attr.fields.dpl == 3) )
-+ if ( unlikely(sreg.attr.fields.dpl) )
- {
- default:
- regs->eax = -EPERM;
-@@ -3657,13 +3651,9 @@ long do_hvm_op(unsigned long op, XEN_GUE
- rc = -EINVAL;
- goto param_fail4;
- }
-- if ( p2m_is_grant(t) )
-- {
-- gdprintk(XENLOG_WARNING,
-- "type for pfn 0x%lx changed to grant while "
-- "we were working?\n", pfn);
-+ if ( !p2m_is_ram(t) &&
-+ (!p2m_is_hole(t) || a.hvmmem_type != HVMMEM_mmio_dm) )
- goto param_fail4;
-- }
- else
- {
- nt = p2m_change_type(p2m, pfn, t, memtype[a.hvmmem_type]);
-@@ -3746,7 +3736,7 @@ long do_hvm_op(unsigned long op, XEN_GUE
- ((a.first_pfn + a.nr - 1) > domain_get_maximum_gpfn(d)) )
- goto param_fail5;
-
-- for ( pfn = a.first_pfn; pfn < a.first_pfn + a.nr; pfn++ )
-+ for ( pfn = a.first_pfn; a.nr; ++pfn )
- {
- p2m_type_t t;
- mfn_t mfn;
-@@ -3759,6 +3749,17 @@ long do_hvm_op(unsigned long op, XEN_GUE
- p2m_unlock(p2m);
- if ( !success )
- goto param_fail5;
-+
-+ /* Check for continuation if it's not the last interation. */
-+ if ( --a.nr && hypercall_preempt_check() )
-+ {
-+ a.first_pfn = pfn + 1;
-+ if ( copy_to_guest(arg, &a, 1) )
-+ rc = -EFAULT;
-+ else
-+ rc = -EAGAIN;
-+ goto param_fail5;
-+ }
- }
-
- rc = 0;
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-4355_2 b/sysutils/xenkernel41/patches/patch-CVE-2013-4355_2
deleted file mode 100644
index 65716cd9c10..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-4355_2
+++ /dev/null
@@ -1,71 +0,0 @@
-$NetBSD: patch-CVE-2013-4355_2,v 1.1 2013/10/01 14:54:44 drochner Exp $
-
---- xen/arch/x86/hvm/intercept.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/arch/x86/hvm/intercept.c 2013-09-30 15:23:07.000000000 +0000
-@@ -93,17 +93,28 @@ static int hvm_mmio_access(struct vcpu *
- {
- for ( i = 0; i < p->count; i++ )
- {
-- int ret;
--
-- ret = hvm_copy_from_guest_phys(&data,
-- p->data + (sign * i * p->size),
-- p->size);
-- if ( (ret == HVMCOPY_gfn_paged_out) ||
-- (ret == HVMCOPY_gfn_shared) )
-+ switch ( hvm_copy_from_guest_phys(&data,
-+ p->data + sign * i * p->size,
-+ p->size) )
- {
-+ case HVMCOPY_okay:
-+ break;
-+ case HVMCOPY_gfn_paged_out:
-+ case HVMCOPY_gfn_shared:
- rc = X86EMUL_RETRY;
- break;
-+ case HVMCOPY_bad_gfn_to_mfn:
-+ data = ~0;
-+ break;
-+ case HVMCOPY_bad_gva_to_gfn:
-+ ASSERT(0);
-+ /* fall through */
-+ default:
-+ rc = X86EMUL_UNHANDLEABLE;
-+ break;
- }
-+ if ( rc != X86EMUL_OKAY )
-+ break;
- rc = write_handler(v, p->addr + (sign * i * p->size), p->size,
- data);
- if ( rc != X86EMUL_OKAY )
-@@ -171,8 +182,28 @@ static int process_portio_intercept(port
- for ( i = 0; i < p->count; i++ )
- {
- data = 0;
-- (void)hvm_copy_from_guest_phys(&data, p->data + sign*i*p->size,
-- p->size);
-+ switch ( hvm_copy_from_guest_phys(&data,
-+ p->data + sign * i * p->size,
-+ p->size) )
-+ {
-+ case HVMCOPY_okay:
-+ break;
-+ case HVMCOPY_gfn_paged_out:
-+ case HVMCOPY_gfn_shared:
-+ rc = X86EMUL_RETRY;
-+ break;
-+ case HVMCOPY_bad_gfn_to_mfn:
-+ data = ~0;
-+ break;
-+ case HVMCOPY_bad_gva_to_gfn:
-+ ASSERT(0);
-+ /* fall through */
-+ default:
-+ rc = X86EMUL_UNHANDLEABLE;
-+ break;
-+ }
-+ if ( rc != X86EMUL_OKAY )
-+ break;
- rc = action(IOREQ_WRITE, p->addr, p->size, &data);
- if ( rc != X86EMUL_OKAY )
- break;
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-4355_3 b/sysutils/xenkernel41/patches/patch-CVE-2013-4355_3
deleted file mode 100644
index 59f890afa52..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-4355_3
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD: patch-CVE-2013-4355_3,v 1.1 2013/10/01 14:54:44 drochner Exp $
-
---- xen/arch/x86/hvm/io.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/arch/x86/hvm/io.c 2013-09-30 15:23:07.000000000 +0000
-@@ -333,14 +333,24 @@ static int dpci_ioport_write(uint32_t mp
- data = p->data;
- if ( p->data_is_ptr )
- {
-- int ret;
--
-- ret = hvm_copy_from_guest_phys(&data,
-- p->data + (sign * i * p->size),
-- p->size);
-- if ( (ret == HVMCOPY_gfn_paged_out) &&
-- (ret == HVMCOPY_gfn_shared) )
-+ switch ( hvm_copy_from_guest_phys(&data,
-+ p->data + sign * i * p->size,
-+ p->size) )
-+ {
-+ case HVMCOPY_okay:
-+ break;
-+ case HVMCOPY_gfn_paged_out:
-+ case HVMCOPY_gfn_shared:
- return X86EMUL_RETRY;
-+ case HVMCOPY_bad_gfn_to_mfn:
-+ data = ~0;
-+ break;
-+ case HVMCOPY_bad_gva_to_gfn:
-+ ASSERT(0);
-+ /* fall through */
-+ default:
-+ return X86EMUL_UNHANDLEABLE;
-+ }
- }
-
- switch ( p->size )
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-4355_4 b/sysutils/xenkernel41/patches/patch-CVE-2013-4355_4
deleted file mode 100644
index 96d956f2417..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-4355_4
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-CVE-2013-4355_4,v 1.1 2013/10/01 14:54:44 drochner Exp $
-
---- xen/arch/x86/hvm/vmx/realmode.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/arch/x86/hvm/vmx/realmode.c 2013-09-30 15:23:07.000000000 +0000
-@@ -38,7 +38,9 @@ static void realmode_deliver_exception(
-
- again:
- last_byte = (vector * 4) + 3;
-- if ( idtr->limit < last_byte )
-+ if ( idtr->limit < last_byte ||
-+ hvm_copy_from_guest_phys(&cs_eip, idtr->base + vector * 4, 4) !=
-+ HVMCOPY_okay )
- {
- /* Software interrupt? */
- if ( insn_len != 0 )
-@@ -63,8 +65,6 @@ static void realmode_deliver_exception(
- }
- }
-
-- (void)hvm_copy_from_guest_phys(&cs_eip, idtr->base + vector * 4, 4);
--
- frame[0] = regs->eip + insn_len;
- frame[1] = csr->sel;
- frame[2] = regs->eflags & ~X86_EFLAGS_RF;
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-4361 b/sysutils/xenkernel41/patches/patch-CVE-2013-4361
deleted file mode 100644
index b133c1e6677..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-4361
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-CVE-2013-4361,v 1.1 2013/10/01 14:54:44 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-devel/2013-09/msg03162.html
-
---- xen/arch/x86/x86_emulate/x86_emulate.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/arch/x86/x86_emulate/x86_emulate.c 2013-09-30 15:23:08.000000000 +0000
-@@ -2975,11 +2975,11 @@ x86_emulate(
- break;
- case 4: /* fbld m80dec */
- ea.bytes = 10;
-- dst = ea;
-+ src = ea;
- if ( (rc = ops->read(src.mem.seg, src.mem.off,
- &src.val, src.bytes, ctxt)) != 0 )
- goto done;
-- emulate_fpu_insn_memdst("fbld", src.val);
-+ emulate_fpu_insn_memsrc("fbld", src.val);
- break;
- case 5: /* fild m64i */
- ea.bytes = 8;
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-4368 b/sysutils/xenkernel41/patches/patch-CVE-2013-4368
deleted file mode 100644
index b46ec754134..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-4368
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-CVE-2013-4368,v 1.1 2013/10/22 19:41:58 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-devel/2013-10/msg00812.html
-
---- xen/arch/x86/traps.c.orig 2013-09-10 08:42:18.000000000 +0200
-+++ xen/arch/x86/traps.c 2013-10-22 21:11:24.000000000 +0200
-@@ -1965,10 +1965,10 @@ static int emulate_privileged_op(struct
- break;
- }
- }
-- else
-- read_descriptor(data_sel, v, regs,
-- &data_base, &data_limit, &ar,
-- 0);
-+ else if ( !read_descriptor(data_sel, v, regs,
-+ &data_base, &data_limit, &ar, 0) ||
-+ !(ar & _SEGMENT_S) || !(ar & _SEGMENT_P) )
-+ goto fail;
- data_limit = ~0UL;
- ar = _SEGMENT_WR|_SEGMENT_S|_SEGMENT_DPL|_SEGMENT_P;
- }
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-4494 b/sysutils/xenkernel41/patches/patch-CVE-2013-4494
deleted file mode 100644
index c7818907f27..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-4494
+++ /dev/null
@@ -1,80 +0,0 @@
-$NetBSD: patch-CVE-2013-4494,v 1.1 2013/11/23 14:04:59 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-devel/2013-11/msg00225.html
-
---- xen/common/grant_table.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/common/grant_table.c 2013-11-19 16:46:13.000000000 +0000
-@@ -1459,6 +1459,8 @@ gnttab_transfer(
-
- for ( i = 0; i < count; i++ )
- {
-+ bool_t okay;
-+
- if (i && hypercall_preempt_check())
- return i;
-
-@@ -1555,16 +1557,18 @@ gnttab_transfer(
- * pages when it is dying.
- */
- if ( unlikely(e->is_dying) ||
-- unlikely(e->tot_pages >= e->max_pages) ||
-- unlikely(!gnttab_prepare_for_transfer(e, d, gop.ref)) )
-+ unlikely(e->tot_pages >= e->max_pages) )
- {
-- if ( !e->is_dying )
-- gdprintk(XENLOG_INFO, "gnttab_transfer: "
-- "Transferee has no reservation "
-- "headroom (%d,%d) or provided a bad grant ref (%08x) "
-- "or is dying (%d)\n",
-- e->tot_pages, e->max_pages, gop.ref, e->is_dying);
- spin_unlock(&e->page_alloc_lock);
-+
-+ if ( e->is_dying )
-+ gdprintk(XENLOG_INFO, "gnttab_transfer: "
-+ "Transferee (d%d) is dying\n", e->domain_id);
-+ else
-+ gdprintk(XENLOG_INFO, "gnttab_transfer: "
-+ "Transferee (d%d) has no headroom (tot %u, max %u)\n",
-+ e->domain_id, e->tot_pages, e->max_pages);
-+
- rcu_unlock_domain(e);
- page->count_info &= ~(PGC_count_mask|PGC_allocated);
- free_domheap_page(page);
-@@ -1575,6 +1579,37 @@ gnttab_transfer(
- /* Okay, add the page to 'e'. */
- if ( unlikely(e->tot_pages++ == 0) )
- get_knownalive_domain(e);
-+
-+ /*
-+ * We must drop the lock to avoid a possible deadlock in
-+ * gnttab_prepare_for_transfer. We have reserved a page in e so can
-+ * safely drop the lock and re-aquire it later to add page to the
-+ * pagelist.
-+ */
-+ spin_unlock(&e->page_alloc_lock);
-+ okay = gnttab_prepare_for_transfer(e, d, gop.ref);
-+ spin_lock(&e->page_alloc_lock);
-+
-+ if ( unlikely(!okay) || unlikely(e->is_dying) )
-+ {
-+ bool_t drop_dom_ref = (e->tot_pages-- == 1);
-+
-+ spin_unlock(&e->page_alloc_lock);
-+
-+ if ( okay /* i.e. e->is_dying due to the surrounding if() */ )
-+ gdprintk(XENLOG_INFO, "gnttab_transfer: "
-+ "Transferee (d%d) is now dying\n", e->domain_id);
-+
-+ if ( drop_dom_ref )
-+ put_domain(e);
-+ rcu_unlock_domain(e);
-+
-+ page->count_info &= ~(PGC_count_mask|PGC_allocated);
-+ free_domheap_page(page);
-+ gop.status = GNTST_general_error;
-+ goto copyback;
-+ }
-+
- page_list_add_tail(page, &e->page_list);
- page_set_owner(page, e);
-
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-4553 b/sysutils/xenkernel41/patches/patch-CVE-2013-4553
deleted file mode 100644
index d0bc8108ec5..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-4553
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-CVE-2013-4553,v 1.1 2013/11/29 19:29:58 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-devel/2013-11/msg03828.html
-
---- xen/arch/x86/domctl.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/arch/x86/domctl.c 2013-11-29 15:19:13.000000000 +0000
-@@ -383,6 +383,26 @@ long arch_do_domctl(
- break;
- }
-
-+ /*
-+ * XSA-74: This sub-hypercall is broken in several ways:
-+ * - lock order inversion (p2m locks inside page_alloc_lock)
-+ * - no preemption on huge max_pfns input
-+ * - not (re-)checking d->is_dying with page_alloc_lock held
-+ * - not honoring start_pfn input (which libxc also doesn't set)
-+ * Additionally it is rather useless, as the result is stale by
-+ * the time the caller gets to look at it.
-+ * As it only has a single, non-production consumer (xen-mceinj),
-+ * rather than trying to fix it we restrict it for the time being.
-+ */
-+ if ( /* No nested locks inside copy_to_guest_offset(). */
-+ paging_mode_external(current->domain) ||
-+ /* Arbitrary limit capping processing time. */
-+ max_pfns > GB(4) / PAGE_SIZE )
-+ {
-+ ret = -EOPNOTSUPP;
-+ break;
-+ }
-+
- spin_lock(&d->page_alloc_lock);
-
- if ( unlikely(d->is_dying) ) {
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-6885_1 b/sysutils/xenkernel41/patches/patch-CVE-2013-6885_1
deleted file mode 100644
index 9befecfc20f..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-6885_1
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-CVE-2013-6885_1,v 1.2 2014/02/20 17:37:25 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-devel/2013-12/msg00235.html
-http://lists.xenproject.org/archives/html/xen-devel/2014-02/msg01800.html
-
---- xen/arch/x86/cpu/amd.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/arch/x86/cpu/amd.c
-@@ -661,6 +661,20 @@ static void __devinit init_amd(struct cp
- }
- #endif
-
-+ if (c->x86 == 0x16 && c->x86_model <= 0xf) {
-+ rdmsrl(MSR_AMD64_LS_CFG, value);
-+ if (!(value & (1 << 15))) {
-+ static bool_t warned;
-+
-+ if (c == &boot_cpu_data || opt_cpu_info ||
-+ !test_and_set_bool(warned))
-+ printk(KERN_WARNING
-+ "CPU%u: Applying workaround for erratum 793\n",
-+ smp_processor_id());
-+ wrmsrl(MSR_AMD64_LS_CFG, value | (1 << 15));
-+ }
-+ }
-+
- if (c->x86 == 0x10) {
- /*
- * On family 10h BIOS may not have properly enabled WC+
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2013-6885_2 b/sysutils/xenkernel41/patches/patch-CVE-2013-6885_2
deleted file mode 100644
index 376c1bbef35..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2013-6885_2
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-CVE-2013-6885_2,v 1.1 2013/12/04 10:35:01 drochner Exp $
-
---- xen/include/asm-x86/msr-index.h.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/include/asm-x86/msr-index.h 2013-12-03 16:55:24.000000000 +0000
-@@ -245,6 +245,7 @@
-
- /* AMD64 MSRs */
- #define MSR_AMD64_NB_CFG 0xc001001f
-+#define MSR_AMD64_LS_CFG 0xc0011020
- #define MSR_AMD64_IC_CFG 0xc0011021
- #define MSR_AMD64_DC_CFG 0xc0011022
- #define AMD64_NB_CFG_CF8_EXT_ENABLE_BIT 46
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-1666 b/sysutils/xenkernel41/patches/patch-CVE-2014-1666
deleted file mode 100644
index 5606447d4cf..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-1666
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-CVE-2014-1666,v 1.1 2014/01/24 17:07:36 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-devel/2014-01/msg02075.html
-
---- xen/arch/x86/physdev.c.orig 2014-01-24 16:04:18.000000000 +0000
-+++ xen/arch/x86/physdev.c 2014-01-24 16:05:09.000000000 +0000
-@@ -554,7 +554,9 @@ ret_t do_physdev_op(int cmd, XEN_GUEST_H
- case PHYSDEVOP_release_msix: {
- struct physdev_pci_device dev;
-
-- if ( copy_from_guest(&dev, arg, 1) )
-+ if ( !IS_PRIV(v->domain) )
-+ ret = -EPERM;
-+ else if ( copy_from_guest(&dev, arg, 1) )
- ret = -EFAULT;
- else if ( dev.seg )
- ret = -EOPNOTSUPP;
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-3124 b/sysutils/xenkernel41/patches/patch-CVE-2014-3124
deleted file mode 100644
index 1980d7b8f45..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-3124
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-CVE-2014-3124,v 1.2 2015/12/29 04:04:32 dholland Exp $
-
---- xen/include/asm-x86/p2m.h.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/include/asm-x86/p2m.h 2014-04-30 13:11:30.000000000 +0000
-@@ -134,6 +134,13 @@ typedef enum {
- | p2m_to_mask(p2m_ram_paging_in) \
- | p2m_to_mask(p2m_ram_shared))
-
-+/* Types that represent a physmap hole. */
-+#define P2M_HOLE_TYPES (p2m_to_mask(p2m_mmio_dm) \
-+ | p2m_to_mask(p2m_invalid) \
-+ | p2m_to_mask(p2m_ram_paging_in_start) \
-+ | p2m_to_mask(p2m_ram_paging_in) \
-+ | p2m_to_mask(p2m_ram_paged))
-+
- /* Grant mapping types, which map to a real machine frame in another
- * VM */
- #define P2M_GRANT_TYPES (p2m_to_mask(p2m_grant_map_rw) \
-@@ -170,6 +177,7 @@ typedef enum {
-
- /* Useful predicates */
- #define p2m_is_ram(_t) (p2m_to_mask(_t) & P2M_RAM_TYPES)
-+#define p2m_is_hole(_t) (p2m_to_mask(_t) & P2M_HOLE_TYPES)
- #define p2m_is_mmio(_t) (p2m_to_mask(_t) & P2M_MMIO_TYPES)
- #define p2m_is_readonly(_t) (p2m_to_mask(_t) & P2M_RO_TYPES)
- #define p2m_is_magic(_t) (p2m_to_mask(_t) & P2M_MAGIC_TYPES)
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-4021 b/sysutils/xenkernel41/patches/patch-CVE-2014-4021
deleted file mode 100644
index e5c196eaf94..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-4021
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-CVE-2014-4021,v 1.1 2014/06/18 13:47:08 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-devel/2014-06/msg02095.html
-
---- xen/common/page_alloc.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/common/page_alloc.c 2014-06-18 10:36:33.000000000 +0000
-@@ -1123,7 +1123,10 @@ void free_xenheap_pages(void *v, unsigne
- pg = virt_to_page(v);
-
- for ( i = 0; i < (1u << order); i++ )
-+ {
-+ scrub_one_page(&pg[i]);
- pg[i].count_info &= ~PGC_xen_heap;
-+ }
-
- free_heap_pages(pg, order);
- }
-@@ -1290,6 +1293,8 @@ void free_domheap_pages(struct page_info
- else
- {
- /* Freeing anonymous domain-heap pages. */
-+ for ( i = 0; i < (1 << order); i++ )
-+ scrub_one_page(&pg[i]);
- free_heap_pages(pg, order);
- drop_dom_ref = 0;
- }
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-7154 b/sysutils/xenkernel41/patches/patch-CVE-2014-7154
deleted file mode 100644
index 1a60d8ed127..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-7154
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-CVE-2014-7154,v 1.1 2014/09/26 10:45:00 bouyer Exp $
-
-x86/shadow: fix race condition sampling the dirty vram state
-
-d->arch.hvm_domain.dirty_vram must be read with the domain's paging lock held.
-
-If not, two concurrent hypercalls could both end up attempting to free
-dirty_vram (the second of which will free a wild pointer), or both end up
-allocating a new dirty_vram structure (the first of which will be leaked).
-
-This is XSA-104.
-
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Tim Deegan <tim@xen.org>
-
---- xen/arch/x86/mm/shadow/common.c.orig 2013-09-10 08:42:18.000000000 +0200
-+++ xen/arch/x86/mm/shadow/common.c 2014-09-26 12:21:33.000000000 +0200
-@@ -3640,7 +3640,7 @@
- int flush_tlb = 0;
- unsigned long i;
- p2m_type_t t;
-- struct sh_dirty_vram *dirty_vram = d->arch.hvm_domain.dirty_vram;
-+ struct sh_dirty_vram *dirty_vram;
- struct p2m_domain *p2m = p2m_get_hostp2m(d);
-
- if (end_pfn < begin_pfn
-@@ -3649,6 +3649,7 @@
- return -EINVAL;
-
- shadow_lock(d);
-+ dirty_vram = d->arch.hvm_domain.dirty_vram;
-
- if ( dirty_vram && (!nr ||
- ( begin_pfn != dirty_vram->begin_pfn
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-7155 b/sysutils/xenkernel41/patches/patch-CVE-2014-7155
deleted file mode 100644
index 8b7388e9dbe..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-7155
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD: patch-CVE-2014-7155,v 1.1 2014/09/26 10:45:00 bouyer Exp $
-
-x86/emulate: check cpl for all privileged instructions
-
-Without this, it is possible for userspace to load its own IDT or GDT.
-
-This is XSA-105.
-
-Reported-by: Andrei LUTAS <vlutas@bitdefender.com>
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Tested-by: Andrei LUTAS <vlutas@bitdefender.com>
-
---- xen/arch/x86/x86_emulate/x86_emulate.c.orig
-+++ xen/arch/x86/x86_emulate/x86_emulate.c
-@@ -3314,6 +3314,7 @@ x86_emulate(
- goto swint;
-
- case 0xf4: /* hlt */
-+ generate_exception_if(!mode_ring0(), EXC_GP, 0);
- ctxt->retire.flags.hlt = 1;
- break;
-
-@@ -3710,6 +3711,7 @@ x86_emulate(
- break;
- case 2: /* lgdt */
- case 3: /* lidt */
-+ generate_exception_if(!mode_ring0(), EXC_GP, 0);
- generate_exception_if(ea.type != OP_MEM, EXC_UD, -1);
- fail_if(ops->write_segment == NULL);
- memset(&reg, 0, sizeof(reg));
-@@ -3738,6 +3740,7 @@ x86_emulate(
- case 6: /* lmsw */
- fail_if(ops->read_cr == NULL);
- fail_if(ops->write_cr == NULL);
-+ generate_exception_if(!mode_ring0(), EXC_GP, 0);
- if ( (rc = ops->read_cr(0, &cr0, ctxt)) )
- goto done;
- if ( ea.type == OP_REG )
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-7156 b/sysutils/xenkernel41/patches/patch-CVE-2014-7156
deleted file mode 100644
index ab28472ef3d..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-7156
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-CVE-2014-7156,v 1.1 2014/09/26 10:45:00 bouyer Exp $
-
-x86emul: only emulate software interrupt injection for real mode
-
-Protected mode emulation currently lacks proper privilege checking of
-the referenced IDT entry, and there's currently no legitimate way for
-any of the respective instructions to reach the emulator when the guest
-is in protected mode.
-
-This is XSA-106.
-
-Reported-by: Andrei LUTAS <vlutas@bitdefender.com>
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Acked-by: Keir Fraser <keir@xen.org>
-
---- xen/arch/x86/x86_emulate/x86_emulate.c.orig
-+++ xen/arch/x86/x86_emulate/x86_emulate.c
-@@ -2634,6 +2634,7 @@ x86_emulate(
- case 0xcd: /* int imm8 */
- src.val = insn_fetch_type(uint8_t);
- swint:
-+ fail_if(!in_realmode(ctxt, ops)); /* XSA-106 */
- fail_if(ops->inject_sw_interrupt == NULL);
- rc = ops->inject_sw_interrupt(src.val, _regs.eip - ctxt->regs->eip,
- ctxt) ? : X86EMUL_EXCEPTION;
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-8594 b/sysutils/xenkernel41/patches/patch-CVE-2014-8594
deleted file mode 100644
index 3d2e8b43465..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-8594
+++ /dev/null
@@ -1,27 +0,0 @@
-$NetBSD: patch-CVE-2014-8594,v 1.1 2014/11/27 15:36:02 bouyer Exp $
-
-x86: don't allow page table updates on non-PV page tables in do_mmu_update()
-
-paging_write_guest_entry() and paging_cmpxchg_guest_entry() aren't
-consistently supported for non-PV guests (they'd deref NULL for PVH or
-non-HAP HVM ones). Don't allow respective MMU_* operations on the
-page tables of such domains.
-
-This is XSA-109.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Acked-by: Tim Deegan <tim@xen.org>
-
---- xen/arch/x86/mm.c.orig 2014-11-27 15:21:15.000000000 +0100
-+++ xen/arch/x86/mm.c 2014-11-27 15:26:06.000000000 +0100
-@@ -3695,6 +3695,10 @@
- {
- p2m_type_t p2mt;
-
-+ rc = -EOPNOTSUPP;
-+ if ( unlikely(paging_mode_refcounts(pt_owner)) )
-+ break;
-+
- rc = xsm_mmu_normal_update(d, pg_owner, req.val);
- if ( rc )
- break;
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-8595 b/sysutils/xenkernel41/patches/patch-CVE-2014-8595
deleted file mode 100644
index 66954ed447c..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-8595
+++ /dev/null
@@ -1,158 +0,0 @@
-$NetBSD: patch-CVE-2014-8595,v 1.1 2014/11/27 15:36:02 bouyer Exp $
-
-x86emul: enforce privilege level restrictions when loading CS
-
-Privilege level checks were basically missing for the CS case, the
-only check that was done (RPL == DPL for nonconforming segments)
-was solely covering a single special case (return to non-conforming
-segment).
-
-Additionally in long mode the L bit set requires the D bit to be clear,
-as was recently pointed out for KVM by Nadav Amit
-<namit@cs.technion.ac.il>.
-
-Finally we also need to force the loaded selector's RPL to CPL (at
-least as long as lret/retf emulation doesn't support privilege level
-changes).
-
-This is XSA-110.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Tim Deegan <tim@xen.org>
-
---- xen/arch/x86/x86_emulate/x86_emulate.c.orig
-+++ xen/arch/x86/x86_emulate/x86_emulate.c
-@@ -1107,7 +1107,7 @@ realmode_load_seg(
- static int
- protmode_load_seg(
- enum x86_segment seg,
-- uint16_t sel,
-+ uint16_t sel, bool_t is_ret,
- struct x86_emulate_ctxt *ctxt,
- const struct x86_emulate_ops *ops)
- {
-@@ -1179,9 +1179,23 @@ protmode_load_seg(
- /* Code segment? */
- if ( !(desc.b & (1u<<11)) )
- goto raise_exn;
-- /* Non-conforming segment: check DPL against RPL. */
-- if ( ((desc.b & (6u<<9)) != (6u<<9)) && (dpl != rpl) )
-+ if ( is_ret
-+ ? /*
-+ * Really rpl < cpl, but our sole caller doesn't handle
-+ * privilege level changes.
-+ */
-+ rpl != cpl || (desc.b & (1 << 10) ? dpl > rpl : dpl != rpl)
-+ : desc.b & (1 << 10)
-+ /* Conforming segment: check DPL against CPL. */
-+ ? dpl > cpl
-+ /* Non-conforming segment: check RPL and DPL against CPL. */
-+ : rpl > cpl || dpl != cpl )
- goto raise_exn;
-+ /* 64-bit code segments (L bit set) must have D bit clear. */
-+ if ( in_longmode(ctxt, ops) &&
-+ (desc.b & (1 << 21)) && (desc.b & (1 << 22)) )
-+ goto raise_exn;
-+ sel = (sel ^ rpl) | cpl;
- break;
- case x86_seg_ss:
- /* Writable data segment? */
-@@ -1246,7 +1260,7 @@ protmode_load_seg(
- static int
- load_seg(
- enum x86_segment seg,
-- uint16_t sel,
-+ uint16_t sel, bool_t is_ret,
- struct x86_emulate_ctxt *ctxt,
- const struct x86_emulate_ops *ops)
- {
-@@ -1255,7 +1269,7 @@ load_seg(
- return X86EMUL_UNHANDLEABLE;
-
- if ( in_protmode(ctxt, ops) )
-- return protmode_load_seg(seg, sel, ctxt, ops);
-+ return protmode_load_seg(seg, sel, is_ret, ctxt, ops);
-
- return realmode_load_seg(seg, sel, ctxt, ops);
- }
-@@ -1852,7 +1866,7 @@ x86_emulate(
- if ( (rc = read_ulong(x86_seg_ss, sp_post_inc(op_bytes),
- &dst.val, op_bytes, ctxt, ops)) != 0 )
- goto done;
-- if ( (rc = load_seg(src.val, (uint16_t)dst.val, ctxt, ops)) != 0 )
-+ if ( (rc = load_seg(src.val, dst.val, 0, ctxt, ops)) != 0 )
- return rc;
- break;
-
-@@ -2222,7 +2236,7 @@ x86_emulate(
- enum x86_segment seg = decode_segment(modrm_reg);
- generate_exception_if(seg == decode_segment_failed, EXC_UD, -1);
- generate_exception_if(seg == x86_seg_cs, EXC_UD, -1);
-- if ( (rc = load_seg(seg, (uint16_t)src.val, ctxt, ops)) != 0 )
-+ if ( (rc = load_seg(seg, src.val, 0, ctxt, ops)) != 0 )
- goto done;
- if ( seg == x86_seg_ss )
- ctxt->retire.flags.mov_ss = 1;
-@@ -2303,7 +2317,7 @@ x86_emulate(
- &_regs.eip, op_bytes, ctxt)) )
- goto done;
-
-- if ( (rc = load_seg(x86_seg_cs, sel, ctxt, ops)) != 0 )
-+ if ( (rc = load_seg(x86_seg_cs, sel, 0, ctxt, ops)) != 0 )
- goto done;
- _regs.eip = eip;
- break;
-@@ -2526,7 +2540,7 @@ x86_emulate(
- if ( (rc = read_ulong(src.mem.seg, src.mem.off + src.bytes,
- &sel, 2, ctxt, ops)) != 0 )
- goto done;
-- if ( (rc = load_seg(dst.val, (uint16_t)sel, ctxt, ops)) != 0 )
-+ if ( (rc = load_seg(dst.val, sel, 0, ctxt, ops)) != 0 )
- goto done;
- dst.val = src.val;
- break;
-@@ -2600,7 +2614,7 @@ x86_emulate(
- &dst.val, op_bytes, ctxt, ops)) ||
- (rc = read_ulong(x86_seg_ss, sp_post_inc(op_bytes + offset),
- &src.val, op_bytes, ctxt, ops)) ||
-- (rc = load_seg(x86_seg_cs, (uint16_t)src.val, ctxt, ops)) )
-+ (rc = load_seg(x86_seg_cs, src.val, 1, ctxt, ops)) )
- goto done;
- _regs.eip = dst.val;
- break;
-@@ -2647,7 +2661,7 @@ x86_emulate(
- _regs.eflags &= mask;
- _regs.eflags |= (uint32_t)(eflags & ~mask) | 0x02;
- _regs.eip = eip;
-- if ( (rc = load_seg(x86_seg_cs, (uint16_t)cs, ctxt, ops)) != 0 )
-+ if ( (rc = load_seg(x86_seg_cs, cs, 1, ctxt, ops)) != 0 )
- goto done;
- break;
- }
-@@ -3277,7 +3291,7 @@ x86_emulate(
- generate_exception_if(mode_64bit(), EXC_UD, -1);
- eip = insn_fetch_bytes(op_bytes);
- sel = insn_fetch_type(uint16_t);
-- if ( (rc = load_seg(x86_seg_cs, sel, ctxt, ops)) != 0 )
-+ if ( (rc = load_seg(x86_seg_cs, sel, 0, ctxt, ops)) != 0 )
- goto done;
- _regs.eip = eip;
- break;
-@@ -3590,7 +3604,7 @@ x86_emulate(
- goto done;
- }
-
-- if ( (rc = load_seg(x86_seg_cs, sel, ctxt, ops)) != 0 )
-+ if ( (rc = load_seg(x86_seg_cs, sel, 0, ctxt, ops)) != 0 )
- goto done;
- _regs.eip = dst.val;
-
-@@ -3671,7 +3685,7 @@ x86_emulate(
- generate_exception_if(!in_protmode(ctxt, ops), EXC_UD, -1);
- generate_exception_if(!mode_ring0(), EXC_GP, 0);
- if ( (rc = load_seg((modrm_reg & 1) ? x86_seg_tr : x86_seg_ldtr,
-- src.val, ctxt, ops)) != 0 )
-+ src.val, 0, ctxt, ops)) != 0 )
- goto done;
- break;
-
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-8866 b/sysutils/xenkernel41/patches/patch-CVE-2014-8866
deleted file mode 100644
index d65688bb667..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-8866
+++ /dev/null
@@ -1,115 +0,0 @@
-$NetBSD: patch-CVE-2014-8866,v 1.1 2014/11/27 15:36:02 bouyer Exp $
-
-x86: limit checks in hypercall_xlat_continuation() to actual arguments
-
-HVM/PVH guests can otherwise trigger the final BUG_ON() in that
-function by entering 64-bit mode, setting the high halves of affected
-registers to non-zero values, leaving 64-bit mode, and issuing a
-hypercall that might get preempted and hence become subject to
-continuation argument translation (HYPERVISOR_memory_op being the only
-one possible for HVM, PVH also having the option of using
-HYPERVISOR_mmuext_op). This issue got introduced when HVM code was
-switched to use compat_memory_op() - neither that nor
-hypercall_xlat_continuation() were originally intended to be used by
-other than PV guests (which can't enter 64-bit mode and hence have no
-way to alter the high halves of 64-bit registers).
-
-This is XSA-111.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Tim Deegan <tim@xen.org>
-
---- xen/arch/x86/domain.c.orig
-+++ xen/arch/x86/domain.c
-@@ -1921,7 +1921,8 @@ unsigned long hypercall_create_continuat
- }
-
- #ifdef CONFIG_COMPAT
--int hypercall_xlat_continuation(unsigned int *id, unsigned int mask, ...)
-+int hypercall_xlat_continuation(unsigned int *id, unsigned int nr,
-+ unsigned int mask, ...)
- {
- int rc = 0;
- struct mc_state *mcs = &current->mc_state;
-@@ -1930,7 +1931,10 @@ int hypercall_xlat_continuation(unsigned
- unsigned long nval = 0;
- va_list args;
-
-- BUG_ON(id && *id > 5);
-+ ASSERT(nr <= ARRAY_SIZE(mcs->call.args));
-+ ASSERT(!(mask >> nr));
-+
-+ BUG_ON(id && *id >= nr);
- BUG_ON(id && (mask & (1U << *id)));
-
- va_start(args, mask);
-@@ -1939,7 +1943,7 @@ int hypercall_xlat_continuation(unsigned
- {
- if ( !test_bit(_MCSF_call_preempted, &mcs->flags) )
- return 0;
-- for ( i = 0; i < 6; ++i, mask >>= 1 )
-+ for ( i = 0; i < nr; ++i, mask >>= 1 )
- {
- if ( mask & 1 )
- {
-@@ -1967,7 +1971,7 @@ int hypercall_xlat_continuation(unsigned
- else
- {
- regs = guest_cpu_user_regs();
-- for ( i = 0; i < 6; ++i, mask >>= 1 )
-+ for ( i = 0; i < nr; ++i, mask >>= 1 )
- {
- unsigned long *reg;
-
---- xen/common/compat/memory.c.orig
-+++ xen/common/compat/memory.c
-@@ -208,7 +208,7 @@ int compat_memory_op(unsigned int cmd, X
- break;
-
- cmd = 0;
-- if ( hypercall_xlat_continuation(&cmd, 0x02, nat.hnd, compat) )
-+ if ( hypercall_xlat_continuation(&cmd, 2, 0x02, nat.hnd, compat) )
- {
- BUG_ON(rc != __HYPERVISOR_memory_op);
- BUG_ON((cmd & MEMOP_CMD_MASK) != op);
---- xen/include/xen/compat.h.orig 2013-09-10 08:42:18.000000000 +0200
-+++ xen/include/xen/compat.h 2014-11-27 15:29:34.000000000 +0100
-@@ -185,7 +185,8 @@
- CHECK_FIELD_COMMON_(k, CHECK_NAME_(k, n ## __ ## f1 ## __ ## f2 ## __ ## \
- f3, F2), n, f1.f2.f3)
-
--int hypercall_xlat_continuation(unsigned int *id, unsigned int mask, ...);
-+int hypercall_xlat_continuation(unsigned int *id, unsigned int nr,
-+ unsigned int mask, ...);
-
- /* In-place translation functons: */
- struct start_info;
---- xen/arch/x86/x86_64/compat/mm.c.orig 2013-09-10 08:42:18.000000000 +0200
-+++ xen/arch/x86/x86_64/compat/mm.c 2014-11-27 15:21:15.000000000 +0100
-@@ -128,7 +128,7 @@
- break;
-
- if ( rc == __HYPERVISOR_memory_op )
-- hypercall_xlat_continuation(NULL, 0x2, nat, arg);
-+ hypercall_xlat_continuation(NULL, 2, 0x2, nat, arg);
-
- XLAT_pod_target(&cmp, nat);
-
-@@ -333,7 +333,7 @@
- left = 1;
- if ( arg1 != MMU_UPDATE_PREEMPTED )
- {
-- BUG_ON(!hypercall_xlat_continuation(&left, 0x01, nat_ops,
-+ BUG_ON(!hypercall_xlat_continuation(&left, 4, 0x01, nat_ops,
- cmp_uops));
- if ( !test_bit(_MCSF_in_multicall, &mcs->flags) )
- regs->_ecx += count - i;
-@@ -341,7 +341,7 @@
- mcs->compat_call.args[1] += count - i;
- }
- else
-- BUG_ON(hypercall_xlat_continuation(&left, 0));
-+ BUG_ON(hypercall_xlat_continuation(&left, 4, 0));
- BUG_ON(left != arg1);
- }
- else
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-8867 b/sysutils/xenkernel41/patches/patch-CVE-2014-8867
deleted file mode 100644
index bc2007d2cd4..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-8867
+++ /dev/null
@@ -1,90 +0,0 @@
-$NetBSD: patch-CVE-2014-8867,v 1.1 2014/11/27 15:36:02 bouyer Exp $
-
-x86/HVM: confine internally handled MMIO to solitary regions
-
-While it is generally wrong to cross region boundaries when dealing
-with MMIO accesses of repeated string instructions (currently only
-MOVS) as that would do things a guest doesn't expect (leaving aside
-that none of these regions would normally be accessed with repeated
-string instructions in the first place), this is even more of a problem
-for all virtual MSI-X page accesses (both msixtbl_{read,write}() can be
-made dereference NULL "entry" pointers this way) as well as undersized
-(1- or 2-byte) LAPIC writes (causing vlapic_read_aligned() to access
-space beyond the one memory page set up for holding LAPIC register
-values).
-
-Since those functions validly assume to be called only with addresses
-their respective checking functions indicated to be okay, it is generic
-code that needs to be fixed to clip the repetition count.
-
-To be on the safe side (and consistent), also do the same for buffered
-I/O intercepts, even if their only client (stdvga) doesn't put the
-hypervisor at risk (i.e. "only" guest misbehavior would result).
-
-This is CVE-2014-8867 / XSA-112.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Tim Deegan <tim@xen.org>
-
---- xen/arch/x86/hvm/intercept.c.orig
-+++ xen/arch/x86/hvm/intercept.c
-@@ -131,11 +131,24 @@ int hvm_mmio_intercept(ioreq_t *p)
- int i;
-
- for ( i = 0; i < HVM_MMIO_HANDLER_NR; i++ )
-- if ( hvm_mmio_handlers[i]->check_handler(v, p->addr) )
-+ {
-+ hvm_mmio_check_t check_handler =
-+ hvm_mmio_handlers[i]->check_handler;
-+
-+ if ( check_handler(v, p->addr) )
-+ {
-+ if ( unlikely(p->count > 1) &&
-+ !check_handler(v, unlikely(p->df)
-+ ? p->addr - (p->count - 1LL) * p->size
-+ : p->addr + (p->count - 1LL) * p->size) )
-+ p->count = 1;
-+
- return hvm_mmio_access(
- v, p,
- hvm_mmio_handlers[i]->read_handler,
- hvm_mmio_handlers[i]->write_handler);
-+ }
-+ }
-
- return X86EMUL_UNHANDLEABLE;
- }
-@@ -243,6 +256,13 @@ int hvm_io_intercept(ioreq_t *p, int typ
- if ( type == HVM_PORTIO )
- return process_portio_intercept(
- handler->hdl_list[i].action.portio, p);
-+
-+ if ( unlikely(p->count > 1) &&
-+ (unlikely(p->df)
-+ ? p->addr - (p->count - 1LL) * p->size < addr
-+ : p->addr + p->count * 1LL * p->size - 1 >= addr + size) )
-+ p->count = 1;
-+
- return handler->hdl_list[i].action.mmio(p);
- }
- }
---- xen/arch/x86/hvm/vmsi.c.orig
-+++ xen/arch/x86/hvm/vmsi.c
-@@ -236,6 +236,8 @@ static int msixtbl_read(
- rcu_read_lock(&msixtbl_rcu_lock);
-
- entry = msixtbl_find_entry(v, address);
-+ if ( !entry )
-+ goto out;
- offset = address & (PCI_MSIX_ENTRY_SIZE - 1);
-
- if ( offset != PCI_MSIX_ENTRY_VECTOR_CTRL_OFFSET )
-@@ -278,6 +280,8 @@ static int msixtbl_write(struct vcpu *v,
- rcu_read_lock(&msixtbl_rcu_lock);
-
- entry = msixtbl_find_entry(v, address);
-+ if ( !entry )
-+ goto out;
- nr_entry = (address - entry->gtable) / PCI_MSIX_ENTRY_SIZE;
-
- offset = address & (PCI_MSIX_ENTRY_SIZE - 1);
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2014-9030 b/sysutils/xenkernel41/patches/patch-CVE-2014-9030
deleted file mode 100644
index 9c7b44708ae..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2014-9030
+++ /dev/null
@@ -1,46 +0,0 @@
-$NetBSD: patch-CVE-2014-9030,v 1.1 2014/11/27 15:36:02 bouyer Exp $
-
-x86/mm: fix a reference counting error in MMU_MACHPHYS_UPDATE
-
-Any domain which can pass the XSM check against a translated guest can cause a
-page reference to be leaked.
-
-While shuffling the order of checks, drop the quite-pointless MEM_LOG(). This
-brings the check in line with similar checks in the vicinity.
-
-Discovered while reviewing the XSA-109/110 followup series.
-
-This is XSA-113.
-
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Tim Deegan <tim@xen.org>
-
---- xen/arch/x86/mm.c.orig 2014-11-27 15:21:15.000000000 +0100
-+++ xen/arch/x86/mm.c 2014-11-27 15:37:25.000000000 +0100
-@@ -3888,6 +3892,12 @@
-
- case MMU_MACHPHYS_UPDATE:
-
-+ if ( unlikely(paging_mode_translate(pg_owner)) )
-+ {
-+ rc = -EINVAL;
-+ break;
-+ }
-+
- mfn = req.ptr >> PAGE_SHIFT;
- gpfn = req.val;
-
-@@ -3901,12 +3911,6 @@
- break;
- }
-
-- if ( unlikely(paging_mode_translate(pg_owner)) )
-- {
-- MEM_LOG("Mach-phys update on auto-translate guest");
-- break;
-- }
--
- set_gpfn_from_mfn(mfn, gpfn);
- okay = 1;
-
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2015-2044 b/sysutils/xenkernel41/patches/patch-CVE-2015-2044
deleted file mode 100644
index 858e491420e..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2015-2044
+++ /dev/null
@@ -1,53 +0,0 @@
-$NetBSD: patch-CVE-2015-2044,v 1.1 2015/03/05 16:37:16 spz Exp $
-
-x86/HVM: return all ones on wrong-sized reads of system device I/O ports
-
-So far the value presented to the guest remained uninitialized.
-
-This is CVE-2015-2044 / XSA-121.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Acked-by: Ian Campbell <ian.campbell@citrix.com>
-
---- xen/arch/x86/hvm/rtc.c.orig 2014-09-02 06:22:57.000000000 +0000
-+++ xen/arch/x86/hvm/rtc.c
-@@ -408,7 +408,8 @@ static int handle_rtc_io(
-
- if ( bytes != 1 )
- {
-- gdprintk(XENLOG_WARNING, "HVM_RTC bas access\n");
-+ gdprintk(XENLOG_WARNING, "HVM_RTC bad access\n");
-+ *val = ~0;
- return X86EMUL_OKAY;
- }
-
---- xen/arch/x86/hvm/i8254.c.orig 2014-09-02 06:22:57.000000000 +0000
-+++ xen/arch/x86/hvm/i8254.c
-@@ -475,6 +475,7 @@ static int handle_pit_io(
- if ( bytes != 1 )
- {
- gdprintk(XENLOG_WARNING, "PIT bad access\n");
-+ *val = ~0;
- return X86EMUL_OKAY;
- }
-
---- xen/arch/x86/hvm/pmtimer.c.orig 2014-09-02 06:22:57.000000000 +0000
-+++ xen/arch/x86/hvm/pmtimer.c
-@@ -213,6 +213,7 @@ static int handle_pmt_io(
- if ( bytes != 4 )
- {
- gdprintk(XENLOG_WARNING, "HVM_PMT bad access\n");
-+ *val = ~0;
- return X86EMUL_OKAY;
- }
-
---- xen/arch/x86/hvm/vpic.c.orig 2014-09-02 06:22:57.000000000 +0000
-+++ xen/arch/x86/hvm/vpic.c
-@@ -324,6 +324,7 @@ static int vpic_intercept_pic_io(
- if ( bytes != 1 )
- {
- gdprintk(XENLOG_WARNING, "PIC_IO bad access size %d\n", bytes);
-+ *val = ~0;
- return X86EMUL_OKAY;
- }
-
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2015-2045 b/sysutils/xenkernel41/patches/patch-CVE-2015-2045
deleted file mode 100644
index 21b2e40e01d..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2015-2045
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-CVE-2015-2045,v 1.1 2015/03/05 16:37:16 spz Exp $
-
-pre-fill structures for certain HYPERVISOR_xen_version sub-ops
-
-... avoiding to pass hypervisor stack contents back to the caller
-through space unused by the respective strings.
-
-This is CVE-2015-2045 / XSA-122.
-
-Signed-off-by: Aaron Adams <Aaron.Adams@nccgroup.com>
-Acked-by: Jan Beulich <jbeulich@suse.com>
-Acked-by: Ian Campbell <ian.campbell@citrix.com>
-
---- xen/common/kernel.c.orig 2014-09-02 06:22:57.000000000 +0000
-+++ xen/common/kernel.c
-@@ -218,6 +218,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL
- case XENVER_extraversion:
- {
- xen_extraversion_t extraversion;
-+
-+ memset(extraversion, 0, sizeof(extraversion));
- safe_strcpy(extraversion, xen_extra_version());
- if ( copy_to_guest(arg, extraversion, ARRAY_SIZE(extraversion)) )
- return -EFAULT;
-@@ -227,6 +229,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL
- case XENVER_compile_info:
- {
- struct xen_compile_info info;
-+
-+ memset(&info, 0, sizeof(info));
- safe_strcpy(info.compiler, xen_compiler());
- safe_strcpy(info.compile_by, xen_compile_by());
- safe_strcpy(info.compile_domain, xen_compile_domain());
-@@ -263,6 +267,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDL
- case XENVER_changeset:
- {
- xen_changeset_info_t chgset;
-+
-+ memset(chgset, 0, sizeof(chgset));
- safe_strcpy(chgset, xen_changeset());
- if ( copy_to_guest(arg, chgset, ARRAY_SIZE(chgset)) )
- return -EFAULT;
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2015-2151 b/sysutils/xenkernel41/patches/patch-CVE-2015-2151
deleted file mode 100644
index 9334467e331..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2015-2151
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-CVE-2015-2151,v 1.1 2015/03/10 20:27:16 spz Exp $
-
-xsa123-4.3-4.2.patch from upstream:
-x86emul: fully ignore segment override for register-only operations
-
-For ModRM encoded instructions with register operands we must not
-overwrite ea.mem.seg (if a - bogus in that case - segment override was
-present) as it aliases with ea.reg.
-
-This is CVE-2015-2151 / XSA-123.
-
---- xen/arch/x86/x86_emulate/x86_emulate.c.orig 2015-03-10 20:10:23.000000000 +0000
-+++ xen/arch/x86/x86_emulate/x86_emulate.c
-@@ -1462,7 +1462,7 @@ x86_emulate(
- }
- }
-
-- if ( override_seg != -1 )
-+ if ( override_seg != -1 && ea.type == OP_MEM )
- ea.mem.seg = override_seg;
-
- /* Decode and fetch the source operand: register, memory or immediate. */
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2015-2752 b/sysutils/xenkernel41/patches/patch-CVE-2015-2752
deleted file mode 100644
index b6aba0008e7..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2015-2752
+++ /dev/null
@@ -1,108 +0,0 @@
-$NetBSD: patch-CVE-2015-2752,v 1.1 2015/04/19 13:13:20 spz Exp $
-
-Patch for CVE-2015-2752 aka XSA-125 from
-http://xenbits.xenproject.org/xsa/xsa125-4.2.patch
-
---- tools/libxc/xc_domain.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ tools/libxc/xc_domain.c
-@@ -1322,6 +1322,13 @@ int xc_domain_bind_pt_isa_irq(
- PT_IRQ_TYPE_ISA, 0, 0, 0, machine_irq));
- }
-
-+#ifndef min
-+#define min(X, Y) ({ \
-+ const typeof (X) _x = (X); \
-+ const typeof (Y) _y = (Y); \
-+ (void) (&_x == &_y); \
-+ (_x < _y) ? _x : _y; })
-+#endif
- int xc_domain_memory_mapping(
- xc_interface *xch,
- uint32_t domid,
-@@ -1331,17 +1338,55 @@ int xc_domain_memory_mapping(
- uint32_t add_mapping)
- {
- DECLARE_DOMCTL;
-+ int ret = 0, err;
-+ unsigned long done = 0, nr, max_batch_sz;
-+
-+ if ( !nr_mfns )
-+ return 0;
-
- domctl.cmd = XEN_DOMCTL_memory_mapping;
- domctl.domain = domid;
-- domctl.u.memory_mapping.first_gfn = first_gfn;
-- domctl.u.memory_mapping.first_mfn = first_mfn;
-- domctl.u.memory_mapping.nr_mfns = nr_mfns;
- domctl.u.memory_mapping.add_mapping = add_mapping;
-+ max_batch_sz = nr_mfns;
-+ do
-+ {
-+ nr = min(nr_mfns - done, max_batch_sz);
-+ domctl.u.memory_mapping.nr_mfns = nr;
-+ domctl.u.memory_mapping.first_gfn = first_gfn + done;
-+ domctl.u.memory_mapping.first_mfn = first_mfn + done;
-+ err = do_domctl(xch, &domctl);
-+ if ( err && errno == E2BIG )
-+ {
-+ if ( max_batch_sz <= 1 )
-+ break;
-+ max_batch_sz >>= 1;
-+ continue;
-+ }
-+ /* Save the first error... */
-+ if ( !ret )
-+ ret = err;
-+ /* .. and ignore the rest of them when removing. */
-+ if ( err && add_mapping != DPCI_REMOVE_MAPPING )
-+ break;
-+
-+ done += nr;
-+ } while ( done < nr_mfns );
-+
-+ /*
-+ * Undo what we have done unless unmapping, by unmapping the entire region.
-+ * Errors here are ignored.
-+ */
-+ if ( ret && add_mapping != DPCI_REMOVE_MAPPING )
-+ xc_domain_memory_mapping(xch, domid, first_gfn, first_mfn, nr_mfns,
-+ DPCI_REMOVE_MAPPING);
-+
-+ /* We might get E2BIG so many times that we never advance. */
-+ if ( !done && !ret )
-+ ret = -1;
-
-- return do_domctl(xch, &domctl);
-+ return ret;
- }
--
-+#undef min
- int xc_domain_ioport_mapping(
- xc_interface *xch,
- uint32_t domid,
-
---- xen/arch/x86/domctl.c.orig 2015-04-19 10:54:27.000000000 +0000
-+++ xen/arch/x86/domctl.c
-@@ -998,6 +998,11 @@ long arch_do_domctl(
- (gfn + nr_mfns - 1) < gfn ) /* wrap? */
- break;
-
-+ ret = -E2BIG;
-+ /* Must break hypercall up as this could take a while. */
-+ if ( nr_mfns > 64 )
-+ break;
-+
- ret = -EPERM;
- if ( !IS_PRIV(current->domain) &&
- !iomem_access_permitted(current->domain, mfn, mfn + nr_mfns - 1) )
-
---- xen/include/public/domctl.h.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/include/public/domctl.h
-@@ -505,6 +505,7 @@ DEFINE_XEN_GUEST_HANDLE(xen_domctl_bind_
-
-
- /* Bind machine I/O address range -> HVM address range. */
-+/* If this returns -E2BIG lower nr_mfns value. */
- /* XEN_DOMCTL_memory_mapping */
- #define DPCI_ADD_MAPPING 1
- #define DPCI_REMOVE_MAPPING 0
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2015-2756 b/sysutils/xenkernel41/patches/patch-CVE-2015-2756
deleted file mode 100644
index cbd78298c0c..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2015-2756
+++ /dev/null
@@ -1,142 +0,0 @@
-$NetBSD: patch-CVE-2015-2756,v 1.1 2015/04/19 13:13:20 spz Exp $
-
-patch for CVE-2015-2756 aka XSA-126 from
-http://xenbits.xenproject.org/xsa/xsa126-qemut.patch
-
---- tools/ioemu-qemu-xen/hw/pass-through.c.orig 2013-07-17 10:59:40.000000000 +0000
-+++ tools/ioemu-qemu-xen/hw/pass-through.c
-@@ -171,9 +171,6 @@ static int pt_word_reg_read(struct pt_de
- static int pt_long_reg_read(struct pt_dev *ptdev,
- struct pt_reg_tbl *cfg_entry,
- uint32_t *value, uint32_t valid_mask);
--static int pt_cmd_reg_read(struct pt_dev *ptdev,
-- struct pt_reg_tbl *cfg_entry,
-- uint16_t *value, uint16_t valid_mask);
- static int pt_bar_reg_read(struct pt_dev *ptdev,
- struct pt_reg_tbl *cfg_entry,
- uint32_t *value, uint32_t valid_mask);
-@@ -277,9 +274,9 @@ static struct pt_reg_info_tbl pt_emu_reg
- .size = 2,
- .init_val = 0x0000,
- .ro_mask = 0xF880,
-- .emu_mask = 0x0740,
-+ .emu_mask = 0x0743,
- .init = pt_common_reg_init,
-- .u.w.read = pt_cmd_reg_read,
-+ .u.w.read = pt_word_reg_read,
- .u.w.write = pt_cmd_reg_write,
- .u.w.restore = pt_cmd_reg_restore,
- },
-@@ -1865,7 +1862,7 @@ static int pt_dev_is_virtfn(struct pci_d
- return rc;
- }
-
--static int pt_register_regions(struct pt_dev *assigned_device)
-+static int pt_register_regions(struct pt_dev *assigned_device, uint16_t *cmd)
- {
- int i = 0;
- uint32_t bar_data = 0;
-@@ -1885,17 +1882,26 @@ static int pt_register_regions(struct pt
-
- /* Register current region */
- if ( pci_dev->base_addr[i] & PCI_ADDRESS_SPACE_IO )
-+ {
- pci_register_io_region((PCIDevice *)assigned_device, i,
- (uint32_t)pci_dev->size[i], PCI_ADDRESS_SPACE_IO,
- pt_ioport_map);
-+ *cmd |= PCI_COMMAND_IO;
-+ }
- else if ( pci_dev->base_addr[i] & PCI_ADDRESS_SPACE_MEM_PREFETCH )
-+ {
- pci_register_io_region((PCIDevice *)assigned_device, i,
- (uint32_t)pci_dev->size[i], PCI_ADDRESS_SPACE_MEM_PREFETCH,
- pt_iomem_map);
-+ *cmd |= PCI_COMMAND_MEMORY;
-+ }
- else
-+ {
- pci_register_io_region((PCIDevice *)assigned_device, i,
- (uint32_t)pci_dev->size[i], PCI_ADDRESS_SPACE_MEM,
- pt_iomem_map);
-+ *cmd |= PCI_COMMAND_MEMORY;
-+ }
-
- PT_LOG("IO region registered (size=0x%08x base_addr=0x%08x)\n",
- (uint32_t)(pci_dev->size[i]),
-@@ -3221,27 +3227,6 @@ static int pt_long_reg_read(struct pt_de
- return 0;
- }
-
--/* read Command register */
--static int pt_cmd_reg_read(struct pt_dev *ptdev,
-- struct pt_reg_tbl *cfg_entry,
-- uint16_t *value, uint16_t valid_mask)
--{
-- struct pt_reg_info_tbl *reg = cfg_entry->reg;
-- uint16_t valid_emu_mask = 0;
-- uint16_t emu_mask = reg->emu_mask;
--
-- if ( ptdev->is_virtfn )
-- emu_mask |= PCI_COMMAND_MEMORY;
-- if ( pt_is_iomul(ptdev) )
-- emu_mask |= PCI_COMMAND_IO;
--
-- /* emulate word register */
-- valid_emu_mask = emu_mask & valid_mask;
-- *value = PT_MERGE_VALUE(*value, cfg_entry->data, ~valid_emu_mask);
--
-- return 0;
--}
--
- /* read BAR */
- static int pt_bar_reg_read(struct pt_dev *ptdev,
- struct pt_reg_tbl *cfg_entry,
-@@ -3376,19 +3361,13 @@ static int pt_cmd_reg_write(struct pt_de
- uint16_t writable_mask = 0;
- uint16_t throughable_mask = 0;
- uint16_t wr_value = *value;
-- uint16_t emu_mask = reg->emu_mask;
--
-- if ( ptdev->is_virtfn )
-- emu_mask |= PCI_COMMAND_MEMORY;
-- if ( pt_is_iomul(ptdev) )
-- emu_mask |= PCI_COMMAND_IO;
-
- /* modify emulate register */
- writable_mask = ~reg->ro_mask & valid_mask;
- cfg_entry->data = PT_MERGE_VALUE(*value, cfg_entry->data, writable_mask);
-
- /* create value for writing to I/O device register */
-- throughable_mask = ~emu_mask & valid_mask;
-+ throughable_mask = ~reg->emu_mask & valid_mask;
-
- if (*value & PCI_COMMAND_DISABLE_INTx)
- {
-@@ -4151,6 +4130,7 @@ static struct pt_dev * register_real_dev
- struct pt_dev *assigned_device = NULL;
- struct pci_dev *pci_dev;
- uint8_t e_device, e_intx;
-+ uint16_t cmd = 0;
- char *key, *val;
- int msi_translate, power_mgmt;
-
-@@ -4240,7 +4220,7 @@ static struct pt_dev * register_real_dev
- assigned_device->dev.config[i] = pci_read_byte(pci_dev, i);
-
- /* Handle real device's MMIO/PIO BARs */
-- pt_register_regions(assigned_device);
-+ pt_register_regions(assigned_device, &cmd);
-
- /* Setup VGA bios for passthroughed gfx */
- if ( setup_vga_pt(assigned_device) < 0 )
-@@ -4318,6 +4298,10 @@ static struct pt_dev * register_real_dev
- }
-
- out:
-+ if (cmd)
-+ pci_write_word(pci_dev, PCI_COMMAND,
-+ *(uint16_t *)(&assigned_device->dev.config[PCI_COMMAND]) | cmd);
-+
- PT_LOG("Real physical device %02x:%02x.%x registered successfuly!\n"
- "IRQ type = %s\n", r_bus, r_dev, r_func,
- assigned_device->msi_trans_en? "MSI-INTx":"INTx");
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2015-7835 b/sysutils/xenkernel41/patches/patch-CVE-2015-7835
deleted file mode 100644
index 9b38ab4435e..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2015-7835
+++ /dev/null
@@ -1,45 +0,0 @@
-$NetBSD: patch-CVE-2015-7835,v 1.1 2015/10/29 20:29:56 bouyer Exp $
-
-Patch for CVE-2015-7835 aka XSA-148 based on
-http://xenbits.xenproject.org/xsa/xsa148-4.4.patch
-
---- xen/include/asm-x86/x86_32/page.h.orig 2015-10-29 20:35:24.000000000 +0100
-+++ xen/include/asm-x86/x86_32/page.h 2015-10-29 20:38:02.000000000 +0100
-@@ -130,7 +130,9 @@
- #define BASE_DISALLOW_MASK (0xFFFFF198U & ~_PAGE_NX)
-
- #define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB)
--#define L2_DISALLOW_MASK (BASE_DISALLOW_MASK & ~_PAGE_PSE)
-+#define L2_DISALLOW_MASK (unlikely(opt_allow_superpage) \
-+ ? BASE_DISALLOW_MASK & ~_PAGE_PSE \
-+ : BASE_DISALLOW_MASK )
- #define L3_DISALLOW_MASK 0xFFFFF1FEU /* must-be-zero */
-
- #endif /* __X86_32_PAGE_H__ */
---- xen/include/asm-x86/x86_64/page.h.orig 2015-10-29 20:35:36.000000000 +0100
-+++ xen/include/asm-x86/x86_64/page.h 2015-10-29 20:37:33.000000000 +0100
-@@ -167,7 +167,9 @@
- #define BASE_DISALLOW_MASK (0xFF800198U & ~_PAGE_NX)
-
- #define L1_DISALLOW_MASK (BASE_DISALLOW_MASK | _PAGE_GNTTAB)
--#define L2_DISALLOW_MASK (BASE_DISALLOW_MASK & ~_PAGE_PSE)
-+#define L2_DISALLOW_MASK (unlikely(opt_allow_superpage) \
-+ ? BASE_DISALLOW_MASK & ~_PAGE_PSE \
-+ : BASE_DISALLOW_MASK )
- #define L3_DISALLOW_MASK (BASE_DISALLOW_MASK)
- #define L4_DISALLOW_MASK (BASE_DISALLOW_MASK)
-
---- xen/arch/x86/mm.c.orig 2015-10-29 20:30:55.000000000 +0100
-+++ xen/arch/x86/mm.c 2015-10-29 20:32:56.000000000 +0100
-@@ -1898,7 +1898,10 @@
- }
-
- /* Fast path for identical mapping and presence. */
-- if ( !l2e_has_changed(ol2e, nl2e, _PAGE_PRESENT) )
-+ if ( !l2e_has_changed(ol2e, nl2e,
-+ unlikely(opt_allow_superpage)
-+ ? _PAGE_PSE | _PAGE_RW | _PAGE_PRESENT
-+ : _PAGE_PRESENT) )
- {
- adjust_guest_l2e(nl2e, d);
- rc = UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, vcpu, preserve_ad);
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2015-7969 b/sysutils/xenkernel41/patches/patch-CVE-2015-7969
deleted file mode 100644
index 200c1dd57c3..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2015-7969
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD: patch-CVE-2015-7969,v 1.1 2015/10/29 20:29:56 bouyer Exp $
-
-Patch for CVE-2015-7869 aka XSA-149 + XSA-151 based on
-http://xenbits.xenproject.org/xsa/xsa149.patch
-http://xenbits.xenproject.org/xsa/xsa151.patch
-
---- xen/common/domain.c.orig 2013-09-10 08:42:18.000000000 +0200
-+++ xen/common/domain.c 2015-10-29 20:44:06.000000000 +0100
-@@ -671,6 +671,7 @@
- xfree(d->pirq_to_evtchn);
-
- xsm_free_security_domain(d);
-+ xfree(d->vcpu);
- free_domain_struct(d);
-
- send_guest_global_virq(dom0, VIRQ_DOM_EXC);
-
---- xen/common/xenoprof.c.orig
-+++ xen/common/xenoprof.c
-@@ -239,6 +239,7 @@ static int alloc_xenoprof_struct(
- d->xenoprof->rawbuf = alloc_xenheap_pages(get_order_from_pages(npages), 0);
- if ( d->xenoprof->rawbuf == NULL )
- {
-+ xfree(d->xenoprof->vcpu);
- xfree(d->xenoprof);
- d->xenoprof = NULL;
- return -ENOMEM;
-@@ -286,6 +287,7 @@ void free_xenoprof_pages(struct domain *
- free_xenheap_pages(x->rawbuf, order);
- }
-
-+ xfree(x->vcpu);
- xfree(x);
- d->xenoprof = NULL;
- }
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2015-7971 b/sysutils/xenkernel41/patches/patch-CVE-2015-7971
deleted file mode 100644
index d104a07fd6c..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2015-7971
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD: patch-CVE-2015-7971,v 1.1 2015/10/29 20:29:56 bouyer Exp $
-
-Patch for CVE-2015-7971 aka XSA-152, based on
-http://xenbits.xenproject.org/xsa/xsa152.patch
-
---- xen/common/xenoprof.c.orig
-+++ xen/common/xenoprof.c
-@@ -676,15 +676,13 @@ ret_t do_xenoprof_op(int op, XEN_GUEST_H
-
- if ( (op < 0) || (op > XENOPROF_last_op) )
- {
-- printk("xenoprof: invalid operation %d for domain %d\n",
-- op, current->domain->domain_id);
-+ gdprintk(XENLOG_DEBUG, "invalid operation %d\n", op);
- return -EINVAL;
- }
-
- if ( !NONPRIV_OP(op) && (current->domain != xenoprof_primary_profiler) )
- {
-- printk("xenoprof: dom %d denied privileged operation %d\n",
-- current->domain->domain_id, op);
-+ gdprintk(XENLOG_DEBUG, "denied privileged operation %d\n", op);
- return -EPERM;
- }
-
-@@ -907,8 +905,7 @@ ret_t do_xenoprof_op(int op, XEN_GUEST_H
- spin_unlock(&xenoprof_lock);
-
- if ( ret < 0 )
-- printk("xenoprof: operation %d failed for dom %d (status : %d)\n",
-- op, current->domain->domain_id, ret);
-+ gdprintk(XENLOG_DEBUG, "operation %d failed: %d\n", op, ret);
-
- return ret;
- }
diff --git a/sysutils/xenkernel41/patches/patch-CVE-2015-8339 b/sysutils/xenkernel41/patches/patch-CVE-2015-8339
deleted file mode 100644
index d6b2dc9e78c..00000000000
--- a/sysutils/xenkernel41/patches/patch-CVE-2015-8339
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-CVE-2015-8339,v 1.1 2016/01/07 17:55:55 bouyer Exp $
-
-Patch for CVE-2015-8339 and CVE-2015-8340 aka XSA-159, based on
-http://xenbits.xenproject.org/xsa/xsa159.patch
-
---- xen/common/memory.c.orig 2013-09-10 08:42:18.000000000 +0200
-+++ xen/common/memory.c 2016-01-07 14:39:42.000000000 +0100
-@@ -487,7 +487,11 @@
- /* Reassign any input pages we managed to steal. */
- while ( (page = page_list_remove_head(&in_chunk_list)) )
- if ( assign_pages(d, page, 0, MEMF_no_refcount) )
-- BUG();
-+ {
-+ BUG_ON(!d->is_dying);
-+ if ( test_and_clear_bit(_PGC_allocated, &page->count_info) )
-+ put_page(page);
-+ }
- dying:
- rcu_unlock_domain(d);
- /* Free any output pages we managed to allocate. */
diff --git a/sysutils/xenkernel41/patches/patch-Config.mk b/sysutils/xenkernel41/patches/patch-Config.mk
deleted file mode 100644
index 8bd5cdcb667..00000000000
--- a/sysutils/xenkernel41/patches/patch-Config.mk
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-Config.mk,v 1.1 2013/04/11 19:57:51 joerg Exp $
-
---- Config.mk.orig 2012-12-18 12:54:16.000000000 +0000
-+++ Config.mk
-@@ -16,6 +16,8 @@ SHELL ?= /bin/sh
- HOSTCC = gcc
- HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
- HOSTCFLAGS += -fno-strict-aliasing
-+HOSTCFLAGS += ${EXTRA_CFLAGS}
-+CFLAGS += ${EXTRA_CFLAGS}
-
- DISTDIR ?= $(XEN_ROOT)/dist
- DESTDIR ?= /
diff --git a/sysutils/xenkernel41/patches/patch-XSA-166 b/sysutils/xenkernel41/patches/patch-XSA-166
deleted file mode 100644
index 2e3e322007a..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-166
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-XSA-166,v 1.1 2016/01/07 17:55:55 bouyer Exp $
-
-Patch for XSA-166, based on
-http://xenbits.xenproject.org/xsa/xsa166-4.3.patch
-
---- xen/arch/x86/hvm/hvm.c.orig
-+++ xen/arch/x86/hvm/hvm.c
-@@ -342,6 +342,7 @@ void hvm_migrate_pirqs(struct vcpu *v)
- void hvm_do_resume(struct vcpu *v)
- {
- ioreq_t *p;
-+ unsigned int state;
-
- pt_restore_timer(v);
-
-@@ -349,9 +350,10 @@ void hvm_do_resume(struct vcpu *v)
-
- /* NB. Optimised for common case (p->state == STATE_IOREQ_NONE). */
- p = get_ioreq(v);
-- while ( p->state != STATE_IOREQ_NONE )
-+ while ( (state = p->state) != STATE_IOREQ_NONE )
- {
-- switch ( p->state )
-+ rmb();
-+ switch ( state )
- {
- case STATE_IORESP_READY: /* IORESP_READY -> NONE */
- hvm_io_assist();
-@@ -359,11 +361,10 @@ void hvm_do_resume(struct vcpu *v)
- case STATE_IOREQ_READY: /* IOREQ_{READY,INPROCESS} -> IORESP_READY */
- case STATE_IOREQ_INPROCESS:
- wait_on_xen_event_channel(v->arch.hvm_vcpu.xen_port,
-- (p->state != STATE_IOREQ_READY) &&
-- (p->state != STATE_IOREQ_INPROCESS));
-+ p->state != state);
- break;
- default:
-- gdprintk(XENLOG_ERR, "Weird HVM iorequest state %d.\n", p->state);
-+ gdprintk(XENLOG_ERR, "Weird HVM iorequest state %u\n", state);
- domain_crash(v->domain);
- return; /* bail */
- }
diff --git a/sysutils/xenkernel41/patches/patch-XSA-182 b/sysutils/xenkernel41/patches/patch-XSA-182
deleted file mode 100644
index 04f4a45b0c4..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-182
+++ /dev/null
@@ -1,90 +0,0 @@
-$NetBSD: patch-XSA-182,v 1.1 2016/07/26 15:59:20 bouyer Exp $
-
-backported from:
-
-From 798c1498f764bfaa7b0b955bab40b01b0610d372 Mon Sep 17 00:00:00 2001
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Date: Mon, 11 Jul 2016 14:32:03 +0100
-Subject: [PATCH] x86/pv: Remove unsafe bits from the mod_l?_entry() fastpath
-
-All changes in writeability and cacheability must go through full
-re-validation.
-
-Rework the logic as a whitelist, to make it clearer to follow.
-
-This is XSA-182
-
---- xen/arch/x86/mm.c.orig 2016-07-26 16:51:13.000000000 +0200
-+++ xen/arch/x86/mm.c 2016-07-26 16:53:07.000000000 +0200
-@@ -1792,6 +1792,14 @@
- _t ## e_get_intpte(_o), _t ## e_get_intpte(_n), \
- (_m), (_v), (_ad))
-
-+/*
-+ * PTE flags that a guest may change without re-validating the PTE.
-+ * All other bits affect translation, caching, or Xen's safety.
-+ */
-+#define FASTPATH_FLAG_WHITELIST \
-+ (_PAGE_NX_BIT | _PAGE_AVAIL_HIGH | _PAGE_AVAIL | _PAGE_GLOBAL | \
-+ _PAGE_DIRTY | _PAGE_ACCESSED | _PAGE_USER)
-+
- /* Update the L1 entry at pl1e to new value nl1e. */
- static int mod_l1_entry(l1_pgentry_t *pl1e, l1_pgentry_t nl1e,
- unsigned long gl1mfn, int preserve_ad,
-@@ -1829,8 +1837,8 @@
- return 0;
- }
-
-- /* Fast path for identical mapping, r/w and presence. */
-- if ( !l1e_has_changed(ol1e, nl1e, _PAGE_RW | _PAGE_PRESENT) )
-+ /* Fast path for sufficiently-similar mappings.*/
-+ if ( !l1e_has_changed(ol1e, nl1e, ~FASTPATH_FLAG_WHITELIST) )
- {
- adjust_guest_l1e(nl1e, pt_dom);
- rc = UPDATE_ENTRY(l1, pl1e, ol1e, nl1e, gl1mfn, pt_vcpu,
-@@ -1897,11 +1905,8 @@
- return 0;
- }
-
-- /* Fast path for identical mapping and presence. */
-- if ( !l2e_has_changed(ol2e, nl2e,
-- unlikely(opt_allow_superpage)
-- ? _PAGE_PSE | _PAGE_RW | _PAGE_PRESENT
-- : _PAGE_PRESENT) )
-+ /* Fast path for sufficiently-similar mappings. */
-+ if ( !l2e_has_changed(ol2e, nl2e, ~FASTPATH_FLAG_WHITELIST) )
- {
- adjust_guest_l2e(nl2e, d);
- rc = UPDATE_ENTRY(l2, pl2e, ol2e, nl2e, pfn, vcpu, preserve_ad);
-@@ -1965,8 +1970,8 @@
- return -EINVAL;
- }
-
-- /* Fast path for identical mapping and presence. */
-- if ( !l3e_has_changed(ol3e, nl3e, _PAGE_PRESENT) )
-+ /* Fast path for sufficiently-similar mappings. */
-+ if ( !l3e_has_changed(ol3e, nl3e, ~FASTPATH_FLAG_WHITELIST) )
- {
- adjust_guest_l3e(nl3e, d);
- rc = UPDATE_ENTRY(l3, pl3e, ol3e, nl3e, pfn, vcpu, preserve_ad);
-@@ -2035,8 +2040,8 @@
- return -EINVAL;
- }
-
-- /* Fast path for identical mapping and presence. */
-- if ( !l4e_has_changed(ol4e, nl4e, _PAGE_PRESENT) )
-+ /* Fast path for sufficiently-similar mappings. */
-+ if ( !l4e_has_changed(ol4e, nl4e, ~FASTPATH_FLAG_WHITELIST) )
- {
- adjust_guest_l4e(nl4e, d);
- rc = UPDATE_ENTRY(l4, pl4e, ol4e, nl4e, pfn, vcpu, preserve_ad);
---- xen/include/asm-x86/page.h.orig 2014-09-02 08:22:57.000000000 +0200
-+++ xen/include/asm-x86/page.h 2016-07-26 16:39:51.000000000 +0200
-@@ -332,6 +332,7 @@
- #define _PAGE_AVAIL2 0x800U
- #define _PAGE_AVAIL 0xE00U
- #define _PAGE_PSE_PAT 0x1000U
-+#define _PAGE_AVAIL_HIGH (0x7ffU << 12)
- #define _PAGE_PAGED 0x2000U
- #define _PAGE_SHARED 0x4000U
-
diff --git a/sysutils/xenkernel41/patches/patch-XSA-185 b/sysutils/xenkernel41/patches/patch-XSA-185
deleted file mode 100644
index b1d13bac5e7..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-185
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD: patch-XSA-185,v 1.1 2016/09/08 15:41:01 bouyer Exp $
-
-From 30aba4992b18245c436f16df7326a16c01a51570 Mon Sep 17 00:00:00 2001
-From: Jan Beulich <jbeulich@suse.com>
-Date: Mon, 8 Aug 2016 10:58:12 +0100
-Subject: x86/32on64: don't allow recursive page tables from L3
-
-L3 entries are special in PAE mode, and hence can't reasonably be used
-for setting up recursive (and hence linear) page table mappings. Since
-abuse is possible when the guest in fact gets run on 4-level page
-tables, this needs to be excluded explicitly.
-
-This is XSA-185.
-
-Reported-by: Jérémie Boutoille <jboutoille@ext.quarkslab.com>
-Reported-by: 栾尚聪(好风) <shangcong.lsc@alibaba-inc.com>
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
----
- xen/arch/x86/mm.c | 4 +++-
- 1 file changed, 3 insertions(+), 1 deletion(-)
-
-diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c
-index 109b8be..69b8b8d 100644
---- xen/arch/x86/mm.c.orig
-+++ xen/arch/x86/mm.c
-@@ -1122,7 +1122,9 @@ get_page_from_l3e(
-
- rc = get_page_and_type_from_pagenr(
- l3e_get_pfn(l3e), PGT_l2_page_table, d, partial, 1);
-- if ( unlikely(rc == -EINVAL) && get_l3_linear_pagetable(l3e, pfn, d) )
-+ if ( unlikely(rc == -EINVAL) &&
-+ !is_pv_32bit_domain(d) &&
-+ get_l3_linear_pagetable(l3e, pfn, d) )
- rc = 0;
-
- return rc;
diff --git a/sysutils/xenkernel41/patches/patch-XSA-187-1 b/sysutils/xenkernel41/patches/patch-XSA-187-1
deleted file mode 100644
index 6481bcb5ace..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-187-1
+++ /dev/null
@@ -1,44 +0,0 @@
-$NetBSD: patch-XSA-187-1,v 1.1 2016/09/08 15:41:01 bouyer Exp $
-
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Subject: x86/shadow: Avoid overflowing sh_ctxt->seg_reg[]
-
-hvm_get_seg_reg() does not perform a range check on its input segment, calls
-hvm_get_segment_register() and writes straight into sh_ctxt->seg_reg[].
-
-x86_seg_none is outside the bounds of sh_ctxt->seg_reg[], and will hit a BUG()
-in {vmx,svm}_get_segment_register().
-
-HVM guests running with shadow paging can end up performing a virtual to
-linear translation with x86_seg_none. This is used for addresses which are
-already linear. However, none of this is a legitimate pagetable update, so
-fail the emulation in such a case.
-
-This is XSA-187
-
-Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Tim Deegan <tim@xen.org>
-
---- xen/arch/x86/mm/shadow/common.c.orig
-+++ xen/arch/x86/mm/shadow/common.c
-@@ -140,9 +140,18 @@ static int hvm_translate_linear_addr(
- struct sh_emulate_ctxt *sh_ctxt,
- unsigned long *paddr)
- {
-- struct segment_register *reg = hvm_get_seg_reg(seg, sh_ctxt);
-+ struct segment_register *reg;
- int okay;
-
-+ /*
-+ * Can arrive here with non-user segments. However, no such cirucmstance
-+ * is part of a legitimate pagetable update, so fail the emulation.
-+ */
-+ if ( !is_x86_user_segment(seg) )
-+ return X86EMUL_UNHANDLEABLE;
-+
-+ reg = hvm_get_seg_reg(seg, sh_ctxt);
-+
- okay = hvm_virtual_to_linear_addr(
- seg, reg, offset, bytes, access_type, sh_ctxt->ctxt.addr_size, paddr);
-
diff --git a/sysutils/xenkernel41/patches/patch-XSA-187-2 b/sysutils/xenkernel41/patches/patch-XSA-187-2
deleted file mode 100644
index 0fa5b0a3cc8..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-187-2
+++ /dev/null
@@ -1,152 +0,0 @@
-$NetBSD: patch-XSA-187-2,v 1.1 2016/09/08 15:41:01 bouyer Exp $
-
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Subject: x86/segment: Bounds check accesses to emulation ctxt->seg_reg[]
-
-HVM HAP codepaths have space for all segment registers in the seg_reg[]
-cache (with x86_seg_none still risking an array overrun), while the shadow
-codepaths only have space for the user segments.
-
-Range check the input segment of *_get_seg_reg() against the size of the array
-used to cache the results, to avoid overruns in the case that the callers
-don't filter their input suitably.
-
-Subsume the is_x86_user_segment(seg) checks from the shadow code, which were
-an incomplete attempt at range checking, and are now superceeded. Make
-hvm_get_seg_reg() static, as it is not used outside of shadow/common.c
-
-No functional change, but far easier to reason that no overflow is possible.
-
-Reported-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Acked-by: Tim Deegan <tim@xen.org>
-Acked-by: Jan Beulich <jbeulich@suse.com>
-
---- xen/include/asm-x86/hvm/emulate.h.orig 2014-09-02 08:22:57.000000000 +0200
-+++ xen/include/asm-x86/hvm/emulate.h 2016-09-08 15:57:32.000000000 +0200
-@@ -13,6 +13,7 @@
- #define __ASM_X86_HVM_EMULATE_H__
-
- #include <xen/config.h>
-+#include <xen/err.h>
- #include <asm/x86_emulate.h>
-
- struct hvm_emulate_ctxt {
---- xen/arch/x86/hvm/emulate.c.orig 2014-09-02 08:22:57.000000000 +0200
-+++ xen/arch/x86/hvm/emulate.c 2016-09-08 16:01:31.000000000 +0200
-@@ -390,6 +390,8 @@
- *reps = min_t(unsigned long, *reps, 4096);
-
- reg = hvmemul_get_seg_reg(seg, hvmemul_ctxt);
-+ if ( IS_ERR(reg) )
-+ return -PTR_ERR(reg);
-
- if ( (hvmemul_ctxt->ctxt.regs->eflags & X86_EFLAGS_DF) && (*reps > 1) )
- {
-@@ -777,6 +779,10 @@
- struct hvm_emulate_ctxt *hvmemul_ctxt =
- container_of(ctxt, struct hvm_emulate_ctxt, ctxt);
- struct segment_register *sreg = hvmemul_get_seg_reg(seg, hvmemul_ctxt);
-+
-+ if ( IS_ERR(sreg) )
-+ return -PTR_ERR(sreg);
-+
- memcpy(reg, sreg, sizeof(struct segment_register));
- return X86EMUL_OKAY;
- }
-@@ -790,6 +796,9 @@
- container_of(ctxt, struct hvm_emulate_ctxt, ctxt);
- struct segment_register *sreg = hvmemul_get_seg_reg(seg, hvmemul_ctxt);
-
-+ if ( IS_ERR(sreg) )
-+ return -PTR_ERR(sreg);
-+
- memcpy(sreg, reg, sizeof(struct segment_register));
- __set_bit(seg, &hvmemul_ctxt->seg_reg_dirty);
-
-@@ -1130,10 +1139,17 @@
- }
- }
-
-+/*
-+ * Callers which pass a known in-range x86_segment can rely on the return
-+ * pointer being valid. Other callers must explicitly check for errors.
-+ */
- struct segment_register *hvmemul_get_seg_reg(
- enum x86_segment seg,
- struct hvm_emulate_ctxt *hvmemul_ctxt)
- {
-+ if ( seg < 0 || seg >= ARRAY_SIZE(hvmemul_ctxt->seg_reg) )
-+ return ERR_PTR(-X86EMUL_UNHANDLEABLE);
-+
- if ( !__test_and_set_bit(seg, &hvmemul_ctxt->seg_reg_accessed) )
- hvm_get_segment_register(current, seg, &hvmemul_ctxt->seg_reg[seg]);
- return &hvmemul_ctxt->seg_reg[seg];
---- xen/arch/x86/mm/shadow/common.c.orig 2016-09-08 17:15:35.000000000 +0200
-+++ xen/arch/x86/mm/shadow/common.c 2016-09-08 17:29:23.000000000 +0200
-@@ -22,6 +22,7 @@
- */
-
- #include <xen/config.h>
-+#include <xen/err.h>
- #include <xen/types.h>
- #include <xen/mm.h>
- #include <xen/trace.h>
-@@ -116,10 +117,19 @@
- /* x86 emulator support for the shadow code
- */
-
-+/*
-+ * Callers which pass a known in-range x86_segment can rely on the return
-+ * pointer being valid. Other callers must explicitly check for errors.
-+ */
- struct segment_register *hvm_get_seg_reg(
- enum x86_segment seg, struct sh_emulate_ctxt *sh_ctxt)
- {
-- struct segment_register *seg_reg = &sh_ctxt->seg_reg[seg];
-+ struct segment_register *seg_reg;
-+
-+ if ( seg < 0 || seg >= ARRAY_SIZE(sh_ctxt->seg_reg) )
-+ return ERR_PTR(-X86EMUL_UNHANDLEABLE);
-+
-+ seg_reg = &sh_ctxt->seg_reg[seg];
- if ( !__test_and_set_bit(seg, &sh_ctxt->valid_seg_regs) )
- hvm_get_segment_register(current, seg, seg_reg);
- return seg_reg;
-@@ -136,14 +146,9 @@
- struct segment_register *reg;
- int okay;
-
-- /*
-- * Can arrive here with non-user segments. However, no such cirucmstance
-- * is part of a legitimate pagetable update, so fail the emulation.
-- */
-- if ( !is_x86_user_segment(seg) )
-- return X86EMUL_UNHANDLEABLE;
--
- reg = hvm_get_seg_reg(seg, sh_ctxt);
-+ if ( IS_ERR(reg) )
-+ return -PTR_ERR(reg);
-
- okay = hvm_virtual_to_linear_addr(
- seg, reg, offset, bytes, access_type, sh_ctxt->ctxt.addr_size, paddr);
-@@ -245,9 +250,6 @@
- unsigned long addr;
- int rc;
-
-- if ( !is_x86_user_segment(seg) )
-- return X86EMUL_UNHANDLEABLE;
--
- /* How many emulations could we save if we unshadowed on stack writes? */
- if ( seg == x86_seg_ss )
- perfc_incr(shadow_fault_emulate_stack);
-@@ -275,9 +277,6 @@
- unsigned long addr, old[2], new[2];
- int rc;
-
-- if ( !is_x86_user_segment(seg) )
-- return X86EMUL_UNHANDLEABLE;
--
- rc = hvm_translate_linear_addr(
- seg, offset, bytes, hvm_access_write, sh_ctxt, &addr);
- if ( rc )
diff --git a/sysutils/xenkernel41/patches/patch-XSA-191 b/sysutils/xenkernel41/patches/patch-XSA-191
deleted file mode 100644
index b0f9c69e23a..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-191
+++ /dev/null
@@ -1,142 +0,0 @@
-$NetBSD: patch-XSA-191,v 1.1 2016/11/22 20:53:40 bouyer Exp $
-
-backported from:
-
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Subject: x86/hvm: Fix the handling of non-present segments
-
-In 32bit, the data segments may be NULL to indicate that the segment is
-ineligible for use. In both 32bit and 64bit, the LDT selector may be NULL to
-indicate that the entire LDT is ineligible for use. However, nothing in Xen
-actually checks for this condition when performing other segmentation
-checks. (Note however that limit and writeability checks are correctly
-performed).
-
-Neither Intel nor AMD specify the exact behaviour of loading a NULL segment.
-Experimentally, AMD zeroes all attributes but leaves the base and limit
-unmodified. Intel zeroes the base, sets the limit to 0xfffffff and resets the
-attributes to just .G and .D/B.
-
-The use of the segment information in the VMCB/VMCS is equivalent to a native
-pipeline interacting with the segment cache. The present bit can therefore
-have a subtly different meaning, and it is now cooked to uniformly indicate
-whether the segment is usable or not.
-
-GDTR and IDTR don't have access rights like the other segments, but for
-consistency, they are treated as being present so no special casing is needed
-elsewhere in the segmentation logic.
-
-AMD hardware does not consider the present bit for %cs and %tr, and will
-function as if they were present. They are therefore unconditionally set to
-present when reading information from the VMCB, to maintain the new meaning of
-usability.
-
-Intel hardware has a separate unusable bit in the VMCS segment attributes.
-This bit is inverted and stored in the present field, so the hvm code can work
-with architecturally-common state.
-
-This is XSA-191.
-
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
-
---- xen/arch/x86/hvm/hvm.c.orig 2016-11-22 15:03:22.000000000 +0100
-+++ xen/arch/x86/hvm/hvm.c 2016-11-22 15:19:57.000000000 +0100
-@@ -1626,6 +1626,10 @@
- * COMPATIBILITY MODE: Apply segment checks and add base.
- */
-
-+ /* Segment not valid for use (cooked meaning of .p)? */
-+ if ( !reg->attr.fields.p )
-+ return 0;
-+
- switch ( access_type )
- {
- case hvm_access_read:
-@@ -1800,6 +1804,10 @@
- hvm_get_segment_register(
- v, (sel & 4) ? x86_seg_ldtr : x86_seg_gdtr, &desctab);
-
-+ /* Segment not valid for use (cooked meaning of .p)? */
-+ if ( !desctab.attr.fields.p )
-+ goto fail;
-+
- /* Check against descriptor table limit. */
- if ( ((sel & 0xfff8) + 7) > desctab.limit )
- goto fail;
---- xen/arch/x86/hvm/svm/svm.c.orig 2013-09-10 08:42:18.000000000 +0200
-+++ xen/arch/x86/hvm/svm/svm.c 2016-11-22 15:19:57.000000000 +0100
-@@ -459,6 +459,7 @@
- {
- case x86_seg_cs:
- memcpy(reg, &vmcb->cs, sizeof(*reg));
-+ reg->attr.fields.p = 1;
- reg->attr.fields.g = reg->limit > 0xFFFFF;
- break;
- case x86_seg_ds:
-@@ -492,13 +493,16 @@
- case x86_seg_tr:
- svm_sync_vmcb(v);
- memcpy(reg, &vmcb->tr, sizeof(*reg));
-+ reg->attr.fields.p = 1;
- reg->attr.fields.type |= 0x2;
- break;
- case x86_seg_gdtr:
- memcpy(reg, &vmcb->gdtr, sizeof(*reg));
-+ reg->attr.bytes = 0x80;
- break;
- case x86_seg_idtr:
- memcpy(reg, &vmcb->idtr, sizeof(*reg));
-+ reg->attr.bytes = 0x80;
- break;
- case x86_seg_ldtr:
- svm_sync_vmcb(v);
---- xen/arch/x86/hvm/vmx/vmx.c.orig 2013-09-10 08:42:18.000000000 +0200
-+++ xen/arch/x86/hvm/vmx/vmx.c 2016-11-22 15:19:57.000000000 +0100
-@@ -761,10 +761,12 @@
-
- vmx_vmcs_exit(v);
-
-- reg->attr.bytes = (attr & 0xff) | ((attr >> 4) & 0xf00);
-- /* Unusable flag is folded into Present flag. */
-- if ( attr & (1u<<16) )
-- reg->attr.fields.p = 0;
-+ /*
-+ * Fold VT-x representation into Xen's representation. The Present bit is
-+ * unconditionally set to the inverse of unusable.
-+ */
-+ reg->attr.bytes =
-+ (!(attr & (1u << 16)) << 7) | (attr & 0x7f) | ((attr >> 4) & 0xf00);
-
- /* Adjust for virtual 8086 mode */
- if ( v->arch.hvm_vmx.vmx_realmode && seg <= x86_seg_tr
-@@ -844,11 +846,11 @@
- }
- }
-
-- attr = ((attr & 0xf00) << 4) | (attr & 0xff);
--
-- /* Not-present must mean unusable. */
-- if ( !reg->attr.fields.p )
-- attr |= (1u << 16);
-+ /*
-+ * Unfold Xen representation into VT-x representation. The unusable bit
-+ * is unconditionally set to the inverse of present.
-+ */
-+ attr = (!(attr & (1u << 7)) << 16) | ((attr & 0xf00) << 4) | (attr & 0xff);
-
- /* VMX has strict consistency requirement for flag G. */
- attr |= !!(limit >> 20) << 15;
---- xen/arch/x86/x86_emulate/x86_emulate.c.orig 2016-11-22 15:03:21.000000000 +0100
-+++ xen/arch/x86/x86_emulate/x86_emulate.c 2016-11-22 15:19:57.000000000 +0100
-@@ -1020,6 +1020,10 @@
- &desctab, ctxt)) )
- return rc;
-
-+ /* Segment not valid for use (cooked meaning of .p)? */
-+ if ( !desctab.attr.fields.p )
-+ goto raise_exn;
-+
- /* Check against descriptor table limit. */
- if ( ((sel & 0xfff8) + 7) > desctab.limit )
- goto raise_exn;
diff --git a/sysutils/xenkernel41/patches/patch-XSA-192 b/sysutils/xenkernel41/patches/patch-XSA-192
deleted file mode 100644
index 72ad050f01f..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-192
+++ /dev/null
@@ -1,67 +0,0 @@
-$NetBSD: patch-XSA-192,v 1.1 2016/11/22 20:53:40 bouyer Exp $
-
-backported from:
-
-From: Jan Beulich <jbeulich@suse.com>
-Subject: x86/HVM: don't load LDTR with VM86 mode attrs during task switch
-
-Just like TR, LDTR is purely a protected mode facility and hence needs
-to be loaded accordingly. Also move its loading to where it
-architecurally belongs.
-
-This is XSA-192.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Tested-by: Andrew Cooper <andrew.cooper3@citrix.com>
-
---- xen/arch/x86/hvm/hvm.c.orig 2016-11-22 15:19:57.000000000 +0100
-+++ xen/arch/x86/hvm/hvm.c 2016-11-22 15:31:13.000000000 +0100
-@@ -1767,16 +1767,15 @@
- }
-
- static int hvm_load_segment_selector(
-- enum x86_segment seg, uint16_t sel)
-+ enum x86_segment seg, uint16_t sel, unsigned int eflags)
- {
- struct segment_register desctab, cs, segr;
- struct desc_struct *pdesc, desc;
- u8 dpl, rpl, cpl;
- int fault_type = TRAP_invalid_tss;
-- struct cpu_user_regs *regs = guest_cpu_user_regs();
- struct vcpu *v = current;
-
-- if ( regs->eflags & X86_EFLAGS_VM )
-+ if ( eflags & X86_EFLAGS_VM )
- {
- segr.sel = sel;
- segr.base = (uint32_t)sel << 4;
-@@ -2022,6 +2021,8 @@
- if ( rc != HVMCOPY_okay )
- goto out;
-
-+ if ( hvm_load_segment_selector(x86_seg_ldtr, tss.ldt, 0) )
-+ goto out;
-
- if ( hvm_set_cr3(tss.cr3) )
- goto out;
-@@ -2044,13 +2045,12 @@
- }
-
- exn_raised = 0;
-- if ( hvm_load_segment_selector(x86_seg_ldtr, tss.ldt) ||
-- hvm_load_segment_selector(x86_seg_es, tss.es) ||
-- hvm_load_segment_selector(x86_seg_cs, tss.cs) ||
-- hvm_load_segment_selector(x86_seg_ss, tss.ss) ||
-- hvm_load_segment_selector(x86_seg_ds, tss.ds) ||
-- hvm_load_segment_selector(x86_seg_fs, tss.fs) ||
-- hvm_load_segment_selector(x86_seg_gs, tss.gs) )
-+ if ( hvm_load_segment_selector(x86_seg_es, tss.es, tss.eflags) ||
-+ hvm_load_segment_selector(x86_seg_cs, tss.cs, tss.eflags) ||
-+ hvm_load_segment_selector(x86_seg_ss, tss.ss, tss.eflags) ||
-+ hvm_load_segment_selector(x86_seg_ds, tss.ds, tss.eflags) ||
-+ hvm_load_segment_selector(x86_seg_fs, tss.fs, tss.eflags) ||
-+ hvm_load_segment_selector(x86_seg_gs, tss.gs, tss.eflags) )
- exn_raised = 1;
-
- rc = hvm_copy_to_guest_virt(
diff --git a/sysutils/xenkernel41/patches/patch-XSA-195 b/sysutils/xenkernel41/patches/patch-XSA-195
deleted file mode 100644
index b20d819af9a..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-195
+++ /dev/null
@@ -1,49 +0,0 @@
-$NetBSD: patch-XSA-195,v 1.1 2016/11/22 20:53:40 bouyer Exp $
-
-backported from:
-
-From: Jan Beulich <jbeulich@suse.com>
-Subject: x86emul: fix huge bit offset handling
-
-We must never chop off the high 32 bits.
-
-This is XSA-195.
-
-Reported-by: George Dunlap <george.dunlap@citrix.com>
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
-
---- xen/arch/x86/x86_emulate/x86_emulate.c.orig 2016-11-22 15:19:57.000000000 +0100
-+++ xen/arch/x86/x86_emulate/x86_emulate.c 2016-11-22 16:03:48.000000000 +0100
-@@ -1578,6 +1578,12 @@
- else
- {
- /*
-+ * Instructions such as bt can reference an arbitrary offset from
-+ * their memory operand, but the instruction doing the actual
-+ * emulation needs the appropriate op_bytes read from memory.
-+ * Adjust both the source register and memory operand to make an
-+ * equivalent instruction.
-+ *
- * EA += BitOffset DIV op_bytes*8
- * BitOffset = BitOffset MOD op_bytes*8
- * DIV truncates towards negative infinity.
-@@ -1589,14 +1595,15 @@
- src.val = (int32_t)src.val;
- if ( (long)src.val < 0 )
- {
-- unsigned long byte_offset;
-- byte_offset = op_bytes + (((-src.val-1) >> 3) & ~(op_bytes-1));
-+ unsigned long byte_offset =
-+ op_bytes + (((-src.val - 1) >> 3) & ~(op_bytes - 1L));
-+
- ea.mem.off -= byte_offset;
- src.val = (byte_offset << 3) + src.val;
- }
- else
- {
-- ea.mem.off += (src.val >> 3) & ~(op_bytes - 1);
-+ ea.mem.off += (src.val >> 3) & ~(op_bytes - 1L);
- src.val &= (op_bytes << 3) - 1;
- }
- }
diff --git a/sysutils/xenkernel41/patches/patch-XSA-200 b/sysutils/xenkernel41/patches/patch-XSA-200
deleted file mode 100644
index 8ffb7246c60..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-200
+++ /dev/null
@@ -1,57 +0,0 @@
-$NetBSD: patch-XSA-200,v 1.1 2016/12/20 10:22:28 bouyer Exp $
-
-From: Jan Beulich <jbeulich@suse.com>
-Subject: x86emul: CMPXCHG8B ignores operand size prefix
-
-Otherwise besides mis-handling the instruction, the comparison failure
-case would result in uninitialized stack data being handed back to the
-guest in rDX:rAX (32 bits leaked for 32-bit guests, 96 bits for 64-bit
-ones).
-
-This is XSA-200.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-
---- tools/tests/x86_emulator/test_x86_emulator.c.orig
-+++ tools/tests/x86_emulator/test_x86_emulator.c
-@@ -429,6 +429,24 @@ int main(int argc, char **argv)
- goto fail;
- printf("okay\n");
-
-+ printf("%-40s", "Testing cmpxchg8b (%edi) [opsize]...");
-+ instr[0] = 0x66; instr[1] = 0x0f; instr[2] = 0xc7; instr[3] = 0x0f;
-+ res[0] = 0x12345678;
-+ res[1] = 0x87654321;
-+ regs.eflags = 0x200;
-+ regs.eip = (unsigned long)&instr[0];
-+ regs.edi = (unsigned long)res;
-+ rc = x86_emulate(&ctxt, &emulops);
-+ if ( (rc != X86EMUL_OKAY) ||
-+ (res[0] != 0x12345678) ||
-+ (res[1] != 0x87654321) ||
-+ (regs.eax != 0x12345678) ||
-+ (regs.edx != 0x87654321) ||
-+ ((regs.eflags&0x240) != 0x200) ||
-+ (regs.eip != (unsigned long)&instr[4]) )
-+ goto fail;
-+ printf("okay\n");
-+
- printf("%-40s", "Testing movsxbd (%%eax),%%ecx...");
- instr[0] = 0x0f; instr[1] = 0xbe; instr[2] = 0x08;
- regs.eflags = 0x200;
---- ./xen/arch/x86/x86_emulate/x86_emulate.c.orig 2016-12-19 21:54:25.000000000 +0100
-+++ ./xen/arch/x86/x86_emulate/x86_emulate.c 2016-12-19 22:00:32.000000000 +0100
-@@ -4183,7 +4183,12 @@
-
- generate_exception_if((modrm_reg & 7) != 1, EXC_UD, -1);
- generate_exception_if(ea.type != OP_MEM, EXC_UD, -1);
-- op_bytes *= 2;
-+ if ( op_bytes == 8 )
-+ {
-+ /* vcpu_must_have_cx16() XXX doens't exists */
-+ op_bytes = 16;
-+ } else
-+ op_bytes = 8;
-
- /* Get actual old value. */
- for ( i = 0; i < (op_bytes/sizeof(long)); i++ )
diff --git a/sysutils/xenkernel41/patches/patch-XSA-202 b/sysutils/xenkernel41/patches/patch-XSA-202
deleted file mode 100644
index d95bcc9b8e9..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-202
+++ /dev/null
@@ -1,73 +0,0 @@
-$NetBSD: patch-XSA-202,v 1.1 2016/12/21 15:35:44 bouyer Exp $
-
-From: Jan Beulich <jbeulich@suse.com>
-Subject: x86: force EFLAGS.IF on when exiting to PV guests
-
-Guest kernels modifying instructions in the process of being emulated
-for another of their vCPU-s may effect EFLAGS.IF to be cleared upon
-next exiting to guest context, by converting the being emulated
-instruction to CLI (at the right point in time). Prevent any such bad
-effects by always forcing EFLAGS.IF on. And to cover hypothetical other
-similar issues, also force EFLAGS.{IOPL,NT,VM} to zero.
-
-This is XSA-202.
-
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-
-
---- xen/arch/x86/x86_64/compat/entry.S.orig 2014-09-02 08:22:57.000000000 +0200
-+++ xen/arch/x86/x86_64/compat/entry.S 2016-12-21 13:23:21.000000000 +0100
-@@ -173,6 +173,10 @@
- /* %rbx: struct vcpu, interrupts disabled */
- ENTRY(compat_restore_all_guest)
- ASSERT_INTERRUPTS_DISABLED
-+ mov $~(X86_EFLAGS_IOPL|X86_EFLAGS_NT|X86_EFLAGS_VM),%r11d
-+ and UREGS_eflags(%rsp),%r11d
-+ or $X86_EFLAGS_IF,%r11
-+ mov %r11d,UREGS_eflags(%rsp)
- RESTORE_ALL
- addq $8,%rsp
- .Lft0: iretq
---- xen/arch/x86/x86_64/entry.S.orig 2016-12-21 13:25:26.000000000 +0100
-+++ xen/arch/x86/x86_64/entry.S 2016-12-21 13:32:36.000000000 +0100
-@@ -41,30 +41,29 @@
- testw $TRAP_syscall,4(%rsp)
- jz iret_exit_to_guest
-
-+ movq 24(%rsp),%r11 # RFLAGS
-+ andq $~(X86_EFLAGS_IOPL|X86_EFLAGS_NT|X86_EFLAGS_VM),%r11
-+ orq $X86_EFLAGS_IF,%r11
-+
- /* Don't use SYSRET path if the return address is not canonical. */
- movq 8(%rsp),%rcx
- sarq $47,%rcx
- incl %ecx
- cmpl $1,%ecx
-- ja .Lforce_iret
-+ movq 8(%rsp),%rcx # RIP
-+ ja iret_exit_to_guest
-
-- addq $8,%rsp
-- popq %rcx # RIP
-- popq %r11 # CS
-- cmpw $FLAT_USER_CS32,%r11
-- popq %r11 # RFLAGS
-- popq %rsp # RSP
-+ cmpw $FLAT_USER_CS32,%r11w
-+ movq 32(%rsp),%rsp # RSP
- je 1f
- sysretq
- 1: sysretl
-
--.Lforce_iret:
-- /* Mimic SYSRET behavior. */
-- movq 8(%rsp),%rcx # RIP
-- movq 24(%rsp),%r11 # RFLAGS
- ALIGN
- /* No special register assumptions. */
- iret_exit_to_guest:
-+ andl $~(X86_EFLAGS_IOPL|X86_EFLAGS_NT|X86_EFLAGS_VM),24(%rsp)
-+ orl $X86_EFLAGS_IF,24(%rsp)
- addq $8,%rsp
- .Lft0: iretq
-
diff --git a/sysutils/xenkernel41/patches/patch-XSA-204 b/sysutils/xenkernel41/patches/patch-XSA-204
deleted file mode 100644
index 72f272056a6..00000000000
--- a/sysutils/xenkernel41/patches/patch-XSA-204
+++ /dev/null
@@ -1,71 +0,0 @@
-$NetBSD: patch-XSA-204,v 1.1 2016/12/20 10:22:28 bouyer Exp $
-
-From: Andrew Cooper <andrew.cooper3@citrix.com>
-Date: Sun, 18 Dec 2016 15:42:59 +0000
-Subject: [PATCH] x86/emul: Correct the handling of eflags with SYSCALL
-
-A singlestep #DB is determined by the resulting eflags value from the
-execution of SYSCALL, not the original eflags value.
-
-By using the original eflags value, we negate the guest kernels attempt to
-protect itself from a privilege escalation by masking TF.
-
-Introduce a tf boolean and have the SYSCALL emulation recalculate it
-after the instruction is complete.
-
-This is XSA-204
-
-Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
-Reviewed-by: Jan Beulich <jbeulich@suse.com>
----
- xen/arch/x86/x86_emulate/x86_emulate.c | 23 ++++++++++++++++++++---
- 1 file changed, 20 insertions(+), 3 deletions(-)
-
-diff --git a/xen/arch/x86/x86_emulate/x86_emulate.c b/xen/arch/x86/x86_emulate/x86_emulate.c
-index 0c43fe1..f675dc9 100644
---- xen/arch/x86/x86_emulate/x86_emulate.c.orig 2016-12-19 22:02:25.000000000 +0100
-+++ xen/arch/x86/x86_emulate/x86_emulate.c 2016-12-19 22:05:31.000000000 +0100
-@@ -1233,6 +1233,7 @@
- #define REPE_PREFIX 1
- #define REPNE_PREFIX 2
- unsigned int lock_prefix = 0, rep_prefix = 0;
-+ bool_t tf = !!(ctxt->regs->eflags & EFLG_TF);
- int override_seg = -1, rc = X86EMUL_OKAY;
- struct operand src, dst;
-
-@@ -3498,9 +3499,8 @@
- break;
- }
-
-- /* Inject #DB if single-step tracing was enabled at instruction start. */
-- if ( (ctxt->regs->eflags & EFLG_TF) && (rc == X86EMUL_OKAY) &&
-- (ops->inject_hw_exception != NULL) )
-+ /* Should a singlestep #DB be raised? */
-+ if ( tf && (rc == X86EMUL_OKAY) && (ops->inject_hw_exception != NULL) )
- rc = ops->inject_hw_exception(EXC_DB, -1, ctxt) ? : X86EMUL_EXCEPTION;
-
- /* Commit shadow register state. */
-@@ -3685,6 +3685,23 @@
- (rc = ops->write_segment(x86_seg_ss, &ss, ctxt)) )
- goto done;
-
-+ /*
-+ * SYSCALL (unlike most instructions) evaluates its singlestep action
-+ * based on the resulting EFLG_TF, not the starting EFLG_TF.
-+ *
-+ * As the #DB is raised after the CPL change and before the OS can
-+ * switch stack, it is a large risk for privilege escalation.
-+ *
-+ * 64bit kernels should mask EFLG_TF in MSR_FMASK to avoid any
-+ * vulnerability. Running the #DB handler on an IST stack is also a
-+ * mitigation.
-+ *
-+ * 32bit kernels have no ability to mask EFLG_TF at all. Their only
-+ * mitigation is to use a task gate for handling #DB (or to not use
-+ * enable EFER.SCE to start with).
-+ */
-+ tf = !!(_regs.eflags & EFLG_TF);
-+
- break;
- }
-
diff --git a/sysutils/xenkernel41/patches/patch-xen_Makefile b/sysutils/xenkernel41/patches/patch-xen_Makefile
deleted file mode 100644
index c32b1cac297..00000000000
--- a/sysutils/xenkernel41/patches/patch-xen_Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-xen_Makefile,v 1.1 2013/04/11 19:57:51 joerg Exp $
-
---- xen/Makefile.orig 2013-03-25 13:23:45.000000000 +0000
-+++ xen/Makefile
-@@ -89,7 +89,7 @@ include/xen/compile.h: include/xen/compi
- -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
- -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
- -e 's/@@hostname@@/$(shell hostname)/g' \
-- -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | tail -1)!g' \
-+ -e 's!@@compiler@@!$(shell $(CC) $(EXTRA_CFLAGS) $(CFLAGS) -v 2>&1 | tail -1)!g' \
- -e 's/@@version@@/$(XEN_VERSION)/g' \
- -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
- -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
diff --git a/sysutils/xenkernel41/patches/patch-xen_arch_x86_Rules.mk b/sysutils/xenkernel41/patches/patch-xen_arch_x86_Rules.mk
deleted file mode 100644
index e433e0ce6e7..00000000000
--- a/sysutils/xenkernel41/patches/patch-xen_arch_x86_Rules.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-xen_arch_x86_Rules.mk,v 1.1 2013/04/11 19:57:51 joerg Exp $
-
---- xen/arch/x86/Rules.mk.orig 2013-03-25 13:28:19.000000000 +0000
-+++ xen/arch/x86/Rules.mk
-@@ -21,6 +21,7 @@ CFLAGS += -iwithprefix include -Werror -
- CFLAGS += -I$(BASEDIR)/include
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-generic
- CFLAGS += -I$(BASEDIR)/include/asm-x86/mach-default
-+CFLAGS += $(EXTRA_CFLAGS)
-
- # Prevent floating-point variables from creeping into Xen.
- CFLAGS += -msoft-float
diff --git a/sysutils/xenkernel41/patches/patch-xen_arch_x86_cpu_mcheck_vmce.c b/sysutils/xenkernel41/patches/patch-xen_arch_x86_cpu_mcheck_vmce.c
deleted file mode 100644
index b29d6cfc309..00000000000
--- a/sysutils/xenkernel41/patches/patch-xen_arch_x86_cpu_mcheck_vmce.c
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-xen_arch_x86_cpu_mcheck_vmce.c,v 1.1 2013/04/11 19:57:51 joerg Exp $
-
---- xen/arch/x86/cpu/mcheck/vmce.c.orig 2013-03-25 13:46:53.000000000 +0000
-+++ xen/arch/x86/cpu/mcheck/vmce.c
-@@ -39,7 +39,7 @@ int vmce_init_msr(struct domain *d)
- return -ENOMEM;
- }
- memset(dom_vmce(d)->mci_ctl, ~0,
-- sizeof(dom_vmce(d)->mci_ctl));
-+ sizeof(*dom_vmce(d)->mci_ctl));
-
- dom_vmce(d)->mcg_status = 0x0;
- dom_vmce(d)->mcg_cap = g_mcg_cap;
-@@ -369,7 +369,7 @@ static struct bank_entry* alloc_bank_ent
- return NULL;
- }
-
-- memset(entry, 0x0, sizeof(entry));
-+ memset(entry, 0x0, sizeof(*entry));
- INIT_LIST_HEAD(&entry->list);
- return entry;
- }
-@@ -451,7 +451,7 @@ int vmce_init(struct cpuinfo_x86 *c)
- return -ENOMEM;
- }
- /* Don't care banks before firstbank */
-- memset(h_mci_ctrl, 0xff, sizeof(h_mci_ctrl));
-+ memset(h_mci_ctrl, 0xff, sizeof(*h_mci_ctrl));
- for (i = firstbank; i < nr_mce_banks; i++)
- rdmsrl(MSR_IA32_MCx_CTL(i), h_mci_ctrl[i]);
- }
diff --git a/sysutils/xenkernel41/patches/patch-xen_arch_x86_time.c b/sysutils/xenkernel41/patches/patch-xen_arch_x86_time.c
deleted file mode 100644
index 358fb2620c1..00000000000
--- a/sysutils/xenkernel41/patches/patch-xen_arch_x86_time.c
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-xen_arch_x86_time.c,v 1.3 2015/12/29 04:04:32 dholland Exp $
-
---- xen/arch/x86/time.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ xen/arch/x86/time.c 2013-09-11 14:30:13.000000000 +0000
-@@ -105,7 +105,7 @@
- {
- u32 product_int, product_frac;
- asm (
-- "mul %3"
-+ "mull %3"
- : "=a" (product_frac), "=d" (product_int)
- : "0" (multiplicand), "r" (multiplier) );
- return product_int;
-@@ -129,10 +129,10 @@
-
- #ifdef CONFIG_X86_32
- asm (
-- "mul %5 ; "
-+ "mull %5 ; "
- "mov %4,%%eax ; "
- "mov %%edx,%4 ; "
-- "mul %5 ; "
-+ "mull %5 ; "
- "xor %5,%5 ; "
- "add %4,%%eax ; "
- "adc %5,%%edx ; "
diff --git a/sysutils/xenkernel41/patches/patch-xen_drivers_char_console_c b/sysutils/xenkernel41/patches/patch-xen_drivers_char_console_c
deleted file mode 100644
index 277428e069a..00000000000
--- a/sysutils/xenkernel41/patches/patch-xen_drivers_char_console_c
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-xen_drivers_char_console_c,v 1.1 2011/06/16 13:02:50 cegger Exp $
-
---- xen/drivers/char/console.c.orig 2011-06-14 16:03:45.000000000 +0000
-+++ xen/drivers/char/console.c
-@@ -10,7 +10,6 @@
- * Ported to Xen - Steven Rostedt - Red Hat
- */
-
--#include <xen/stdarg.h>
- #include <xen/config.h>
- #include <xen/version.h>
- #include <xen/init.h>
diff --git a/sysutils/xenkernel41/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c b/sysutils/xenkernel41/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c
deleted file mode 100644
index 40822684d39..00000000000
--- a/sysutils/xenkernel41/patches/patch-xen_drivers_passthrough_vtd_x86_ats.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-xen_drivers_passthrough_vtd_x86_ats.c,v 1.1 2015/09/14 13:36:29 joerg Exp $
-
---- xen/drivers/passthrough/vtd/x86/ats.c.orig 2015-09-13 15:34:59.000000000 +0000
-+++ xen/drivers/passthrough/vtd/x86/ats.c
-@@ -286,7 +286,7 @@ int dev_invalidate_iotlb(struct iommu *i
- case DMA_TLB_GLOBAL_FLUSH:
- /* invalidate all translations: sbit=1,bit_63=0,bit[62:12]=1 */
- sbit = 1;
-- addr = (~0 << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
-+ addr = (~0ULL << PAGE_SHIFT_4K) & 0x7FFFFFFFFFFFFFFF;
- ret |= qinval_device_iotlb(iommu, pdev->ats_queue_depth,
- sid, sbit, addr);
- break;
diff --git a/sysutils/xenkernel41/patches/patch-xen_include_xen_stdarg.h b/sysutils/xenkernel41/patches/patch-xen_include_xen_stdarg.h
deleted file mode 100644
index 55db181b596..00000000000
--- a/sysutils/xenkernel41/patches/patch-xen_include_xen_stdarg.h
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-xen_include_xen_stdarg.h,v 1.3 2011/08/14 20:42:41 abs Exp $
-
---- xen/include/xen/stdarg.h.orig 2011-06-14 16:03:46.000000000 +0000
-+++ xen/include/xen/stdarg.h
-@@ -1,8 +1,19 @@
- #if defined(__OpenBSD__)
- # include "/usr/include/stdarg.h"
- #elif defined (__NetBSD__)
-+ /* Why not just include stdarg.h like everyone else? should explain */
- typedef __builtin_va_list va_list;
--# define va_start(ap, last) __builtin_stdarg_start((ap), (last))
-+# ifdef __GNUC__
-+# define __GNUC_PREREQ__(x, y) \
-+ ((__GNUC__ == (x) && __GNUC_MINOR__ >= (y)) || \
-+ (__GNUC__ > (x)))
-+# else
-+# define __GNUC_PREREQ__(x, y) 0
-+# endif
-+# if !__GNUC_PREREQ__(4, 5)
-+# define __builtin_va_start(ap, last) __builtin_stdarg_start((ap), (last))
-+# endif
-+# define va_start(ap, last) __builtin_va_start((ap), (last))
- # define va_end(ap) __builtin_va_end(ap)
- # define va_arg __builtin_va_arg
- #else
diff --git a/sysutils/xentools3-hvm/DESCR b/sysutils/xentools3-hvm/DESCR
deleted file mode 100644
index 8b7d41362d4..00000000000
--- a/sysutils/xentools3-hvm/DESCR
+++ /dev/null
@@ -1,4 +0,0 @@
-The Xen virtual machine monitor allows running several virtual machines
-on a single physical machine. The xentools30-vmx package contains
-additionnal tools to xentools30 to run unmodified guests using the
-Intel VT or AMD VMX extentions.
diff --git a/sysutils/xentools3-hvm/Makefile b/sysutils/xentools3-hvm/Makefile
deleted file mode 100644
index 1616e5f56fd..00000000000
--- a/sysutils/xentools3-hvm/Makefile
+++ /dev/null
@@ -1,126 +0,0 @@
-# $NetBSD: Makefile,v 1.32 2016/07/09 13:04:08 wiz Exp $
-
-VERSION= 3.1.4
-DISTNAME= xen-${VERSION}
-PKGNAME= xentools3-hvm-${VERSION}
-PKGREVISION= 15
-CATEGORIES= sysutils
-MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
-
-MAINTAINER= bouyer@NetBSD.org
-HOMEPAGE= http://xen.org/
-COMMENT= Tools for Virtual Machine Extensions support in Xen
-
-BUILD_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware
-
-PKG_SYSCONFSUBDIR= xen
-
-ONLY_FOR_PLATFORM= Linux-2.[46]*-i386 Linux-2.[46]*-x86_64
-ONLY_FOR_PLATFORM+= NetBSD-*-i386 NetBSD-*-x86_64
-
-CONFLICTS= xentools30-* xentools33-*
-CONFLICTS+= xenstoretools-*
-
-PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # not yet ported as of 3.1.4
-
-WRKSRC= ${WRKDIR}/xen-${VERSION}/tools
-CHECK_PORTABILITY_SKIP+= examples/* xm-test/ramdisk/make-release.sh
-
-EGDIR= ${PREFIX}/share/examples/xen
-MESSAGE_SUBST= EGDIR=${EGDIR}
-
-USE_TOOLS+= perl
-USE_TOOLS+= gmake
-MAKE_ENV+= EGDIR=${EGDIR:Q}
-MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
-.if ${MACHINE_ARCH} == "i386"
-MAKE_ENV+= XEN_TARGET_ARCH="x86_32" XEN_COMPILE_ARCH="x86_32"
-.elif ${MACHINE_ARCH} == "x86_64"
-MAKE_ENV+= XEN_TARGET_ARCH="x86_64" XEN_COMPILE_ARCH="x86_64"
-.else
-MAKE_ENV+= XEN_TARGET_ARCH="unsupported"
-.endif
-
-SUBST_CLASSES+= paths
-SUBST_STAGE.paths= pre-configure
-SUBST_FILES.paths= ioemu/vl.c
-SUBST_SED.paths= -e "s|/usr/sbin|${PREFIX}/sbin|g"
-SUBST_MESSAGE.paths= Fixing hardcoded paths.
-
-SUBST_CLASSES+= py
-SUBST_STAGE.py= pre-configure
-SUBST_FILES.py= ../xen/include/public/foreign/Makefile
-SUBST_SED.py= -e "s,python,${PYTHONBIN},g"
-
-SUBST_CLASSES+= conf
-SUBST_STAGE.conf= pre-configure
-SUBST_FILES.conf= ioemu/configure
-SUBST_FILES.conf+= ioemu/vl.c
-SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
-
-SUBST_CLASSES+= prefix
-SUBST_STAGE.prefix= pre-configure
-SUBST_FILES.prefix= python/xen/util/auxbin.py
-SUBST_FILES.prefix= ioemu/vl.c
-SUBST_SED.prefix= -e "s,@PREFIX@,${PREFIX},g"
-
-OPSYSVARS+= PROCPATH
-PROCPATH.NetBSD= /kern
-PROCPATH.*= /proc
-
-CONF_FILES_PERMS+= ${EGDIR}/qemu-ifup ${PKG_SYSCONFDIR}/scripts/qemu-ifup \
- ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
-
-OWN_DIRS= ${PKG_SYSCONFDIR}/scripts
-
-INSTALLATION_DIRS= ${EGDIR}
-
-.include "../../mk/compiler.mk"
-.if !empty(PKGSRC_COMPILER:Mclang)
-EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes -Wno-error=format-security
-EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \
- -Wno-error=tautological-compare -Wno-error=null-dereference \
- -Wno-error=self-assign -Wno-error=sometimes-uninitialized
-.endif
-
-MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
-
-pre-build:
-.if !exists(/usr/include/xen/xenio.h)
- ${MKDIR} ${WRKSRC}/libxc/xen
- ${TEST} -f ${WRKSRC}/libxc/xen/xenio.h || \
- ${CP} ${FILESDIR}/xenio.h ${WRKSRC}/libxc/xen
- ${TEST} -f ${WRKSRC}/libxc/xen/xenio3.h || \
- ${CP} ${FILESDIR}/xenio3.h ${WRKSRC}/libxc/xen
-.endif
- ${CP} ${FILESDIR}/NetBSD.mk ${WRKSRC}/../config/
-.if ${MACHINE_ARCH} == "x86_64"
- ${MKDIR} ${WRKSRC}/libxc/machine
- ${TEST} -f ${WRKSRC}/libxc/machine/int_types.h || \
- ${CP} ${FILESDIR}/int_types.h ${WRKSRC}/libxc/machine
- ${TEST} -f ${WRKSRC}/libxc/machine/elf_machdep.h || \
- ${CP} ${FILESDIR}/elf_machdep.h ${WRKSRC}/libxc/machine
-.endif
-
-.if ${OPSYS} == "NetBSD"
-post-build:
- cd ${FILESDIR}; for src in *-nbsd; do \
- dst="$${src%-nbsd}"; \
- ${SED} -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" \
- -e "s|@PREFIX@|${PREFIX}|g" \
- $$src > ${WRKSRC}/examples/$$dst; \
- done
-.endif
-
-post-install:
- for f in hvm qemu-ifup; do \
- ${INSTALL_DATA} ${WRKSRC}/examples/$$f ${DESTDIR}${EGDIR}/$$f; \
- done
-
-.include "../../lang/python/application.mk"
-.include "../../lang/python/extension.mk"
-.include "../../devel/ncurses/buildlink3.mk"
-.include "../../devel/SDL/buildlink3.mk"
-.include "../../sysutils/xentools3/buildlink3.mk"
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xentools3-hvm/PLIST b/sysutils/xentools3-hvm/PLIST
deleted file mode 100644
index f956438e87b..00000000000
--- a/sysutils/xentools3-hvm/PLIST
+++ /dev/null
@@ -1,40 +0,0 @@
-@comment $NetBSD: PLIST,v 1.5 2009/06/14 18:16:22 joerg Exp $
-lib/xen/boot/hvmloader
-libexec/qemu-dm
-share/examples/xen/hvm
-share/examples/xen/qemu-ifup
-share/xen/qemu/keymaps/ar
-share/xen/qemu/keymaps/common
-share/xen/qemu/keymaps/da
-share/xen/qemu/keymaps/de
-share/xen/qemu/keymaps/de-ch
-share/xen/qemu/keymaps/en-gb
-share/xen/qemu/keymaps/en-us
-share/xen/qemu/keymaps/es
-share/xen/qemu/keymaps/et
-share/xen/qemu/keymaps/fi
-share/xen/qemu/keymaps/fo
-share/xen/qemu/keymaps/fr
-share/xen/qemu/keymaps/fr-be
-share/xen/qemu/keymaps/fr-ca
-share/xen/qemu/keymaps/fr-ch
-share/xen/qemu/keymaps/hr
-share/xen/qemu/keymaps/hu
-share/xen/qemu/keymaps/is
-share/xen/qemu/keymaps/it
-share/xen/qemu/keymaps/ja
-share/xen/qemu/keymaps/lt
-share/xen/qemu/keymaps/lv
-share/xen/qemu/keymaps/mk
-share/xen/qemu/keymaps/modifiers
-share/xen/qemu/keymaps/nl
-share/xen/qemu/keymaps/nl-be
-share/xen/qemu/keymaps/no
-share/xen/qemu/keymaps/pl
-share/xen/qemu/keymaps/pt
-share/xen/qemu/keymaps/pt-br
-share/xen/qemu/keymaps/ru
-share/xen/qemu/keymaps/sl
-share/xen/qemu/keymaps/sv
-share/xen/qemu/keymaps/th
-share/xen/qemu/keymaps/tr
diff --git a/sysutils/xentools3-hvm/distinfo b/sysutils/xentools3-hvm/distinfo
deleted file mode 100644
index 95befea8c1f..00000000000
--- a/sysutils/xentools3-hvm/distinfo
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: distinfo,v 1.12 2015/11/04 01:32:40 agc Exp $
-
-SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d
-RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859
-SHA512 (xen-3.1.4.tar.gz) = 25f797c1c47a807573b4d2d0a12b5b15185d1b1e463e5db46d4bc3843bde7d913ac66440d084dfd12d3968dfbe88738fe84c28047c31c12551530bb157788b1d
-Size (xen-3.1.4.tar.gz) = 6894493 bytes
-SHA1 (patch-.._patch-Config.mk) = 5ce1a561c8e358ceff4187b7109702c85fa29af8
-SHA1 (patch-aa) = 663c798a472501d4c38add5049faded5b7e807aa
-SHA1 (patch-an) = 37650fa861ed8219aa0682e84c5c8ba41a8cdff0
-SHA1 (patch-ao) = 500f1921a73e3a4b7aa91bbd819a26f2327ac8b5
-SHA1 (patch-ap) = 33f2bdbef6df3f2105d4502b8066abb6c952fc6c
-SHA1 (patch-ar) = 16d551946bdbc0f712548e3dbac0913b0fcccb44
-SHA1 (patch-as) = 8850108d0c8f101642f4855184253824f9c214b5
-SHA1 (patch-at) = 2311289176c83fcd3ff18b90bab9c2e5e05a52f1
-SHA1 (patch-au) = b2357fdaff2895a5e4da4371d72ccc3041c78a83
-SHA1 (patch-av) = be2a1440126908996410f92a04ad479f8a2ca373
-SHA1 (patch-aw) = 2776799b391983ad79af0f28367287a4a865260a
-SHA1 (patch-ax) = 93411fbeff95f76d723fdda993d55a2740d3a713
-SHA1 (patch-ay) = 8828bcf2286da8831f2a7c9652f168f33176c641
-SHA1 (patch-ba) = ee151472a9ec28301b67e696e81673c4bf753ed6
-SHA1 (patch-bb) = c07dfb4783694f827e0268bd780af135a800f980
-SHA1 (patch-bv) = 2ba938aef7a5c9eb417e443577b841bae0e0550a
-SHA1 (patch-ck) = d085b0ced66544963441fff5231e06fd9ac03878
-SHA1 (patch-cl) = ad26eee7b315ec512453c73cdc29253e0fa6266f
-SHA1 (patch-cp) = 1f774a6636ce6646fc83bab304e84ce2d8886db5
-SHA1 (patch-cq) = b2fcddf97e92a49828504777232841c8d5e3df16
-SHA1 (patch-python_xen_util_xmlrpcclient.py) = 227db87dee15cfb7bedd67d6c118983b4dae2e34
-SHA1 (patch-python_xen_util_xmlrpclib2.py) = 0fc01ed0511ccff6942453f3592a6939b60ab0c0
diff --git a/sysutils/xentools3-hvm/files/NetBSD.mk b/sysutils/xentools3-hvm/files/NetBSD.mk
deleted file mode 100644
index 39d24996f4e..00000000000
--- a/sysutils/xentools3-hvm/files/NetBSD.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-# $NetBSD: NetBSD.mk,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-include $(XEN_ROOT)/config/StdGNU.mk
diff --git a/sysutils/xentools3-hvm/files/elf_machdep.h b/sysutils/xentools3-hvm/files/elf_machdep.h
deleted file mode 100644
index 34fdf61921d..00000000000
--- a/sysutils/xentools3-hvm/files/elf_machdep.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* $NetBSD: elf_machdep.h,v 1.1 2007/12/02 18:55:31 bouyer Exp $ */
-
-#ifndef __i386__
-#include <amd64/elf_machdep.h>
-#else /* !__i386__ */
-/* i386 ELF definitions for gcc -m32 */
-
-#define ELF32_MACHDEP_ENDIANNESS ELFDATA2LSB
-#define ELF32_MACHDEP_ID_CASES \
- case EM_386: \
- case EM_486: \
- break;
-
-#define ELF64_MACHDEP_ENDIANNESS XXX /* break compilation */
-#define ELF64_MACHDEP_ID_CASES \
- /* no 64-bit ELF machine types supported */
-
-#define ELF32_MACHDEP_ID EM_386
-
-#define ARCH_ELFSIZE 32 /* MD native binary size */
-
-/* i386 relocations */
-#define R_386_NONE 0
-#define R_386_32 1
-#define R_386_PC32 2
-#define R_386_GOT32 3
-#define R_386_PLT32 4
-#define R_386_COPY 5
-#define R_386_GLOB_DAT 6
-#define R_386_JMP_SLOT 7
-#define R_386_RELATIVE 8
-#define R_386_GOTOFF 9
-#define R_386_GOTPC 10
-/* The following relocations are GNU extensions. */
-#define R_386_16 20
-#define R_386_PC16 21
-#define R_386_8 22
-#define R_386_PC8 23
-
-#define R_TYPE(name) __CONCAT(R_386_,name)
-#endif /* !__i386__ */
diff --git a/sysutils/xentools3-hvm/files/hvm-nbsd b/sysutils/xentools3-hvm/files/hvm-nbsd
deleted file mode 100644
index 2ff8181f827..00000000000
--- a/sysutils/xentools3-hvm/files/hvm-nbsd
+++ /dev/null
@@ -1,68 +0,0 @@
-#============================================================================
-# Python configuration setup for 'xm create'.
-# This script sets the parameters used when a domain is created using 'xm create'.
-# You use a separate script for each domain you want to create, or
-# you can set the parameters for the domain on the xm command line.
-#============================================================================
-
-#----------------------------------------------------------------------------
-# Kernel image file.
-kernel = "@PREFIX@/lib/xen/boot/hvmloader"
-
-builder='hvm'
-
-# Initial memory allocation (in megabytes) for the new domain.
-memory = 256
-
-# A name for your domain. All domains must have different names.
-name = "hvm"
-
-#Network interface. By default emules a realtek 8139. For a NetBSD guest you
-# have to disable re(4) and let rtk attach to use it.
-# ne2k_pci emulates a pci ne2000 clone; this his cpu-hungry in dom0
-# pcnet emulates a AMD PCnet-PCI controller; but it corrupts packets with
-# pcn(4) under NetBSD.
-#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=ne2k_pci' ]
-#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=pcnet' ]
-vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu' ]
-
-#----------------------------------------------------------------------------
-# device model to use: only qemu-dm available for now
-device_model = '/usr/pkg/libexec/qemu-dm'
-
-# Define the disk devices you want the domain to have access to, and
-# what you want them accessible as.
-# Each disk entry is of the form phy:UNAME,DEV,MODE
-# where UNAME is the device, DEV is the device name the domain will see,
-# and MODE is r for read-only, w for read-write.
-# For hvm domains you can only use hda to hdd. You can set extra types
-# (e.g. cdrom)
-
-disk = [ 'file:/home/domains/vmx,ioemu:hda,w', 'file:/home/domains/i386cd.iso,ioemu:hdc:cdrom,r' ]
-
-# floppy images; this doesn't seem to work currently. Use a iso image instead.
-#fda = '/home/domains/boot1.fs'
-
-# boot device: a = floppy, c= hard drive, d= cdrom (with the disk entry
-# before)
-boot='d'
-
-# By default, 'xm create' will try to open an X window on the current display
-# for the virtal framebuffer. You can have the virtal framebuffer in vnc
-# instead, and connect using a vnc client (using localhost:$vncdisplay)
-# If vncunused is set to 1 (this is the default value), vncdisplay
-# will be set to the first unused port; so it's recommended to
-#vnc = 1
-#vncdisplay = 0
-#vncunused = 0
-
-#Xen emulates a PS/2 mouse, but the pointer in the guest has difficulties
-# tracking the absolute position. Xen can emulate a USB tablet in addition
-# to the mouse which will report the absolute position of the pointer,
-# and make the mouse much easier to use.
-#
-usb=1
-usbdevice='tablet'
-#usbdevice='mouse'
-
-#============================================================================
diff --git a/sysutils/xentools3-hvm/files/int_types.h b/sysutils/xentools3-hvm/files/int_types.h
deleted file mode 100644
index 1cb43124ae7..00000000000
--- a/sysutils/xentools3-hvm/files/int_types.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* $NetBSD: int_types.h,v 1.1 2007/12/02 18:55:31 bouyer Exp $ */
-
-/*-
- * Copyright (c) 1990 The Regents of the University of California.
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- * 3. Neither the name of the University nor the names of its contributors
- * may be used to endorse or promote products derived from this software
- * without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- * from: @(#)types.h 7.5 (Berkeley) 3/9/91
- */
-
-#ifndef __i386__
-#include <amd64/int_types.h>
-#else /* !__i386__ */
-/* i386 types definitions for gcc -m32 */
-#ifndef _I386_INT_TYPES_H_
-#define _I386_INT_TYPES_H_
-
-#include <sys/cdefs.h>
-
-/*
- * 7.18.1 Integer types
- */
-
-/* 7.18.1.1 Exact-width integer types */
-
-typedef signed char __int8_t;
-typedef unsigned char __uint8_t;
-typedef short int __int16_t;
-typedef unsigned short int __uint16_t;
-typedef int __int32_t;
-typedef unsigned int __uint32_t;
-#ifdef __COMPILER_INT64__
-typedef __COMPILER_INT64__ __int64_t;
-typedef __COMPILER_UINT64__ __uint64_t;
-#else
-/* LONGLONG */
-typedef long long int __int64_t;
-/* LONGLONG */
-typedef unsigned long long int __uint64_t;
-#endif
-
-#define __BIT_TYPES_DEFINED__
-
-/* 7.18.1.4 Integer types capable of holding object pointers */
-
-typedef int __intptr_t;
-typedef unsigned int __uintptr_t;
-
-#endif /* !_I386_INT_TYPES_H_ */
-#endif /* !__i386__ */
diff --git a/sysutils/xentools3-hvm/files/qemu-ifup-nbsd b/sysutils/xentools3-hvm/files/qemu-ifup-nbsd
deleted file mode 100755
index eee78765d67..00000000000
--- a/sysutils/xentools3-hvm/files/qemu-ifup-nbsd
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-ifconfig $1 up
-exec /sbin/brconfig $2 add $1
diff --git a/sysutils/xentools3-hvm/files/xenio.h b/sysutils/xentools3-hvm/files/xenio.h
deleted file mode 100644
index dfbb03187c5..00000000000
--- a/sysutils/xentools3-hvm/files/xenio.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* NetBSD: xenio.h,v 1.3 2005/05/24 12:07:12 yamt Exp $ */
-
-/******************************************************************************
- * privcmd.h
- *
- * Copyright (c) 2003-2004, K A Fraser
- *
- * This file may be distributed separately from the Linux kernel, or
- * incorporated into other software packages, subject to the following license:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this source file (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy, modify,
- * merge, publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef __PKGSRC_PRIVCMD_H__
-#define __PKGSRC_PRIVCMD_H__
-
-/* Interface to /proc/xen/privcmd */
-
-typedef struct privcmd_hypercall
-{
- unsigned long op;
- unsigned long arg[5];
-} privcmd_hypercall_t;
-
-typedef struct privcmd_mmap_entry {
- unsigned long va;
- unsigned long mfn;
- unsigned long npages;
-} privcmd_mmap_entry_t;
-
-typedef struct privcmd_mmap {
- int num;
- domid_t dom; /* target domain */
- privcmd_mmap_entry_t *entry;
-} privcmd_mmap_t;
-
-typedef struct privcmd_mmapbatch {
- int num; /* number of pages to populate */
- domid_t dom; /* target domain */
- unsigned long addr; /* virtual address */
- unsigned long *arr; /* array of mfns - top nibble set on err */
-} privcmd_mmapbatch_t;
-
-typedef struct privcmd_blkmsg
-{
- unsigned long op;
- void *buf;
- int buf_size;
-} privcmd_blkmsg_t;
-
-/*
- * @cmd: IOCTL_PRIVCMD_HYPERCALL
- * @arg: &privcmd_hypercall_t
- * Return: Value returned from execution of the specified hypercall.
- */
-#define IOCTL_PRIVCMD_HYPERCALL \
- _IOWR('P', 0, privcmd_hypercall_t)
-
-#if defined(_KERNEL)
-/* compat */
-#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN_OLD \
- _IO('P', 1)
-#endif /* defined(_KERNEL) */
-
-#define IOCTL_PRIVCMD_MMAP \
- _IOW('P', 2, privcmd_mmap_t)
-#define IOCTL_PRIVCMD_MMAPBATCH \
- _IOW('P', 3, privcmd_mmapbatch_t)
-#define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \
- _IOR('P', 4, unsigned long)
-
-/*
- * @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN
- * @arg: n/a
- * Return: Port associated with domain-controller end of control event channel
- * for the initial domain.
- */
-#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
- _IOR('P', 5, int)
-
-/* Interface to /dev/xenevt */
-/* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition. */
-#define EVTCHN_RESET _IO('E', 1)
-/* EVTCHN_BIND: Bind to the specified event-channel port. */
-#define EVTCHN_BIND _IOW('E', 2, unsigned long)
-/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */
-#define EVTCHN_UNBIND _IOW('E', 3, unsigned long)
-
-#endif /* __PKGSRC_PRIVCMD_H__ */
diff --git a/sysutils/xentools3-hvm/files/xenio3.h b/sysutils/xentools3-hvm/files/xenio3.h
deleted file mode 100644
index 5ee2a26e20f..00000000000
--- a/sysutils/xentools3-hvm/files/xenio3.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* $NetBSD: xenio3.h,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $ */
-/******************************************************************************
- * evtchn.h
- *
- * Interface to /dev/xen/evtchn.
- *
- * Copyright (c) 2003-2005, K A Fraser
- *
- * This file may be distributed separately from the Linux kernel, or
- * incorporated into other software packages, subject to the following license:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this source file (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy, modify,
- * merge, publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef __NetBSD_XENIO3_H__
-#define __NetBSD_XENIO3_H__
-
-/*
- * Bind a fresh port to VIRQ @virq.
- * Return allocated port.
- */
-#define IOCTL_EVTCHN_BIND_VIRQ \
- _IOWR('E', 4, struct ioctl_evtchn_bind_virq)
-struct ioctl_evtchn_bind_virq {
- unsigned int virq;
- unsigned int port;
-};
-
-/*
- * Bind a fresh port to remote <@remote_domain, @remote_port>.
- * Return allocated port.
- */
-#define IOCTL_EVTCHN_BIND_INTERDOMAIN \
- _IOWR('E', 5, struct ioctl_evtchn_bind_interdomain)
-struct ioctl_evtchn_bind_interdomain {
- unsigned int remote_domain, remote_port;
- unsigned int port;
-};
-
-/*
- * Allocate a fresh port for binding to @remote_domain.
- * Return allocated port.
- */
-#define IOCTL_EVTCHN_BIND_UNBOUND_PORT \
- _IOWR('E', 6, struct ioctl_evtchn_bind_unbound_port)
-struct ioctl_evtchn_bind_unbound_port {
- unsigned int remote_domain;
- unsigned int port;
-};
-
-/*
- * Unbind previously allocated @port.
- */
-#define IOCTL_EVTCHN_UNBIND \
- _IOW('E', 7, struct ioctl_evtchn_unbind)
-struct ioctl_evtchn_unbind {
- unsigned int port;
-};
-
-/*
- * Send event to previously allocated @port.
- */
-#define IOCTL_EVTCHN_NOTIFY \
- _IOW('E', 8, struct ioctl_evtchn_notify)
-struct ioctl_evtchn_notify {
- unsigned int port;
-};
-
-/* Clear and reinitialise the event buffer. Clear error condition. */
-#define IOCTL_EVTCHN_RESET \
- _IO('E', 9)
-
-#endif /* __NetBSD_XENIO3_H__ */
diff --git a/sysutils/xentools3-hvm/patches/patch-.._patch-Config.mk b/sysutils/xentools3-hvm/patches/patch-.._patch-Config.mk
deleted file mode 100644
index b2e71623188..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-.._patch-Config.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-.._patch-Config.mk,v 1.1 2013/04/11 19:57:52 joerg Exp $
-
---- ../Config.mk.orig 2011-12-07 10:40:48.000000000 +0000
-+++ ../Config.mk
-@@ -19,7 +19,7 @@ SHELL ?= /bin/sh
- # Tools to run on system hosting the build
- HOSTCC = gcc
- HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
--HOSTCFLAGS += -fno-strict-aliasing
-+HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS}
- HOSTCFLAGS_x86_32 = -m32
- HOSTCFLAGS_x86_64 = -m64
- HOSTCFLAGS += $(HOSTCFLAGS_$(XEN_COMPILE_ARCH))
-@@ -70,10 +70,11 @@ CFLAGS += -Wall -Wstrict-prototypes
-
- # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
- # result of any casted expression causes a warning.
--CFLAGS += -Wno-unused-value
-+CFLAGS += -Wno-unused-value -Wno-switch
-
- HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
- CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
-+CFLAGS += ${EXTRA_CFLAGS}
-
- LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
- CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
diff --git a/sysutils/xentools3-hvm/patches/patch-aa b/sysutils/xentools3-hvm/patches/patch-aa
deleted file mode 100644
index 7a6a25088f2..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-aa
+++ /dev/null
@@ -1,61 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- Makefile.orig 2007-05-18 16:45:21.000000000 +0200
-+++ Makefile 2007-06-12 22:20:43.000000000 +0200
-@@ -2,34 +2,11 @@
- include $(XEN_ROOT)/tools/Rules.mk
-
- SUBDIRS-y :=
--SUBDIRS-y += libxc
--SUBDIRS-y += xenstore
--SUBDIRS-y += misc
--SUBDIRS-y += examples
--SUBDIRS-y += xentrace
--SUBDIRS-$(CONFIG_XCUTILS) += xcutils
--SUBDIRS-$(CONFIG_X86) += firmware
--SUBDIRS-y += security
--SUBDIRS-y += console
--SUBDIRS-y += xenmon
--SUBDIRS-y += guest-headers
--SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
--SUBDIRS-$(VTPM_TOOLS) += vtpm
--SUBDIRS-y += xenstat
--SUBDIRS-y += libaio
--SUBDIRS-y += blktap
--SUBDIRS-y += libfsimage
--SUBDIRS-$(XENFB_TOOLS) += xenfb
--SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
--
--# These don't cross-compile
--ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
--SUBDIRS-$(PYTHON_TOOLS) += python
--SUBDIRS-$(PYTHON_TOOLS) += pygrub
--endif
-+SUBDIRS-y += firmware
-
- .PHONY: all
- all: check
-+ (cd libxc ; $(MAKE) mk-symlinks)
- @set -e; for subdir in $(SUBDIRS-y); do \
- $(MAKE) -C $$subdir $@; \
- done
-@@ -56,18 +33,16 @@
-
- .PHONY: check
- check:
-- $(MAKE) -C check
-
- .PHONY: check_clean
- check_clean:
-- $(MAKE) -C check clean
-
- .PHONY: ioemu ioemuinstall ioemuclean
- ifeq ($(CONFIG_IOEMU),y)
- export IOEMU_DIR ?= ioemu
- ioemu ioemuinstall:
- [ -f $(IOEMU_DIR)/config-host.mak ] || \
-- (cd $(IOEMU_DIR) && sh configure --prefix=/usr)
-+ (cd $(IOEMU_DIR) && sh configure --prefix=$(PREFIX))
- $(MAKE) -C $(IOEMU_DIR) $(patsubst ioemu%,%,$@)
- ioemuclean:
- $(MAKE) -C $(IOEMU_DIR) distclean
diff --git a/sysutils/xentools3-hvm/patches/patch-an b/sysutils/xentools3-hvm/patches/patch-an
deleted file mode 100644
index a9bda237f2b..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-an
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-an,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- firmware/Makefile.orig 2007-05-18 16:45:21.000000000 +0200
-+++ firmware/Makefile 2007-06-12 22:21:53.000000000 +0200
-@@ -4,7 +4,7 @@
- # hvmloader is a 32-bit protected mode binary.
- # It belongs in /usr/lib, not /usr/lib64.
- TARGET := hvmloader/hvmloader
--INST_DIR := $(DESTDIR)/usr/lib/xen/boot
-+INST_DIR := $(PREFIX)/lib/xen/boot
-
- SUBDIRS :=
- SUBDIRS += rombios rombios/32bit
-@@ -28,8 +28,8 @@
-
- .PHONY: install
- install: all
-- [ -d $(INST_DIR) ] || $(INSTALL_DIR) $(INST_DIR)
-- [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(INST_DIR)
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(INST_DIR)
-+ $(BSD_INSTALL_DATA) $(TARGET) ${DESTDIR}$(INST_DIR)
-
- .PHONY: clean
- clean:
diff --git a/sysutils/xentools3-hvm/patches/patch-ao b/sysutils/xentools3-hvm/patches/patch-ao
deleted file mode 100644
index a55797a831d..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-ao
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD: patch-ao,v 1.3 2009/03/31 17:37:37 bouyer Exp $
-
---- ioemu/configure.orig 2008-04-25 15:03:12.000000000 +0200
-+++ ioemu/configure 2009-03-31 17:41:22.000000000 +0200
-@@ -513,11 +513,11 @@
- if test -z "$prefix" ; then
- prefix="/usr/local"
- fi
--mandir="$prefix/share/man"
-+mandir="$prefix/man"
- datadir="$prefix/share/xen/qemu"
--docdir="$prefix/share/doc/qemu"
--bindir="$prefix/$libdir/xen/bin"
--configdir="/etc/xen"
-+docdir="$prefix/share/doc/xen"
-+bindir="$prefix/libexec"
-+configdir="/usr/pkg/etc/xen"
- fi
-
- echo "Install prefix $prefix"
-@@ -653,6 +653,8 @@
- echo "#define CONFIG_WIN32 1" >> $config_h
- elif test -f "/usr/include/byteswap.h" ; then
- echo "#define HAVE_BYTESWAP_H 1" >> $config_h
-+elif test -f "/usr/include/machine/bswap.h" ; then
-+ echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_h
- fi
- if test "$darwin" = "yes" ; then
- echo "CONFIG_DARWIN=yes" >> $config_mak
-@@ -716,9 +718,6 @@
- echo "VPATH=$source_path" >> $config_mak
- fi
- echo "TARGET_DIRS=$target_list" >> $config_mak
--if [ "$build_docs" = "yes" ] ; then
-- echo "BUILD_DOCS=yes" >> $config_mak
--fi
- if [ "$build_acpi_tables" = "yes" ] ; then
- echo "BUILD_ACPI_TABLES=yes" >> $config_mak
- fi
diff --git a/sysutils/xentools3-hvm/patches/patch-ap b/sysutils/xentools3-hvm/patches/patch-ap
deleted file mode 100644
index efe94d6f8b8..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-ap
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ap,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- firmware/hvmloader/mkhex.orig 2006-04-13 19:48:38.000000000 +0200
-+++ firmware/hvmloader/mkhex
-@@ -21,6 +21,6 @@
- #
-
- echo "unsigned $1[] = {"
--od -v -t x $2 | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$/,/'
-+od -v -t x $2 | sed 's/^[0-9]* */0x0/' | sed 's/ */, 0x/g' | sed 's/$/,/'
- echo "};"
-
diff --git a/sysutils/xentools3-hvm/patches/patch-ar b/sysutils/xentools3-hvm/patches/patch-ar
deleted file mode 100644
index a665a362451..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-ar
+++ /dev/null
@@ -1,178 +0,0 @@
-$NetBSD: patch-ar,v 1.2 2009/10/18 21:28:10 bouyer Exp $
-
---- ioemu/vl.c.orig 2008-04-25 15:03:12.000000000 +0200
-+++ ioemu/vl.c 2009-10-18 22:22:56.000000000 +0200
-@@ -37,14 +37,17 @@
- #include <sys/poll.h>
- #include <sys/mman.h>
- #include <sys/ioctl.h>
-+#include <sys/resource.h>
- #include <sys/socket.h>
- #include <netinet/in.h>
-+#include <net/if.h>
-+#include <net/if_tap.h>
- #include <arpa/inet.h>
- #include <dirent.h>
- #include <netdb.h>
- #ifdef _BSD
- #include <sys/stat.h>
--#ifndef __APPLE__
-+#ifndef _BSD
- #include <libutil.h>
- #endif
- #else
-@@ -89,8 +92,8 @@
- #include "exec-all.h"
-
- #include <xen/hvm/params.h>
--#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
--#define DEFAULT_BRIDGE "xenbr0"
-+#define DEFAULT_NETWORK_SCRIPT "@XENDCONFDIR@/scripts/qemu-ifup"
-+#define DEFAULT_BRIDGE "bridge0"
-
- //#define DEBUG_UNUSED_IOPORT
- //#define DEBUG_IOPORT
-@@ -1683,7 +1686,7 @@
- return 0;
- }
-
--#if defined(__linux__)
-+#if defined(__linux__) || defined(__NetBSD__)
- CharDriverState *qemu_chr_open_pty(void)
- {
- struct termios tty;
-@@ -1696,7 +1699,12 @@
-
- /* Set raw attributes on the pty. */
- cfmakeraw(&tty);
-+#if defined(__NetBSD__)
-+ tcsetattr(master_fd, TCSAFLUSH, &tty);
-+ close(slave_fd);
-+#else
- tcsetattr(slave_fd, TCSAFLUSH, &tty);
-+#endif
-
- fprintf(stderr, "char device redirected to %s\n", ptsname(master_fd));
-
-@@ -1834,7 +1842,7 @@
- chr->chr_ioctl = tty_serial_ioctl;
- return chr;
- }
--
-+#if defined(__linux__)
- static int pp_ioctl(CharDriverState *chr, int cmd, void *arg)
- {
- int fd = (int)chr->opaque;
-@@ -1897,13 +1905,14 @@
- chr->chr_ioctl = pp_ioctl;
- return chr;
- }
-+#endif /* __linux__ */
-
- #else
- CharDriverState *qemu_chr_open_pty(void)
- {
- return NULL;
- }
--#endif
-+#endif /* __linux__ || __NetBSD__ */
-
- #endif /* !defined(_WIN32) */
-
-@@ -3146,7 +3155,7 @@
- fclose(f);
- atexit(smb_exit);
-
-- snprintf(smb_cmdline, sizeof(smb_cmdline), "/usr/sbin/smbd -s %s",
-+ snprintf(smb_cmdline, sizeof(smb_cmdline), "@PREFIX@/sbin/smbd -s %s",
- smb_conf);
-
- slirp_add_exec(0, smb_cmdline, 4, 139);
-@@ -3210,16 +3219,26 @@
- int fd;
- char *dev;
- struct stat s;
-+ struct ifreq ifr;
-
- fd = open("/dev/tap", O_RDWR);
- if (fd < 0) {
-- fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation\n");
-+ fprintf(stderr, "warning: could not open /dev/tap: no virtual network emulation: %s\n", strerror(errno));
- return -1;
- }
-
-+#ifdef TAPGIFNAME
-+ if (ioctl (fd, TAPGIFNAME, (void*)&ifr) < 0) {
-+ fprintf(stderr, "warning: could not open get tap name: %s\n",
-+ strerror(errno));
-+ return -1;
-+ }
-+ pstrcpy(ifname, ifname_size, ifr.ifr_name);
-+#else
- fstat(fd, &s);
- dev = devname(s.st_rdev, S_IFCHR);
- pstrcpy(ifname, ifname_size, dev);
-+#endif
-
- fcntl(fd, F_SETFL, O_NONBLOCK);
- return fd;
-@@ -5972,7 +5991,6 @@
- nr_buckets = (((MAX_MCACHE_SIZE >> PAGE_SHIFT) +
- (1UL << (MCACHE_BUCKET_SHIFT - PAGE_SHIFT)) - 1) >>
- (MCACHE_BUCKET_SHIFT - PAGE_SHIFT));
-- fprintf(logfile, "qemu_map_cache_init nr_buckets = %lx\n", nr_buckets);
-
- /*
- * Use mmap() directly: lets us allocate a big hash table with no up-front
-@@ -5981,8 +5999,9 @@
- */
- size = nr_buckets * sizeof(struct map_cache);
- size = (size + PAGE_SIZE - 1) & ~(PAGE_SIZE - 1);
-+ fprintf(logfile, "qemu_map_cache_init nr_buckets = %lx size %lu\n", nr_buckets, size);
- mapcache_entry = mmap(NULL, size, PROT_READ|PROT_WRITE,
-- MAP_SHARED|MAP_ANONYMOUS, 0, 0);
-+ MAP_SHARED|MAP_ANONYMOUS, -1, 0);
- if (mapcache_entry == MAP_FAILED) {
- errno = ENOMEM;
- return -1;
-@@ -6119,6 +6138,7 @@
- unsigned long ioreq_pfn;
- extern void *shared_page;
- extern void *buffered_io_page;
-+ struct rlimit rl;
- #ifdef __ia64__
- unsigned long nr_pages;
- xen_pfn_t *page_array;
-@@ -6127,6 +6147,32 @@
-
- char qemu_dm_logfilename[64];
-
-+ /* XXX required for now */
-+ if (setenv("PTHREAD_DIAGASSERT", "A", 1) != 0)
-+ perror("setenv");
-+ if (getrlimit(RLIMIT_STACK, &rl) != 0) {
-+ perror("getrlimit(RLIMIT_STACK)");
-+ exit(1);
-+ }
-+ rl.rlim_cur = rl.rlim_max;
-+ if (setrlimit(RLIMIT_STACK, &rl) != 0)
-+ perror("setrlimit(RLIMIT_STACK)");
-+ if (getrlimit(RLIMIT_DATA, &rl) != 0) {
-+ perror("getrlimit(RLIMIT_DATA)");
-+ exit(1);
-+ }
-+ rl.rlim_cur = rl.rlim_max;
-+ if (setrlimit(RLIMIT_DATA, &rl) != 0)
-+ perror("setrlimit(RLIMIT_DATA)");
-+ rl.rlim_cur = RLIM_INFINITY;
-+ rl.rlim_max = RLIM_INFINITY;
-+ if (setrlimit(RLIMIT_RSS, &rl) != 0)
-+ perror("setrlimit(RLIMIT_RSS)");
-+ rl.rlim_cur = RLIM_INFINITY;
-+ rl.rlim_max = RLIM_INFINITY;
-+ if (setrlimit(RLIMIT_MEMLOCK, &rl) != 0)
-+ perror("setrlimit(RLIMIT_MEMLOCK)");
-+
- LIST_INIT (&vm_change_state_head);
- #ifndef _WIN32
- {
diff --git a/sysutils/xentools3-hvm/patches/patch-as b/sysutils/xentools3-hvm/patches/patch-as
deleted file mode 100644
index 6f5f4c0ca10..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-as
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-as,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- ioemu/bswap.h.orig 2006-04-13 19:48:38.000000000 +0200
-+++ ioemu/bswap.h
-@@ -5,6 +5,12 @@
-
- #include <inttypes.h>
-
-+#ifdef HAVE_MACHINE_BSWAP_H
-+#include <sys/endian.h>
-+#include <sys/types.h>
-+#include <machine/bswap.h>
-+#else
-+
- #ifdef HAVE_BYTESWAP_H
- #include <byteswap.h>
- #else
-@@ -58,6 +64,8 @@ static inline uint64_t bswap64(uint64_t
- return bswap_64(x);
- }
-
-+#endif /* ! HAVE_MACHINE_BSWAP_H */
-+
- static inline void bswap16s(uint16_t *s)
- {
- *s = bswap16(*s);
diff --git a/sysutils/xentools3-hvm/patches/patch-at b/sysutils/xentools3-hvm/patches/patch-at
deleted file mode 100644
index 26906d436c8..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-at
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-at,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- ioemu/audio/ossaudio.c.orig 2006-10-04 04:28:03.000000000 +0200
-+++ ioemu/audio/ossaudio.c 2006-10-18 17:43:53.000000000 +0200
-@@ -231,7 +231,7 @@
- goto err;
- }
-
-- if (ioctl (fd, SNDCTL_DSP_NONBLOCK)) {
-+ if (ioctl (fd, SNDCTL_DSP_NONBLOCK, NULL)) {
- oss_logerr2 (errno, typ, "Failed to set non-blocking mode\n");
- goto err;
- }
diff --git a/sysutils/xentools3-hvm/patches/patch-au b/sysutils/xentools3-hvm/patches/patch-au
deleted file mode 100644
index 72acfa62e8b..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-au
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-au,v 1.2 2008/02/17 16:29:03 bouyer Exp $
-
---- libxc/xc_private.h.orig 2006-10-16 22:15:35.000000000 +0200
-+++ libxc/xc_private.h 2006-10-16 22:16:09.000000000 +0200
-@@ -15,7 +15,11 @@
-
- #include "xenctrl.h"
-
-+#ifdef __NetBSD__
-+#include <xen/xenio.h>
-+#else
- #include <xen/sys/privcmd.h>
-+#endif
-
- /* valgrind cannot see when a hypercall has filled in some values. For this
- reason, we must zero the privcmd_hypercall_t or domctl/sysctl instance
diff --git a/sysutils/xentools3-hvm/patches/patch-av b/sysutils/xentools3-hvm/patches/patch-av
deleted file mode 100644
index 323ffdff478..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-av
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-av,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- libxc/xg_private.h.orig 2006-10-16 22:15:35.000000000 +0200
-+++ libxc/xg_private.h 2006-10-16 22:16:19.000000000 +0200
-@@ -15,7 +15,6 @@
- #include "xenguest.h"
- #include "xc_private.h"
-
--#include <xen/sys/privcmd.h>
- #include <xen/memory.h>
- #include <xen/elfnote.h>
-
diff --git a/sysutils/xentools3-hvm/patches/patch-aw b/sysutils/xentools3-hvm/patches/patch-aw
deleted file mode 100644
index 0a3a28eb075..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-aw
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-aw,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- ioemu/audio/mixeng.c.orig 2006-10-04 04:28:03.000000000 +0200
-+++ ioemu/audio/mixeng.c 2006-10-18 17:45:57.000000000 +0200
-@@ -102,6 +102,7 @@
- #undef SHIFT
-
- t_sample *mixeng_conv[2][2][2][2] = {
-+#if !defined(__NetBSD__)
- {
- {
- {
-@@ -146,9 +147,11 @@
- }
- }
- }
-+#endif /* !__NetBSD__ */
- };
-
- f_sample *mixeng_clip[2][2][2][2] = {
-+#if !defined(__NetBSD__)
- {
- {
- {
-@@ -193,6 +196,7 @@
- }
- }
- }
-+#endif /* !__NetBSD__ */
- };
-
- /*
diff --git a/sysutils/xentools3-hvm/patches/patch-ax b/sysutils/xentools3-hvm/patches/patch-ax
deleted file mode 100644
index 2dc2f96da9c..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-ax
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ax,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- ioemu/vnc.c.orig 2006-10-19 22:23:35.000000000 +0200
-+++ ioemu/vnc.c 2006-10-19 22:26:50.000000000 +0200
-@@ -24,6 +24,9 @@
- * THE SOFTWARE.
- */
-
-+#include <sys/stat.h>
-+#include <sys/socket.h>
-+#include <netinet/in.h>
- #include "vl.h"
- #include "qemu_socket.h"
- #include <assert.h>
diff --git a/sysutils/xentools3-hvm/patches/patch-ay b/sysutils/xentools3-hvm/patches/patch-ay
deleted file mode 100644
index ba624e83016..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-ay
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-ay,v 1.3 2009/03/24 20:04:51 abs Exp $
-
---- ioemu/Makefile.orig 2008-04-25 14:03:12.000000000 +0100
-+++ ioemu/Makefile
-@@ -68,11 +68,12 @@ install-doc: $(DOCS)
- $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
- ifndef CONFIG_WIN32
- mkdir -p "$(DESTDIR)$(mandir)/man1"
-- $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
-+ $(INSTALL_DATA) qemu.1 "$(DESTDIR)$(mandir)/man1/xen-qemu.1"
-+ $(INSTALL_DATA) qemu-img.1 "$(DESTDIR)$(mandir)/man1/xen-qemu-img.1"
- endif
-
- install: all $(if $(BUILD_DOCS),install-doc)
-- mkdir -p "$(DESTDIR)$(bindir)"
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(bindir)
- # $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
- # mkdir -p "$(DESTDIR)$(datadir)"
- # for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
-@@ -80,9 +81,9 @@ install: all $(if $(BUILD_DOCS),install-
- # $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
- # done
- ifndef CONFIG_WIN32
-- mkdir -p "$(DESTDIR)$(datadir)/keymaps"
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(datadir)/keymaps
- for x in $(KEYMAPS); do \
-- $(INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
-+ $(BSD_INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
- done
- endif
- for d in $(TARGET_DIRS); do \
diff --git a/sysutils/xentools3-hvm/patches/patch-ba b/sysutils/xentools3-hvm/patches/patch-ba
deleted file mode 100644
index 81215f06030..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-ba
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ba,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- ioemu/target-i386-dm/exec-dm.c.orig 2006-10-18 18:19:27.000000000 +0200
-+++ ioemu/target-i386-dm/exec-dm.c 2006-10-18 18:19:40.000000000 +0200
-@@ -163,8 +163,8 @@
- #else
- setvbuf(logfile, NULL, _IOLBF, 0);
- #endif
-- stdout = logfile;
-- stderr = logfile;
-+ dup2(fileno(logfile), 1);
-+ dup2(fileno(logfile), 2);
- }
- }
-
diff --git a/sysutils/xentools3-hvm/patches/patch-bb b/sysutils/xentools3-hvm/patches/patch-bb
deleted file mode 100644
index b9f1553ed47..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-bb
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-bb,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- ioemu/Makefile.target.orig 2007-01-08 16:00:48.000000000 +0100
-+++ ioemu/Makefile.target 2007-04-26 21:38:21.000000000 +0200
-@@ -567,12 +567,8 @@
- rm -rf config.mak config.h
-
- install: all
-- mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(configdir)"
--ifneq ($(PROGS),)
-- $(INSTALL_PROG) $(PROGS) "$(DESTDIR)$(bindir)"
--endif
-- $(INSTALL_PROG) $(TARGET_PATH)/qemu-dm.debug "$(DESTDIR)$(bindir)"
-- $(INSTALL_PROG) $(TARGET_PATH)/qemu-ifup "$(DESTDIR)$(configdir)"
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(bindir)
-+ $(BSD_INSTALL_PROGRAM) $(PROGS) ${DESTDIR}$(bindir)
-
- ifneq ($(wildcard .depend),)
- include .depend
diff --git a/sysutils/xentools3-hvm/patches/patch-bv b/sysutils/xentools3-hvm/patches/patch-bv
deleted file mode 100644
index 0279eb04d88..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-bv
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-bv,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- libxc/xenctrl.h.orig 2007-01-08 16:00:49.000000000 +0100
-+++ libxc/xenctrl.h 2007-04-26 21:40:23.000000000 +0200
-@@ -16,6 +16,9 @@
-
- #include <stddef.h>
- #include <stdint.h>
-+#undef uint8_t
-+#undef uint16_t
-+#undef uint32_t
- #include <xen/xen.h>
- #include <xen/domctl.h>
- #include <xen/sysctl.h>
diff --git a/sysutils/xentools3-hvm/patches/patch-ck b/sysutils/xentools3-hvm/patches/patch-ck
deleted file mode 100644
index 7532d14a39e..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-ck
+++ /dev/null
@@ -1,9 +0,0 @@
-$NetBSD: patch-ck,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
---- firmware/rombios/32bit/Makefile.orig 2007-06-12 22:41:50.000000000 +0200
-+++ firmware/rombios/32bit/Makefile 2007-06-12 22:41:59.000000000 +0200
-@@ -39,4 +39,4 @@
- nm -u 32bitbios_all.o; \
- exit 11; \
- } || :
-- bash mkhex highbios_array 32bitbios_all.o > $@
-+ sh mkhex highbios_array 32bitbios_all.o > $@
diff --git a/sysutils/xentools3-hvm/patches/patch-cl b/sysutils/xentools3-hvm/patches/patch-cl
deleted file mode 100644
index 494a255d544..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-cl
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-cl,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- firmware/rombios/32bit/mkhex.orig 2007-06-12 22:45:56.000000000 +0200
-+++ firmware/rombios/32bit/mkhex 2007-06-12 22:46:08.000000000 +0200
-@@ -21,6 +21,6 @@
- #
-
- echo "unsigned $1[] = {"
--od -v -t x $2 | sed 's/^[0-9]* /0x/' | sed 's/ /, 0x/g' | sed 's/$/,/'
-+od -v -t x $2 | sed 's/^[0-9]* */0x0/' | sed 's/ */, 0x/g' | sed 's/$/,/' | sed 's/0x,//' | sed 's/^[0-9]*,//'
- echo "};"
-
diff --git a/sysutils/xentools3-hvm/patches/patch-cp b/sysutils/xentools3-hvm/patches/patch-cp
deleted file mode 100644
index a55777b0e3f..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-cp
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-cp,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-
---- ../xen/include/public/arch-x86/xen-x86_32.h.orig 2007-05-27 15:08:03.000000000 +0200
-+++ ../xen/include/public/arch-x86/xen-x86_32.h 2007-05-27 15:08:44.000000000 +0200
-@@ -103,7 +103,8 @@
- (hnd).p = val; \
- } while ( 0 )
- #define uint64_aligned_t uint64_t __attribute__((aligned(8)))
--#define XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name
-+#define __XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name
-+#define XEN_GUEST_HANDLE_64(name) __XEN_GUEST_HANDLE_64(name)
- #endif
-
- #ifndef __ASSEMBLY__
diff --git a/sysutils/xentools3-hvm/patches/patch-cq b/sysutils/xentools3-hvm/patches/patch-cq
deleted file mode 100644
index 7016cca7877..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-cq
+++ /dev/null
@@ -1,757 +0,0 @@
-$NetBSD: patch-cq,v 1.1.1.1 2007/06/14 19:42:12 bouyer Exp $
-This is a backport of bugfixes and changes in xen-unstable to make pcnet
-usable. It gives better performances than the ne2000 or realtek emulations.
-
---- ioemu/hw/pcnet.c.orig 2007-06-13 19:06:54.000000000 +0200
-+++ ioemu/hw/pcnet.c 2007-06-13 19:54:43.000000000 +0200
-@@ -41,25 +41,6 @@
- #define PCNET_IOPORT_SIZE 0x20
- #define PCNET_PNPMMIO_SIZE 0x20
-
--
--typedef struct PCNetState_st PCNetState;
--
--struct PCNetState_st {
-- PCIDevice dev;
-- VLANClientState *vc;
-- NICInfo *nd;
-- QEMUTimer *poll_timer;
-- int mmio_io_addr, rap, isr, lnkst;
-- target_phys_addr_t rdra, tdra;
-- uint8_t prom[16];
-- uint16_t csr[128];
-- uint16_t bcr[32];
-- uint64_t timer;
-- int xmit_pos, recv_pos;
-- uint8_t buffer[4096];
-- int tx_busy;
--};
--
- /* XXX: using bitfields for target memory structures is almost surely
- not portable, so it should be suppressed ASAP */
- #ifdef __GNUC__
-@@ -251,6 +232,28 @@
- (R)->rmd2.rcc, (R)->rmd2.rpc, (R)->rmd2.mcnt, \
- (R)->rmd2.zeros)
-
-+typedef struct PCNetState_st PCNetState;
-+
-+struct PCNetState_st {
-+ PCIDevice dev;
-+ VLANClientState *vc;
-+ NICInfo *nd;
-+ QEMUTimer *poll_timer;
-+ int mmio_io_addr, rap, isr, lnkst;
-+ target_phys_addr_t rdra, tdra;
-+ uint8_t prom[16];
-+ uint16_t csr[128];
-+ uint16_t bcr[32];
-+ uint64_t timer;
-+ int recv_pos;
-+ uint8_t tx_buffer[2048];
-+ uint8_t rx_buffer[2048];
-+ struct pcnet_TMD tmd;
-+ struct pcnet_RMD crmd;
-+ struct pcnet_RMD nrmd;
-+ struct pcnet_RMD nnrmd;
-+};
-+
- static inline void pcnet_tmd_load(PCNetState *s, struct pcnet_TMD *tmd, target_phys_addr_t addr)
- {
- if (!BCR_SWSTYLE(s)) {
-@@ -269,18 +272,17 @@
- if (BCR_SWSTYLE(s) != 3)
- cpu_physical_memory_read(addr, (void *)tmd, 16);
- else {
-- uint32_t xda[4];
-- cpu_physical_memory_read(addr,
-- (void *)&xda[0], sizeof(xda));
-- ((uint32_t *)tmd)[0] = xda[2];
-- ((uint32_t *)tmd)[1] = xda[1];
-- ((uint32_t *)tmd)[2] = xda[0];
-- ((uint32_t *)tmd)[3] = xda[3];
-+ uint32_t xda[2];
-+ cpu_physical_memory_read(addr+4, (void *)&xda[0], sizeof(xda));
-+ ((uint32_t *)tmd)[0] = xda[1];
-+ ((uint32_t *)tmd)[1] = xda[0];
-+ ((uint32_t *)tmd)[2] = 0;
- }
- }
-
- static inline void pcnet_tmd_store(PCNetState *s, struct pcnet_TMD *tmd, target_phys_addr_t addr)
- {
-+ tmd->tmd1.own = 0;
- if (!BCR_SWSTYLE(s)) {
- uint16_t xda[4];
- xda[0] = ((uint32_t *)tmd)[0] & 0xffff;
-@@ -295,14 +297,12 @@
- if (BCR_SWSTYLE(s) != 3)
- cpu_physical_memory_write(addr, (void *)tmd, 16);
- else {
-- uint32_t xda[4];
-+ uint32_t xda[2];
- xda[0] = ((uint32_t *)tmd)[2];
- xda[1] = ((uint32_t *)tmd)[1];
-- xda[2] = ((uint32_t *)tmd)[0];
-- xda[3] = ((uint32_t *)tmd)[3];
-- cpu_physical_memory_write(addr,
-- (void *)&xda[0], sizeof(xda));
-+ cpu_physical_memory_write(addr, (void *)&xda[0], sizeof(xda));
- }
-+ cpu_physical_memory_set_dirty(addr+15);
- }
- }
-
-@@ -320,21 +320,22 @@
- ((uint32_t *)rmd)[3] = 0;
- }
- else
-- if (BCR_SWSTYLE(s) != 3)
-+ if (BCR_SWSTYLE(s) != 3) {
-+ ((uint32_t *)rmd)[2] = 0;
- cpu_physical_memory_read(addr, (void *)rmd, 16);
-- else {
-- uint32_t rda[4];
-- cpu_physical_memory_read(addr,
-- (void *)&rda[0], sizeof(rda));
-- ((uint32_t *)rmd)[0] = rda[2];
-- ((uint32_t *)rmd)[1] = rda[1];
-- ((uint32_t *)rmd)[2] = rda[0];
-- ((uint32_t *)rmd)[3] = rda[3];
-+ } else {
-+ uint32_t rda[2];
-+ cpu_physical_memory_read(addr+4, (void *)&rda[0], sizeof(rda));
-+ ((uint32_t *)rmd)[0] = rda[1];
-+ ((uint32_t *)rmd)[1] = rda[0];
-+ ((uint32_t *)rmd)[2] = 0;
- }
- }
-
- static inline void pcnet_rmd_store(PCNetState *s, struct pcnet_RMD *rmd, target_phys_addr_t addr)
- {
-+ rmd->rmd1.own = 0;
-+ cpu_physical_memory_set_dirty(addr);
- if (!BCR_SWSTYLE(s)) {
- uint16_t rda[4]; \
- rda[0] = ((uint32_t *)rmd)[0] & 0xffff; \
-@@ -349,13 +350,10 @@
- if (BCR_SWSTYLE(s) != 3)
- cpu_physical_memory_write(addr, (void *)rmd, 16);
- else {
-- uint32_t rda[4];
-+ uint32_t rda[2];
- rda[0] = ((uint32_t *)rmd)[2];
- rda[1] = ((uint32_t *)rmd)[1];
-- rda[2] = ((uint32_t *)rmd)[0];
-- rda[3] = ((uint32_t *)rmd)[3];
-- cpu_physical_memory_write(addr,
-- (void *)&rda[0], sizeof(rda));
-+ cpu_physical_memory_write(addr, (void *)&rda[0], sizeof(rda));
- }
- }
- }
-@@ -369,81 +367,16 @@
-
- #define RMDSTORE(RMD,ADDR) pcnet_rmd_store(s,RMD,ADDR)
-
--#if 1
--
--#define CHECK_RMD(ADDR,RES) do { \
-- struct pcnet_RMD rmd; \
-- RMDLOAD(&rmd,(ADDR)); \
-- (RES) |= (rmd.rmd1.ones != 15) \
-- || (rmd.rmd2.zeros != 0); \
-+#define CHECK_RMD(RMD,ADDR,RES) do { \
-+ RMDLOAD((RMD),(ADDR)); \
-+ (RES) |= ((RMD)->rmd1.ones != 15); \
- } while (0)
-
- #define CHECK_TMD(ADDR,RES) do { \
-- struct pcnet_TMD tmd; \
-- TMDLOAD(&tmd,(ADDR)); \
-- (RES) |= (tmd.tmd1.ones != 15); \
-+ TMDLOAD(&(s->tmd),(ADDR)); \
-+ (RES) |= (s->tmd.tmd1.ones != 15); \
- } while (0)
-
--#else
--
--#define CHECK_RMD(ADDR,RES) do { \
-- switch (BCR_SWSTYLE(s)) { \
-- case 0x00: \
-- do { \
-- uint16_t rda[4]; \
-- cpu_physical_memory_read((ADDR), \
-- (void *)&rda[0], sizeof(rda)); \
-- (RES) |= (rda[2] & 0xf000)!=0xf000; \
-- (RES) |= (rda[3] & 0xf000)!=0x0000; \
-- } while (0); \
-- break; \
-- case 0x01: \
-- case 0x02: \
-- do { \
-- uint32_t rda[4]; \
-- cpu_physical_memory_read((ADDR), \
-- (void *)&rda[0], sizeof(rda)); \
-- (RES) |= (rda[1] & 0x0000f000L)!=0x0000f000L; \
-- (RES) |= (rda[2] & 0x0000f000L)!=0x00000000L; \
-- } while (0); \
-- break; \
-- case 0x03: \
-- do { \
-- uint32_t rda[4]; \
-- cpu_physical_memory_read((ADDR), \
-- (void *)&rda[0], sizeof(rda)); \
-- (RES) |= (rda[0] & 0x0000f000L)!=0x00000000L; \
-- (RES) |= (rda[1] & 0x0000f000L)!=0x0000f000L; \
-- } while (0); \
-- break; \
-- } \
--} while (0)
--
--#define CHECK_TMD(ADDR,RES) do { \
-- switch (BCR_SWSTYLE(s)) { \
-- case 0x00: \
-- do { \
-- uint16_t xda[4]; \
-- cpu_physical_memory_read((ADDR), \
-- (void *)&xda[0], sizeof(xda)); \
-- (RES) |= (xda[2] & 0xf000)!=0xf000;\
-- } while (0); \
-- break; \
-- case 0x01: \
-- case 0x02: \
-- case 0x03: \
-- do { \
-- uint32_t xda[4]; \
-- cpu_physical_memory_read((ADDR), \
-- (void *)&xda[0], sizeof(xda)); \
-- (RES) |= (xda[1] & 0x0000f000L)!=0x0000f000L; \
-- } while (0); \
-- break; \
-- } \
--} while (0)
--
--#endif
--
- #define PRINT_PKTHDR(BUF) do { \
- struct qemu_ether_header *hdr = (void *)(BUF); \
- printf("packet dhost=%02x:%02x:%02x:%02x:%02x:%02x, " \
-@@ -662,8 +595,6 @@
- s->csr[114] = 0x0000;
- s->csr[122] = 0x0000;
- s->csr[124] = 0x0000;
--
-- s->tx_busy = 0;
- }
-
- static void pcnet_update_irq(PCNetState *s)
-@@ -737,6 +668,9 @@
- s->csr[15] = le16_to_cpu(initblk.mode); \
- CSR_RCVRL(s) = (initblk.rlen < 9) ? (1 << initblk.rlen) : 512; \
- CSR_XMTRL(s) = (initblk.tlen < 9) ? (1 << initblk.tlen) : 512; \
-+ s->crmd.rmd1.own = 0; \
-+ s->nrmd.rmd1.own = 0; \
-+ s->nnrmd.rmd1.own = 0; \
- s->csr[ 6] = (initblk.tlen << 12) | (initblk.rlen << 8); \
- s->csr[ 8] = le16_to_cpu(initblk.ladrf1); \
- s->csr[ 9] = le16_to_cpu(initblk.ladrf2); \
-@@ -791,6 +725,10 @@
-
- if (!CSR_DRX(s))
- s->csr[0] |= 0x0020; /* set RXON */
-+ /* flush any cached receive descriptors */
-+ s->crmd.rmd1.own = 0;
-+ s->nrmd.rmd1.own = 0;
-+ s->nnrmd.rmd1.own = 0;
-
- s->csr[0] &= ~0x0004; /* clear STOP bit */
- s->csr[0] |= 0x0002;
-@@ -813,29 +751,21 @@
- s->csr[28] = s->csr[29] = 0;
- if (s->rdra) {
- int bad = 0;
--#if 1
- target_phys_addr_t crda = pcnet_rdra_addr(s, CSR_RCVRC(s));
- target_phys_addr_t nrda = pcnet_rdra_addr(s, -1 + CSR_RCVRC(s));
- target_phys_addr_t nnrd = pcnet_rdra_addr(s, -2 + CSR_RCVRC(s));
--#else
-- target_phys_addr_t crda = s->rdra +
-- (CSR_RCVRL(s) - CSR_RCVRC(s)) *
-- (BCR_SWSTYLE(s) ? 16 : 8 );
-- int nrdc = CSR_RCVRC(s)<=1 ? CSR_RCVRL(s) : CSR_RCVRC(s)-1;
-- target_phys_addr_t nrda = s->rdra +
-- (CSR_RCVRL(s) - nrdc) *
-- (BCR_SWSTYLE(s) ? 16 : 8 );
-- int nnrc = nrdc<=1 ? CSR_RCVRL(s) : nrdc-1;
-- target_phys_addr_t nnrd = s->rdra +
-- (CSR_RCVRL(s) - nnrc) *
-- (BCR_SWSTYLE(s) ? 16 : 8 );
--#endif
-
-- CHECK_RMD(PHYSADDR(s,crda), bad);
-+ if (!s->crmd.rmd1.own) {
-+ CHECK_RMD(&(s->crmd),PHYSADDR(s,crda), bad);
-+ }
- if (!bad) {
-- CHECK_RMD(PHYSADDR(s,nrda), bad);
-+ if (s->crmd.rmd1.own && !s->nrmd.rmd1.own) {
-+ CHECK_RMD(&(s->nrmd),PHYSADDR(s,nrda), bad);
-+ }
- if (bad || (nrda == crda)) nrda = 0;
-- CHECK_RMD(PHYSADDR(s,nnrd), bad);
-+ if (s->crmd.rmd1.own && s->nrmd.rmd1.own && !s->nnrmd.rmd1.own) {
-+ CHECK_RMD(&(s->nnrmd),PHYSADDR(s,nnrd), bad);
-+ }
- if (bad || (nnrd == crda)) nnrd = 0;
-
- s->csr[28] = crda & 0xffff;
-@@ -856,14 +786,12 @@
- }
-
- if (CSR_CRDA(s)) {
-- struct pcnet_RMD rmd;
-- RMDLOAD(&rmd, PHYSADDR(s,CSR_CRDA(s)));
-- CSR_CRBC(s) = rmd.rmd1.bcnt;
-- CSR_CRST(s) = ((uint32_t *)&rmd)[1] >> 16;
-+ CSR_CRBC(s) = s->crmd.rmd1.bcnt;
-+ CSR_CRST(s) = ((uint32_t *)&(s->crmd))[1] >> 16;
- #ifdef PCNET_DEBUG_RMD_X
- printf("CRDA=0x%08x CRST=0x%04x RCVRC=%d RMD1=0x%08x RMD2=0x%08x\n",
- PHYSADDR(s,CSR_CRDA(s)), CSR_CRST(s), CSR_RCVRC(s),
-- ((uint32_t *)&rmd)[1], ((uint32_t *)&rmd)[2]);
-+ ((uint32_t *)&(s->crmd))[1], ((uint32_t *)&(s->crmd))[2]);
- PRINT_RMD(&rmd);
- #endif
- } else {
-@@ -871,10 +799,8 @@
- }
-
- if (CSR_NRDA(s)) {
-- struct pcnet_RMD rmd;
-- RMDLOAD(&rmd, PHYSADDR(s,CSR_NRDA(s)));
-- CSR_NRBC(s) = rmd.rmd1.bcnt;
-- CSR_NRST(s) = ((uint32_t *)&rmd)[1] >> 16;
-+ CSR_NRBC(s) = s->nrmd.rmd1.bcnt;
-+ CSR_NRST(s) = ((uint32_t *)&(s->nrmd))[1] >> 16;
- } else {
- CSR_NRBC(s) = CSR_NRST(s) = 0;
- }
-@@ -889,6 +815,7 @@
- (CSR_XMTRL(s) - CSR_XMTRC(s)) *
- (BCR_SWSTYLE(s) ? 16 : 8 );
- int bad = 0;
-+ s->csr[0] &= ~0x0008; /* clear TDMD */
- CHECK_TMD(PHYSADDR(s, cxda),bad);
- if (!bad) {
- if (CSR_CXDA(s) != cxda) {
-@@ -907,12 +834,8 @@
- }
-
- if (CSR_CXDA(s)) {
-- struct pcnet_TMD tmd;
--
-- TMDLOAD(&tmd, PHYSADDR(s,CSR_CXDA(s)));
--
-- CSR_CXBC(s) = tmd.tmd1.bcnt;
-- CSR_CXST(s) = ((uint32_t *)&tmd)[1] >> 16;
-+ CSR_CXBC(s) = s->tmd.tmd1.bcnt;
-+ CSR_CXST(s) = ((uint32_t *)&(s->tmd))[1] >> 16;
- } else {
- CSR_CXBC(s) = CSR_CXST(s) = 0;
- }
-@@ -925,11 +848,12 @@
- PCNetState *s = opaque;
- if (CSR_STOP(s) || CSR_SPND(s))
- return 0;
--
-- if (s->recv_pos > 0)
-- return 0;
-
-- return sizeof(s->buffer)-16;
-+ if (!(CSR_CRST(s) & 0x8000)) {
-+ return 0;
-+ }
-+
-+ return sizeof(s->rx_buffer)-16;
- }
-
- #define MIN_BUF_SIZE 60
-@@ -938,7 +862,7 @@
- {
- PCNetState *s = opaque;
- int is_padr = 0, is_bcast = 0, is_ladr = 0;
-- uint8_t buf1[60];
-+ int pad;
-
- if (CSR_DRX(s) || CSR_STOP(s) || CSR_SPND(s) || !size)
- return;
-@@ -948,12 +872,10 @@
- #endif
-
- /* if too small buffer, then expand it */
-- if (size < MIN_BUF_SIZE) {
-- memcpy(buf1, buf, size);
-- memset(buf1 + size, 0, MIN_BUF_SIZE - size);
-- buf = buf1;
-- size = MIN_BUF_SIZE;
-- }
-+ if (size < MIN_BUF_SIZE)
-+ pad = MIN_BUF_SIZE - size + 4;
-+ else
-+ pad = 4;
-
- if (CSR_PROM(s)
- || (is_padr=padr_match(s, buf, size))
-@@ -962,125 +884,75 @@
-
- pcnet_rdte_poll(s);
-
-- if (!(CSR_CRST(s) & 0x8000) && s->rdra) {
-- struct pcnet_RMD rmd;
-- int rcvrc = CSR_RCVRC(s)-1,i;
-- target_phys_addr_t nrda;
-- for (i = CSR_RCVRL(s)-1; i > 0; i--, rcvrc--) {
-- if (rcvrc <= 1)
-- rcvrc = CSR_RCVRL(s);
-- nrda = s->rdra +
-- (CSR_RCVRL(s) - rcvrc) *
-- (BCR_SWSTYLE(s) ? 16 : 8 );
-- RMDLOAD(&rmd, PHYSADDR(s,nrda));
-- if (rmd.rmd1.own) {
-+ if (size > 2000) {
- #ifdef PCNET_DEBUG_RMD
-- printf("pcnet - scan buffer: RCVRC=%d PREV_RCVRC=%d\n",
-- rcvrc, CSR_RCVRC(s));
-+ printf("pcnet - oversize packet discarded.\n");
- #endif
-- CSR_RCVRC(s) = rcvrc;
-- pcnet_rdte_poll(s);
-- break;
-- }
-- }
-- }
--
-- if (!(CSR_CRST(s) & 0x8000)) {
-+ } else if (!(CSR_CRST(s) & 0x8000)) {
- #ifdef PCNET_DEBUG_RMD
- printf("pcnet - no buffer: RCVRC=%d\n", CSR_RCVRC(s));
- #endif
- s->csr[0] |= 0x1000; /* Set MISS flag */
- CSR_MISSC(s)++;
- } else {
-- uint8_t *src = &s->buffer[8];
-+ uint8_t *src = &s->rx_buffer[8];
- target_phys_addr_t crda = CSR_CRDA(s);
-- struct pcnet_RMD rmd;
-+ target_phys_addr_t nrda = CSR_NRDA(s);
-+ target_phys_addr_t nnrda = CSR_NNRD(s);
- int pktcount = 0;
-+ int packet_size = size + pad;
-
- memcpy(src, buf, size);
-
--#if 1
-- /* no need to compute the CRC */
-- src[size] = 0;
-- src[size + 1] = 0;
-- src[size + 2] = 0;
-- src[size + 3] = 0;
-- size += 4;
--#else
-- /* XXX: avoid CRC generation */
-- if (!CSR_ASTRP_RCV(s)) {
-- uint32_t fcs = ~0;
-- uint8_t *p = src;
--
-- while (size < 46) {
-- src[size++] = 0;
-- }
--
-- while (p != &src[size]) {
-- CRC(fcs, *p++);
-- }
-- ((uint32_t *)&src[size])[0] = htonl(fcs);
-- size += 4; /* FCS at end of packet */
-- } else size += 4;
--#endif
-+ memset(src + size, 0, pad);
-+ size += pad;
-
- #ifdef PCNET_DEBUG_MATCH
- PRINT_PKTHDR(buf);
- #endif
-
-- RMDLOAD(&rmd, PHYSADDR(s,crda));
-- /*if (!CSR_LAPPEN(s))*/
-- rmd.rmd1.stp = 1;
--
--#define PCNET_RECV_STORE() do { \
-- int count = MIN(4096 - rmd.rmd1.bcnt,size); \
-- target_phys_addr_t rbadr = PHYSADDR(s, rmd.rmd0.rbadr); \
-- cpu_physical_memory_write(rbadr, src, count); \
-- src += count; size -= count; \
-- rmd.rmd2.mcnt = count; rmd.rmd1.own = 0; \
-- RMDSTORE(&rmd, PHYSADDR(s,crda)); \
-- pktcount++; \
--} while (0)
--
-- PCNET_RECV_STORE();
-- if ((size > 0) && CSR_NRDA(s)) {
-- target_phys_addr_t nrda = CSR_NRDA(s);
-- RMDLOAD(&rmd, PHYSADDR(s,nrda));
-- if (rmd.rmd1.own) {
-+ s->crmd.rmd1.stp = 1;
-+ do {
-+ int count = MIN(4096 - s->crmd.rmd1.bcnt,size);
-+ target_phys_addr_t rbadr = PHYSADDR(s, s->crmd.rmd0.rbadr);
-+ cpu_physical_memory_write(rbadr, src, count);
-+ cpu_physical_memory_set_dirty(rbadr);
-+ cpu_physical_memory_set_dirty(rbadr+count);
-+ src += count; size -= count;
-+ if (size > 0 && s->nrmd.rmd1.own) {
-+ RMDSTORE(&(s->crmd), PHYSADDR(s,crda));
- crda = nrda;
-- PCNET_RECV_STORE();
-- if ((size > 0) && (nrda=CSR_NNRD(s))) {
-- RMDLOAD(&rmd, PHYSADDR(s,nrda));
-- if (rmd.rmd1.own) {
-- crda = nrda;
-- PCNET_RECV_STORE();
-- }
-- }
-- }
-- }
--
--#undef PCNET_RECV_STORE
-+ nrda = nnrda;
-+ s->crmd = s->nrmd;
-+ s->nrmd = s->nnrmd;
-+ s->nnrmd.rmd1.own = 0;
-+ }
-+ pktcount++;
-+ } while (size > 0 && s->crmd.rmd1.own);
-
-- RMDLOAD(&rmd, PHYSADDR(s,crda));
- if (size == 0) {
-- rmd.rmd1.enp = 1;
-- rmd.rmd1.pam = !CSR_PROM(s) && is_padr;
-- rmd.rmd1.lafm = !CSR_PROM(s) && is_ladr;
-- rmd.rmd1.bam = !CSR_PROM(s) && is_bcast;
-+ s->crmd.rmd1.enp = 1;
-+ s->crmd.rmd2.mcnt = packet_size;
-+ s->crmd.rmd1.pam = !CSR_PROM(s) && is_padr;
-+ s->crmd.rmd1.lafm = !CSR_PROM(s) && is_ladr;
-+ s->crmd.rmd1.bam = !CSR_PROM(s) && is_bcast;
- } else {
-- rmd.rmd1.oflo = 1;
-- rmd.rmd1.buff = 1;
-- rmd.rmd1.err = 1;
-+ s->crmd.rmd1.oflo = 1;
-+ s->crmd.rmd1.buff = 1;
-+ s->crmd.rmd1.err = 1;
- }
-- RMDSTORE(&rmd, PHYSADDR(s,crda));
-+ RMDSTORE(&(s->crmd), PHYSADDR(s,crda));
- s->csr[0] |= 0x0400;
-+ s->crmd = s->nrmd;
-+ s->nrmd = s->nnrmd;
-+ s->nnrmd.rmd1.own = 0;
-
- #ifdef PCNET_DEBUG
- printf("RCVRC=%d CRDA=0x%08x BLKS=%d\n",
- CSR_RCVRC(s), PHYSADDR(s,CSR_CRDA(s)), pktcount);
- #endif
- #ifdef PCNET_DEBUG_RMD
-- PRINT_RMD(&rmd);
-+ PRINT_RMD(&s->crmd);
- #endif
-
- while (pktcount--) {
-@@ -1101,81 +973,86 @@
-
- static void pcnet_transmit(PCNetState *s)
- {
-- target_phys_addr_t xmit_cxda = 0;
-+ target_phys_addr_t start_addr = 0;
-+ struct pcnet_TMD start_tmd;
- int count = CSR_XMTRL(s)-1;
-- s->xmit_pos = -1;
-+ int xmit_pos = 0;
-+ int len;
-
- if (!CSR_TXON(s)) {
- s->csr[0] &= ~0x0008;
- return;
- }
-
-- s->tx_busy = 1;
--
-- txagain:
-- if (pcnet_tdte_poll(s)) {
-- struct pcnet_TMD tmd;
--
-- TMDLOAD(&tmd, PHYSADDR(s,CSR_CXDA(s)));
-+ while (pcnet_tdte_poll(s)) {
-
- #ifdef PCNET_DEBUG_TMD
- printf(" TMDLOAD 0x%08x\n", PHYSADDR(s,CSR_CXDA(s)));
-- PRINT_TMD(&tmd);
-+ PRINT_TMD(&(s->tmd));
- #endif
-- if (tmd.tmd1.stp) {
-- s->xmit_pos = 0;
-- if (!tmd.tmd1.enp) {
-- cpu_physical_memory_read(PHYSADDR(s, tmd.tmd0.tbadr),
-- s->buffer, 4096 - tmd.tmd1.bcnt);
-- s->xmit_pos += 4096 - tmd.tmd1.bcnt;
-- }
-- xmit_cxda = PHYSADDR(s,CSR_CXDA(s));
-- }
-- if (tmd.tmd1.enp && (s->xmit_pos >= 0)) {
-- cpu_physical_memory_read(PHYSADDR(s, tmd.tmd0.tbadr),
-- s->buffer + s->xmit_pos, 4096 - tmd.tmd1.bcnt);
-- s->xmit_pos += 4096 - tmd.tmd1.bcnt;
--#ifdef PCNET_DEBUG
-- printf("pcnet_transmit size=%d\n", s->xmit_pos);
--#endif
-- if (CSR_LOOP(s))
-- pcnet_receive(s, s->buffer, s->xmit_pos);
-- else
-- qemu_send_packet(s->vc, s->buffer, s->xmit_pos);
--
-- s->csr[0] &= ~0x0008; /* clear TDMD */
-- s->csr[4] |= 0x0004; /* set TXSTRT */
-- s->xmit_pos = -1;
-- }
-+ len = 4096 - s->tmd.tmd1.bcnt;
-+ if (CSR_XMTRC(s) <= 1)
-+ CSR_XMTRC(s) = CSR_XMTRL(s);
-+ else
-+ CSR_XMTRC(s)--;
-+ /* handle start followed by start */
-+ if (s->tmd.tmd1.stp && start_addr) {
-+ TMDSTORE(&start_tmd, start_addr);
-+ start_addr = 0;
-+ xmit_pos = 0;
-+ }
-+ if ((xmit_pos + len) < sizeof(s->tx_buffer)) {
-+ cpu_physical_memory_read(PHYSADDR(s, s->tmd.tmd0.tbadr),
-+ s->tx_buffer + xmit_pos, len);
-+ xmit_pos += len;
-+ } else {
-+ s->tmd.tmd2.buff = s->tmd.tmd2.uflo = s->tmd.tmd1.err = 1;
-+ TMDSTORE(&(s->tmd), PHYSADDR(s,CSR_CXDA(s)));
-+ if (start_addr == PHYSADDR(s,CSR_CXDA(s)))
-+ start_addr = 0; /* don't clear own bit twice */
-+ continue;
-+ }
-+ if (s->tmd.tmd1.stp) {
-+ if (s->tmd.tmd1.enp) {
-+ if (CSR_LOOP(s))
-+ pcnet_receive(s, s->tx_buffer, xmit_pos);
-+ else
-+ qemu_send_packet(s->vc, s->tx_buffer, xmit_pos);
-+
-+ s->csr[4] |= 0x0008; /* set TXSTRT */
-+ TMDSTORE(&(s->tmd), PHYSADDR(s,CSR_CXDA(s)));
-+ xmit_pos = 0;
-+ count--;
-+ } else {
-+ start_tmd = s->tmd;
-+ start_addr = PHYSADDR(s,CSR_CXDA(s));
-+ }
-+ } else if (s->tmd.tmd1.enp) {
-+ TMDSTORE(&(s->tmd), PHYSADDR(s,CSR_CXDA(s)));
-+ if (start_addr) {
-+ TMDSTORE(&start_tmd, start_addr);
-+ }
-+ start_addr = 0;
-+ xmit_pos = 0;
-+ count--;
-+ } else {
-+ TMDSTORE(&(s->tmd), PHYSADDR(s,CSR_CXDA(s)));
-+ }
-
-- tmd.tmd1.own = 0;
-- TMDSTORE(&tmd, PHYSADDR(s,CSR_CXDA(s)));
-- if (!CSR_TOKINTD(s) || (CSR_LTINTEN(s) && tmd.tmd1.ltint))
-+ if (!CSR_TOKINTD(s) || (CSR_LTINTEN(s) && s->tmd.tmd1.ltint))
- s->csr[0] |= 0x0200; /* set TINT */
-
-- if (CSR_XMTRC(s)<=1)
-- CSR_XMTRC(s) = CSR_XMTRL(s);
-- else
-- CSR_XMTRC(s)--;
-- if (count--)
-- goto txagain;
--
-- } else
-- if (s->xmit_pos >= 0) {
-- struct pcnet_TMD tmd;
-- TMDLOAD(&tmd, PHYSADDR(s,xmit_cxda));
-- tmd.tmd2.buff = tmd.tmd2.uflo = tmd.tmd1.err = 1;
-- tmd.tmd1.own = 0;
-- TMDSTORE(&tmd, PHYSADDR(s,xmit_cxda));
-- s->csr[0] |= 0x0200; /* set TINT */
-- if (!CSR_DXSUFLO(s)) {
-- s->csr[0] &= ~0x0010;
-- } else
-- if (count--)
-- goto txagain;
-+ if (count <= 0)
-+ break;
-+ }
-+ if (start_addr) {
-+ start_tmd.tmd2.buff = start_tmd.tmd2.uflo = start_tmd.tmd1.err = 1;
-+ TMDSTORE(&start_tmd, PHYSADDR(s,start_addr));
-+ s->csr[0] |= 0x0200; /* set TINT */
-+ if (!CSR_DXSUFLO(s)) {
-+ s->csr[0] &= ~0x0010;
-+ }
- }
--
-- s->tx_busy = 0;
- }
-
- static void pcnet_poll(PCNetState *s)
-@@ -1186,13 +1063,7 @@
-
- if (CSR_TDMD(s) ||
- (CSR_TXON(s) && !CSR_DPOLL(s) && pcnet_tdte_poll(s)))
-- {
-- /* prevent recursion */
-- if (s->tx_busy)
-- return;
--
- pcnet_transmit(s);
-- }
- }
-
- static void pcnet_poll_timer(void *opaque)
-@@ -1744,10 +1615,9 @@
- for (i = 0; i < 32; i++)
- qemu_put_be16s(f, &s->bcr[i]);
- qemu_put_be64s(f, &s->timer);
-- qemu_put_be32s(f, &s->xmit_pos);
- qemu_put_be32s(f, &s->recv_pos);
-- qemu_put_buffer(f, s->buffer, 4096);
-- qemu_put_be32s(f, &s->tx_busy);
-+ qemu_put_buffer(f, s->tx_buffer, 2048);
-+ qemu_put_buffer(f, s->rx_buffer, 2048);
- qemu_put_timer(f, s->poll_timer);
- }
-
-@@ -1770,10 +1640,9 @@
- for (i = 0; i < 32; i++)
- qemu_get_be16s(f, &s->bcr[i]);
- qemu_get_be64s(f, &s->timer);
-- qemu_get_be32s(f, &s->xmit_pos);
- qemu_get_be32s(f, &s->recv_pos);
-- qemu_get_buffer(f, s->buffer, 4096);
-- qemu_get_be32s(f, &s->tx_busy);
-+ qemu_get_buffer(f, s->tx_buffer, 2048);
-+ qemu_get_buffer(f, s->rx_buffer, 2048);
- qemu_get_timer(f, s->poll_timer);
-
- return 0;
diff --git a/sysutils/xentools3-hvm/patches/patch-python_xen_util_xmlrpcclient.py b/sysutils/xentools3-hvm/patches/patch-python_xen_util_xmlrpcclient.py
deleted file mode 100644
index baae4207f83..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-python_xen_util_xmlrpcclient.py
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-python_xen_util_xmlrpcclient.py,v 1.1 2012/05/14 15:39:52 manu Exp $
-
---- ../tools/python/xen/util/xmlrpcclient.py.orig 2012-05-14 17:14:52.000000000 +0200
-+++ ../tools/python/xen/util/xmlrpcclient.py 2012-05-14 17:15:44.000000000 +0200
-@@ -21,8 +21,9 @@
- import socket
- import string
- import xmlrpclib
- from types import StringTypes
-+from sys import hexversion
-
-
- try:
- import SSHTransport
-@@ -53,9 +54,12 @@
- self.__handler = handler
- return xmlrpclib.Transport.request(self, host, '/RPC2',
- request_body, verbose)
- def make_connection(self, host):
-- return HTTPUnix(self.__handler)
-+ if hexversion < 0x02070000:
-+ return HTTPUnix(self.__handler)
-+ else:
-+ return HTTPUnixConnection(self.__handler)
-
-
- # We need our own transport for HTTPS, because xmlrpclib.SafeTransport is
- # broken -- it does not handle ERROR_ZERO_RETURN properly.
diff --git a/sysutils/xentools3-hvm/patches/patch-python_xen_util_xmlrpclib2.py b/sysutils/xentools3-hvm/patches/patch-python_xen_util_xmlrpclib2.py
deleted file mode 100644
index b78273f6da0..00000000000
--- a/sysutils/xentools3-hvm/patches/patch-python_xen_util_xmlrpclib2.py
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-python_xen_util_xmlrpclib2.py,v 1.1 2012/05/14 15:39:52 manu Exp $
-
---- ../tools/python/xen/util/xmlrpclib2.py.orig 2012-05-14 17:15:51.000000000 +0200
-+++ ../tools/python/xen/util/xmlrpclib2.py 2012-05-14 17:16:18.000000000 +0200
-@@ -60,8 +60,9 @@
- protocol_version = "HTTP/1.1"
-
- def __init__(self, hosts_allowed, request, client_address, server):
- self.hosts_allowed = hosts_allowed
-+ self.disable_nagle_algorithm = False
- SimpleXMLRPCRequestHandler.__init__(self, request, client_address,
- server)
-
- # this is inspired by SimpleXMLRPCRequestHandler's do_POST but differs
diff --git a/sysutils/xentools3/DESCR b/sysutils/xentools3/DESCR
deleted file mode 100644
index 43c6815d681..00000000000
--- a/sysutils/xentools3/DESCR
+++ /dev/null
@@ -1,5 +0,0 @@
-The Xen virtual machine monitor allows running several virtual machines
-on a single physical machine. The xentools3 package contains the
-tools to create, destroy and control the virtual machines.
-
-The xentools3 package contains the tools for Xen 3
diff --git a/sysutils/xentools3/MESSAGE.NetBSD b/sysutils/xentools3/MESSAGE.NetBSD
deleted file mode 100644
index de539a210f6..00000000000
--- a/sysutils/xentools3/MESSAGE.NetBSD
+++ /dev/null
@@ -1,17 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE.NetBSD,v 1.2 2007/10/07 12:59:15 kano Exp $
-
-Please ensure that the Xen-specific devices needed by xend(8) exist:
-
- cd /dev && sh MAKEDEV xen
-
-There are example configuration files for setting up a guest domain in:
-
- ${EGDIR}/
-
-Please also refer to the the "NetBSD/xen How-To" for more information on
-creating a Xen setup:
-
- http://www.NetBSD.org/ports/xen/howto.html
-
-===========================================================================
diff --git a/sysutils/xentools3/Makefile b/sysutils/xentools3/Makefile
deleted file mode 100644
index 3515828abf5..00000000000
--- a/sysutils/xentools3/Makefile
+++ /dev/null
@@ -1,212 +0,0 @@
-# $NetBSD: Makefile,v 1.49 2016/07/09 13:04:08 wiz Exp $
-
-VERSION= 3.1.4
-DISTNAME= xen-${VERSION}
-PKGNAME= xentools3-${VERSION}
-PKGREVISION= 21
-CATEGORIES= sysutils
-MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
-
-MAINTAINER= bouyer@NetBSD.org
-HOMEPAGE= http://xen.org/
-COMMENT= Userland Tools for Xen
-
-#DEPENDS+= ${PYPKGPREFIX}-twisted-[0-9]*:../../net/py-twisted
-DEPENDS+= ${PYPKGPREFIX}-readline-[0-9]*:../../devel/py-readline
-DEPENDS+= ${PYPKGPREFIX}-curses>=0nb4:../../devel/py-curses
-
-PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # py-xml
-
-MAKE_JOBS_SAFE= no
-
-PKG_SYSCONFSUBDIR= xen
-
-ONLY_FOR_PLATFORM= Linux-2.[46]*-i386 Linux-2.[46]*-x86_64
-ONLY_FOR_PLATFORM+= NetBSD-*-i386 NetBSD-*-x86_64
-
-CONFLICTS+= libxen-[0-9]*
-CONFLICTS+= xentools20-[0-9]*
-CONFLICTS+= xentools30-* xentools33-*
-CONFLICTS+= xenstoretools-*
-
-WRKSRC= ${WRKDIR}/xen-${VERSION}/tools
-CHECK_PORTABILITY_SKIP= examples/* xm-test/ramdisk/make-release.sh
-
-EGDIR= ${PREFIX}/share/examples/xen
-MESSAGE_SUBST= EGDIR=${EGDIR}
-
-USE_TOOLS+= perl #for pod2man
-USE_TOOLS+= gmake
-MAKE_ENV+= CONFIG_NetBSD=yes
-MAKE_ENV+= CONFIG_MBOOTPACK=no
-MAKE_ENV+= EGDIR=${EGDIR:Q}
-MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
-.if ${MACHINE_ARCH} == "i386"
-MAKE_ENV+= XEN_TARGET_ARCH="x86_32" XEN_COMPILE_ARCH="x86_32"
-.elif ${MACHINE_ARCH} == "x86_64"
-MAKE_ENV+= XEN_TARGET_ARCH="x86_64" XEN_COMPILE_ARCH="x86_64"
-.else
-MAKE_ENV+= XEN_TARGET_ARCH="unsupported"
-.endif
-PY_PATCHPLIST= yes
-REPLACE_PYTHON+= misc/xm
-REPLACE_PYTHON+= misc/netfix
-REPLACE_PYTHON+= misc/xen-bugtool
-REPLACE_PYTHON+= misc/xencons
-REPLACE_PYTHON+= misc/xend
-REPLACE_PYTHON+= misc/xensymoops
-REPLACE_PYTHON+= misc/xen-python-path
-REPLACE_PYTHON+= pygrub/src/pygrub
-REPLACE_PYTHON+= python/xen/util/*.py
-REPLACE_PYTHON+= python/xen/xend/*.py
-REPLACE_PYTHON+= python/xen/xm/*.py
-REPLACE_PYTHON+= python/xen/util/*.py
-REPLACE_PYTHON+= python/*.py
-REPLACE_PYTHON+= security/python/xensec_gen/cgi-bin/policy.cgi
-REPLACE_PYTHON+= security/python/xensec_gen/*.py
-REPLACE_PYTHON+= security/python/*.py
-REPLACE_PYTHON+= security/*.py
-REPLACE_PYTHON+= xenmon/*.py
-REPLACE_PYTHON+= xentrace/xentrace_format
-
-SUBST_CLASSES+= paths
-SUBST_STAGE.paths= pre-configure
-SUBST_FILES.paths= ioemu/vl.c
-SUBST_SED.paths= -e "s|/usr/sbin|${PREFIX}/sbin|g"
-SUBST_MESSAGE.paths= Fixing hardcoded paths.
-
-SUBST_CLASSES+= pathsvar
-SUBST_STAGE.pathsvar= pre-configure
-SUBST_FILES.pathsvar= examples/init.d/sysconfig.xendomains \
- examples/xend-config.sxp \
- python/xen/xend/server/relocate.py \
- python/xen/xend/XendOptions.py \
- security/Makefile security/python/xensec_gen/main.py \
- xenstore/xs_lib.c
-SUBST_SED.pathsvar= -e "s|/var/lib|${VARBASE}/run|g"
-
-SUBST_CLASSES+= py
-SUBST_STAGE.py= pre-configure
-SUBST_FILES.py= pygrub/Makefile
-SUBST_FILES.py+= python/Makefile
-SUBST_FILES.py+= security/Makefile
-SUBST_FILES.py+= ../xen/include/public/foreign/Makefile
-SUBST_SED.py= -e "s,python,${PYTHONBIN},g"
-
-SUBST_CLASSES+= conf
-SUBST_STAGE.conf= pre-configure
-SUBST_FILES.conf= python/xen/xend/XendOptions.py
-SUBST_FILES.conf+= python/xen/xend/osdep.py
-SUBST_FILES.conf+= python/xen/xm/create.py
-SUBST_FILES.conf+= python/xen/xm/addlabel.py
-SUBST_FILES.conf+= python/xen/xm/getlabel.py
-SUBST_FILES.conf+= python/xen/xm/rmlabel.py
-SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
-
-SUBST_CLASSES+= prefix
-SUBST_STAGE.prefix= pre-configure
-SUBST_FILES.prefix= python/xen/util/auxbin.py
-SUBST_FILES.prefix+= python/xen/xend/osdep.py
-SUBST_FILES.prefix+= misc/xen-python-path
-SUBST_SED.prefix= -e "s,@PREFIX@,${PREFIX},g"
-
-SUBST_CLASSES.NetBSD+= proc
-SUBST_STAGE.proc= pre-configure
-SUBST_FILES.proc= python/xen/xend/XendVnet.py
-SUBST_FILES.proc+= xenstore/xs_lib.c
-SUBST_SED.proc= -e "s|/proc|/kern|g"
-
-OPSYSVARS+= PROCPATH
-PROCPATH.NetBSD= /kern
-PROCPATH.*= /proc
-
-RCD_SCRIPTS= xend xenbackendd xendomains
-FILES_SUBST+= RCD_INTERPRETER=${PYTHONBIN:Q}
-FILES_SUBST+= PROCPATH=${PROCPATH:Q}
-FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
-
-XEND_SCRIPTS= block vif-bridge vif-ip xen-subr
-
-CONF_FILES= ${EGDIR}/xend-config.sxp \
- ${PKG_SYSCONFDIR}/xend-config.sxp
-.for s in ${XEND_SCRIPTS}
-CONF_FILES_PERMS+= ${EGDIR}/${s} ${PKG_SYSCONFDIR}/scripts/${s} \
- ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
-.endfor
-
-OWN_DIRS= ${PKG_SYSCONFDIR}/scripts /var/log/xen
-
-.include "../../mk/compiler.mk"
-.if !empty(PKGSRC_COMPILER:Mclang)
-EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes -Wno-error=format-security
-EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \
- -Wno-error=tautological-compare -Wno-error=null-dereference \
- -Wno-error=self-assign -Wno-error=sometimes-uninitialized \
- -Wno-error=unused-function
-.elif !empty(PKGSRC_COMPILER:Mgcc)
-EXTRA_CFLAGS+= -Wno-error=unused-but-set-variable
-.endif
-
-MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
-
-pre-build:
-.if !exists(/usr/include/xen/xenio.h)
- ${MKDIR} ${WRKSRC}/libxc/xen
- ${TEST} -f ${WRKSRC}/libxc/xen/xenio.h || \
- ${CP} ${FILESDIR}/xenio.h ${WRKSRC}/libxc/xen
- ${TEST} -f ${WRKSRC}/libxc/xen/xenio3.h || \
- ${CP} ${FILESDIR}/xenio3.h ${WRKSRC}/libxc/xen
-.endif
- ${CP} ${FILESDIR}/NetBSD.mk ${WRKSRC}/../config/
- pod2man ${WRKSRC}/../docs/man/xend-config.sxp.pod.5 |\
- sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
- >${WRKDIR}/xend-config.sxp.5
- pod2man ${WRKSRC}/../docs/man/xmdomain.cfg.pod.5 |\
- sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
- >${WRKDIR}/xmdomain.cfg.5
- pod2man ${WRKSRC}/../docs/man/xm.pod.1 |\
- sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
- >${WRKDIR}/xm.1
-
-.if ${OPSYS} == "NetBSD"
-post-build:
- cd ${FILESDIR}; for src in *-nbsd; do \
- dst="$${src%-nbsd}"; \
- ${SED} -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" \
- -e "s|@PREFIX@|${PREFIX}|g" \
- $$src > ${WRKSRC}/examples/$$dst; \
- done
- ${CC} ${CFLAGS} ${LDFLAGS} \
- -DVBD_SCRIPT=\"${PKG_SYSCONFDIR}/scripts/block\" \
- -DLOG_FILE=\"${VARBASE}/log/xenbackendd.log\" \
- -DPID_FILE=\"${VARBASE}/run/xenbackendd.pid\" \
- -o ${WRKDIR}/xenbackendd.bin ${FILESDIR}/xenbackendd.c \
- -I${WRKSRC}/libxc -L${WRKSRC}/libxc \
- -I${WRKSRC}/xenstore -L${WRKSRC}/xenstore \
- -lxenctrl -lxenstore
-
-.endif
-
-INSTALLATION_DIRS= ${PKGMANDIR}/man1 ${PKGMANDIR}/man5 ${EGDIR}
-
-post-install:
- ${INSTALL_PROGRAM} ${WRKDIR}/xenbackendd.bin ${DESTDIR}${PREFIX}/sbin/xenbackendd
- for f in xend-config.sxp xmexample1 xmexample2 xmexample3 netbsd1; do \
- ${INSTALL_DATA} ${WRKSRC}/examples/$$f ${DESTDIR}${EGDIR}/$$f; \
- done
-.for s in ${XEND_SCRIPTS}
- ${INSTALL_SCRIPT} ${WRKSRC}/examples/${s} ${DESTDIR}${EGDIR}/${s}
-.endfor
- ${RM} -rf ${DESTDIR}${PREFIX}/lib/xen
- ${INSTALL_DATA} ${WRKDIR}/xend-config.sxp.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
- ${INSTALL_DATA} ${WRKDIR}/xmdomain.cfg.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
- ${INSTALL_DATA} ${WRKDIR}/xm.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
-
-.include "../../lang/python/application.mk"
-.include "../../lang/python/extension.mk"
-.include "../../textproc/py-xml/buildlink3.mk"
-#.include "../../devel/zlib/buildlink3.mk"
-#.include "../../www/curl/buildlink3.mk"
-.include "../../devel/ncurses/buildlink3.mk"
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xentools3/PLIST b/sysutils/xentools3/PLIST
deleted file mode 100644
index 817ab223022..00000000000
--- a/sysutils/xentools3/PLIST
+++ /dev/null
@@ -1,371 +0,0 @@
-@comment $NetBSD: PLIST,v 1.5 2014/03/11 14:05:16 jperkin Exp $
-bin/pygrub
-bin/readnotes
-bin/xc_restore
-bin/xc_save
-bin/xencons
-bin/xenconsole
-bin/xenperf
-bin/xenstore-chmod
-bin/xenstore-control
-bin/xenstore-exists
-bin/xenstore-list
-bin/xenstore-ls
-bin/xenstore-read
-bin/xenstore-rm
-bin/xenstore-write
-bin/xen-detect
-include/fsimage.h
-include/fsimage_plugin.h
-include/fsimage_grub.h
-include/xenctrl.h
-include/xenguest.h
-include/xs.h
-include/xs_lib.h
-lib/fs/ext2fs/fsimage.so
-lib/fs/fat/fsimage.so
-lib/fs/iso9660/fsimage.so
-lib/fs/reiserfs/fsimage.so
-lib/fs/ufs/fsimage.so
-lib/libfsimage.so
-lib/libfsimage.so.1.0
-lib/libfsimage.so.1.0.0
-lib/libxenctrl.a
-lib/libxenctrl.so
-lib/libxenctrl.so.3.0
-lib/libxenctrl.so.3.0.0
-lib/libxenguest.a
-lib/libxenguest.so
-lib/libxenguest.so.3.0
-lib/libxenguest.so.3.0.0
-lib/libxenstore.a
-lib/libxenstore.so
-lib/libxenstore.so.3.0
-lib/libxenstore.so.3.0.0
-man/man1/xentop.1
-man/man1/xm.1
-man/man5/xend-config.sxp.5
-man/man5/xmdomain.cfg.5
-${PYSITELIB}/fsimage.so
-${PYSITELIB}/grub/GrubConf.py
-${PYSITELIB}/grub/GrubConf.pyc
-${PYSITELIB}/grub/LiloConf.py
-${PYSITELIB}/grub/LiloConf.pyc
-${PYSITELIB}/grub/__init__.py
-${PYSITELIB}/grub/__init__.pyc
-${PYSITELIB}/xen/__init__.py
-${PYSITELIB}/xen/__init__.pyc
-${PYSITELIB}/xen/lowlevel/__init__.py
-${PYSITELIB}/xen/lowlevel/__init__.pyc
-${PYSITELIB}/xen/lowlevel/acm.so
-${PYSITELIB}/xen/lowlevel/ptsname.so
-${PYSITELIB}/xen/lowlevel/xc.so
-${PYSITELIB}/xen/lowlevel/xs.so
-${PYSITELIB}/xen/sv/CreateDomain.py
-${PYSITELIB}/xen/sv/CreateDomain.pyc
-${PYSITELIB}/xen/sv/DomInfo.py
-${PYSITELIB}/xen/sv/DomInfo.pyc
-${PYSITELIB}/xen/sv/GenTabbed.py
-${PYSITELIB}/xen/sv/GenTabbed.pyc
-${PYSITELIB}/xen/sv/HTMLBase.py
-${PYSITELIB}/xen/sv/HTMLBase.pyc
-${PYSITELIB}/xen/sv/Main.py
-${PYSITELIB}/xen/sv/Main.pyc
-${PYSITELIB}/xen/sv/NodeInfo.py
-${PYSITELIB}/xen/sv/NodeInfo.pyc
-${PYSITELIB}/xen/sv/RestoreDomain.py
-${PYSITELIB}/xen/sv/RestoreDomain.pyc
-${PYSITELIB}/xen/sv/Wizard.py
-${PYSITELIB}/xen/sv/Wizard.pyc
-${PYSITELIB}/xen/sv/__init__.py
-${PYSITELIB}/xen/sv/__init__.pyc
-${PYSITELIB}/xen/sv/util.py
-${PYSITELIB}/xen/sv/util.pyc
-${PYSITELIB}/xen/util/Brctl.py
-${PYSITELIB}/xen/util/Brctl.pyc
-${PYSITELIB}/xen/util/SSHTransport.py
-${PYSITELIB}/xen/util/SSHTransport.pyc
-${PYSITELIB}/xen/util/__init__.py
-${PYSITELIB}/xen/util/__init__.pyc
-${PYSITELIB}/xen/util/asserts.py
-${PYSITELIB}/xen/util/asserts.pyc
-${PYSITELIB}/xen/util/auxbin.py
-${PYSITELIB}/xen/util/auxbin.pyc
-${PYSITELIB}/xen/util/blkif.py
-${PYSITELIB}/xen/util/blkif.pyc
-${PYSITELIB}/xen/util/bugtool.py
-${PYSITELIB}/xen/util/bugtool.pyc
-${PYSITELIB}/xen/util/diagnose.py
-${PYSITELIB}/xen/util/diagnose.pyc
-${PYSITELIB}/xen/util/dictio.py
-${PYSITELIB}/xen/util/dictio.pyc
-${PYSITELIB}/xen/util/ip.py
-${PYSITELIB}/xen/util/ip.pyc
-${PYSITELIB}/xen/util/mac.py
-${PYSITELIB}/xen/util/mac.pyc
-${PYSITELIB}/xen/util/mkdir.py
-${PYSITELIB}/xen/util/mkdir.pyc
-${PYSITELIB}/xen/util/pci.py
-${PYSITELIB}/xen/util/pci.pyc
-${PYSITELIB}/xen/util/security.py
-${PYSITELIB}/xen/util/security.pyc
-${PYSITELIB}/xen/util/xmlrpcclient.py
-${PYSITELIB}/xen/util/xmlrpcclient.pyc
-${PYSITELIB}/xen/util/xmlrpclib2.py
-${PYSITELIB}/xen/util/xmlrpclib2.pyc
-${PYSITELIB}/xen/util/xpopen.py
-${PYSITELIB}/xen/util/xpopen.pyc
-${PYSITELIB}/xen/web/SrvBase.py
-${PYSITELIB}/xen/web/SrvBase.pyc
-${PYSITELIB}/xen/web/SrvDir.py
-${PYSITELIB}/xen/web/SrvDir.pyc
-${PYSITELIB}/xen/web/__init__.py
-${PYSITELIB}/xen/web/__init__.pyc
-${PYSITELIB}/xen/web/connection.py
-${PYSITELIB}/xen/web/connection.pyc
-${PYSITELIB}/xen/web/http.py
-${PYSITELIB}/xen/web/http.pyc
-${PYSITELIB}/xen/web/httpserver.py
-${PYSITELIB}/xen/web/httpserver.pyc
-${PYSITELIB}/xen/web/protocol.py
-${PYSITELIB}/xen/web/protocol.pyc
-${PYSITELIB}/xen/web/resource.py
-${PYSITELIB}/xen/web/resource.pyc
-${PYSITELIB}/xen/web/static.py
-${PYSITELIB}/xen/web/static.pyc
-${PYSITELIB}/xen/web/tcp.py
-${PYSITELIB}/xen/web/tcp.pyc
-${PYSITELIB}/xen/web/unix.py
-${PYSITELIB}/xen/web/unix.pyc
-${PYSITELIB}/xen/xend/Args.py
-${PYSITELIB}/xen/xend/Args.pyc
-${PYSITELIB}/xen/xend/PrettyPrint.py
-${PYSITELIB}/xen/xend/PrettyPrint.pyc
-${PYSITELIB}/xen/xend/Vifctl.py
-${PYSITELIB}/xen/xend/Vifctl.pyc
-${PYSITELIB}/xen/xend/XendAPI.py
-${PYSITELIB}/xen/xend/XendAPI.pyc
-${PYSITELIB}/xen/xend/XendAPIConstants.py
-${PYSITELIB}/xen/xend/XendAPIConstants.pyc
-${PYSITELIB}/xen/xend/XendAPIStore.py
-${PYSITELIB}/xen/xend/XendAPIStore.pyc
-${PYSITELIB}/xen/xend/XendAPIVersion.py
-${PYSITELIB}/xen/xend/XendAPIVersion.pyc
-${PYSITELIB}/xen/xend/XendAuthSessions.py
-${PYSITELIB}/xen/xend/XendAuthSessions.pyc
-${PYSITELIB}/xen/xend/XendBase.py
-${PYSITELIB}/xen/xend/XendBase.pyc
-${PYSITELIB}/xen/xend/XendBootloader.py
-${PYSITELIB}/xen/xend/XendBootloader.pyc
-${PYSITELIB}/xen/xend/XendCheckpoint.py
-${PYSITELIB}/xen/xend/XendCheckpoint.pyc
-${PYSITELIB}/xen/xend/XendClient.py
-${PYSITELIB}/xen/xend/XendClient.pyc
-${PYSITELIB}/xen/xend/XendConfig.py
-${PYSITELIB}/xen/xend/XendConfig.pyc
-${PYSITELIB}/xen/xend/XendConstants.py
-${PYSITELIB}/xen/xend/XendConstants.pyc
-${PYSITELIB}/xen/xend/XendDevices.py
-${PYSITELIB}/xen/xend/XendDevices.pyc
-${PYSITELIB}/xen/xend/XendDmesg.py
-${PYSITELIB}/xen/xend/XendDmesg.pyc
-${PYSITELIB}/xen/xend/XendDomain.py
-${PYSITELIB}/xen/xend/XendDomain.pyc
-${PYSITELIB}/xen/xend/XendDomainInfo.py
-${PYSITELIB}/xen/xend/XendDomainInfo.pyc
-${PYSITELIB}/xen/xend/XendError.py
-${PYSITELIB}/xen/xend/XendError.pyc
-${PYSITELIB}/xen/xend/XendLocalStorageRepo.py
-${PYSITELIB}/xen/xend/XendLocalStorageRepo.pyc
-${PYSITELIB}/xen/xend/XendLogging.py
-${PYSITELIB}/xen/xend/XendLogging.pyc
-${PYSITELIB}/xen/xend/XendMonitor.py
-${PYSITELIB}/xen/xend/XendMonitor.pyc
-${PYSITELIB}/xen/xend/XendNetwork.py
-${PYSITELIB}/xen/xend/XendNetwork.pyc
-${PYSITELIB}/xen/xend/XendNode.py
-${PYSITELIB}/xen/xend/XendNode.pyc
-${PYSITELIB}/xen/xend/XendOptions.py
-${PYSITELIB}/xen/xend/XendOptions.pyc
-${PYSITELIB}/xen/xend/XendPBD.py
-${PYSITELIB}/xen/xend/XendPBD.pyc
-${PYSITELIB}/xen/xend/XendPIF.py
-${PYSITELIB}/xen/xend/XendPIF.pyc
-${PYSITELIB}/xen/xend/XendPIFMetrics.py
-${PYSITELIB}/xen/xend/XendPIFMetrics.pyc
-${PYSITELIB}/xen/xend/XendProtocol.py
-${PYSITELIB}/xen/xend/XendProtocol.pyc
-${PYSITELIB}/xen/xend/XendQCoWStorageRepo.py
-${PYSITELIB}/xen/xend/XendQCoWStorageRepo.pyc
-${PYSITELIB}/xen/xend/XendStateStore.py
-${PYSITELIB}/xen/xend/XendStateStore.pyc
-${PYSITELIB}/xen/xend/XendStorageRepository.py
-${PYSITELIB}/xen/xend/XendStorageRepository.pyc
-${PYSITELIB}/xen/xend/XendTask.py
-${PYSITELIB}/xen/xend/XendTask.pyc
-${PYSITELIB}/xen/xend/XendTaskManager.py
-${PYSITELIB}/xen/xend/XendTaskManager.pyc
-${PYSITELIB}/xen/xend/XendVDI.py
-${PYSITELIB}/xen/xend/XendVDI.pyc
-${PYSITELIB}/xen/xend/XendVMMetrics.py
-${PYSITELIB}/xen/xend/XendVMMetrics.pyc
-${PYSITELIB}/xen/xend/XendVnet.py
-${PYSITELIB}/xen/xend/XendVnet.pyc
-${PYSITELIB}/xen/xend/__init__.py
-${PYSITELIB}/xen/xend/__init__.pyc
-${PYSITELIB}/xen/xend/arch.py
-${PYSITELIB}/xen/xend/arch.pyc
-${PYSITELIB}/xen/xend/balloon.py
-${PYSITELIB}/xen/xend/balloon.pyc
-${PYSITELIB}/xen/xend/encode.py
-${PYSITELIB}/xen/xend/encode.pyc
-${PYSITELIB}/xen/xend/image.py
-${PYSITELIB}/xen/xend/image.pyc
-${PYSITELIB}/xen/xend/osdep.py
-${PYSITELIB}/xen/xend/osdep.pyc
-${PYSITELIB}/xen/xend/server/BlktapController.py
-${PYSITELIB}/xen/xend/server/BlktapController.pyc
-${PYSITELIB}/xen/xend/server/ConsoleController.py
-${PYSITELIB}/xen/xend/server/ConsoleController.pyc
-${PYSITELIB}/xen/xend/server/DevController.py
-${PYSITELIB}/xen/xend/server/DevController.pyc
-${PYSITELIB}/xen/xend/server/SSLXMLRPCServer.py
-${PYSITELIB}/xen/xend/server/SSLXMLRPCServer.pyc
-${PYSITELIB}/xen/xend/server/SrvDaemon.py
-${PYSITELIB}/xen/xend/server/SrvDaemon.pyc
-${PYSITELIB}/xen/xend/server/SrvDmesg.py
-${PYSITELIB}/xen/xend/server/SrvDmesg.pyc
-${PYSITELIB}/xen/xend/server/SrvDomain.py
-${PYSITELIB}/xen/xend/server/SrvDomain.pyc
-${PYSITELIB}/xen/xend/server/SrvDomainDir.py
-${PYSITELIB}/xen/xend/server/SrvDomainDir.pyc
-${PYSITELIB}/xen/xend/server/SrvNode.py
-${PYSITELIB}/xen/xend/server/SrvNode.pyc
-${PYSITELIB}/xen/xend/server/SrvRoot.py
-${PYSITELIB}/xen/xend/server/SrvRoot.pyc
-${PYSITELIB}/xen/xend/server/SrvServer.py
-${PYSITELIB}/xen/xend/server/SrvServer.pyc
-${PYSITELIB}/xen/xend/server/SrvVnetDir.py
-${PYSITELIB}/xen/xend/server/SrvVnetDir.pyc
-${PYSITELIB}/xen/xend/server/SrvXendLog.py
-${PYSITELIB}/xen/xend/server/SrvXendLog.pyc
-${PYSITELIB}/xen/xend/server/XMLRPCServer.py
-${PYSITELIB}/xen/xend/server/XMLRPCServer.pyc
-${PYSITELIB}/xen/xend/server/__init__.py
-${PYSITELIB}/xen/xend/server/__init__.pyc
-${PYSITELIB}/xen/xend/server/blkif.py
-${PYSITELIB}/xen/xend/server/blkif.pyc
-${PYSITELIB}/xen/xend/server/iopif.py
-${PYSITELIB}/xen/xend/server/iopif.pyc
-${PYSITELIB}/xen/xend/server/irqif.py
-${PYSITELIB}/xen/xend/server/irqif.pyc
-${PYSITELIB}/xen/xend/server/netif.py
-${PYSITELIB}/xen/xend/server/netif.pyc
-${PYSITELIB}/xen/xend/server/params.py
-${PYSITELIB}/xen/xend/server/params.pyc
-${PYSITELIB}/xen/xend/server/pciif.py
-${PYSITELIB}/xen/xend/server/pciif.pyc
-${PYSITELIB}/xen/xend/server/pciquirk.py
-${PYSITELIB}/xen/xend/server/pciquirk.pyc
-${PYSITELIB}/xen/xend/server/relocate.py
-${PYSITELIB}/xen/xend/server/relocate.pyc
-${PYSITELIB}/xen/xend/server/tests/__init__.py
-${PYSITELIB}/xen/xend/server/tests/__init__.pyc
-${PYSITELIB}/xen/xend/server/tests/test_controllers.py
-${PYSITELIB}/xen/xend/server/tests/test_controllers.pyc
-${PYSITELIB}/xen/xend/server/tpmif.py
-${PYSITELIB}/xen/xend/server/tpmif.pyc
-${PYSITELIB}/xen/xend/server/usbif.py
-${PYSITELIB}/xen/xend/server/usbif.pyc
-${PYSITELIB}/xen/xend/server/vfbif.py
-${PYSITELIB}/xen/xend/server/vfbif.pyc
-${PYSITELIB}/xen/xend/sxp.py
-${PYSITELIB}/xen/xend/sxp.pyc
-${PYSITELIB}/xen/xend/tests/__init__.py
-${PYSITELIB}/xen/xend/tests/__init__.pyc
-${PYSITELIB}/xen/xend/tests/test_XendConfig.py
-${PYSITELIB}/xen/xend/tests/test_XendConfig.pyc
-${PYSITELIB}/xen/xend/tests/test_sxp.py
-${PYSITELIB}/xen/xend/tests/test_sxp.pyc
-${PYSITELIB}/xen/xend/tests/test_uuid.py
-${PYSITELIB}/xen/xend/tests/test_uuid.pyc
-${PYSITELIB}/xen/xend/uuid.py
-${PYSITELIB}/xen/xend/uuid.pyc
-${PYSITELIB}/xen/xend/xenstore/__init__.py
-${PYSITELIB}/xen/xend/xenstore/__init__.pyc
-${PYSITELIB}/xen/xend/xenstore/tests/__init__.py
-${PYSITELIB}/xen/xend/xenstore/tests/__init__.pyc
-${PYSITELIB}/xen/xend/xenstore/tests/stress_xs.py
-${PYSITELIB}/xen/xend/xenstore/tests/stress_xs.pyc
-${PYSITELIB}/xen/xend/xenstore/xstransact.py
-${PYSITELIB}/xen/xend/xenstore/xstransact.pyc
-${PYSITELIB}/xen/xend/xenstore/xsutil.py
-${PYSITELIB}/xen/xend/xenstore/xsutil.pyc
-${PYSITELIB}/xen/xend/xenstore/xswatch.py
-${PYSITELIB}/xen/xend/xenstore/xswatch.pyc
-${PYSITELIB}/xen/xm/XenAPI.py
-${PYSITELIB}/xen/xm/XenAPI.pyc
-${PYSITELIB}/xen/xm/__init__.py
-${PYSITELIB}/xen/xm/__init__.pyc
-${PYSITELIB}/xen/xm/addlabel.py
-${PYSITELIB}/xen/xm/addlabel.pyc
-${PYSITELIB}/xen/xm/cfgbootpolicy.py
-${PYSITELIB}/xen/xm/cfgbootpolicy.pyc
-${PYSITELIB}/xen/xm/console.py
-${PYSITELIB}/xen/xm/console.pyc
-${PYSITELIB}/xen/xm/create.py
-${PYSITELIB}/xen/xm/create.pyc
-${PYSITELIB}/xen/xm/dry-run.py
-${PYSITELIB}/xen/xm/dry-run.pyc
-${PYSITELIB}/xen/xm/dumppolicy.py
-${PYSITELIB}/xen/xm/dumppolicy.pyc
-${PYSITELIB}/xen/xm/getlabel.py
-${PYSITELIB}/xen/xm/getlabel.pyc
-${PYSITELIB}/xen/xm/help.py
-${PYSITELIB}/xen/xm/help.pyc
-${PYSITELIB}/xen/xm/labels.py
-${PYSITELIB}/xen/xm/labels.pyc
-${PYSITELIB}/xen/xm/loadpolicy.py
-${PYSITELIB}/xen/xm/loadpolicy.pyc
-${PYSITELIB}/xen/xm/main.py
-${PYSITELIB}/xen/xm/main.pyc
-${PYSITELIB}/xen/xm/makepolicy.py
-${PYSITELIB}/xen/xm/makepolicy.pyc
-${PYSITELIB}/xen/xm/migrate.py
-${PYSITELIB}/xen/xm/migrate.pyc
-${PYSITELIB}/xen/xm/new.py
-${PYSITELIB}/xen/xm/new.pyc
-${PYSITELIB}/xen/xm/opts.py
-${PYSITELIB}/xen/xm/opts.pyc
-${PYSITELIB}/xen/xm/resources.py
-${PYSITELIB}/xen/xm/resources.pyc
-${PYSITELIB}/xen/xm/rmlabel.py
-${PYSITELIB}/xen/xm/rmlabel.pyc
-${PYSITELIB}/xen/xm/shutdown.py
-${PYSITELIB}/xen/xm/shutdown.pyc
-${PYSITELIB}/xen/xm/tests/__init__.py
-${PYSITELIB}/xen/xm/tests/__init__.pyc
-${PYSITELIB}/xen/xm/tests/test_create.py
-${PYSITELIB}/xen/xm/tests/test_create.pyc
-${PYSITELIB}/xen/xm/xenapi_create.py
-${PYSITELIB}/xen/xm/xenapi_create.pyc
-sbin/netfix
-sbin/xen-bugtool
-sbin/xenbackendd
-sbin/xenconsoled
-sbin/xend
-sbin/xenperf
-sbin/xenstored
-sbin/xentop
-sbin/xen-python-path
-sbin/xm
-share/examples/xen/block
-share/examples/xen/netbsd1
-share/examples/xen/vif-bridge
-share/examples/xen/vif-ip
-share/examples/xen/xen-subr
-share/examples/xen/xend-config.sxp
-share/examples/xen/xmexample1
-share/examples/xen/xmexample2
-share/examples/xen/xmexample3
-share/xen/create.dtd
diff --git a/sysutils/xentools3/buildlink3.mk b/sysutils/xentools3/buildlink3.mk
deleted file mode 100644
index 1153d9177a9..00000000000
--- a/sysutils/xentools3/buildlink3.mk
+++ /dev/null
@@ -1,12 +0,0 @@
-# $NetBSD: buildlink3.mk,v 1.4 2009/03/20 19:25:26 joerg Exp $
-
-BUILDLINK_TREE+= xentools3
-
-.if !defined(XENTOOLS3_BUILDLINK3_MK)
-XENTOOLS3_BUILDLINK3_MK:=
-
-BUILDLINK_API_DEPENDS.xentools3+= xentools3>=3.1.3
-BUILDLINK_PKGSRCDIR.xentools3?= ../../sysutils/xentools3
-.endif # XENTOOLS3_BUILDLINK3_MK
-
-BUILDLINK_TREE+= -xentools3
diff --git a/sysutils/xentools3/distinfo b/sysutils/xentools3/distinfo
deleted file mode 100644
index e3f0ddc238d..00000000000
--- a/sysutils/xentools3/distinfo
+++ /dev/null
@@ -1,71 +0,0 @@
-$NetBSD: distinfo,v 1.19 2015/12/29 04:04:32 dholland Exp $
-
-SHA1 (xen-3.1.4.tar.gz) = 0d784662776239195df10b3f29d40350f9d0644d
-RMD160 (xen-3.1.4.tar.gz) = c02ad2bd64e6306b127a4f37a8aa370dadc11859
-SHA512 (xen-3.1.4.tar.gz) = 25f797c1c47a807573b4d2d0a12b5b15185d1b1e463e5db46d4bc3843bde7d913ac66440d084dfd12d3968dfbe88738fe84c28047c31c12551530bb157788b1d
-Size (xen-3.1.4.tar.gz) = 6894493 bytes
-SHA1 (patch-.._patch-Config.mk) = 5ce1a561c8e358ceff4187b7109702c85fa29af8
-SHA1 (patch-.._xen_patch-common_libelf_libelf-private.h) = b115b0118f932b15c653c131c0c9c9885e2480ff
-SHA1 (patch-aa) = dca8b8de73b9bdbb17f8245224575eb881cdf00d
-SHA1 (patch-ab) = dcafc8b6c4cd1e4dfc6f4ec806fd8076b3104b86
-SHA1 (patch-ac) = d6d895e0361194cd84da13c42e17e17efecae7dd
-SHA1 (patch-ad) = 0a950e4aeebb30f691d739cda2d99e1fa8fb7edb
-SHA1 (patch-al) = 87f2af4784a8c2266d40788fd572e282f100c7b0
-SHA1 (patch-as) = 040208cc9bf1d7fecc120b5b140b8bc72f2f84cf
-SHA1 (patch-au) = b2357fdaff2895a5e4da4371d72ccc3041c78a83
-SHA1 (patch-av) = be2a1440126908996410f92a04ad479f8a2ca373
-SHA1 (patch-aw) = b4425e0667ae1ee7f2007cfa38210c82a24144a0
-SHA1 (patch-ax) = c2fd0f25ed00498039eececcfb467a236f608efa
-SHA1 (patch-ba) = d1f028b099dce2a8b0f7edae64f05f2bb0a984a8
-SHA1 (patch-bb) = d6705871ab5655719cac1df2daf03845a8d50fba
-SHA1 (patch-bc) = c143c3c587f254af1552667a70e2fac1f0f9665e
-SHA1 (patch-be) = dc8e2a96f39cb540eece35468e2e055201c80220
-SHA1 (patch-bf) = 8b4ecb5cc6c92e3b52574f725f577df062c4f147
-SHA1 (patch-bg) = 3d390a3155db6a1f9c910868b7f615c2f270dc4d
-SHA1 (patch-bh) = c9719a85d84268fab81da989b06c7eca341bb6f9
-SHA1 (patch-bo) = fa73382dbd674cf68cbef9ad265ecd55e6243896
-SHA1 (patch-br) = d2ff0637133b75485431cce1bd7ec0695eeabb33
-SHA1 (patch-bs) = 259e16912a1e0c1aed88eaada4fb786b82bc9f4c
-SHA1 (patch-bt) = d1cfab2ccf14d3df0fdda4c4699258997d2eb5d2
-SHA1 (patch-bw) = d4bdb0dcc48cabefb568042d3b58822f8251b1bd
-SHA1 (patch-ca) = f999e8159c79ae6cd09004b8cac4ca36da93f79f
-SHA1 (patch-cb) = 0bf2513749e28ff955caabd76bf79dd8280b61ed
-SHA1 (patch-cc) = 3e618c7da953115e7b3c7fe07f17b75ef2c2bb34
-SHA1 (patch-cd) = a692eea5dcbf90536ffbbd2b934772bdefda5664
-SHA1 (patch-cf) = 05c5e86d33d31a2216c2751a2bf684c8d5d06746
-SHA1 (patch-cg) = e01915fc13291920106318b30681719cd226ff53
-SHA1 (patch-ch) = ebe2aedf1ecd1dce66f4a8a25ef5e83ee1d4c60d
-SHA1 (patch-cj) = 5227c180e9ec2cf7146ade6f250f6bdff8f2bda1
-SHA1 (patch-ck) = 3783d9b4b9344670bae2f35e2ac7f11e2ec9ce7b
-SHA1 (patch-cm) = 802d395f1dc391a827487bbc9fcfe2bbd6af07de
-SHA1 (patch-cn) = 40ae04194cca94b112133e962d4cf7487412925a
-SHA1 (patch-co) = 44594dee06dcc6754760e73e7b5490dd81b96c41
-SHA1 (patch-cp) = 1f774a6636ce6646fc83bab304e84ce2d8886db5
-SHA1 (patch-cq) = 9d45b395050b47d3d2b98487673d37feb35df80c
-SHA1 (patch-cr) = d5ccaddebdbe266ca2136b82a8e6968f636a2799
-SHA1 (patch-cs) = 62b9f23e0172a59b9b23ae06ae147fb439029550
-SHA1 (patch-ct) = 14259d4c223b12218a07f2a2860e2706d40157b8
-SHA1 (patch-cu) = 90b4a39a037c6f2aeb694e1df8e7a7165b51cdbc
-SHA1 (patch-cv) = 1fea2a1cd139e2e46655622ad5f02b37e1501e0b
-SHA1 (patch-cw) = 7fad0847bb87beddb9330d067132d1f7fc784222
-SHA1 (patch-cx) = eed56d9e4535f19a6fc2474765d85135fce15e63
-SHA1 (patch-cy) = d8f7b3c7c1fcacb273fed2799b287de8f11a1399
-SHA1 (patch-cz) = 5299209411763ceeed630c9a1fa08ecc9ac0ad0d
-SHA1 (patch-da) = 8da2d7866ab17403ae6c50e3771b8e556c257ed4
-SHA1 (patch-db) = 5f4262ce891d5109dab2418664eb05f58a8aa535
-SHA1 (patch-dc) = 10875cd9267ea5d86b1402ca7f493c67cb57a739
-SHA1 (patch-dd) = 66446a6d8293aa52da11dbd28455ae856c184d16
-SHA1 (patch-de) = 7cf7fb63984833e8c6110dbbb4de82a6d5e91d32
-SHA1 (patch-df) = e1d10ddb899d24d727d60ca49f5b382566d65d2c
-SHA1 (patch-dg) = 298bbd22362ab880fea378935a99aef6f4613f27
-SHA1 (patch-dh) = a9dfb5d6442096c2f0ee49143a002656ce790592
-SHA1 (patch-di) = 9d6a5acde713e0b7471adbea2d55e55b3ac77881
-SHA1 (patch-dj) = 354ee3ceb1b5ba9b02091de916c328e5a062cb87
-SHA1 (patch-dk) = 5685f52835885635eacd305945653f817bbe8a2a
-SHA1 (patch-dl) = 480b515da8773e4d3cfc305d74f833f16bb12750
-SHA1 (patch-dm) = af4b849dfb54454e08acd0618afc0a81572bcbc3
-SHA1 (patch-dn) = 1b6490b8f75ab9fe4d66d444fdacdde7db38131d
-SHA1 (patch-libfsimage_ufs_ufs.h) = dc59f33cf3abd08a8cdee5977ca4168613327513
-SHA1 (patch-libxc_xc__dom__x86.c) = 098e42cef3a5e34b1b4b941d9f8709e8a97e60f6
-SHA1 (patch-python_xen_util_xmlrpcclient.py) = 227db87dee15cfb7bedd67d6c118983b4dae2e34
-SHA1 (patch-python_xen_util_xmlrpclib2.py) = 0fc01ed0511ccff6942453f3592a6939b60ab0c0
diff --git a/sysutils/xentools3/files/NetBSD.mk b/sysutils/xentools3/files/NetBSD.mk
deleted file mode 100644
index 7d57dd437e3..00000000000
--- a/sysutils/xentools3/files/NetBSD.mk
+++ /dev/null
@@ -1,2 +0,0 @@
-# $NetBSD: NetBSD.mk,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $
-include $(XEN_ROOT)/config/StdGNU.mk
diff --git a/sysutils/xentools3/files/block-nbsd b/sysutils/xentools3/files/block-nbsd
deleted file mode 100644
index 0530c45b806..00000000000
--- a/sysutils/xentools3/files/block-nbsd
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh -e
-
-# $NetBSD: block-nbsd,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $
-# Called by xenbackendd
-# Usage: block xsdir_backend_path state
-
-PATH=/bin:/usr/bin:@PREFIX@/bin:/sbin:/usr/sbin:@PREFIX@/sbin
-export PATH
-
-error() {
- echo "$@" >&2
- xenstore_write $xpath/hotplug-status error
- exit 1
-}
-
-
-xpath=$1
-xstatus=$2
-xtype=$(xenstore-read "$xpath/type")
-xparams=$(xenstore-read "$xpath/params")
-
-case $xstatus in
-6)
- # device removed
- case $xtype in
- file)
- vnd=$(xenstore-read "$xpath/vnd" || echo none)
- if [ $vnd != none ]; then
- vnconfig -u $vnd
- fi
- ;;
- phy)
- ;;
- *)
- echo "unknown type $xtype" >&2
- ;;
- esac
- xenstore-rm $xpath
- exit 0
- ;;
-2)
- case $xtype in
- file)
- # Store the list of available vnd(4) devices in
- #``available_disks'', and mark them as ``free''.
- list=`ls -1 /dev/vnd[0-9]*d | sed "s,/dev/vnd,,;s,d,," | sort -n`
- for i in $list; do
- disk="vnd$i"
- available_disks="$available_disks $disk"
- eval $disk=free
- done
- # Mark the used vnd(4) devices as ``used''.
- for disk in `sysctl hw.disknames`; do
- case $disk in
- vnd[0-9]*) eval $disk=used ;;
- esac
- done
- # Configure the first free vnd(4) device.
- for disk in $available_disks; do
- eval status=\$$disk
- if [ "$status" = "free" ] && \
- vnconfig /dev/${disk}d $xparams >/dev/null; then
- device=/dev/${disk}d
- echo vnconfig /dev/${disk}d $xparams
- break
- fi
- done
- if [ x$device = x ] ; then
- error "no available vnd device"
- fi
- echo xenstore-write $xpath/vnd $device
- xenstore-write $xpath/vnd $device
- ;;
- phy)
- device=$xparams
- ;;
- esac
- physical_device=$(stat -f '%r' "$device")
- echo xenstore-write $xpath/physical-device $physical_device
- xenstore-write $xpath/physical-device $physical_device
- echo xenstore-write $xpath/hotplug-status connected
- xenstore-write $xpath/hotplug-status connected
- exit 0
- ;;
-*)
- exit 0
- ;;
-esac
diff --git a/sysutils/xentools3/files/netbsd1-nbsd b/sysutils/xentools3/files/netbsd1-nbsd
deleted file mode 100644
index d56ff0634b9..00000000000
--- a/sysutils/xentools3/files/netbsd1-nbsd
+++ /dev/null
@@ -1,61 +0,0 @@
-# -*- mode: python; -*-
-#============================================================================
-# Python configuration setup for 'xm create'.
-# This script sets the parameters used when a domain is created using 'xm create'.
-# You use a separate script for each domain you want to create, or
-# you can set the parameters for the domain on the xm command line.
-#============================================================================
-
-#----------------------------------------------------------------------------
-# Kernel image file.
-kernel = "/usr/pkg/etc/xen/kernels/netbsd-XEN3_DOMU.gz"
-#kernel = "/usr/pkg/etc/xen/kernels/netbsd-INSTALL_XEN3_DOMU.gz"
-
-# Initial memory allocation (in megabytes) for the new domain.
-memory = 256
-
-# A name for your domain. All domains must have different names.
-name = "netbsd1"
-
-#----------------------------------------------------------------------------
-# network configuration.
-# The mac address is optionnal, it will use a random one if not specified.
-# By default we create a bridged configuration; when a vif is created
-# the script @PKG_SYSCONFDIR@/scripts/vif-bridge is called to connect
-# the bridge to the designated bridge (the bridge should already be up)
-vif = [ 'mac=00:16:3e:00:00:11, bridge=bridge0' ]
-
-#it's possible to use a different script when the vif is created;
-# for example to use a routed setup instead of bridged:
-# vif = [ 'mac=00:16:3e:00:00:11, ip=10.0.0.1 netmask 255.255.255.0, script=vif-ip' ]
-
-#----------------------------------------------------------------------------
-# Define the disk devices you want the domain to have access to, and
-# what you want them accessible as.
-# Each disk entry is of the form phy:UNAME,DEV,MODE
-# where UNAME is the device, DEV is the device name the domain will see,
-# and MODE is r for read-only, w for read-write.
-# For NetBSD guest DEV doesn't matter, so we can just use increasing numbers
-# here. For linux guests you have to use a linux device name (e.g. hda1)
-# or the corresponding device number (e.g 0x301 for hda1)
-
-disk = [ 'file:/home/domains/netbsd1,0x1,w' ]
-
-#----------------------------------------------------------------------------
-# exported PCI devices
-# these devices have to be attched to the pciback driver; use
-# pciback.hide=(bus:dev1.fun1)(bus:dev2.fun2)(...)
-# on the dom0's kernel command line to force attach of PCI devices to
-# pciback. bus and dev are 2-digit hex number, fun is a single digit
-# the domU needs to be built with
-# xpci* at xenbus ?
-# pci* at xpci ?
-# and the pci drivers to be used by the domU
-#
-# pci = [ 'bus:dev1.fun1', 'bus:dev2.fun2' ]
-
-#----------------------------------------------------------------------------
-# Boot parameters (e.g. -s, -a, ...)
-extra = ""
-
-#============================================================================
diff --git a/sysutils/xentools3/files/vif-bridge-nbsd b/sysutils/xentools3/files/vif-bridge-nbsd
deleted file mode 100644
index 487f69a347d..00000000000
--- a/sysutils/xentools3/files/vif-bridge-nbsd
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh -e
-
-# $NetBSD: vif-bridge-nbsd,v 1.2 2011/01/12 00:11:19 jym Exp $
-# Called by xenbackendd
-# Usage: vif-bridge xsdir_backend_path state
-
-dir=$(dirname $0)
-. "$dir/xen-subr"
-
-PATH=/bin:/usr/bin:@PREFIX@/bin:/sbin:/usr/sbin:@PREFIX@/sbin
-export PATH
-
-xpath=$1
-xstatus=$2
-
-case $xstatus in
-6)
- # device removed
- xenstore-rm $xpath
- exit 0
- ;;
-2)
- xbridge=$(xenstore-read "$xpath/bridge")
- xfid=$(xenstore-read "$xpath/frontend-id")
- xhandle=$(xenstore-read "$xpath/handle")
- iface=$(xenstore_read_default "$xpath/vifname" "xvif$xfid.$xhandle")
- echo ifconfig $iface up
- ifconfig $iface up
- brconfig $xbridge add $iface
- echo brconfig $xbridge add $iface
- xenstore-write $xpath/hotplug-status connected
- echo xenstore-write $xpath/hotplug-status connected
- exit 0
- ;;
-*)
- exit 0
- ;;
-esac
diff --git a/sysutils/xentools3/files/vif-ip-nbsd b/sysutils/xentools3/files/vif-ip-nbsd
deleted file mode 100755
index 1cc685f246a..00000000000
--- a/sysutils/xentools3/files/vif-ip-nbsd
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh -e
-
-# $NetBSD: vif-ip-nbsd,v 1.2 2011/01/12 00:11:19 jym Exp $
-# Called by xenbackendd
-# Usage: vif-ip xsdir_backend_path state
-
-dir=$(dirname $0)
-. "$dir/xen-subr"
-
-PATH=/bin:/usr/bin:@PREFIX@/bin:/sbin:/usr/sbin:@PREFIX@/sbin
-export PATH
-
-xpath=$1
-xstatus=$2
-
-case $xstatus in
-6)
- # device removed
- xenstore-rm $xpath
- exit 0
- ;;
-2)
- xip=$(xenstore-read "$xpath/ip")
- xfid=$(xenstore-read "$xpath/frontend-id")
- xhandle=$(xenstore-read "$xpath/handle")
- iface=$(xenstore_read_default "$xpath/vifname" "xvif$xfid.$xhandle")
- echo ifconfig $iface $xip up
- ifconfig $iface $xip up
- xenstore-write $xpath/hotplug-status connected
- echo xenstore-write $xpath/hotplug-status connected
- exit 0
- ;;
-*)
- exit 0
- ;;
-esac
diff --git a/sysutils/xentools3/files/xen-subr-nbsd b/sysutils/xentools3/files/xen-subr-nbsd
deleted file mode 100644
index bda5a806e1b..00000000000
--- a/sysutils/xentools3/files/xen-subr-nbsd
+++ /dev/null
@@ -1,11 +0,0 @@
-# $NetBSD: xen-subr-nbsd,v 1.1 2011/01/12 00:11:19 jym Exp $
-#
-# Contains commonly used functions which are used by Xen scripts
-
-# xenstore_read_default path default
-#
-# Read the given path in XenStore. Return default if path does not exist
-#
-xenstore_read_default() {
- xenstore-read "$1" 2>/dev/null || echo "$2"
-}
diff --git a/sysutils/xentools3/files/xenbackendd.c b/sysutils/xentools3/files/xenbackendd.c
deleted file mode 100644
index 18e43313ff1..00000000000
--- a/sysutils/xentools3/files/xenbackendd.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/* $NetBSD: xenbackendd.c,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $ */
-/*
- * Copyright (C) 2006 Manuel bouyer
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; under version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <err.h>
-#include <errno.h>
-#include <stdio.h>
-#include <getopt.h>
-#include <stdbool.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <string.h>
-#include <syslog.h>
-#include <stdarg.h>
-
-#include <xenctrl.h>
-#include <xs.h>
-
-#define DEVTYPE_UNKNOWN 0
-#define DEVTYPE_VIF 1
-#define DEVTYPE_VBD 2
-
-#define DOMAIN_PATH "/local/domain/0"
-
-#ifndef VBD_SCRIPT
-#define VBD_SCRIPT "/usr/pkg/etc/xen/scripts/block"
-#endif
-#ifndef LOG_FILE
-#define LOG_FILE "/var/log/xenbackendd.log"
-#endif
-#ifndef PID_FILE
-#define PID_FILE "/var/run/xenbackendd.pid"
-#endif
-
-
-struct xs_handle *xs;
-int xc;
-
-int xen_setup(void);
-void dolog(int, const char *, ...);
-void dodebug(const char *, ...);
-void doexec(const char *, const char *, const char *);
-void usage(void);
-
-int fflag = 0;
-int dflag = 0;
-
-const char *vbd_script = NULL;
-const char *log_file = NULL;
-const char *pidfile = NULL;
-int
-main(int argc, char * const argv[])
-{
- char **vec;
- unsigned int num;
- int i;
- char *s;
- int state;
- char *sstate;
- char *p;
- char buf[80];
- int type = DEVTYPE_UNKNOWN;
- extern char *optarg;
- extern int optind;
- int ch;
- int debug_fd;
- FILE *pidfile_f;
-
- while ((ch = getopt(argc, argv, "dfl:p:s:")) != -1) {
- switch (ch) {
- case 'd':
- dflag = 1;
- break;
- case 'f':
- fflag = 1;
- break;
- case 'l':
- log_file = optarg;
- break;
- case 'p':
- pidfile = pidfile;
- case 's':
- vbd_script = optarg;
- break;
- default:
- usage();
- }
- }
-
- if (vbd_script == NULL)
- vbd_script = VBD_SCRIPT;
- if (pidfile == NULL)
- pidfile = PID_FILE;
- if (log_file == NULL)
- log_file = LOG_FILE;
-
- openlog("xenbackendd", LOG_PID | LOG_NDELAY, LOG_DAEMON);
-
- if (fflag == 0) {
- /* open log file */
- debug_fd = open(log_file, O_RDWR | O_CREAT | O_TRUNC, 0644);
- if (debug_fd == -1) {
- dolog(LOG_ERR, "can't open %s: %s",
- log_file, strerror(errno));
- exit(1);
- }
- }
-
- if (fflag == 0) {
- /* daemonize */
- pidfile_f = fopen(pidfile, "w");
- if (pidfile_f == NULL) {
- dolog(LOG_ERR, "can't open %s: %s",
- pidfile, strerror(errno));
- exit(1);
- }
- if (daemon(0, 0) < 0) {
- dolog(LOG_ERR, "can't daemonize: %s",
- strerror(errno));
- exit(1);
- }
- fprintf(pidfile_f, "%d\n", (int)getpid());
- fclose(pidfile_f);
- /* retirect stderr to log file */
- if (dup2(debug_fd, STDERR_FILENO) < 0) {
- dolog(LOG_ERR, "can't redirect stderr to %s: %s\n",
- log_file, strerror(errno));
- exit(1);
- }
- /* also redirect stdout if we're in debug mode */
- if (dflag) {
- if (dup2(debug_fd, STDOUT_FILENO) < 0) {
- dolog(LOG_ERR,
- "can't redirect stdout to %s: %s\n",
- log_file, strerror(errno));
- exit(1);
- }
- }
- close(debug_fd);
- debug_fd = -1;
- }
-
- if (xen_setup() < 0) {
- exit(1);
- }
-
- while (1) {
- vec = xs_read_watch(xs, &num);
- if (!vec) {
- dolog(LOG_ERR, "xs_read_watch: NULL\n");
- continue;
- }
- if (strlen(vec[XS_WATCH_PATH]) < sizeof("state"))
- goto next1;
- /* find last component of path, check if it's "state" */
- p = &vec[XS_WATCH_PATH][
- strlen(vec[XS_WATCH_PATH]) - sizeof("state")];
- if (p[0] != '/')
- goto next1;
- p[0] = '\0';
- p++;
- if (strcmp(p, "state") != 0)
- goto next1;
- snprintf(buf, sizeof(buf), "%s/state", vec[XS_WATCH_PATH]);
- sstate = xs_read(xs, XBT_NULL, buf, 0);
- if (sstate == NULL) {
- dolog(LOG_ERR,
- "Failed to read %s (%s)", buf, strerror(errno));
- goto next1;
- }
- state = atoi(sstate);
- snprintf(buf, sizeof(buf), "%s/hotplug-status",
- vec[XS_WATCH_PATH]);
- s = xs_read(xs, XBT_NULL, buf, 0);
- if (s != NULL && state != 6 /* XenbusStateClosed */)
- goto next2;
- if (strncmp(vec[XS_WATCH_PATH],
- DOMAIN_PATH "/backend/vif",
- strlen(DOMAIN_PATH "/backend/vif")) == 0)
- type = DEVTYPE_VIF;
- if (strncmp(vec[XS_WATCH_PATH],
- DOMAIN_PATH "/backend/vbd",
- strlen(DOMAIN_PATH "/backend/vbd")) == 0)
- type = DEVTYPE_VBD;
- switch(type) {
- case DEVTYPE_VIF:
- if (s)
- free(s);
- snprintf(buf, sizeof(buf), "%s/script",
- vec[XS_WATCH_PATH]);
- s = xs_read(xs, XBT_NULL, buf, 0);
- if (s == NULL) {
- dolog(LOG_ERR,
- "Failed to read %s (%s)", buf,
- strerror(errno));
- goto next2;
- }
- doexec(s, vec[XS_WATCH_PATH], sstate);
- break;
- case DEVTYPE_VBD:
- doexec(vbd_script, vec[XS_WATCH_PATH], sstate);
- break;
- default:
- break;
- }
-next2:
- if (s)
- free(s);
- free(sstate);
-next1:
- free(vec);
- }
-}
-
-void
-dolog(int pri, const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
- fprintf(stderr, "\n");
- fflush(stderr);
- va_start(ap, fmt);
- vsyslog(pri, fmt, ap);
- va_end(ap);
-}
-
-void
-dodebug(const char *fmt, ...)
-{
- va_list ap;
-
- if (dflag == 0)
- return;
- va_start(ap, fmt);
- vfprintf(stdout, fmt, ap);
- va_end(ap);
- printf("\n");
- fflush(stdout);
-}
-
-int
-xen_setup(void)
-{
-
- xs = xs_daemon_open();
- if (xs == NULL) {
- dolog(LOG_ERR,
- "Failed to contact xenstore (%s). Is it running?",
- strerror(errno));
- goto out;
- }
-
- xc = xc_interface_open();
- if (xc == -1) {
- dolog(LOG_ERR, "Failed to contact hypervisor (%s)",
- strerror(errno));
- goto out;
- }
- if (!xs_watch(xs, DOMAIN_PATH, "backend")) {
- dolog(LOG_ERR, "xenstore watch on backend fails.");
- goto out;
- }
- return 0;
- out:
- if (xs)
- xs_daemon_close(xs);
- if (xc != -1)
- xc_interface_close(xc);
- return -1;
-}
-
-void
-doexec(const char *cmd, const char *arg1, const char *arg2)
-{
- dodebug("exec %s %s %s", cmd, arg1, arg2);
- switch(vfork()) {
- case -1:
- dolog(LOG_ERR, "can't vfork: %s", strerror(errno));
- break;
- case 0:
- execl(cmd, cmd, arg1, arg2, NULL);
- dolog(LOG_ERR, "can't exec %s: %s", cmd, strerror(errno));
- exit(1);
- break;
- default:
- wait(NULL);
- break;
- }
-}
-
-void
-usage()
-{
- fprintf(stderr, "usage: %s [-d] [-f] [-l log_file] [-p pif_file] [-s vbd_script]\n",
- getprogname());
- exit(1);
-}
diff --git a/sysutils/xentools3/files/xenbackendd.sh b/sysutils/xentools3/files/xenbackendd.sh
deleted file mode 100644
index b0951df1314..00000000000
--- a/sysutils/xentools3/files/xenbackendd.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD: xenbackendd.sh,v 1.2 2011/10/07 22:37:06 shattered Exp $
-#
-
-# PROVIDE: xenbackendd
-# REQUIRE: xend
-
-$_rc_subr_loaded . /etc/rc.subr
-
-name="xenbackendd"
-rcvar=$name
-command="@PREFIX@/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/sysutils/xentools3/files/xend.sh b/sysutils/xentools3/files/xend.sh
deleted file mode 100644
index b7ebcd309f6..00000000000
--- a/sysutils/xentools3/files/xend.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD: xend.sh,v 1.3 2009/01/17 12:31:10 bouyer Exp $
-#
-# PROVIDE: xend
-# REQUIRE: DAEMON
-
-. /etc/rc.subr
-
-name="xend"
-rcvar=$name
-command="@PREFIX@/sbin/xend"
-command_interpreter="@RCD_INTERPRETER@"
-start_cmd="@ECHO@ Starting ${name}. && PATH=${PATH}:@PREFIX@/sbin ${command} start"
-start_precmd="xen_precmd"
-privcmd_path="@PROCPATH@/xen/privcmd"
-
-xen_precmd()
-{
- if [ ! -f ${privcmd_path} ]; then
- @ECHO@ "${name}: Cannot find ${privcmd_path}!"
- exit 1
- fi
- mkdir -p /var/run/xend || exit 1
- mkdir -p /var/run/xend/boot || exit 1
- mkdir -p /var/run/xenstored || exit 1
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/sysutils/xentools3/files/xendomains.sh b/sysutils/xentools3/files/xendomains.sh
deleted file mode 100644
index 8108d8b8a33..00000000000
--- a/sysutils/xentools3/files/xendomains.sh
+++ /dev/null
@@ -1,136 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD: xendomains.sh,v 1.2 2012/07/16 22:55:25 jym Exp $
-#
-# PROVIDE: xendomains
-# REQUIRE: xenbackendd
-# KEYWORD: shutdown
-#
-# xendomains This required variable is a whitespace-separated
-# list of domains, e.g., xendomains="dom1 dom2 dom3".
-#
-# xendomains_config This optional variable is a format string that
-# represents the path to the configuration file for
-# each domain. "%s" is substituted with the name of
-# the domain. The default is "@PKG_SYSCONFDIR@/%s".
-#
-# xendomains_prehook This optional variable is a format string that
-# represents the command to run, if it exists, before
-# starting each domain. "%s" is substituted with the
-# name of the domain. The default is
-# "@PKG_SYSCONFDIR@/%s-pre".
-#
-# xendomains_posthook This optional variable is a format string that
-# represents the command to run, if it exists, after
-# stopping each domain. "%s" is substituted with the
-# name of the domain. The default is
-# "@PKG_SYSCONFDIR@/%s-post".
-#
-
-. /etc/rc.subr
-
-name="xendomains"
-ctl_command="@PREFIX@/sbin/xm"
-start_cmd="xendomains_start"
-stop_cmd="xendomains_stop"
-list_cmd="xendomains_list"
-extra_commands="list"
-privcmd_path="@PROCPATH@/xen/privcmd"
-
-xendomains_start()
-{
- [ -n "$xendomains" ] || return
-
- if [ ! -f ${privcmd_path} ]; then
- echo "${name}: Cannot find ${privcmd_path}!"
- exit 1
- fi
-
- echo "Starting xen domains."
- for domain in $xendomains; do
- case "$domain" in
- "") continue ;;
- esac
-
- # Start off by running the pre-hook script if it's present.
- if [ -n "${xendomains_prehook}" ]; then
- cmdline=`printf "${xendomains_prehook}" $domain`
- cmd="${cmdline%% *}"
- if [ -x "$cmd" ]; then
- if ! $cmdline; then
- echo "Pre-hook \`\`$cmdline'' failed... skipping $domain."
- continue
- fi
- fi
- fi
-
- # Ask xend to create the domain.
- if [ -n "${xendomains_config}" ]; then
- file=`printf "${xendomains_config}" $domain`
- if [ -f "$file" ]; then
- ${ctl_command} create "$file"
- fi
- fi
- done
-}
-
-xendomains_list() {
- # Output a whitespace-separated list of live guest domains.
- ${ctl_command} list | awk '
- (FNR <= 2) { next }
- ($5 !~ /s/) { s = s " " $1 }
- END { sub(" *", "", s); print s }'
-}
-
-xendomains_stop()
-{
- # Determine an appropriate timeout waiting for all domains to
- # stop -- always wait at least 60s, and add 5s per active domain.
- #
- numdomains=$(xendomains_list | awk '{ print NF }')
- [ $numdomains -gt 0 ] || return
- timeout=$((60 + numdomains * 5))
-
- # Ask xend to stop every domain, and poll xend every 10s up to the
- # timeout period to check if all the domains are stopped. We
- # consider a domain in the "s" (shutdown) state to be stopped.
- #
- echo "Stopping xen domains."
- for domain in $(xendomains_list); do
- ${ctl_command} shutdown --halt $domain
- done
- while [ $timeout -gt 0 ]; do
- livedomains=$(xendomains_list)
- [ -n "$livedomains" ] || break
- timeout=$((timeout - 10))
- sleep 10
- done
- livedomains=$(xendomains_list)
- if [ -n "$livedomains" ]; then
- echo "Failed to stop: $livedomains"
- else
- echo "All domains stopped."
- fi
-
- # Finish off by running the post-hook script if it's present.
- for domain in $xendomains; do
- case "$domain" in
- "") continue ;;
- esac
- if [ -n "${xendomains_posthook}" ]; then
- cmdline=`printf "${xendomains_posthook}" $domain`
- cmd="${cmdline%% *}"
- if [ -x "$cmd" ]; then
- $cmdline || echo "Post-hook \`\`$cmdline'' failed."
- fi
- fi
- done
-}
-
-load_rc_config $name
-
-: ${xendomains_config="@PKG_SYSCONFDIR@/%s"}
-: ${xendomains_prehook="@PKG_SYSCONFDIR@/%s-pre"}
-: ${xendomains_posthook="@PKG_SYSCONFDIR@/%s-post"}
-
-run_rc_command "$1"
diff --git a/sysutils/xentools3/files/xenio.h b/sysutils/xentools3/files/xenio.h
deleted file mode 100644
index dfbb03187c5..00000000000
--- a/sysutils/xentools3/files/xenio.h
+++ /dev/null
@@ -1,105 +0,0 @@
-/* NetBSD: xenio.h,v 1.3 2005/05/24 12:07:12 yamt Exp $ */
-
-/******************************************************************************
- * privcmd.h
- *
- * Copyright (c) 2003-2004, K A Fraser
- *
- * This file may be distributed separately from the Linux kernel, or
- * incorporated into other software packages, subject to the following license:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this source file (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy, modify,
- * merge, publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef __PKGSRC_PRIVCMD_H__
-#define __PKGSRC_PRIVCMD_H__
-
-/* Interface to /proc/xen/privcmd */
-
-typedef struct privcmd_hypercall
-{
- unsigned long op;
- unsigned long arg[5];
-} privcmd_hypercall_t;
-
-typedef struct privcmd_mmap_entry {
- unsigned long va;
- unsigned long mfn;
- unsigned long npages;
-} privcmd_mmap_entry_t;
-
-typedef struct privcmd_mmap {
- int num;
- domid_t dom; /* target domain */
- privcmd_mmap_entry_t *entry;
-} privcmd_mmap_t;
-
-typedef struct privcmd_mmapbatch {
- int num; /* number of pages to populate */
- domid_t dom; /* target domain */
- unsigned long addr; /* virtual address */
- unsigned long *arr; /* array of mfns - top nibble set on err */
-} privcmd_mmapbatch_t;
-
-typedef struct privcmd_blkmsg
-{
- unsigned long op;
- void *buf;
- int buf_size;
-} privcmd_blkmsg_t;
-
-/*
- * @cmd: IOCTL_PRIVCMD_HYPERCALL
- * @arg: &privcmd_hypercall_t
- * Return: Value returned from execution of the specified hypercall.
- */
-#define IOCTL_PRIVCMD_HYPERCALL \
- _IOWR('P', 0, privcmd_hypercall_t)
-
-#if defined(_KERNEL)
-/* compat */
-#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN_OLD \
- _IO('P', 1)
-#endif /* defined(_KERNEL) */
-
-#define IOCTL_PRIVCMD_MMAP \
- _IOW('P', 2, privcmd_mmap_t)
-#define IOCTL_PRIVCMD_MMAPBATCH \
- _IOW('P', 3, privcmd_mmapbatch_t)
-#define IOCTL_PRIVCMD_GET_MACH2PHYS_START_MFN \
- _IOR('P', 4, unsigned long)
-
-/*
- * @cmd: IOCTL_PRIVCMD_INITDOMAIN_EVTCHN
- * @arg: n/a
- * Return: Port associated with domain-controller end of control event channel
- * for the initial domain.
- */
-#define IOCTL_PRIVCMD_INITDOMAIN_EVTCHN \
- _IOR('P', 5, int)
-
-/* Interface to /dev/xenevt */
-/* EVTCHN_RESET: Clear and reinit the event buffer. Clear error condition. */
-#define EVTCHN_RESET _IO('E', 1)
-/* EVTCHN_BIND: Bind to the specified event-channel port. */
-#define EVTCHN_BIND _IOW('E', 2, unsigned long)
-/* EVTCHN_UNBIND: Unbind from the specified event-channel port. */
-#define EVTCHN_UNBIND _IOW('E', 3, unsigned long)
-
-#endif /* __PKGSRC_PRIVCMD_H__ */
diff --git a/sysutils/xentools3/files/xenio3.h b/sysutils/xentools3/files/xenio3.h
deleted file mode 100644
index 7f1cc503af3..00000000000
--- a/sysutils/xentools3/files/xenio3.h
+++ /dev/null
@@ -1,89 +0,0 @@
-/* $NetBSD: xenio3.h,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $ */
-/******************************************************************************
- * evtchn.h
- *
- * Interface to /dev/xen/evtchn.
- *
- * Copyright (c) 2003-2005, K A Fraser
- *
- * This file may be distributed separately from the Linux kernel, or
- * incorporated into other software packages, subject to the following license:
- *
- * Permission is hereby granted, free of charge, to any person obtaining a copy
- * of this source file (the "Software"), to deal in the Software without
- * restriction, including without limitation the rights to use, copy, modify,
- * merge, publish, distribute, sublicense, and/or sell copies of the Software,
- * and to permit persons to whom the Software is furnished to do so, subject to
- * the following conditions:
- *
- * The above copyright notice and this permission notice shall be included in
- * all copies or substantial portions of the Software.
- *
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
- * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
- * IN THE SOFTWARE.
- */
-
-#ifndef __NetBSD_XENIO3_H__
-#define __NetBSD_XENIO3_H__
-
-/*
- * Bind a fresh port to VIRQ @virq.
- * Return allocated port.
- */
-#define IOCTL_EVTCHN_BIND_VIRQ \
- _IOWR('E', 4, struct ioctl_evtchn_bind_virq)
-struct ioctl_evtchn_bind_virq {
- unsigned int virq;
- unsigned int port;
-};
-
-/*
- * Bind a fresh port to remote <@remote_domain, @remote_port>.
- * Return allocated port.
- */
-#define IOCTL_EVTCHN_BIND_INTERDOMAIN \
- _IOWR('E', 5, struct ioctl_evtchn_bind_interdomain)
-struct ioctl_evtchn_bind_interdomain {
- unsigned int remote_domain, remote_port;
- unsigned int port;
-};
-
-/*
- * Allocate a fresh port for binding to @remote_domain.
- * Return allocated port.
- */
-#define IOCTL_EVTCHN_BIND_UNBOUND_PORT \
- _IOWR('E', 6, struct ioctl_evtchn_bind_unbound_port)
-struct ioctl_evtchn_bind_unbound_port {
- unsigned int remote_domain;
- unsigned int port;
-};
-
-/*
- * Unbind previously allocated @port.
- */
-#define IOCTL_EVTCHN_UNBIND \
- _IOW('E', 7, struct ioctl_evtchn_unbind)
-struct ioctl_evtchn_unbind {
- unsigned int port;
-};
-
-/*
- * Send event to previously allocated @port.
- */
-#define IOCTL_EVTCHN_NOTIFY \
- _IOW('E', 8, struct ioctl_evtchn_notify)
-struct ioctl_evtchn_notify {
- unsigned int port;
-};
-
-/* Clear and reinitialise the event buffer. Clear error condition. */
-#define IOCTL_EVTCHN_RESET \
- _IO('E', 9)
-
-#endif /* __NetBSD_XENIO3_H__ */
diff --git a/sysutils/xentools3/patches/patch-.._patch-Config.mk b/sysutils/xentools3/patches/patch-.._patch-Config.mk
deleted file mode 100644
index 04128e65e5c..00000000000
--- a/sysutils/xentools3/patches/patch-.._patch-Config.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-.._patch-Config.mk,v 1.2 2013/04/11 19:57:52 joerg Exp $
-
---- ../Config.mk.orig 2011-12-07 10:40:48.000000000 +0000
-+++ ../Config.mk
-@@ -19,7 +19,7 @@ SHELL ?= /bin/sh
- # Tools to run on system hosting the build
- HOSTCC = gcc
- HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
--HOSTCFLAGS += -fno-strict-aliasing
-+HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS}
- HOSTCFLAGS_x86_32 = -m32
- HOSTCFLAGS_x86_64 = -m64
- HOSTCFLAGS += $(HOSTCFLAGS_$(XEN_COMPILE_ARCH))
-@@ -70,10 +70,11 @@ CFLAGS += -Wall -Wstrict-prototypes
-
- # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
- # result of any casted expression causes a warning.
--CFLAGS += -Wno-unused-value
-+CFLAGS += -Wno-unused-value -Wno-switch
-
- HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
- CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
-+CFLAGS += ${EXTRA_CFLAGS}
-
- LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
- CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
diff --git a/sysutils/xentools3/patches/patch-.._xen_patch-common_libelf_libelf-private.h b/sysutils/xentools3/patches/patch-.._xen_patch-common_libelf_libelf-private.h
deleted file mode 100644
index f4902fa7600..00000000000
--- a/sysutils/xentools3/patches/patch-.._xen_patch-common_libelf_libelf-private.h
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-.._xen_patch-common_libelf_libelf-private.h,v 1.1 2013/07/17 09:39:19 joerg Exp $
-
---- ../xen/common/libelf/libelf-private.h.orig 2013-07-12 18:07:36.000000000 +0000
-+++ ../xen/common/libelf/libelf-private.h
-@@ -1,4 +1,4 @@
--#ifndef __LIBELF_PRIVATE_H__
-+#ifndef __LIBELF_PRIVATE_H_
- #define __LIBELF_PRIVATE_H_
-
- #ifdef __XEN__
diff --git a/sysutils/xentools3/patches/patch-aa b/sysutils/xentools3/patches/patch-aa
deleted file mode 100644
index 100be84339b..00000000000
--- a/sysutils/xentools3/patches/patch-aa
+++ /dev/null
@@ -1,59 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2008/03/03 16:45:27 hannken Exp $
-
---- Makefile.orig 2008-01-31 11:06:54.000000000 +0100
-+++ Makefile 2008-02-29 16:58:47.000000000 +0100
-@@ -5,19 +5,12 @@ SUBDIRS-y :=
- SUBDIRS-y += libxc
- SUBDIRS-y += xenstore
- SUBDIRS-y += misc
--SUBDIRS-y += examples
--SUBDIRS-y += xentrace
- SUBDIRS-$(CONFIG_XCUTILS) += xcutils
--SUBDIRS-$(CONFIG_X86) += firmware
- SUBDIRS-y += security
- SUBDIRS-y += console
--SUBDIRS-y += xenmon
--SUBDIRS-y += guest-headers
- SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
- SUBDIRS-$(VTPM_TOOLS) += vtpm
- SUBDIRS-y += xenstat
--SUBDIRS-y += libaio
--SUBDIRS-y += blktap
- SUBDIRS-y += libfsimage
- SUBDIRS-$(XENFB_TOOLS) += xenfb
- SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
-@@ -33,34 +26,27 @@ all: check
- @set -e; for subdir in $(SUBDIRS-y); do \
- $(MAKE) -C $$subdir $@; \
- done
-- $(MAKE) ioemu
-
- .PHONY: install
- install: check
- @set -e; for subdir in $(SUBDIRS-y); do \
- $(MAKE) -C $$subdir $@; \
- done
-- $(MAKE) ioemuinstall
-- $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
-- $(INSTALL_DIR) $(DESTDIR)/var/log/xen
-
- .PHONY: clean
- clean: check_clean
- @set -e; for subdir in $(SUBDIRS-y); do \
- $(MAKE) -C $$subdir $@; \
- done
-- $(MAKE) ioemuclean
-
- .PHONY: distclean
- distclean: clean
-
- .PHONY: check
- check:
-- $(MAKE) -C check
-
- .PHONY: check_clean
- check_clean:
-- $(MAKE) -C check clean
-
- .PHONY: ioemu ioemuinstall ioemuclean
- ifeq ($(CONFIG_IOEMU),y)
diff --git a/sysutils/xentools3/patches/patch-ab b/sysutils/xentools3/patches/patch-ab
deleted file mode 100644
index 61b725109b2..00000000000
--- a/sysutils/xentools3/patches/patch-ab
+++ /dev/null
@@ -1,284 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2008/02/17 16:29:03 bouyer Exp $
-
---- libxc/xc_netbsd.c.orig 2008-02-17 15:12:36.000000000 +0100
-+++ libxc/xc_netbsd.c 2008-02-17 15:20:03.000000000 +0100
-@@ -0,0 +1,279 @@
-+/******************************************************************************
-+ *
-+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
-+ * Use is subject to license terms.
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation, version 2 of the
-+ * License.
-+ */
-+
-+#include "xc_private.h"
-+
-+#include <xen/memory.h>
-+#include <xen/xenio3.h>
-+#include <unistd.h>
-+#include <fcntl.h>
-+
-+int xc_interface_open(void)
-+{
-+ int flags, saved_errno;
-+ int fd = open("/kern/xen/privcmd", O_RDWR);
-+
-+ if ( fd == -1 )
-+ {
-+ PERROR("Could not obtain handle on privileged command interface");
-+ return -1;
-+ }
-+
-+ /* Although we return the file handle as the 'xc handle' the API
-+ does not specify / guarentee that this integer is in fact
-+ a file handle. Thus we must take responsiblity to ensure
-+ it doesn't propagate (ie leak) outside the process */
-+ if ( (flags = fcntl(fd, F_GETFD)) < 0 )
-+ {
-+ PERROR("Could not get file handle flags");
-+ goto error;
-+ }
-+ flags |= FD_CLOEXEC;
-+ if ( fcntl(fd, F_SETFD, flags) < 0 )
-+ {
-+ PERROR("Could not set file handle flags");
-+ goto error;
-+ }
-+
-+ return fd;
-+
-+ error:
-+ saved_errno = errno;
-+ close(fd);
-+ errno = saved_errno;
-+ return -1;
-+}
-+
-+int xc_interface_close(int xc_handle)
-+{
-+ return close(xc_handle);
-+}
-+
-+void *xc_map_foreign_batch(int xc_handle, uint32_t dom, int prot,
-+ xen_pfn_t *arr, int num)
-+{
-+ privcmd_mmapbatch_t ioctlx;
-+ void *addr;
-+ addr = mmap(NULL, num*PAGE_SIZE, prot, MAP_ANON | MAP_SHARED, -1, 0);
-+ if ( addr == MAP_FAILED )
-+ return NULL;
-+
-+ ioctlx.num=num;
-+ ioctlx.dom=dom;
-+ ioctlx.addr=(unsigned long)addr;
-+ ioctlx.arr=arr;
-+ if ( ioctl(xc_handle, IOCTL_PRIVCMD_MMAPBATCH, &ioctlx) < 0 )
-+ {
-+ int saved_errno = errno;
-+ perror("XXXXXXXX");
-+ (void)munmap(addr, num*PAGE_SIZE);
-+ errno = saved_errno;
-+ return NULL;
-+ }
-+ return addr;
-+
-+}
-+
-+void *xc_map_foreign_range(int xc_handle, uint32_t dom,
-+ int size, int prot,
-+ unsigned long mfn)
-+{
-+ privcmd_mmap_t ioctlx;
-+ privcmd_mmap_entry_t entry;
-+ void *addr;
-+ addr = mmap(NULL, size, prot, MAP_ANON | MAP_SHARED, -1, 0);
-+ if ( addr == MAP_FAILED )
-+ return NULL;
-+
-+ ioctlx.num=1;
-+ ioctlx.dom=dom;
-+ ioctlx.entry=&entry;
-+ entry.va=(unsigned long) addr;
-+ entry.mfn=mfn;
-+ entry.npages=(size+PAGE_SIZE-1)>>PAGE_SHIFT;
-+ if ( ioctl(xc_handle, IOCTL_PRIVCMD_MMAP, &ioctlx) < 0 )
-+ {
-+ int saved_errno = errno;
-+ (void)munmap(addr, size);
-+ errno = saved_errno;
-+ return NULL;
-+ }
-+ return addr;
-+}
-+
-+int xc_map_foreign_ranges(int xc_handle, uint32_t dom,
-+ privcmd_mmap_entry_t *entries, int nr)
-+{
-+ privcmd_mmap_t ioctlx;
-+ int err;
-+
-+ ioctlx.num = nr;
-+ ioctlx.dom = dom;
-+ ioctlx.entry = entries;
-+
-+ err = ioctl(xc_handle, IOCTL_PRIVCMD_MMAP, &ioctlx);
-+ if (err == 0)
-+ return 0;
-+ else
-+ return -errno;
-+}
-+
-+static int do_privcmd(int xc_handle, unsigned int cmd, unsigned long data)
-+{
-+ int err = ioctl(xc_handle, cmd, data);
-+ if (err == 0)
-+ return 0;
-+ else
-+ return -errno;
-+}
-+
-+int do_xen_hypercall(int xc_handle, privcmd_hypercall_t *hypercall)
-+{
-+#ifdef __PKGSRC_PRIVCMD_H__
-+ /* old IOCTL */
-+ return do_privcmd(xc_handle,
-+ IOCTL_PRIVCMD_HYPERCALL,
-+ (unsigned long)hypercall);
-+#else
-+ int error = do_privcmd(xc_handle,
-+ IOCTL_PRIVCMD_HYPERCALL,
-+ (unsigned long)hypercall);
-+ if (error)
-+ return error;
-+ else
-+ return (hypercall->retval);
-+#endif
-+}
-+
-+#define EVTCHN_DEV_NAME "/dev/xenevt"
-+
-+int xc_evtchn_open(void)
-+{
-+ return open(EVTCHN_DEV_NAME, O_NONBLOCK|O_RDWR);
-+}
-+
-+int xc_evtchn_close(int xce_handle)
-+{
-+ return close(xce_handle);
-+}
-+
-+int xc_evtchn_fd(int xce_handle)
-+{
-+ return xce_handle;
-+}
-+
-+int xc_evtchn_notify(int xce_handle, evtchn_port_t port)
-+{
-+ struct ioctl_evtchn_notify notify;
-+
-+ notify.port = port;
-+
-+ return ioctl(xce_handle, IOCTL_EVTCHN_NOTIFY, &notify);
-+}
-+
-+evtchn_port_or_error_t xc_evtchn_bind_interdomain(int xce_handle, int domid,
-+ evtchn_port_t remote_port)
-+{
-+ struct ioctl_evtchn_bind_interdomain bind;
-+ int ret;
-+
-+ bind.remote_domain = domid;
-+ bind.remote_port = remote_port;
-+
-+ ret = ioctl(xce_handle, IOCTL_EVTCHN_BIND_INTERDOMAIN, &bind);
-+ if (ret == 0)
-+ return bind.port;
-+ else
-+ return -1;
-+}
-+
-+int xc_evtchn_unbind(int xce_handle, evtchn_port_t port)
-+{
-+ struct ioctl_evtchn_unbind unbind;
-+
-+ unbind.port = port;
-+
-+ return ioctl(xce_handle, IOCTL_EVTCHN_UNBIND, &unbind);
-+}
-+
-+evtchn_port_or_error_t xc_evtchn_bind_virq(int xce_handle, unsigned int virq)
-+{
-+ struct ioctl_evtchn_bind_virq bind;
-+ int err;
-+
-+ bind.virq = virq;
-+
-+ err = ioctl(xce_handle, IOCTL_EVTCHN_BIND_VIRQ, &bind);
-+ if (err)
-+ return -1;
-+ else
-+ return bind.port;
-+}
-+
-+static int dorw(int fd, char *data, size_t size, int do_write)
-+{
-+ size_t offset = 0;
-+ ssize_t len;
-+
-+ while ( offset < size )
-+ {
-+ if (do_write)
-+ len = write(fd, data + offset, size - offset);
-+ else
-+ len = read(fd, data + offset, size - offset);
-+
-+ if ( len == -1 )
-+ {
-+ if ( errno == EINTR )
-+ continue;
-+ return -1;
-+ }
-+
-+ offset += len;
-+ }
-+
-+ return 0;
-+}
-+
-+evtchn_port_or_error_t xc_evtchn_pending(int xce_handle)
-+{
-+ evtchn_port_t port;
-+
-+ if ( dorw(xce_handle, (char *)&port, sizeof(port), 0) == -1 )
-+ return -1;
-+
-+ return port;
-+}
-+
-+int xc_evtchn_unmask(int xce_handle, evtchn_port_t port)
-+{
-+ return dorw(xce_handle, (char *)&port, sizeof(port), 1);
-+}
-+
-+/* Optionally flush file to disk and discard page cache */
-+void discard_file_cache(int fd, int flush)
-+{
-+
-+ if ( flush && (fsync(fd) < 0) )
-+ {
-+ /*PERROR("Failed to flush file: %s", strerror(errno));*/
-+ }
-+}
-+
-+/*
-+ * Local variables:
-+ * mode: C
-+ * c-set-style: "BSD"
-+ * c-basic-offset: 4
-+ * tab-width: 4
-+ * indent-tabs-mode: nil
-+ * End:
-+ */
diff --git a/sysutils/xentools3/patches/patch-ac b/sysutils/xentools3/patches/patch-ac
deleted file mode 100644
index 68ce3f2f4bf..00000000000
--- a/sysutils/xentools3/patches/patch-ac
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2008/09/16 19:39:06 bouyer Exp $
-
---- libxc/xc_domain_save.c.orig 2007-05-27 13:35:43.000000000 +0200
-+++ libxc/xc_domain_save.c 2007-05-27 13:35:53.000000000 +0200
-@@ -620,7 +620,7 @@
- }
-
- if ( (m2p = mmap(NULL, m2p_size, prot,
-- MAP_SHARED, xc_handle, 0)) == MAP_FAILED )
-+ MAP_ANON | MAP_SHARED, -1, 0)) == MAP_FAILED )
- {
- ERROR("failed to mmap m2p");
- return NULL;
diff --git a/sysutils/xentools3/patches/patch-ad b/sysutils/xentools3/patches/patch-ad
deleted file mode 100644
index b5bad387ba2..00000000000
--- a/sysutils/xentools3/patches/patch-ad
+++ /dev/null
@@ -1,161 +0,0 @@
-$NetBSD: patch-ad,v 1.3 2015/12/29 04:04:32 dholland Exp $
-
---- libxc/xc_private.c.orig 2008-04-25 15:03:12.000000000 +0200
-+++ libxc/xc_private.c 2008-09-14 23:37:40.000000000 +0200
-@@ -10,7 +10,12 @@
- #include <stdarg.h>
- #include <pthread.h>
-
--static __thread xc_error last_error = { XC_ERROR_NONE, ""};
-+static pthread_key_t last_error_pkey;
-+static pthread_once_t last_error_pkey_once = PTHREAD_ONCE_INIT;
-+
-+static pthread_key_t errbuf_pkey;
-+static pthread_once_t errbuf_pkey_once = PTHREAD_ONCE_INIT;
-+
- #if DEBUG
- static xc_error_handler error_handler = xc_default_error_handler;
- #else
-@@ -23,15 +28,44 @@
- fprintf(stderr, "ERROR %s: %s\n", desc, err->message);
- }
-
-+static void
-+_xc_clean_last_error(void *m)
-+{
-+ if (m)
-+ free(m);
-+ pthread_setspecific(last_error_pkey, NULL);
-+}
-+
-+static void
-+_xc_init_last_error(void)
-+{
-+ pthread_key_create(&last_error_pkey, _xc_clean_last_error);
-+}
-+static xc_error *
-+_xc_get_last_error(void) {
-+ xc_error *last_error;
-+
-+ pthread_once(&last_error_pkey_once, _xc_init_last_error);
-+
-+ last_error = pthread_getspecific(last_error_pkey);
-+ if (last_error == NULL) {
-+ last_error = malloc(sizeof(xc_error));
-+ pthread_setspecific(last_error_pkey, last_error);
-+ }
-+ return last_error;
-+}
-+
-+
- const xc_error *xc_get_last_error(void)
- {
-- return &last_error;
-+ return _xc_get_last_error();
- }
-
- void xc_clear_last_error(void)
- {
-- last_error.code = XC_ERROR_NONE;
-- last_error.message[0] = '\0';
-+ xc_error *last_error = _xc_get_last_error();
-+ last_error->code = XC_ERROR_NONE;
-+ last_error->message[0] = '\0';
- }
-
- const char *xc_error_code_to_desc(int code)
-@@ -64,9 +98,10 @@
-
- static void _xc_set_error(int code, const char *msg)
- {
-- last_error.code = code;
-- strncpy(last_error.message, msg, XC_MAX_ERROR_MSG_LEN - 1);
-- last_error.message[XC_MAX_ERROR_MSG_LEN-1] = '\0';
-+ xc_error *last_error = _xc_get_last_error();
-+ last_error->code = code;
-+ strncpy(last_error->message, msg, XC_MAX_ERROR_MSG_LEN - 1);
-+ last_error->message[XC_MAX_ERROR_MSG_LEN-1] = '\0';
- }
-
- void xc_set_error(int code, const char *fmt, ...)
-@@ -84,13 +119,19 @@
-
- errno = saved_errno;
-
-- if ( error_handler != NULL )
-- error_handler(&last_error);
-+ if ( error_handler != NULL ) {
-+ xc_error *last_error = _xc_get_last_error();
-+ error_handler(last_error);
-+ }
- }
-
- int lock_pages(void *addr, size_t len)
- {
- int e = 0;
-+ size_t offset = (u_long)addr & 0xfffUL;
-+ addr -= offset;
-+ len += offset;
-+ len = (len + 0xfffUL) & ~0xfffUL; /* round up */
- #ifndef __sun__
- e = mlock(addr, len);
- #endif
-@@ -99,8 +140,10 @@
-
- void unlock_pages(void *addr, size_t len)
- {
-+ void *laddr = (void *)((u_long)addr & ~0xfffUL);
-+ size_t llen = (len + 0xfffUL) & ~0xfffUL;
- #ifndef __sun__
-- safe_munlock(addr, len);
-+ safe_munlock(laddr, llen);
- #endif
- }
-
-@@ -466,20 +509,43 @@
- return new_mfn;
- }
-
-+static void
-+_xc_clean_errbuf(void * m)
-+{
-+ if (m)
-+ free(m);
-+ pthread_setspecific(errbuf_pkey, NULL);
-+}
-+
-+static void
-+_xc_init_errbuf(void)
-+{
-+ pthread_key_create(&errbuf_pkey, _xc_clean_errbuf);
-+}
-+
- char *safe_strerror(int errcode)
- {
-- static __thread char errbuf[32];
-+#define XS_BUFSIZE 32
-+ char *errbuf;
- static pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
- char *strerror_str;
-
-+ pthread_once(&errbuf_pkey_once, _xc_init_errbuf);
-+
-+ errbuf = pthread_getspecific(errbuf_pkey);
-+ if (errbuf == NULL) {
-+ errbuf = malloc(XS_BUFSIZE);
-+ pthread_setspecific(errbuf_pkey, errbuf);
-+ }
-+
- /*
- * Thread-unsafe strerror() is protected by a local mutex. We copy
- * the string to a thread-private buffer before releasing the mutex.
- */
- pthread_mutex_lock(&mutex);
- strerror_str = strerror(errcode);
-- strncpy(errbuf, strerror_str, sizeof(errbuf));
-- errbuf[sizeof(errbuf)-1] = '\0';
-+ strncpy(errbuf, strerror_str, XS_BUFSIZE);
-+ errbuf[XS_BUFSIZE-1] = '\0';
- pthread_mutex_unlock(&mutex);
-
- return errbuf;
diff --git a/sysutils/xentools3/patches/patch-al b/sysutils/xentools3/patches/patch-al
deleted file mode 100644
index cf97c472f3c..00000000000
--- a/sysutils/xentools3/patches/patch-al
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-al,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- console/Makefile.orig 2007-05-18 16:45:21.000000000 +0200
-+++ console/Makefile 2007-05-27 13:45:20.000000000 +0200
-@@ -21,16 +21,17 @@
- $(RM) client/*.o daemon/*.o
-
- xenconsoled: $(patsubst %.c,%.o,$(wildcard daemon/*.c))
-- $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
-+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
- $(SOCKET_LIBS) -lxenctrl -lxenstore
-
- xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
-- $(CC) $(CFLAGS) $^ -o $@ -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
-+ $(CC) $(CFLAGS) $^ -o $@ $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) \
- $(SOCKET_LIBS) -lxenctrl -lxenstore
-
- .PHONY: install
- install: $(BIN)
-- $(INSTALL_DIR) $(DESTDIR)/$(DAEMON_INSTALL_DIR)
-- $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(DAEMON_INSTALL_DIR)
-- $(INSTALL_DIR) $(DESTDIR)/$(CLIENT_INSTALL_DIR)
-- $(INSTALL_PROG) xenconsole $(DESTDIR)/$(CLIENT_INSTALL_DIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(PREFIX)/sbin
-+ $(BSD_INSTALL_PROGRAM) xenconsoled ${DESTDIR}$(PREFIX)/sbin
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM) xenconsole ${DESTDIR}$(PREFIX)/bin
-+
diff --git a/sysutils/xentools3/patches/patch-as b/sysutils/xentools3/patches/patch-as
deleted file mode 100644
index 9775fea833f..00000000000
--- a/sysutils/xentools3/patches/patch-as
+++ /dev/null
@@ -1,45 +0,0 @@
-$NetBSD: patch-as,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- libxc/Makefile.orig 2007-05-18 16:45:21.000000000 +0200
-+++ libxc/Makefile 2007-05-27 13:46:42.000000000 +0200
-@@ -23,6 +23,7 @@
- CTRL_SRCS-$(CONFIG_Linux) += xc_linux.c
- CTRL_SRCS-$(CONFIG_SunOS) += xc_solaris.c
- CTRL_SRCS-$(CONFIG_X86_Linux) += xc_ptrace.c xc_ptrace_core.c
-+CTRL_SRCS-$(CONFIG_NetBSD) += xc_netbsd.c
-
- GUEST_SRCS-y :=
- GUEST_SRCS-y += xg_private.c
-@@ -102,19 +103,19 @@
-
- .PHONY: install
- install: build
-- [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
-- [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
-- $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
-- $(INSTALL_DATA) libxenctrl.a $(DESTDIR)/usr/$(LIBDIR)
-- ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so.$(MAJOR)
-- ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenctrl.so
-- $(INSTALL_DATA) xenctrl.h $(DESTDIR)/usr/include
--
-- $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
-- $(INSTALL_DATA) libxenguest.a $(DESTDIR)/usr/$(LIBDIR)
-- ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so.$(MAJOR)
-- ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenguest.so
-- $(INSTALL_DATA) xenguest.h $(DESTDIR)/usr/include
-+ $(BSD_INSTALL_LIB_DIR) ${DESTDIR}$(PREFIX)/lib
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(PREFIX)/include
-+ $(BSD_INSTALL_LIB) libxenctrl.so.$(MAJOR).$(MINOR) ${DESTDIR}$(PREFIX)/lib
-+ $(BSD_INSTALL_LIB) libxenctrl.a ${DESTDIR}$(PREFIX)/lib
-+ ln -sf libxenctrl.so.$(MAJOR).$(MINOR) ${DESTDIR}$(PREFIX)/lib/libxenctrl.so.$(MAJOR)
-+ ln -sf libxenctrl.so.$(MAJOR) ${DESTDIR}$(PREFIX)/lib/libxenctrl.so
-+ $(BSD_INSTALL_DATA) xenctrl.h ${DESTDIR}$(PREFIX)/include
-+
-+ $(BSD_INSTALL_LIB) libxenguest.so.$(MAJOR).$(MINOR) ${DESTDIR}$(PREFIX)/lib
-+ $(BSD_INSTALL_LIB) libxenguest.a ${DESTDIR}$(PREFIX)/lib
-+ ln -sf libxenguest.so.$(MAJOR).$(MINOR) ${DESTDIR}$(PREFIX)/lib/libxenguest.so.$(MAJOR)
-+ ln -sf libxenguest.so.$(MAJOR) ${DESTDIR}$(PREFIX)/lib/libxenguest.so
-+ $(BSD_INSTALL_DATA) xenguest.h ${DESTDIR}$(PREFIX)/include
-
- .PHONY: TAGS
- TAGS:
diff --git a/sysutils/xentools3/patches/patch-au b/sysutils/xentools3/patches/patch-au
deleted file mode 100644
index 72acfa62e8b..00000000000
--- a/sysutils/xentools3/patches/patch-au
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-au,v 1.2 2008/02/17 16:29:03 bouyer Exp $
-
---- libxc/xc_private.h.orig 2006-10-16 22:15:35.000000000 +0200
-+++ libxc/xc_private.h 2006-10-16 22:16:09.000000000 +0200
-@@ -15,7 +15,11 @@
-
- #include "xenctrl.h"
-
-+#ifdef __NetBSD__
-+#include <xen/xenio.h>
-+#else
- #include <xen/sys/privcmd.h>
-+#endif
-
- /* valgrind cannot see when a hypercall has filled in some values. For this
- reason, we must zero the privcmd_hypercall_t or domctl/sysctl instance
diff --git a/sysutils/xentools3/patches/patch-av b/sysutils/xentools3/patches/patch-av
deleted file mode 100644
index e6eb39e5b28..00000000000
--- a/sysutils/xentools3/patches/patch-av
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-av,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- libxc/xg_private.h.orig 2006-10-16 22:15:35.000000000 +0200
-+++ libxc/xg_private.h 2006-10-16 22:16:19.000000000 +0200
-@@ -15,7 +15,6 @@
- #include "xenguest.h"
- #include "xc_private.h"
-
--#include <xen/sys/privcmd.h>
- #include <xen/memory.h>
- #include <xen/elfnote.h>
-
diff --git a/sysutils/xentools3/patches/patch-aw b/sysutils/xentools3/patches/patch-aw
deleted file mode 100644
index dc17eacb9fb..00000000000
--- a/sysutils/xentools3/patches/patch-aw
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-aw,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- misc/Makefile.orig 2007-05-18 16:45:21.000000000 +0200
-+++ misc/Makefile 2007-05-27 13:48:51.000000000 +0200
-@@ -13,8 +13,10 @@
- TARGETS-$(CONFIG_X86) += xen-detect
- TARGETS := $(TARGETS-y)
-
--INSTALL_BIN = $(TARGETS) xencons
--INSTALL_SBIN = netfix xm xen-bugtool xen-python-path xend xenperf
-+INSTALL_BIN = $(TARGETS)
-+INSTALL_BIN_SCRIPT = xencons
-+INSTALL_SBIN = xenperf
-+INSTALL_SBIN_SCRIPT = netfix xm xen-bugtool xend xen-python-path
-
- .PHONY: all
- all: build
-@@ -26,11 +28,13 @@
-
- .PHONY: install
- install: build
-- [ -d $(DESTDIR)/usr/bin ] || $(INSTALL_DIR) $(DESTDIR)/usr/bin
-- [ -d $(DESTDIR)/usr/sbin ] || $(INSTALL_DIR) $(DESTDIR)/usr/sbin
-- $(INSTALL_PROG) $(INSTALL_BIN) $(DESTDIR)/usr/bin
-- $(INSTALL_PROG) $(INSTALL_SBIN) $(DESTDIR)/usr/sbin
-- $(MAKE) -C lomount install
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(PREFIX)/sbin
-+ $(BSD_INSTALL_PROGRAM) $(INSTALL_BIN) ${DESTDIR}$(PREFIX)/bin
-+ $(BSD_INSTALL_SCRIPT) $(INSTALL_BIN_SCRIPT) ${DESTDIR}$(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM) $(INSTALL_SBIN) ${DESTDIR}$(PREFIX)/sbin
-+ $(BSD_INSTALL_SCRIPT) $(INSTALL_SBIN_SCRIPT) ${DESTDIR}$(PREFIX)/sbin
-+# $(MAKE) -C lomount install
- # No sense in installing miniterm on the Xen box.
- # $(MAKE) -C miniterm install
-
-@@ -44,4 +48,4 @@
- $(CC) -c $(CFLAGS) -o $@ $<
-
- xenperf: %: %.o Makefile
-- $(CC) $(CFLAGS) -o $@ $< -L$(XEN_LIBXC) -lxenctrl
-+ $(CC) $(CFLAGS) -o $@ $< $(LDFLAGS) -L$(XEN_LIBXC) -lxenctrl
diff --git a/sysutils/xentools3/patches/patch-ax b/sysutils/xentools3/patches/patch-ax
deleted file mode 100644
index 430e3652a20..00000000000
--- a/sysutils/xentools3/patches/patch-ax
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ax,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- misc/xend.orig 2006-10-17 15:33:55.000000000 +0200
-+++ misc/xend 2006-10-17 15:38:47.000000000 +0200
-@@ -94,8 +94,7 @@
- os.execvp('xenconsoled', ['xenconsoled'])
-
- def start_blktapctrl():
-- if os.fork() == 0:
-- os.execvp('blktapctrl', ['blktapctrl'])
-+ ''
-
- def main():
- try:
diff --git a/sysutils/xentools3/patches/patch-ba b/sysutils/xentools3/patches/patch-ba
deleted file mode 100644
index 7ec7586e52a..00000000000
--- a/sysutils/xentools3/patches/patch-ba
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD: patch-ba,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- python/Makefile.orig 2007-05-18 16:45:21.000000000 +0200
-+++ python/Makefile 2007-05-27 14:33:00.000000000 +0200
-@@ -12,7 +12,7 @@
- POTFILE := $(PODIR)/xen-xm.pot
- I18NSRCFILES = $(shell find xen/xm/ -name '*.py')
- CATALOGS = $(patsubst %,xen/xm/messages/%.mo,$(LINGUAS))
--NLSDIR = /usr/share/locale
-+NLSDIR = $(PREFIX)/share/locale
-
- .PHONY: build buildpy
- buildpy:
-@@ -57,24 +57,24 @@
- ifndef XEN_PYTHON_NATIVE_INSTALL
- install: LIBPATH=$(shell PYTHONPATH=xen/util python -c "import auxbin; print auxbin.libpath()")
- install: install-messages install-dtd
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force --install-lib="$(DESTDIR)$(LIBPATH)/python"
-+ python setup.py install --root=${DESTDIR}
- else
- install: install-messages install-dtd
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
-+ python setup.py install --root=${DESTDIR}
- endif
-
- install-dtd: all
-- $(INSTALL_DIR) $(DESTDIR)/usr/share/xen
-- $(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)/usr/share/xen
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(PREFIX)/share/xen
-+ $(BSD_INSTALL_DATA) xen/xm/create.dtd ${DESTDIR}$(PREFIX)/share/xen
-
- install-messages: all
- if which $(MSGFMT) >/dev/null ; then \
-- mkdir -p $(DESTDIR)$(NLSDIR); \
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(NLSDIR); \
- for l in $(LINGUAS); do \
-- $(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l; \
-- $(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES; \
-- $(INSTALL_DATA) $(PODIR)/$$l.mo \
-- $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES/$(POPACKAGE).mo; \
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(NLSDIR)/$$l; \
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(NLSDIR)/$$l/LC_MESSAGES; \
-+ $(BSD_INSTALL_DATA) ${DESTDIR}$(PODIR)/$$l.mo \
-+ ${DESTDIR}$(NLSDIR)/$$l/LC_MESSAGES/$(POPACKAGE).mo; \
- done ; \
- fi
-
diff --git a/sysutils/xentools3/patches/patch-bb b/sysutils/xentools3/patches/patch-bb
deleted file mode 100644
index 9ec0463cd78..00000000000
--- a/sysutils/xentools3/patches/patch-bb
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bb,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- python/xen/xend/XendOptions.py.orig 2007-05-27 14:34:33.000000000 +0200
-+++ python/xen/xend/XendOptions.py 2007-05-27 14:35:35.000000000 +0200
-@@ -281,7 +281,7 @@
- class XendOptionsFile(XendOptions):
-
- """Default path to the config file."""
-- config_default = "/etc/xen/xend-config.sxp"
-+ config_default = "@XENDCONFDIR@/xend-config.sxp"
-
- """Environment variable used to override config_default."""
- config_var = "XEND_CONFIG"
diff --git a/sysutils/xentools3/patches/patch-bc b/sysutils/xentools3/patches/patch-bc
deleted file mode 100644
index 7f9fbb37986..00000000000
--- a/sysutils/xentools3/patches/patch-bc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-bc,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- python/xen/xm/create.py.orig 2007-04-25 22:19:55.000000000 +0200
-+++ python/xen/xm/create.py 2007-04-25 22:20:12.000000000 +0200
-@@ -64,7 +64,7 @@
- use="Quiet.")
-
- gopts.opt('path', val='PATH',
-- fn=set_value, default='.:/etc/xen',
-+ fn=set_value, default='.:@XENDCONFDIR@',
- use="Search path for configuration scripts. "
- "The value of PATH is a colon-separated directory list.")
-
-@@ -318,7 +318,7 @@
- preferred instance number. The hotplug script will determine
- which instance number will actually be assigned to the domain.
- The associtation between virtual machine and the TPM instance
-- number can be found in /etc/xen/vtpm.db. Use the backend in the
-+ number can be found in @XENDCONFDIR@/vtpm.db. Use the backend in the
- given domain.
- The type parameter can be used to select a specific driver type
- that the VM can use. To prevent a fully virtualized domain (HVM)
diff --git a/sysutils/xentools3/patches/patch-be b/sysutils/xentools3/patches/patch-be
deleted file mode 100644
index 0a58135b7bb..00000000000
--- a/sysutils/xentools3/patches/patch-be
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-be,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- python/xen/lowlevel/acm/acm.c.orig 2006-10-17 00:18:15.000000000 +0200
-+++ python/xen/lowlevel/acm/acm.c 2006-10-17 00:18:25.000000000 +0200
-@@ -26,10 +26,10 @@
- #include <stdlib.h>
- #include <sys/ioctl.h>
- #include <netinet/in.h>
-+#include <xenctrl.h>
- #include <xen/acm.h>
- #include <xen/acm_ops.h>
-
--#include <xenctrl.h>
-
- #define PERROR(_m, _a...) \
- fprintf(stderr, "ERROR: " _m " (%d = %s)\n" , ## _a , \
diff --git a/sysutils/xentools3/patches/patch-bf b/sysutils/xentools3/patches/patch-bf
deleted file mode 100644
index 06522cbec4a..00000000000
--- a/sysutils/xentools3/patches/patch-bf
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bf,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- python/xen/xm/addlabel.py.orig 2006-10-15 14:22:03.000000000 +0200
-+++ python/xen/xm/addlabel.py 2006-10-19 21:51:26.000000000 +0200
-@@ -133,7 +133,7 @@
- if argv[2].lower() == "dom":
- configfile = argv[3]
- if configfile[0] != '/':
-- for prefix in [".", "/etc/xen"]:
-+ for prefix in [".", "@XENDCONFDIR@"]:
- configfile = prefix + "/" + configfile
- if os.path.isfile(configfile):
- break
diff --git a/sysutils/xentools3/patches/patch-bg b/sysutils/xentools3/patches/patch-bg
deleted file mode 100644
index 4f0f5c0a7c1..00000000000
--- a/sysutils/xentools3/patches/patch-bg
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bg,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- python/xen/xm/getlabel.py.orig 2006-10-15 14:22:03.000000000 +0200
-+++ python/xen/xm/getlabel.py 2006-10-19 21:52:18.000000000 +0200
-@@ -55,7 +55,7 @@
- if configfile[0] == '/':
- fd = open(configfile, "rb")
- else:
-- for prefix in [".", "/etc/xen"]:
-+ for prefix in [".", "@XENDCONFDIR@"]:
- abs_file = prefix + "/" + configfile
- if os.path.isfile(abs_file):
- fd = open(abs_file, "rb")
diff --git a/sysutils/xentools3/patches/patch-bh b/sysutils/xentools3/patches/patch-bh
deleted file mode 100644
index b85696e7353..00000000000
--- a/sysutils/xentools3/patches/patch-bh
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bh,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- python/xen/xm/rmlabel.py.orig 2006-10-15 14:22:03.000000000 +0200
-+++ python/xen/xm/rmlabel.py 2006-10-19 21:52:58.000000000 +0200
-@@ -60,7 +60,7 @@
- file = configfile
- fd = open(file, "rb")
- else:
-- for prefix in [".", "/etc/xen"]:
-+ for prefix in [".", "@XENDCONFDIR@"]:
- file = prefix + "/" + configfile
- if os.path.isfile(file):
- fd = open(file, "rb")
diff --git a/sysutils/xentools3/patches/patch-bo b/sysutils/xentools3/patches/patch-bo
deleted file mode 100644
index ea3f3ccb961..00000000000
--- a/sysutils/xentools3/patches/patch-bo
+++ /dev/null
@@ -1,25 +0,0 @@
-$NetBSD: patch-bo,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- xcutils/Makefile.orig 2007-05-18 16:45:21.000000000 +0200
-+++ xcutils/Makefile 2007-05-27 14:37:57.000000000 +0200
-@@ -24,7 +24,7 @@
-
- PROGRAMS = xc_restore xc_save readnotes
-
--LDLIBS = -L$(XEN_LIBXC) -L$(XEN_XENSTORE) -lxenguest -lxenctrl -lxenstore
-+LDLIBS = $(LDFLAGS) -L$(XEN_LIBXC) -L$(XEN_XENSTORE) -lxenguest -lxenctrl -lxenstore
-
- .PHONY: all
- all: build
-@@ -37,9 +37,8 @@
-
- .PHONY: install
- install: build
-- [ -d $(DESTDIR)$(PROGRAMS_INSTALL_DIR) ] || \
-- $(INSTALL_DIR) $(DESTDIR)$(PROGRAMS_INSTALL_DIR)
-- $(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PROGRAMS_INSTALL_DIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM) $(PROGRAMS) ${DESTDIR}$(PREFIX)/bin
-
-
- .PHONY: clean
diff --git a/sysutils/xentools3/patches/patch-br b/sysutils/xentools3/patches/patch-br
deleted file mode 100644
index 64b94b8100c..00000000000
--- a/sysutils/xentools3/patches/patch-br
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-br,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- xenstat/xentop/Makefile.orig 2007-01-08 16:00:52.000000000 +0100
-+++ xenstat/xentop/Makefile 2007-04-25 18:43:18.000000000 +0200
-@@ -33,9 +33,8 @@
-
- .PHONY: install
- install: xentop xentop.1
-- $(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
-- $(INSTALL_DIR) $(DESTDIR)$(man1dir)
-- $(INSTALL_DATA) xentop.1 $(DESTDIR)$(man1dir)/xentop.1
-+ $(BSD_INSTALL_PROGRAM) xentop ${DESTDIR}$(PREFIX)/sbin
-+ $(BSD_INSTALL_DATA) xentop.1 ${DESTDIR}$(PREFIX)/$(PKGMANDIR)/man1
-
- endif
-
diff --git a/sysutils/xentools3/patches/patch-bs b/sysutils/xentools3/patches/patch-bs
deleted file mode 100644
index 85e66300d99..00000000000
--- a/sysutils/xentools3/patches/patch-bs
+++ /dev/null
@@ -1,49 +0,0 @@
-$NetBSD: patch-bs,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- xenstore/Makefile.orig 2007-05-18 16:45:21.000000000 +0200
-+++ xenstore/Makefile 2007-05-27 14:41:40.000000000 +0200
-@@ -29,6 +29,7 @@
-
- XENSTORED_OBJS_$(CONFIG_Linux) = xenstored_linux.o
- XENSTORED_OBJS_$(CONFIG_SunOS) = xenstored_solaris.o
-+XENSTORED_OBJS_$(CONFIG_NetBSD) = xenstored_netbsd.o
-
- XENSTORED_OBJS += $(XENSTORED_OBJS_y)
-
-@@ -168,22 +169,20 @@
-
- .PHONY: install
- install: all
-- $(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
-- $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
-- $(INSTALL_DIR) $(DESTDIR)/usr/bin
-- $(INSTALL_DIR) $(DESTDIR)/usr/sbin
-- $(INSTALL_DIR) $(DESTDIR)/usr/include
-- $(INSTALL_PROG) xenstored $(DESTDIR)/usr/sbin
-- $(INSTALL_PROG) $(CLIENTS) $(DESTDIR)/usr/bin
-- $(INSTALL_PROG) xenstore-control $(DESTDIR)/usr/bin
-- $(INSTALL_PROG) xenstore-ls $(DESTDIR)/usr/bin
-- $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
-- $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
-- ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so.$(MAJOR)
-- ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libxenstore.so
-- $(INSTALL_DATA) libxenstore.a $(DESTDIR)/usr/$(LIBDIR)
-- $(INSTALL_DATA) xs.h $(DESTDIR)/usr/include
-- $(INSTALL_DATA) xs_lib.h $(DESTDIR)/usr/include
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM_DIR) ${DESTDIR}$(PREFIX)/sbin
-+ $(BSD_INSTALL_DATA_DIR) -p ${DESTDIR}$(PREFIX)/include
-+ $(BSD_INSTALL_PROGRAM) xenstored ${DESTDIR}$(PREFIX)/sbin
-+ $(BSD_INSTALL_PROGRAM) $(CLIENTS) ${DESTDIR}$(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM) xenstore-control ${DESTDIR}$(PREFIX)/bin
-+ $(BSD_INSTALL_PROGRAM) xenstore-ls ${DESTDIR}$(PREFIX)/bin
-+ $(BSD_INSTALL_LIB_DIR) ${DESTDIR}$(PREFIX)/lib
-+ $(BSD_INSTALL_LIB) libxenstore.so.$(MAJOR).$(MINOR) ${DESTDIR}$(PREFIX)/lib
-+ ln -sf libxenstore.so.$(MAJOR).$(MINOR) ${DESTDIR}$(PREFIX)/lib/libxenstore.so.$(MAJOR)
-+ ln -sf libxenstore.so.$(MAJOR) ${DESTDIR}$(PREFIX)/lib/libxenstore.so
-+ $(BSD_INSTALL_LIB) libxenstore.a ${DESTDIR}$(PREFIX)/lib
-+ $(BSD_INSTALL_DATA) xs.h ${DESTDIR}$(PREFIX)/include
-+ $(BSD_INSTALL_DATA) xs_lib.h ${DESTDIR}$(PREFIX)/include
-
- -include $(PROG_DEP)
-
diff --git a/sysutils/xentools3/patches/patch-bt b/sysutils/xentools3/patches/patch-bt
deleted file mode 100644
index 8e6a535c84d..00000000000
--- a/sysutils/xentools3/patches/patch-bt
+++ /dev/null
@@ -1,78 +0,0 @@
-$NetBSD: patch-bt,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- /dev/null 2007-04-25 19:26:24.000000000 +0200
-+++ xenstore/xenstored_netbsd.c 2007-04-25 19:28:19.000000000 +0200
-@@ -0,0 +1,73 @@
-+/******************************************************************************
-+ *
-+ * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
-+ * Use is subject to license terms.
-+ *
-+ * Copyright (C) 2005 Rusty Russell IBM Corporation
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License as
-+ * published by the Free Software Foundation, version 2 of the
-+ * License.
-+ */
-+
-+#include <fcntl.h>
-+#include <unistd.h>
-+#include <stdlib.h>
-+#include <sys/mman.h>
-+
-+#include "xenstored_core.h"
-+
-+#define XENSTORED_PROC_KVA "/dev/xsd_kva"
-+#define XENSTORED_PROC_PORT "/kern/xen/xsd_port"
-+
-+evtchn_port_t xenbus_evtchn(void)
-+{
-+ int fd;
-+ int rc;
-+ evtchn_port_t port;
-+ char str[20];
-+
-+ fd = open(XENSTORED_PROC_PORT, O_RDONLY);
-+ if (fd == -1)
-+ return -1;
-+
-+ rc = read(fd, str, sizeof(str));
-+ if (rc == -1)
-+ {
-+ int err = errno;
-+ close(fd);
-+ errno = err;
-+ return -1;
-+ }
-+
-+ str[rc] = '\0';
-+ port = strtoul(str, NULL, 0);
-+
-+ close(fd);
-+ return port;
-+}
-+
-+void *xenbus_map(void)
-+{
-+ int fd;
-+ void *addr;
-+
-+ fd = open(XENSTORED_PROC_KVA, O_RDWR);
-+ if (fd == -1)
-+ return NULL;
-+
-+ addr = mmap(NULL, getpagesize(), PROT_READ|PROT_WRITE,
-+ MAP_SHARED, fd, 0);
-+
-+ if (addr == MAP_FAILED)
-+ addr = NULL;
-+
-+ close(fd);
-+
-+ return addr;
-+}
-+
-+void xenbus_notify_running(void)
-+{
-+}
diff --git a/sysutils/xentools3/patches/patch-bw b/sysutils/xentools3/patches/patch-bw
deleted file mode 100644
index 9790c19c1ce..00000000000
--- a/sysutils/xentools3/patches/patch-bw
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-bw,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- xenstore/list.h.orig 2006-10-16 22:51:42.000000000 +0200
-+++ xenstore/list.h 2006-10-16 22:51:57.000000000 +0200
-@@ -3,6 +3,10 @@
- /* Taken from Linux kernel code, but de-kernelized for userspace. */
- #include <stddef.h>
-
-+#undef LIST_HEAD_INIT
-+#undef LIST_HEAD
-+#undef INIT_LIST_HEAD
-+
- /*
- * These are non-NULL pointers that will result in page faults
- * under normal circumstances, used to verify that nobody uses
diff --git a/sysutils/xentools3/patches/patch-ca b/sysutils/xentools3/patches/patch-ca
deleted file mode 100644
index 002ce9c8078..00000000000
--- a/sysutils/xentools3/patches/patch-ca
+++ /dev/null
@@ -1,57 +0,0 @@
-$NetBSD: patch-ca,v 1.1 2008/03/08 13:59:39 bouyer Exp $
-
---- console/daemon/io.c.orig 2008-03-08 14:24:52.000000000 +0100
-+++ console/daemon/io.c 2008-03-08 14:41:23.000000000 +0100
-@@ -56,6 +56,7 @@
- {
- int domid;
- int tty_fd;
-+ int stty_fd;
- bool is_dead;
- struct buffer buffer;
- struct domain *next;
-@@ -160,6 +161,12 @@
- char *data;
- unsigned int len;
-
-+ if ((dom->stty_fd = open(slave, O_RDONLY, 0)) == -1) {
-+ dolog(LOG_ERR, "Failed to open slave tty %s for "
-+ "domain-%d", slave, dom->domid);
-+ goto out;
-+ }
-+
- if (tcgetattr(master, &term) != -1) {
- cfmakeraw(&term);
- tcsetattr(master, TCSAFLUSH, &term);
-@@ -444,6 +451,7 @@
- {
- if (d->tty_fd != -1) {
- close(d->tty_fd);
-+ close(d->stty_fd);
- d->tty_fd = -1;
- }
-
-@@ -527,6 +535,7 @@
- len = read(dom->tty_fd, msg, len);
- if (len < 1) {
- close(dom->tty_fd);
-+ close(dom->stty_fd);
- dom->tty_fd = -1;
-
- if (domain_is_valid(dom->domid)) {
-@@ -545,6 +554,7 @@
- xc_evtchn_notify(dom->xce_handle, dom->local_port);
- } else {
- close(dom->tty_fd);
-+ close(dom->stty_fd);
- dom->tty_fd = -1;
- shutdown_domain(dom);
- }
-@@ -564,6 +574,7 @@
- dom->domid, len, errno);
-
- close(dom->tty_fd);
-+ close(dom->stty_fd);
- dom->tty_fd = -1;
-
- if (domain_is_valid(dom->domid)) {
diff --git a/sysutils/xentools3/patches/patch-cb b/sysutils/xentools3/patches/patch-cb
deleted file mode 100644
index 4eb7ced90bb..00000000000
--- a/sysutils/xentools3/patches/patch-cb
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-cb,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- console/daemon/utils.c.orig 2006-10-16 22:55:37.000000000 +0200
-+++ console/daemon/utils.c 2006-10-16 22:55:48.000000000 +0200
-@@ -32,6 +32,7 @@
- #include <sys/socket.h>
- #include <sys/un.h>
- #include <string.h>
-+#include <signal.h>
-
- #include "xenctrl.h"
- #include "utils.h"
diff --git a/sysutils/xentools3/patches/patch-cc b/sysutils/xentools3/patches/patch-cc
deleted file mode 100644
index 142d2173a30..00000000000
--- a/sysutils/xentools3/patches/patch-cc
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-cc,v 1.3 2008/03/08 17:24:20 bouyer Exp $
-
---- console/client/main.c.orig 2007-05-18 16:45:21.000000000 +0200
-+++ console/client/main.c 2007-05-27 14:43:14.000000000 +0200
-@@ -34,7 +34,11 @@
- #include <sys/select.h>
- #include <err.h>
- #include <errno.h>
-+#ifndef __NetBSD__
- #include <pty.h>
-+#endif
-+#include <string.h>
-+
-
- #include "xs.h"
-
-@@ -289,6 +293,7 @@
- err(errno, "Could not read tty from store");
- }
-
-+ init_term(spty, &attr);
- init_term(STDIN_FILENO, &attr);
- console_loop(spty, xs, path);
- restore_term(STDIN_FILENO, &attr);
diff --git a/sysutils/xentools3/patches/patch-cd b/sysutils/xentools3/patches/patch-cd
deleted file mode 100644
index 5540b68ec56..00000000000
--- a/sysutils/xentools3/patches/patch-cd
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-cd,v 1.2 2011/12/14 03:57:50 sbd Exp $
-
---- python/xen/util/auxbin.py.orig 2008-04-25 13:03:12.000000000 +0000
-+++ python/xen/util/auxbin.py
-@@ -16,9 +16,9 @@
- #============================================================================
-
-
--LIB_32 = "/usr/lib"
--LIB_64 = "/usr/lib64"
--LIB_BIN_SUFFIX = "xen/bin"
-+LIB_32 = "@PREFIX@/bin"
-+LIB_64 = "@PREFIX@/bin"
-+LIB_BIN_SUFFIX = ""
-
- ## The architectures on which the LIB_64 directory is used. This
- # deliberately excludes ia64 and ppc64, and Solaris.
diff --git a/sysutils/xentools3/patches/patch-cf b/sysutils/xentools3/patches/patch-cf
deleted file mode 100644
index 923cde27e6e..00000000000
--- a/sysutils/xentools3/patches/patch-cf
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-cf,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- xenstat/libxenstat/Makefile.orig 2007-05-18 16:45:21.000000000 +0200
-+++ xenstat/libxenstat/Makefile 2007-05-27 14:45:56.000000000 +0200
-@@ -31,6 +31,7 @@
- OBJECTS-y=src/xenstat.o
- OBJECTS-$(CONFIG_Linux) += src/xenstat_linux.o
- OBJECTS-$(CONFIG_SunOS) += src/xenstat_solaris.o
-+OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o
- SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR)
-
- WARN_FLAGS=-Wall -Werror
-@@ -97,7 +98,7 @@
- all-bindings: perl-bindings python-bindings
-
- # The install-bindings target installs all the language bindings
--install-bindings: install-perl-bindings install-python-bindings
-+install-bindings: install-python-bindings
-
- $(BINDINGS): $(SHLIB) $(SHLIB_LINKS) src/xenstat.h
-
diff --git a/sysutils/xentools3/patches/patch-cg b/sysutils/xentools3/patches/patch-cg
deleted file mode 100644
index 29f197b22c7..00000000000
--- a/sysutils/xentools3/patches/patch-cg
+++ /dev/null
@@ -1,65 +0,0 @@
-$NetBSD: patch-cg,v 1.3 2013/04/11 19:57:52 joerg Exp $
-
---- xenstat/xentop/xentop.c.orig 2008-04-25 13:03:12.000000000 +0000
-+++ xenstat/xentop/xentop.c
-@@ -18,7 +18,8 @@
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
--#include <curses.h>
-+#include <ncurses.h>
-+#define vw_printw vwprintw
- #include <ctype.h>
- #include <errno.h>
- #include <stdio.h>
-@@ -28,7 +29,11 @@
- #include <sys/time.h>
- #include <time.h>
- #include <unistd.h>
-+#ifndef __NetBSD__
- #include <linux/kdev_t.h>
-+#else
-+#include <stdarg.h>
-+#endif
-
- #include <xenstat.h>
-
-@@ -251,7 +256,7 @@ static void fail(const char *str)
- {
- if(cwin != NULL && !isendwin())
- endwin();
-- fprintf(stderr, str);
-+ fprintf(stderr, "%s", str);
- exit(1);
- }
-
-@@ -752,10 +757,11 @@ void do_summary(void)
- unsigned i, num_domains = 0;
- unsigned long long used = 0;
- xenstat_domain *domain;
-+ time_t curt;
-
- /* Print program name, current time, and number of domains */
-- strftime(time_str, TIME_STR_LEN, TIME_STR_FORMAT,
-- localtime(&curtime.tv_sec));
-+ curt = curtime.tv_sec;
-+ strftime(time_str, TIME_STR_LEN, TIME_STR_FORMAT, localtime(&curt));
- num_domains = xenstat_node_num_domains(cur_node);
- ver_str = xenstat_node_xen_version(cur_node);
- print("xentop - %s Xen %s\n", time_str, ver_str);
-@@ -921,6 +927,7 @@ void do_network(xenstat_domain *domain)
- /* Output all VBD information */
- void do_vbd(xenstat_domain *domain)
- {
-+#ifdef notyet
- int i = 0;
- xenstat_vbd *vbd;
- unsigned num_vbds = 0;
-@@ -952,6 +959,7 @@ void do_vbd(xenstat_domain *domain)
- xenstat_vbd_rd_reqs(vbd),
- xenstat_vbd_wr_reqs(vbd));
- }
-+#endif
- }
-
- static void top(void)
diff --git a/sysutils/xentools3/patches/patch-ch b/sysutils/xentools3/patches/patch-ch
deleted file mode 100644
index b9190e2617e..00000000000
--- a/sysutils/xentools3/patches/patch-ch
+++ /dev/null
@@ -1,102 +0,0 @@
-$NetBSD: patch-ch,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- /dev/null 2007-05-27 19:36:35.000000000 +0200
-+++ xenstat/libxenstat/src/xenstat_netbsd.c 2007-05-27 19:36:00.000000000 +0200
-@@ -0,0 +1,97 @@
-+/* libxenstat: statistics-collection library for Xen
-+ * Copyright (C) International Business Machines Corp., 2005
-+ * Authors: Josh Triplett <josht@us.ibm.com>
-+ * Judy Fischbach <jfisch@us.ibm.com>
-+ * David Hendricks <dhendrix@us.ibm.com>
-+ *
-+ * This library is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * This library is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ */
-+
-+/*
-+ * Copyright 2007 Sun Microsystems, Inc. All rights reserved.
-+ * Use is subject to license terms.
-+ */
-+
-+#include <fcntl.h>
-+#include <dirent.h>
-+#include <sys/types.h>
-+#include <sys/stat.h>
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <string.h>
-+#include <unistd.h>
-+
-+#include "xenstat_priv.h"
-+
-+#define SYSFS_VBD_PATH "/sys/devices/xen-backend/"
-+
-+struct priv_data {
-+ FILE *procnetdev;
-+ DIR *sysfsvbd;
-+};
-+
-+static struct priv_data *
-+get_priv_data(xenstat_handle *handle)
-+{
-+ if (handle->priv != NULL)
-+ return handle->priv;
-+
-+ handle->priv = malloc(sizeof(struct priv_data));
-+ if (handle->priv == NULL)
-+ return (NULL);
-+
-+ ((struct priv_data *)handle->priv)->procnetdev = NULL;
-+ ((struct priv_data *)handle->priv)->sysfsvbd = NULL;
-+
-+ return handle->priv;
-+}
-+
-+/* Expected format of /proc/net/dev */
-+static const char PROCNETDEV_HEADER[] =
-+ "Inter-| Receive |"
-+ " Transmit\n"
-+ " face |bytes packets errs drop fifo frame compressed multicast|"
-+ "bytes packets errs drop fifo colls carrier compressed\n";
-+
-+/* Collect information about networks */
-+int xenstat_collect_networks(xenstat_node * node)
-+{
-+ /* XXX fixme: implement code to get stats from libkvm ! */
-+ return 1;
-+}
-+
-+/* Free network information in handle */
-+void xenstat_uninit_networks(xenstat_handle * handle)
-+{
-+ struct priv_data *priv = get_priv_data(handle);
-+ if (priv != NULL && priv->procnetdev != NULL)
-+ fclose(priv->procnetdev);
-+}
-+
-+static int read_attributes_vbd(const char *vbd_directory, const char *what, char *ret, int cap)
-+{
-+ /* XXX implement */
-+ return 0;
-+}
-+
-+/* Collect information about VBDs */
-+int xenstat_collect_vbds(xenstat_node * node)
-+{
-+ return 1;
-+}
-+
-+/* Free VBD information in handle */
-+void xenstat_uninit_vbds(xenstat_handle * handle)
-+{
-+ struct priv_data *priv = get_priv_data(handle);
-+ if (priv != NULL && priv->sysfsvbd != NULL)
-+ closedir(priv->sysfsvbd);
-+}
diff --git a/sysutils/xentools3/patches/patch-cj b/sysutils/xentools3/patches/patch-cj
deleted file mode 100644
index 67783f9cad0..00000000000
--- a/sysutils/xentools3/patches/patch-cj
+++ /dev/null
@@ -1,33 +0,0 @@
-$NetBSD: patch-cj,v 1.2 2008/03/03 16:45:27 hannken Exp $
-
---- python/xen/xend/osdep.py.orig 2008-01-31 11:06:54.000000000 +0100
-+++ python/xen/xend/osdep.py 2008-03-02 13:38:39.000000000 +0100
-@@ -22,15 +22,18 @@ import os
- _scripts_dir = {
- "Linux": "/etc/xen/scripts",
- "SunOS": "/usr/lib/xen/scripts",
-+ "NetBSD": "@XENDCONFDIR@/scripts",
- }
-
- _xend_autorestart = {
-+ "NetBSD": True,
- "Linux": True,
- "SunOS": False,
- }
-
- _pygrub_path = {
-- "SunOS": "/usr/lib/xen/bin/pygrub"
-+ "SunOS": "/usr/lib/xen/bin/pygrub",
-+ "NetBSD": "@PREFIX@/bin/pygrub",
- }
-
- _netback_type = {
-@@ -93,7 +96,7 @@ _balloon_stat = {
- def _get(var, default=None):
- return var.get(os.uname()[0], default)
-
--scripts_dir = _get(_scripts_dir, "/etc/xen/scripts")
-+scripts_dir = _get(_scripts_dir, "@XENDCONFDIR@/scripts")
- xend_autorestart = _get(_xend_autorestart)
- pygrub_path = _get(_pygrub_path, "/usr/bin/pygrub")
- netback_type = _get(_netback_type, "netfront")
diff --git a/sysutils/xentools3/patches/patch-ck b/sysutils/xentools3/patches/patch-ck
deleted file mode 100644
index 398b5a1495c..00000000000
--- a/sysutils/xentools3/patches/patch-ck
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ck,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- xenstore/xs_lib.c.orig 2007-01-08 16:00:53.000000000 +0100
-+++ xenstore/xs_lib.c 2007-04-26 13:16:40.000000000 +0200
-@@ -79,8 +79,10 @@
- if (s)
- return s;
-
--#ifdef __linux__
-+#if defined(__linux__)
- return "/proc/xen/xenbus";
-+#elif defined(__NetBSD__)
-+ return "/kern/xen/xenbus";
- #else
- return "/dev/xen/xenbus";
- #endif
diff --git a/sysutils/xentools3/patches/patch-cm b/sysutils/xentools3/patches/patch-cm
deleted file mode 100644
index eef001c56ad..00000000000
--- a/sysutils/xentools3/patches/patch-cm
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD: patch-cm,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- ../docs/man/xend-config.sxp.pod.5.orig 2007-01-08 16:00:44.000000000 +0100
-+++ ../docs/man/xend-config.sxp.pod.5 2007-04-28 19:21:52.000000000 +0200
-@@ -4,7 +4,7 @@
-
- =head1 SYNOPSIS
-
--/etc/xen/xend-config.sxp
-+@XENDCONFDIR@/xend-config.sxp
-
- =head1 DESCRIPTION
-
-@@ -12,7 +12,7 @@
- parameters which determine the behavior of the daemon at runtime.
-
- The parameters are specified in S-expression format. See the example
--configuration file in I</etc/xen/xend-config.sxp> for details.
-+configuration file in I<@XENDCONFDIR@/xend-config.sxp> for details.
-
- =head1 OPTIONS
-
-@@ -82,13 +82,13 @@
-
- =item I<network-script>
-
--The name of the script in I</etc/xen/scripts> that will be run to
-+The name of the script in I<@XENDCONFDIR@/scripts> that will be run to
- setup the networking environment. This can be any name, but in
- general is either I<network-bridge> or I<network-route>.
-
- =item I<vif-script>
-
--The name of the script in I</etc/xen/scripts> that will be run to
-+The name of the script in I<@XENDCONFDIR@/scripts> that will be run to
- setup a virtual interface when it is created or destroyed. This needs
- to (in general) work in unison with the I<network-script>.
-
-@@ -113,7 +113,7 @@
-
- The name of an application or script that can handle external device
- migration, such as for example virtual TPM migration. An example
--script is I</etc/xen/scripts/external-device-migrate>.
-+script is I<@XENDCONFDIR@/scripts/external-device-migrate>.
-
- =back
-
diff --git a/sysutils/xentools3/patches/patch-cn b/sysutils/xentools3/patches/patch-cn
deleted file mode 100644
index 4c11028bdea..00000000000
--- a/sysutils/xentools3/patches/patch-cn
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD: patch-cn,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- ../docs/man/xmdomain.cfg.pod.5.orig 2007-01-08 16:00:44.000000000 +0100
-+++ ../docs/man/xmdomain.cfg.pod.5 2007-04-28 19:21:52.000000000 +0200
-@@ -4,9 +4,9 @@
-
- =head1 SYNOPSIS
-
-- /etc/xen/myxendomain
-- /etc/xen/myxendomain2
-- /etc/xen/auto/myxenautostarted
-+ @XENDCONFDIR@/myxendomain
-+ @XENDCONFDIR@/myxendomain2
-+ @XENDCONFDIR@/auto/myxenautostarted
-
- =head1 DESCRIPTION
-
-@@ -14,14 +14,14 @@
- domains to create from scratch. Each of these config files needs to
- contain a number of required options, and may specify many more.
-
--Domain configuration files live in /etc/xen by default, if you store
-+Domain configuration files live in @XENDCONFDIR@ by default, if you store
- config files anywhere else the full path to the config file must be
- specified in the I<xm create> command.
-
--/etc/xen/auto is a special case. Domain config files in that
-+@XENDCONFDIR@/auto is a special case. Domain config files in that
- directory will be started automatically at system boot if the
--xendomain init script is enabled. The contents of /etc/xen/auto
--should be symlinks to files in /etc/xen to allow I<xm create> to be
-+xendomain init script is enabled. The contents of @XENDCONFDIR@/auto
-+should be symlinks to files in @XENDCONFDIR@ to allow I<xm create> to be
- used without full paths.
-
- Options are specified by I<name = value> statements in the
diff --git a/sysutils/xentools3/patches/patch-co b/sysutils/xentools3/patches/patch-co
deleted file mode 100644
index 56d75ff08a0..00000000000
--- a/sysutils/xentools3/patches/patch-co
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-co,v 1.2 2007/12/03 21:54:31 bouyer Exp $
-
---- ../docs/man/xm.pod.1.orig 2007-11-15 00:35:27.000000000 +0100
-+++ ../docs/man/xm.pod.1 2007-12-03 12:44:09.000000000 +0100
-@@ -76,7 +76,7 @@
- I<name>=I<value> combinations.
-
- I<configfile> can either be an absolute path to a file, or a relative
--path to a file located in /etc/xen.
-+path to a file located in @XENDCONFDIR@.
-
- Create will return B<as soon> as the domain is started. This B<does
- not> mean the guest OS in the domain has actually booted, or is
-@@ -101,7 +101,7 @@
-
- xm create Fedora4
-
--This creates a domain with the file /etc/xen/Fedora4, and returns as
-+This creates a domain with the file @XENDCONFDIR@/Fedora4, and returns as
- soon as it is run.
-
- =item I<without config file>
-@@ -836,7 +836,7 @@
- name pre-fix for the policy XML file. The preceding name parts are
- translated into the local path pointing to the policy XML file
- relative to the global policy root directory
--(/etc/xen/acm-security/policies). For example,
-+(@XENDCONFDIR@/acm-security/policies). For example,
- example.chwall_ste.client_v1 denotes the policy file
- example/chwall_ste/client_v1-security_policy.xml relative to the
- global policy root directory.
-@@ -927,7 +927,7 @@
- =over 4
-
- This step creates client_v1.map and client_v1.bin files in
--/etc/xen/acm-security/policies/example/chwall_ste.
-+@XENDCONFDIR@/acm-security/policies/example/chwall_ste.
-
- xm makepolicy example.chwall_ste.client_v1
-
diff --git a/sysutils/xentools3/patches/patch-cp b/sysutils/xentools3/patches/patch-cp
deleted file mode 100644
index c7ee2c0bcca..00000000000
--- a/sysutils/xentools3/patches/patch-cp
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-cp,v 1.1.1.1 2007/06/14 19:39:45 bouyer Exp $
-
---- ../xen/include/public/arch-x86/xen-x86_32.h.orig 2007-05-27 15:08:03.000000000 +0200
-+++ ../xen/include/public/arch-x86/xen-x86_32.h 2007-05-27 15:08:44.000000000 +0200
-@@ -103,7 +103,8 @@
- (hnd).p = val; \
- } while ( 0 )
- #define uint64_aligned_t uint64_t __attribute__((aligned(8)))
--#define XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name
-+#define __XEN_GUEST_HANDLE_64(name) __guest_handle_64_ ## name
-+#define XEN_GUEST_HANDLE_64(name) __XEN_GUEST_HANDLE_64(name)
- #endif
-
- #ifndef __ASSEMBLY__
diff --git a/sysutils/xentools3/patches/patch-cq b/sysutils/xentools3/patches/patch-cq
deleted file mode 100644
index 9a32ada5ac8..00000000000
--- a/sysutils/xentools3/patches/patch-cq
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-cq,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- ../xen/common/libelf/libelf-private.h.orig 2007-05-27 15:13:03.000000000 +0200
-+++ ../xen/common/libelf/libelf-private.h 2007-05-27 15:14:20.000000000 +0200
-@@ -33,6 +33,11 @@
- #define bswap_16(x) BSWAP_16(x)
- #define bswap_32(x) BSWAP_32(x)
- #define bswap_64(x) BSWAP_64(x)
-+#elif defined(__NetBSD__)
-+#include <sys/bswap.h>
-+#define bswap_16(x) bswap16(x)
-+#define bswap_32(x) bswap32(x)
-+#define bswap_64(x) bswap64(x)
- #else
- #include <byteswap.h>
- #endif
diff --git a/sysutils/xentools3/patches/patch-cr b/sysutils/xentools3/patches/patch-cr
deleted file mode 100644
index 6d0390bb5c7..00000000000
--- a/sysutils/xentools3/patches/patch-cr
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-cr,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- libxc/xc_dom_core.c.orig 2007-05-27 15:17:22.000000000 +0200
-+++ libxc/xc_dom_core.c 2007-05-27 15:17:39.000000000 +0200
-@@ -122,7 +122,7 @@
- memset(block, 0, sizeof(*block));
- block->mmap_len = size;
- block->mmap_ptr = mmap(NULL, block->mmap_len,
-- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS,
-+ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON,
- -1, 0);
- if ( block->mmap_ptr == MAP_FAILED )
- {
-@@ -354,7 +354,7 @@
- {
- mode = "anonymous memory";
- phys->ptr = mmap(NULL, phys->count << page_shift,
-- PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANONYMOUS,
-+ PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_ANON,
- -1, 0);
- if ( phys->ptr == MAP_FAILED )
- {
diff --git a/sysutils/xentools3/patches/patch-cs b/sysutils/xentools3/patches/patch-cs
deleted file mode 100644
index b8ae240c998..00000000000
--- a/sysutils/xentools3/patches/patch-cs
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-cs,v 1.2 2007/12/03 21:54:31 bouyer Exp $
-
---- misc/xen-python-path.orig 2007-11-15 00:35:27.000000000 +0100
-+++ misc/xen-python-path 2007-12-03 12:45:29.000000000 +0100
-@@ -22,14 +22,14 @@
- # take the first installed instance of auxbin that we find, and then run it
- # to determine the correct path, appending that to sys.path.
-
--AUXBIN = 'xen/util/auxbin.py'
-+AUXBIN = 'site-packages/xen/util/auxbin.py'
-
- import os
- import os.path
- import sys
-
- for p in ['python%s' % sys.version[:3], 'python']:
-- for l in ['/usr/lib64', '/usr/lib']:
-+ for l in ['@PREFIX@/lib']:
- for k in ['', 'site-packages/']:
- d = os.path.join(l, p, k)
- if os.path.exists(os.path.join(d, AUXBIN)):
diff --git a/sysutils/xentools3/patches/patch-ct b/sysutils/xentools3/patches/patch-ct
deleted file mode 100644
index c970a13b854..00000000000
--- a/sysutils/xentools3/patches/patch-ct
+++ /dev/null
@@ -1,56 +0,0 @@
-$NetBSD: patch-ct,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- python/xen/xend/XendNode.py.orig 2007-05-18 16:45:21.000000000 +0200
-+++ python/xen/xend/XendNode.py 2007-05-27 17:30:50.000000000 +0200
-@@ -106,17 +106,15 @@
- # We can run off the end of the cpuinfo list if domain0 does not
- # have #vcpus == #pcpus. In that case we just replicate one that's
- # in the hash table.
-- if not cpuinfo.has_key(number):
-- number = cpuinfo.keys()[0]
- if arch.type == "x86":
- self.cpus[u].update(
- { 'host' : self.uuid,
- 'features' : cpu_features,
-- 'speed' : int(float(cpuinfo[number]['cpu MHz'])),
-- 'vendor' : cpuinfo[number]['vendor_id'],
-- 'modelname': cpuinfo[number]['model name'],
-- 'stepping' : cpuinfo[number]['stepping'],
-- 'flags' : cpuinfo[number]['flags'],
-+ 'speed' : 0,
-+ 'vendor' : 'unkown',
-+ 'modelname': 'unkown',
-+ 'stepping' : 'unkown',
-+ 'flags' : 'unkown',
- })
- elif arch.type == "ia64":
- self.cpus[u].update(
-@@ -627,27 +625,7 @@
-
- def parse_proc_cpuinfo():
- cpuinfo = {}
-- f = file('/proc/cpuinfo', 'r')
-- try:
-- p = -1
-- d = {}
-- for line in f:
-- keyvalue = line.split(':')
-- if len(keyvalue) != 2:
-- continue
-- key = keyvalue[0].strip()
-- val = keyvalue[1].strip()
-- if key == 'processor':
-- if p != -1:
-- cpuinfo[p] = d
-- p = int(val)
-- d = {}
-- else:
-- d[key] = val
-- cpuinfo[p] = d
-- return cpuinfo
-- finally:
-- f.close()
-+ return cpuinfo
-
-
- def instance():
diff --git a/sysutils/xentools3/patches/patch-cu b/sysutils/xentools3/patches/patch-cu
deleted file mode 100644
index 05fca200784..00000000000
--- a/sysutils/xentools3/patches/patch-cu
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-cu,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- libxc/xc_dom_boot.c.orig 2007-05-27 17:55:28.000000000 +0200
-+++ libxc/xc_dom_boot.c 2007-05-27 17:55:46.000000000 +0200
-@@ -163,7 +163,7 @@
- }
-
- ptr = mmap(NULL, count << page_shift, PROT_READ | PROT_WRITE,
-- MAP_SHARED, dom->guest_xc, 0);
-+ MAP_SHARED | MAP_ANON, -1, 0);
- if ( ptr == MAP_FAILED )
- {
- xc_dom_panic(XC_INTERNAL_ERROR,
diff --git a/sysutils/xentools3/patches/patch-cv b/sysutils/xentools3/patches/patch-cv
deleted file mode 100644
index ca86c28ee85..00000000000
--- a/sysutils/xentools3/patches/patch-cv
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-cv,v 1.1.1.1 2007/06/14 19:39:46 bouyer Exp $
-
---- libxc/xc_hvm_build.c 2007-06-12 23:36:11.000000000 +0200
-+++ libxc/xc_hvm_build.c.orig 2007-06-12 23:35:55.000000000 +0200
-@@ -120,7 +120,7 @@
- if ( entries == NULL )
- goto err;
- elf->dest = mmap(NULL, pages << PAGE_SHIFT, PROT_READ | PROT_WRITE,
-- MAP_SHARED, xch, 0);
-+ MAP_ANON | MAP_SHARED, -1, 0);
- if ( elf->dest == MAP_FAILED )
- goto err;
-
diff --git a/sysutils/xentools3/patches/patch-cw b/sysutils/xentools3/patches/patch-cw
deleted file mode 100644
index 91a6071dd80..00000000000
--- a/sysutils/xentools3/patches/patch-cw
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-cw,v 1.1 2007/11/17 16:45:32 bouyer Exp $
-
---- python/xen/xend/arch.py.orig 2007-11-17 16:30:03.000000000 +0100
-+++ python/xen/xend/arch.py 2007-11-17 16:30:26.000000000 +0100
-@@ -25,6 +25,7 @@
- "i586": "x86",
- "i686": "x86",
- "x86_64": "x86",
-+ "amd64": "x86",
- "i86pc": "x86",
- "ia64": "ia64",
- "ppc": "powerpc",
diff --git a/sysutils/xentools3/patches/patch-cx b/sysutils/xentools3/patches/patch-cx
deleted file mode 100644
index f1a76eca092..00000000000
--- a/sysutils/xentools3/patches/patch-cx
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-cx,v 1.1 2007/12/03 21:54:31 bouyer Exp $
-
---- python/xen/xend/balloon.py.orig 2007-11-15 00:35:27.000000000 +0100
-+++ python/xen/xend/balloon.py 2007-12-03 16:34:28.000000000 +0100
-@@ -96,7 +96,6 @@
- xoptions = XendOptions.instance()
- dom0 = XendDomain.instance().privilegedDomain()
- xc = xen.lowlevel.xc.xc()
-- dom0_start_alloc_mb = get_dom0_current_alloc() / 1024
-
- try:
- dom0_min_mem = xoptions.get_dom0_min_mem() * 1024
-@@ -159,6 +158,7 @@
- (need_mem, dom0_min_mem, dom0_min_mem,
- free_mem + scrub_mem + dom0_alloc - dom0_min_mem))
- else:
-+ dom0_start_alloc_mb = get_dom0_current_alloc() / 1024
- dom0.setMemoryTarget(dom0_start_alloc_mb)
- raise VmError(
- ('Not enough memory is available, and dom0 cannot'
diff --git a/sysutils/xentools3/patches/patch-cy b/sysutils/xentools3/patches/patch-cy
deleted file mode 100644
index 52bfe9d4898..00000000000
--- a/sysutils/xentools3/patches/patch-cy
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-cy,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- libfsimage/Makefile.orig 2008-01-31 10:06:54.000000000 +0000
-+++ libfsimage/Makefile 2008-03-01 11:52:28.000000000 +0000
-@@ -2,7 +2,7 @@ XEN_ROOT = ../..
- include $(XEN_ROOT)/tools/Rules.mk
-
- SUBDIRS-y = common ufs reiserfs iso9660 fat
--SUBDIRS-y += $(shell ./check-libext2fs)
-+SUBDIRS-y += $(shell ${SHELL} check-libext2fs)
-
- .PHONY: all
- all install clean:
diff --git a/sysutils/xentools3/patches/patch-cz b/sysutils/xentools3/patches/patch-cz
deleted file mode 100644
index 73c87862cb9..00000000000
--- a/sysutils/xentools3/patches/patch-cz
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-cz,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- libfsimage/Rules.mk.orig 2008-01-31 10:06:54.000000000 +0000
-+++ libfsimage/Rules.mk 2008-03-01 11:52:28.000000000 +0000
-@@ -20,8 +20,8 @@ fs-all: $(FSLIB)
-
- .PHONY: fs-install
- fs-install: fs-all
-- $(INSTALL_DIR) $(DESTDIR)/usr/$(FSDIR)
-- $(INSTALL_PROG) $(FSLIB) $(DESTDIR)/usr/$(FSDIR)
-+ $(BSD_INSTALL_LIB_DIR) ${DESTDIR}$(PREFIX)/lib/fs/$(FS)
-+ $(BSD_INSTALL_LIB) $(FSLIB) ${DESTDIR}$(PREFIX)/lib/fs/$(FS)
-
- $(FSLIB): $(PIC_OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS)
diff --git a/sysutils/xentools3/patches/patch-da b/sysutils/xentools3/patches/patch-da
deleted file mode 100644
index fe732fcf0da..00000000000
--- a/sysutils/xentools3/patches/patch-da
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD: patch-da,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- libfsimage/common/Makefile.orig 2008-01-31 10:06:54.000000000 +0000
-+++ libfsimage/common/Makefile 2008-03-01 11:52:28.000000000 +0000
-@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
- MAJOR = 1.0
- MINOR = 0
-
--CFLAGS += -Werror -Wp,-MD,.$(@F).d
-+CFLAGS += -Werror -Wp,-MD,.$(@F).d -DFSIMAGE_FSDIR=\"$(PREFIX)/lib/fs\"
- DEPS = .*.d
-
- LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
-@@ -22,14 +22,14 @@ all: $(LIB)
-
- .PHONY: install
- install: all
-- [ -d $(DESTDIR)/usr/$(LIBDIR) ] || $(INSTALL_DIR) $(DESTDIR)/usr/$(LIBDIR)
-- [ -d $(DESTDIR)/usr/include ] || $(INSTALL_DIR) $(DESTDIR)/usr/include
-- $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)
-- ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)/usr/$(LIBDIR)/libfsimage.so.$(MAJOR)
-- ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)/usr/$(LIBDIR)/libfsimage.so
-- $(INSTALL_DATA) fsimage.h $(DESTDIR)/usr/include
-- $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)/usr/include
-- $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)/usr/include
-+ $(BSD_INSTALL_LIB_DIR) ${DESTDIR}$(PREFIX)/lib
-+ $(BSD_INSTALL_DATA_DIR) ${DESTDIR}$(PREFIX)/include
-+ $(BSD_INSTALL_LIB) libfsimage.so.$(MAJOR).$(MINOR) ${DESTDIR}$(PREFIX)/lib
-+ ln -sf libfsimage.so.$(MAJOR).$(MINOR) ${DESTDIR}$(PREFIX)/lib/libfsimage.so.$(MAJOR)
-+ ln -sf libfsimage.so.$(MAJOR) ${DESTDIR}$(PREFIX)/lib/libfsimage.so
-+ $(BSD_INSTALL_DATA) fsimage.h ${DESTDIR}$(PREFIX)/include
-+ $(BSD_INSTALL_DATA) fsimage_plugin.h ${DESTDIR}$(PREFIX)/include
-+ $(BSD_INSTALL_DATA) fsimage_grub.h ${DESTDIR}$(PREFIX)/include
-
- clean distclean:
- rm -f $(PIC_OBJS) $(LIB)
diff --git a/sysutils/xentools3/patches/patch-db b/sysutils/xentools3/patches/patch-db
deleted file mode 100644
index 5842968f60c..00000000000
--- a/sysutils/xentools3/patches/patch-db
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-db,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- libfsimage/common/fsimage_plugin.c.orig 2008-01-31 10:06:54.000000000 +0000
-+++ libfsimage/common/fsimage_plugin.c 2008-03-01 11:52:28.000000000 +0000
-@@ -131,7 +131,10 @@ static int load_plugins(void)
- int err;
- int ret = -1;
-
--#ifdef __sun__
-+#if defined(FSIMAGE_FSDIR)
-+ if (fsdir == NULL)
-+ fsdir = FSIMAGE_FSDIR;
-+#elif defined(__sun__)
- if (fsdir == NULL)
- fsdir = "/usr/lib/fs";
-
diff --git a/sysutils/xentools3/patches/patch-dc b/sysutils/xentools3/patches/patch-dc
deleted file mode 100644
index 8500461439a..00000000000
--- a/sysutils/xentools3/patches/patch-dc
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-dc,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- libfsimage/ext2fs/fsys_ext2fs.c.orig 2008-01-31 10:06:54.000000000 +0000
-+++ libfsimage/ext2fs/fsys_ext2fs.c 2008-03-01 11:52:28.000000000 +0000
-@@ -594,7 +594,7 @@ ext2fs_dir (fsi_file_t *ffi, char *dirna
-
- /* Find out how long our remaining name is. */
- len = 0;
-- while (dirname[len] && !isspace (dirname[len]))
-+ while (dirname[len] && !isspace ((uint8_t)dirname[len]))
- len++;
-
- /* Get the symlink size. */
-@@ -651,7 +651,7 @@ ext2fs_dir (fsi_file_t *ffi, char *dirna
- }
-
- /* if end of filename, INODE points to the file's inode */
-- if (!*dirname || isspace (*dirname))
-+ if (!*dirname || isspace ((uint8_t)*dirname))
- {
- if (!S_ISREG (INODE->i_mode))
- {
-@@ -678,7 +678,7 @@ ext2fs_dir (fsi_file_t *ffi, char *dirna
- }
-
- /* skip to next slash or end of filename (space) */
-- for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/';
-+ for (rest = dirname; (ch = *rest) && !isspace ((uint8_t)ch) && ch != '/';
- rest++);
-
- /* look through this directory and find the next filename component */
diff --git a/sysutils/xentools3/patches/patch-dd b/sysutils/xentools3/patches/patch-dd
deleted file mode 100644
index 8676d05bfcc..00000000000
--- a/sysutils/xentools3/patches/patch-dd
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD: patch-dd,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- libfsimage/fat/fsys_fat.c.orig 2008-01-31 10:06:54.000000000 +0000
-+++ libfsimage/fat/fsys_fat.c 2008-03-01 11:52:29.000000000 +0000
-@@ -301,7 +301,7 @@ fat_dir (fsi_file_t *ffi, char *dirname)
- /* if we have a real file (and we're not just printing possibilities),
- then this is where we want to exit */
-
-- if (!*dirname || isspace (*dirname))
-+ if (!*dirname || isspace ((uint8_t)*dirname))
- {
- if (attrib & FAT_ATTRIB_DIR)
- {
-@@ -325,7 +325,7 @@ fat_dir (fsi_file_t *ffi, char *dirname)
- /* Directories don't have a file size */
- filemax = INT_MAX;
-
-- for (rest = dirname; (ch = *rest) && !isspace (ch) && ch != '/'; rest++);
-+ for (rest = dirname; (ch = *rest) && !isspace ((uint8_t)ch) && ch != '/'; rest++);
-
- *rest = 0;
-
-@@ -426,12 +426,12 @@ fat_dir (fsi_file_t *ffi, char *dirname)
- {
- int i, j, c;
-
-- for (i = 0; i < 8 && (c = filename[i] = tolower (dir_buf[i]))
-+ for (i = 0; i < 8 && (c = filename[i] = tolower ((uint8_t)dir_buf[i]))
- && !isspace (c); i++);
-
- filename[i++] = '.';
-
-- for (j = 0; j < 3 && (c = filename[i + j] = tolower (dir_buf[8 + j]))
-+ for (j = 0; j < 3 && (c = filename[i + j] = tolower ((uint8_t)dir_buf[8 + j]))
- && !isspace (c); j++);
-
- if (j == 0)
diff --git a/sysutils/xentools3/patches/patch-de b/sysutils/xentools3/patches/patch-de
deleted file mode 100644
index 2fd60b61c5d..00000000000
--- a/sysutils/xentools3/patches/patch-de
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-de,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- libfsimage/iso9660/fsys_iso9660.c.orig 2008-01-31 10:06:54.000000000 +0000
-+++ libfsimage/iso9660/fsys_iso9660.c 2008-03-01 11:52:29.000000000 +0000
-@@ -164,7 +164,7 @@ iso9660_dir (fsi_file_t *ffi, char *dirn
- /* pathlen = strcspn(dirname, "/\n\t "); */
- for (pathlen = 0 ;
- dirname[pathlen]
-- && !isspace(dirname[pathlen]) && dirname[pathlen] != '/' ;
-+ && !isspace((uint8_t)dirname[pathlen]) && dirname[pathlen] != '/' ;
- pathlen++)
- ;
-
diff --git a/sysutils/xentools3/patches/patch-df b/sysutils/xentools3/patches/patch-df
deleted file mode 100644
index a43815f906e..00000000000
--- a/sysutils/xentools3/patches/patch-df
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-df,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- libfsimage/reiserfs/fsys_reiserfs.c.orig 2008-01-31 10:06:54.000000000 +0000
-+++ libfsimage/reiserfs/fsys_reiserfs.c 2008-03-01 11:52:29.000000000 +0000
-@@ -1029,7 +1029,7 @@ reiserfs_dir (fsi_file_t *ffi, char *dir
-
- /* Find out how long our remaining name is. */
- len = 0;
-- while (dirname[len] && !isspace (dirname[len]))
-+ while (dirname[len] && !isspace ((uint8_t)dirname[len]))
- len++;
-
- if (filemax + len > sizeof (linkbuf) - 1)
-@@ -1078,7 +1078,7 @@ reiserfs_dir (fsi_file_t *ffi, char *dir
- /* if we have a real file (and we're not just printing possibilities),
- then this is where we want to exit */
-
-- if (! *dirname || isspace (*dirname))
-+ if (! *dirname || isspace ((uint8_t)*dirname))
- {
- if (! S_ISREG (mode))
- {
-@@ -1109,7 +1109,7 @@ reiserfs_dir (fsi_file_t *ffi, char *dir
- errnum = ERR_BAD_FILETYPE;
- return 0;
- }
-- for (rest = dirname; (ch = *rest) && ! isspace (ch) && ch != '/'; rest++);
-+ for (rest = dirname; (ch = *rest) && ! isspace ((uint8_t)ch) && ch != '/'; rest++);
- *rest = 0;
-
- # ifndef STAGE1_5
diff --git a/sysutils/xentools3/patches/patch-dg b/sysutils/xentools3/patches/patch-dg
deleted file mode 100644
index 18b00a23bc0..00000000000
--- a/sysutils/xentools3/patches/patch-dg
+++ /dev/null
@@ -1,41 +0,0 @@
-$NetBSD: patch-dg,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- libfsimage/ufs/fsys_ufs.c.orig 2008-01-31 11:06:54.000000000 +0100
-+++ libfsimage/ufs/fsys_ufs.c 2008-03-02 18:14:30.000000000 +0100
-@@ -32,8 +32,9 @@
- #define SUPERBLOCK ((struct fs *)(FSYS_BUF + 0x2000))
- #define INODE ((struct icommon *)(FSYS_BUF + 0x1000))
- #define DIRENT (FSYS_BUF + 0x4000)
-+#define MAXBSIZE ((FSYS_BUFLEN - 0x4000) / 2)
- #define INDIRBLK1 ((grub_daddr32_t *)(FSYS_BUF + 0x4000)) /* 2+ indir blk */
--#define INDIRBLK0 ((grub_daddr32_t *)(FSYS_BUF+ 0x6000)) /* 1st indirect blk */
-+#define INDIRBLK0 ((grub_daddr32_t *)(FSYS_BUF+ 0x4000 + MAXBSIZE)) /* 1st indirect blk */
-
- #define indirblk0 (*fsig_int1(ffi))
- #define indirblk1 (*fsig_int2(ffi))
-@@ -48,7 +49,8 @@ ufs_mount(fsi_file_t *ffi, const char *o
- {
- if (/*! IS_PC_SLICE_TYPE_SOLARIS(current_slice) || */
- !devread(ffi, UFS_SBLOCK, 0, UFS_SBSIZE, (char *)SUPERBLOCK) ||
-- SUPERBLOCK->fs_magic != UFS_MAGIC)
-+ SUPERBLOCK->fs_magic != UFS_MAGIC ||
-+ MAXBSIZE < SUPERBLOCK->fs_bsize)
- return 0;
-
- return 1;
-@@ -72,13 +74,13 @@ ufs_dir(fsi_file_t *ffi, char *dirname)
- while (*dirname == '/')
- dirname++;
-
-- while (inode && *dirname && !isspace(*dirname)) {
-+ while (inode && *dirname && !isspace((uint8_t)*dirname)) {
- if (!openi(ffi, inode))
- return 0;
-
- /* parse for next path component */
- fname = dirname;
-- while (*dirname && !isspace(*dirname) && *dirname != '/')
-+ while (*dirname && !isspace((uint8_t)*dirname) && *dirname != '/')
- dirname++;
- ch = *dirname;
- *dirname = 0; /* ensure null termination */
diff --git a/sysutils/xentools3/patches/patch-dh b/sysutils/xentools3/patches/patch-dh
deleted file mode 100644
index dc71eadd9e4..00000000000
--- a/sysutils/xentools3/patches/patch-dh
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-dh,v 1.2 2008/08/07 16:00:14 joerg Exp $
-
---- pygrub/Makefile.orig 2008-01-31 10:06:54.000000000 +0000
-+++ pygrub/Makefile 2008-03-01 12:03:11.000000000 +0000
-@@ -10,14 +10,12 @@ build:
-
- .PHONY: install
- ifndef XEN_PYTHON_NATIVE_INSTALL
--install: LIBPATH=$(shell PYTHONPATH=../python/xen/util python -c "import auxbin; print auxbin.libpath()")
-+install: LIBPATH=$(shell PYTHONPATH=../py{}thon/xen/util python -c "import auxbin; print auxbin.libpath()")
- install: all
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --install-lib="$(DESTDIR)$(LIBPATH)/python"
-- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-+ python setup.py install --root=${DESTDIR}
- else
- install: all
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
-- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-+ python setup.py install --root=${DESTDIR}
- endif
-
- .PHONY: clean
diff --git a/sysutils/xentools3/patches/patch-di b/sysutils/xentools3/patches/patch-di
deleted file mode 100644
index 94169727500..00000000000
--- a/sysutils/xentools3/patches/patch-di
+++ /dev/null
@@ -1,58 +0,0 @@
-$NetBSD: patch-di,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- libfsimage/common/fsimage_grub.c.orig 2008-01-31 11:06:54.000000000 +0100
-+++ libfsimage/common/fsimage_grub.c 2008-03-01 18:59:27.000000000 +0100
-@@ -204,6 +204,45 @@ int
- fsig_devread(fsi_file_t *ffi, unsigned int sector, unsigned int offset,
- unsigned int bufsize, char *buf)
- {
-+#ifdef __NetBSD__
-+ off_t off;
-+ ssize_t ret;
-+ int n, r;
-+ char tmp[512];
-+
-+ off = ffi->ff_fsi->f_off + ((off_t)sector * 512) + offset;
-+
-+ /*
-+ * On NetBSD reads from a raw disk must be sector-aligned.
-+ * Split the read into up to three parts to meet this requirement.
-+ */
-+
-+ if ((n = (off & 511)) > 0) {
-+ if ((r = 512 - n) > bufsize)
-+ r = bufsize;
-+ if ((ret = pread(ffi->ff_fsi->f_fd, tmp, 512, off - n)) < n + r)
-+ return (0);
-+ bcopy(tmp + n, buf, r);
-+ buf += r;
-+ bufsize -= r;
-+ off += r;
-+ }
-+
-+ if ((n = (bufsize & ~511)) > 0) {
-+ if ((ret = pread(ffi->ff_fsi->f_fd, buf, n, off)) < n)
-+ return (0);
-+ buf += n;
-+ bufsize -= n;
-+ off += n;
-+ }
-+ if (bufsize > 0) {
-+ if ((ret = pread(ffi->ff_fsi->f_fd, tmp, 512, off)) < bufsize)
-+ return (0);
-+ bcopy(tmp, buf, bufsize);
-+ }
-+
-+ return (1);
-+#else /* __NetBSD__ */
- uint64_t off = ffi->ff_fsi->f_off + ((uint64_t)sector * 512) + offset;
- ssize_t bytes_read = 0;
-
-@@ -220,6 +259,7 @@ fsig_devread(fsi_file_t *ffi, unsigned i
- }
-
- return (1);
-+#endif /* __NetBSD__ */
- }
-
- int
diff --git a/sysutils/xentools3/patches/patch-dj b/sysutils/xentools3/patches/patch-dj
deleted file mode 100644
index f6a5e02ba4d..00000000000
--- a/sysutils/xentools3/patches/patch-dj
+++ /dev/null
@@ -1,46 +0,0 @@
-$NetBSD: patch-dj,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- python/xen/xend/XendBootloader.py.orig 2008-01-31 11:06:54.000000000 +0100
-+++ python/xen/xend/XendBootloader.py 2008-03-02 13:37:58.000000000 +0100
-@@ -12,7 +12,7 @@
- # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- #
-
--import os, select, errno, stat, signal
-+import os, select, errno, stat, signal, tty
- import random
- import shlex
- from xen.xend import sxp
-@@ -43,6 +43,9 @@ def bootloader(blexec, disk, dom, quiet
- log.error(msg)
- raise VmError(msg)
-
-+ if os.uname()[0] == "NetBSD" and disk.startswith('/dev/'):
-+ disk = disk.replace("/dev/", "/dev/r")
-+
- mkdir.parents("/var/run/xend/boot/", stat.S_IRWXU)
-
- while True:
-@@ -63,12 +66,8 @@ def bootloader(blexec, disk, dom, quiet
- # where we copy characters between the two master fds, as well as
- # listening on the bootloader's fifo for the results.
-
-- # Termios runes for very raw access to the pty master fds.
-- attr = [ 0, 0, termios.CS8 | termios.CREAD | termios.CLOCAL,
-- 0, 0, 0, [0] * 32 ]
--
- (m1, s1) = pty.openpty()
-- termios.tcsetattr(m1, termios.TCSANOW, attr)
-+ tty.setraw(m1);
- fcntl.fcntl(m1, fcntl.F_SETFL, os.O_NDELAY);
- os.close(s1)
- slavename = ptsname.ptsname(m1)
-@@ -109,7 +108,7 @@ def bootloader(blexec, disk, dom, quiet
- # record that this domain is bootloading
- dom.bootloader_pid = child
-
-- termios.tcsetattr(m2, termios.TCSANOW, attr)
-+ tty.setraw(m2);
- fcntl.fcntl(m2, fcntl.F_SETFL, os.O_NDELAY);
- while True:
- try:
diff --git a/sysutils/xentools3/patches/patch-dk b/sysutils/xentools3/patches/patch-dk
deleted file mode 100644
index 127c8cb03db..00000000000
--- a/sysutils/xentools3/patches/patch-dk
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-dk,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- libfsimage/common/fsimage_grub.h.orig 2008-01-31 11:06:54.000000000 +0100
-+++ libfsimage/common/fsimage_grub.h 2008-03-02 18:10:43.000000000 +0100
-@@ -44,7 +44,7 @@ typedef struct fsig_plugin_ops {
- } fsig_plugin_ops_t;
-
- #define STAGE1_5
--#define FSYS_BUFLEN 0x8000
-+#define FSYS_BUFLEN 0x40000
- #define SECTOR_BITS 9
- #define SECTOR_SIZE 0x200
-
diff --git a/sysutils/xentools3/patches/patch-dl b/sysutils/xentools3/patches/patch-dl
deleted file mode 100644
index afd2d47e799..00000000000
--- a/sysutils/xentools3/patches/patch-dl
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-dl,v 1.1 2008/03/03 16:45:27 hannken Exp $
-
---- pygrub/src/pygrub.orig 2008-03-02 18:25:22.000000000 +0100
-+++ pygrub/src/pygrub 2008-03-03 12:15:22.000000000 +0100
-@@ -240,10 +240,10 @@ class Grub:
- if y > self.start_image + maxy:
- break
- if y == self.selected_image:
-- attr = curses.A_REVERSE
-- else:
-- attr = 0
-- self.entry_win.addstr(y + 1 - self.start_image, 2, i.title.ljust(70), attr)
-+ self.entry_win.attron(curses.A_REVERSE)
-+ self.entry_win.addstr(y + 1 - self.start_image, 2, i.title.ljust(70))
-+ if y == self.selected_image:
-+ self.entry_win.attroff(curses.A_REVERSE)
- self.entry_win.refresh()
-
- def edit_entry(self, origimg):
-@@ -269,16 +269,17 @@ class Grub:
- self.entry_win.box()
- for idx in range(1, len(img.lines)):
- # current line should be highlighted
-- attr = 0
- if idx == curline:
-- attr = curses.A_REVERSE
-+ self.entry_win.attron(curses.A_REVERSE)
-
- # trim the line
- l = img.lines[idx].ljust(70)
- if len(l) > 70:
- l = l[:69] + ">"
-
-- self.entry_win.addstr(idx, 2, l, attr)
-+ self.entry_win.addstr(idx, 2, l)
-+ if idx == curline:
-+ self.entry_win.attroff(curses.A_REVERSE)
- self.entry_win.refresh()
-
- c = self.screen.getch()
diff --git a/sysutils/xentools3/patches/patch-dm b/sysutils/xentools3/patches/patch-dm
deleted file mode 100644
index 745e7d0bf23..00000000000
--- a/sysutils/xentools3/patches/patch-dm
+++ /dev/null
@@ -1,186 +0,0 @@
-$NetBSD: patch-dm,v 1.1 2009/03/05 19:43:32 bouyer Exp $
-
---- python/xen/util/pci.py.orig 2008-04-25 13:03:12.000000000 +0000
-+++ python/xen/util/pci.py 2009-03-05 15:48:44.000000000 +0000
-@@ -1,4 +1,4 @@
--#!/usr/bin/env python
-+#!/usr/pkg/bin/python2.4
- #
- # PCI Device Information Class
- # - Helps obtain information about which I/O resources a PCI device needs
-@@ -6,52 +6,8 @@
- # Author: Ryan Wilson <hap9@epoch.ncsc.mil>
-
- import sys
--import os, os.path
-
--PROC_MNT_PATH = '/proc/mounts'
--PROC_PCI_PATH = '/proc/bus/pci/devices'
--PROC_PCI_NUM_RESOURCES = 7
--
--SYSFS_PCI_DEVS_PATH = '/bus/pci/devices'
--SYSFS_PCI_DEV_RESOURCE_PATH = '/resource'
--SYSFS_PCI_DEV_IRQ_PATH = '/irq'
--SYSFS_PCI_DEV_DRIVER_DIR_PATH = '/driver'
--SYSFS_PCI_DEV_VENDOR_PATH = '/vendor'
--SYSFS_PCI_DEV_DEVICE_PATH = '/device'
--SYSFS_PCI_DEV_SUBVENDOR_PATH = '/subsystem_vendor'
--SYSFS_PCI_DEV_SUBDEVICE_PATH = '/subsystem_device'
--
--PCI_BAR_IO = 0x01
--PCI_BAR_IO_MASK = ~0x03
--PCI_BAR_MEM_MASK = ~0x0f
--
--# Definitions from Linux: include/linux/pci.h
--def PCI_DEVFN(slot, func):
-- return ((((slot) & 0x1f) << 3) | ((func) & 0x07))
--
--def find_sysfs_mnt():
-- mounts_file = open(PROC_MNT_PATH,'r')
--
-- for line in mounts_file:
-- sline = line.split()
-- if len(sline)<3:
-- continue
--
-- if sline[2]=='sysfs':
-- return sline[1]
--
-- return None
--
--class PciDeviceNotFoundError(Exception):
-- def __init__(self,domain,bus,slot,func):
-- self.domain = domain
-- self.bus = bus
-- self.slot = slot
-- self.func = func
-- self.name = "%04x:%02x:%02x.%01x"%(domain, bus, slot, func)
--
-- def __str__(self):
-- return ('PCI Device %s Not Found' % (self.name))
-+KERN_PATH = '/kern/xen/pci/'
-
- class PciDeviceParseError(Exception):
- def __init__(self,msg):
-@@ -69,94 +25,45 @@
- self.irq = 0
- self.iomem = []
- self.ioports = []
-- self.driver = None
-+ self.driver = 'pciback'
- self.vendor = None
- self.device = None
- self.subvendor = None
- self.subdevice = None
-
-- self.get_info_from_sysfs()
-+ self.get_info_from_kern()
-
-- def get_info_from_sysfs(self):
-- try:
-- sysfs_mnt = find_sysfs_mnt()
-- except IOError, (errno, strerr):
-- raise PciDeviceParseError(('Failed to locate sysfs mount: %s (%d)' %
-- (PROC_PCI_PATH, strerr, errno)))
-+ def get_info_from_kern(self):
-
-- if sysfs_mnt == None:
-- return False
--
-- path = sysfs_mnt+SYSFS_PCI_DEVS_PATH+'/'+ \
-- self.name+SYSFS_PCI_DEV_RESOURCE_PATH
-+ path = KERN_PATH + self.name
-+
- try:
- resource_file = open(path,'r')
-
-- for i in range(PROC_PCI_NUM_RESOURCES):
-- line = resource_file.readline()
-- sline = line.split()
-- if len(sline)<3:
-- continue
--
-- start = int(sline[0],16)
-- end = int(sline[1],16)
-- flags = int(sline[2],16)
-- size = end-start+1
--
-- if start!=0:
-- if flags&PCI_BAR_IO:
-- self.ioports.append( (start,size) )
-+ for line in resource_file.readlines():
-+ k, v = line.strip().split(':')
-+ if k == 'vendor':
-+ self.vendor = int(v.strip(), 16)
-+ elif k == 'product':
-+ self.device = int(v.strip(), 16)
-+ elif k == 'subsys_vendor':
-+ self.subvendor = int(v.strip(), 16)
-+ elif k == 'subsys_product':
-+ self.subdevice = int(v.strip(), 16)
-+ elif k in ('I/O', 'mem'):
-+ sline = map(str.strip, v.split('-'))
-+
-+ start = int(sline[0], 16)
-+ end = int(sline[1], 16)
-+ size = end - start + 1
-+
-+ if k == 'I/O':
-+ self.ioports.append((start, size))
- else:
-- self.iomem.append( (start,size) )
--
-- except IOError, (errno, strerr):
-- raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
-- (path, strerr, errno)))
--
-- path = sysfs_mnt+SYSFS_PCI_DEVS_PATH+'/'+ \
-- self.name+SYSFS_PCI_DEV_IRQ_PATH
-- try:
-- self.irq = int(open(path,'r').readline())
-- except IOError, (errno, strerr):
-- raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
-- (path, strerr, errno)))
-+ self.iomem.append((start, size))
-+ elif k == 'irq':
-+ self.irq = int(v.strip())
-
-- path = sysfs_mnt+SYSFS_PCI_DEVS_PATH+'/'+ \
-- self.name+SYSFS_PCI_DEV_DRIVER_DIR_PATH
-- try:
-- self.driver = os.path.basename(os.readlink(path))
-- except IOError, (errno, strerr):
-- raise PciDeviceParseError(('Failed to read %s: %s (%d)' %
-- (path, strerr, errno)))
--
-- path = sysfs_mnt+SYSFS_PCI_DEVS_PATH+'/'+ \
-- self.name+SYSFS_PCI_DEV_VENDOR_PATH
-- try:
-- self.vendor = int(open(path,'r').readline(), 16)
-- except IOError, (errno, strerr):
-- raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
-- (path, strerr, errno)))
--
-- path = sysfs_mnt+SYSFS_PCI_DEVS_PATH+'/'+ \
-- self.name+SYSFS_PCI_DEV_DEVICE_PATH
-- try:
-- self.device = int(open(path,'r').readline(), 16)
-- except IOError, (errno, strerr):
-- raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
-- (path, strerr, errno)))
--
-- path = sysfs_mnt+SYSFS_PCI_DEVS_PATH+'/'+ \
-- self.name+SYSFS_PCI_DEV_SUBVENDOR_PATH
-- try:
-- self.subvendor = int(open(path,'r').readline(), 16)
-- except IOError, (errno, strerr):
-- raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
-- (path, strerr, errno)))
--
-- path = sysfs_mnt+SYSFS_PCI_DEVS_PATH+'/'+ \
-- self.name+SYSFS_PCI_DEV_SUBDEVICE_PATH
-- try:
-- self.subdevice = int(open(path,'r').readline(), 16)
- except IOError, (errno, strerr):
- raise PciDeviceParseError(('Failed to open & read %s: %s (%d)' %
- (path, strerr, errno)))
diff --git a/sysutils/xentools3/patches/patch-dn b/sysutils/xentools3/patches/patch-dn
deleted file mode 100644
index e8d09c58715..00000000000
--- a/sysutils/xentools3/patches/patch-dn
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-dn,v 1.1 2009/03/05 19:43:32 bouyer Exp $
-
---- python/xen/xend/server/pciquirk.py.orig 2009-03-05 16:24:01.000000000 +0000
-+++ python/xen/xend/server/pciquirk.py 2009-03-05 16:25:22.000000000 +0000
-@@ -115,14 +115,14 @@
- pci_perm_dev_config = ['']
- else:
- pci_perm_dev_config.insert(0, '')
-- self.pci_perm_dev_config = pci_perm_dev_config
- except Exception, ex:
- raise XendError("Reading config file %s: %s" %
- (PERMISSIVE_CONFIG_FILE,str(ex)))
- else:
- log.info("Config file does not exist: %s" % PERMISSIVE_CONFIG_FILE)
-- self.pci_perm_dev_config = ['xend-pci-perm-devs']
-+ pci_perm_dev_config = ['xend-pci-perm-devs']
-
-+ self.pci_perm_dev_config = pci_perm_dev_config
- devices = child_at(child(pci_perm_dev_config, 'unconstrained_dev_ids'),0)
- if self.__matchPCIdev( devices ):
- log.debug("Permissive mode enabled for PCI device [%s]" %
diff --git a/sysutils/xentools3/patches/patch-libfsimage_ufs_ufs.h b/sysutils/xentools3/patches/patch-libfsimage_ufs_ufs.h
deleted file mode 100644
index 083bad4c8b8..00000000000
--- a/sysutils/xentools3/patches/patch-libfsimage_ufs_ufs.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-libfsimage_ufs_ufs.h,v 1.1 2013/07/17 09:39:19 joerg Exp $
-
---- libfsimage/ufs/ufs.h.orig 2013-07-14 19:44:35.000000000 +0000
-+++ libfsimage/ufs/ufs.h
-@@ -4,7 +4,7 @@
- */
-
- #ifndef _GRUB_UFS_H
--#define _GRUB_UFS_H_
-+#define _GRUB_UFS_H
-
- /* ufs specific constants */
- #define UFS_SBLOCK 16
diff --git a/sysutils/xentools3/patches/patch-libxc_xc__dom__x86.c b/sysutils/xentools3/patches/patch-libxc_xc__dom__x86.c
deleted file mode 100644
index 0deecb72121..00000000000
--- a/sysutils/xentools3/patches/patch-libxc_xc__dom__x86.c
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-libxc_xc__dom__x86.c,v 1.1 2013/04/11 19:57:52 joerg Exp $
-
---- libxc/xc_dom_x86.c.orig 2013-03-25 20:08:33.000000000 +0000
-+++ libxc/xc_dom_x86.c
-@@ -418,7 +418,7 @@ static int start_info_x86_32(struct xc_d
- xc_dom_printf("%s: called\n", __FUNCTION__);
-
- memset(start_info, 0, sizeof(*start_info));
-- sprintf(start_info->magic, dom->guest_type);
-+ snprintf(start_info->magic, sizeof(start_info->magic), "%s", dom->guest_type);
- start_info->nr_pages = dom->total_pages;
- start_info->shared_info = shinfo << PAGE_SHIFT_X86;
- start_info->pt_base = dom->pgtables_seg.vstart;
-@@ -457,7 +457,7 @@ static int start_info_x86_64(struct xc_d
- xc_dom_printf("%s: called\n", __FUNCTION__);
-
- memset(start_info, 0, sizeof(*start_info));
-- sprintf(start_info->magic, dom->guest_type);
-+ snprintf(start_info->magic, sizeof(start_info->magic), "%s", dom->guest_type);
- start_info->nr_pages = dom->total_pages;
- start_info->shared_info = shinfo << PAGE_SHIFT_X86;
- start_info->pt_base = dom->pgtables_seg.vstart;
diff --git a/sysutils/xentools3/patches/patch-python_xen_util_xmlrpcclient.py b/sysutils/xentools3/patches/patch-python_xen_util_xmlrpcclient.py
deleted file mode 100644
index baae4207f83..00000000000
--- a/sysutils/xentools3/patches/patch-python_xen_util_xmlrpcclient.py
+++ /dev/null
@@ -1,28 +0,0 @@
-$NetBSD: patch-python_xen_util_xmlrpcclient.py,v 1.1 2012/05/14 15:39:52 manu Exp $
-
---- ../tools/python/xen/util/xmlrpcclient.py.orig 2012-05-14 17:14:52.000000000 +0200
-+++ ../tools/python/xen/util/xmlrpcclient.py 2012-05-14 17:15:44.000000000 +0200
-@@ -21,8 +21,9 @@
- import socket
- import string
- import xmlrpclib
- from types import StringTypes
-+from sys import hexversion
-
-
- try:
- import SSHTransport
-@@ -53,9 +54,12 @@
- self.__handler = handler
- return xmlrpclib.Transport.request(self, host, '/RPC2',
- request_body, verbose)
- def make_connection(self, host):
-- return HTTPUnix(self.__handler)
-+ if hexversion < 0x02070000:
-+ return HTTPUnix(self.__handler)
-+ else:
-+ return HTTPUnixConnection(self.__handler)
-
-
- # We need our own transport for HTTPS, because xmlrpclib.SafeTransport is
- # broken -- it does not handle ERROR_ZERO_RETURN properly.
diff --git a/sysutils/xentools3/patches/patch-python_xen_util_xmlrpclib2.py b/sysutils/xentools3/patches/patch-python_xen_util_xmlrpclib2.py
deleted file mode 100644
index b78273f6da0..00000000000
--- a/sysutils/xentools3/patches/patch-python_xen_util_xmlrpclib2.py
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-python_xen_util_xmlrpclib2.py,v 1.1 2012/05/14 15:39:52 manu Exp $
-
---- ../tools/python/xen/util/xmlrpclib2.py.orig 2012-05-14 17:15:51.000000000 +0200
-+++ ../tools/python/xen/util/xmlrpclib2.py 2012-05-14 17:16:18.000000000 +0200
-@@ -60,8 +60,9 @@
- protocol_version = "HTTP/1.1"
-
- def __init__(self, hosts_allowed, request, client_address, server):
- self.hosts_allowed = hosts_allowed
-+ self.disable_nagle_algorithm = False
- SimpleXMLRPCRequestHandler.__init__(self, request, client_address,
- server)
-
- # this is inspired by SimpleXMLRPCRequestHandler's do_POST but differs
diff --git a/sysutils/xentools33/DESCR b/sysutils/xentools33/DESCR
deleted file mode 100644
index ad9eff33b35..00000000000
--- a/sysutils/xentools33/DESCR
+++ /dev/null
@@ -1,5 +0,0 @@
-The Xen virtual machine monitor allows running several virtual machines
-on a single physical machine. The xentools33 package contains the
-tools to create, destroy and control the virtual machines.
-
-The xentools33 package contains the tools for Xen 3.3.x
diff --git a/sysutils/xentools33/MESSAGE.NetBSD b/sysutils/xentools33/MESSAGE.NetBSD
deleted file mode 100644
index 7ab3a3f757d..00000000000
--- a/sysutils/xentools33/MESSAGE.NetBSD
+++ /dev/null
@@ -1,17 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE.NetBSD,v 1.1.1.1 2008/08/07 20:26:56 cegger Exp $
-
-Please ensure that the Xen-specific devices needed by xend(8) exist:
-
- cd /dev && sh MAKEDEV xen
-
-There are example configuration files for setting up a guest domain in:
-
- ${EGDIR}/
-
-Please also refer to the the "NetBSD/xen How-To" for more information on
-creating a Xen setup:
-
- http://www.NetBSD.org/ports/xen/howto.html
-
-===========================================================================
diff --git a/sysutils/xentools33/Makefile b/sysutils/xentools33/Makefile
deleted file mode 100644
index cb6abf65896..00000000000
--- a/sysutils/xentools33/Makefile
+++ /dev/null
@@ -1,218 +0,0 @@
-# $NetBSD: Makefile,v 1.52 2016/07/09 13:04:08 wiz Exp $
-
-VERSION= 3.3.2
-DISTNAME= xen-${VERSION}
-PKGNAME= xentools33-${VERSION}
-PKGREVISION= 21
-CATEGORIES= sysutils
-MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
-
-MAINTAINER= cegger@NetBSD.org
-HOMEPAGE= http://xen.org/
-COMMENT= Userland Tools for Xen 3.3.x
-
-LICENSE= gnu-gpl-v2
-
-#DEPENDS+= ${PYPKGPREFIX}-twisted-[0-9]*:../../net/py-twisted
-DEPENDS+= ${PYPKGPREFIX}-readline-[0-9]*:../../devel/py-readline
-DEPENDS+= ${PYPKGPREFIX}-curses>=0nb4:../../devel/py-curses
-
-BUILD_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware
-
-PKG_SYSCONFSUBDIR= xen
-PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # py-xml
-
-ONLY_FOR_PLATFORM= Linux-2.6*-i386 Linux-2.6*-x86_64
-ONLY_FOR_PLATFORM+= NetBSD-[5-9].*-x86_64 NetBSD-[5-9].*-i386
-
-CONFLICTS+= libxen-[0-9]*
-CONFLICTS+= xentools20-[0-9]*
-CONFLICTS+= xentools30-* xentools3-*
-CONFLICTS+= xenstoretools-*
-
-WRKSRC= ${WRKDIR}/xen-${VERSION}/tools
-CHECK_PORTABILITY_SKIP= examples/* xm-test/ramdisk/make-release.sh
-
-EGDIR= ${PREFIX}/share/examples/xen
-MESSAGE_SUBST= EGDIR=${EGDIR}
-
-USE_TOOLS+= perl #for pod2man
-USE_TOOLS+= gmake
-MAKE_ENV+= CONFIG_NetBSD=yes
-MAKE_ENV+= CONFIG_MBOOTPACK=no
-MAKE_ENV+= EGDIR=${EGDIR:Q}
-MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
-.if ${MACHINE_ARCH} == "i386"
-MAKE_ENV+= XEN_TARGET_ARCH="x86_32" XEN_COMPILE_ARCH="x86_32"
-.elif ${MACHINE_ARCH} == "x86_64"
-MAKE_ENV+= XEN_TARGET_ARCH="x86_64" XEN_COMPILE_ARCH="x86_64"
-.else
-MAKE_ENV+= XEN_TARGET_ARCH="unsupported"
-.endif
-PY_PATCHPLIST= yes
-REPLACE_PYTHON+= misc/xm
-REPLACE_PYTHON+= misc/netfix
-REPLACE_PYTHON+= misc/xen-bugtool
-REPLACE_PYTHON+= misc/xencons
-REPLACE_PYTHON+= misc/xend
-REPLACE_PYTHON+= misc/xensymoops
-REPLACE_PYTHON+= misc/xen-python-path
-REPLACE_PYTHON+= pygrub/src/pygrub
-REPLACE_PYTHON+= python/xen/util/*.py
-REPLACE_PYTHON+= python/xen/xend/*.py
-REPLACE_PYTHON+= python/xen/xm/*.py
-REPLACE_PYTHON+= python/xen/util/*.py
-REPLACE_PYTHON+= python/*.py
-REPLACE_PYTHON+= security/python/xensec_gen/cgi-bin/policy.cgi
-REPLACE_PYTHON+= security/python/xensec_gen/*.py
-REPLACE_PYTHON+= security/python/*.py
-REPLACE_PYTHON+= security/*.py
-REPLACE_PYTHON+= xenmon/*.py
-REPLACE_PYTHON+= xentrace/xentrace_format
-
-SUBST_CLASSES+= pathsvar
-SUBST_STAGE.pathsvar= pre-configure
-SUBST_FILES.pathsvar= examples/init.d/sysconfig.xendomains \
- examples/xend-config.sxp \
- python/xen/xend/server/relocate.py \
- python/xen/xend/XendOptions.py \
- security/Makefile security/python/xensec_gen/main.py \
- xenstore/xs_lib.c
-SUBST_SED.pathsvar= -e "s|/var/lib|${VARBASE}/run|g"
-
-SUBST_CLASSES+= py
-SUBST_STAGE.py= pre-configure
-SUBST_FILES.py= check/check_python
-SUBST_FILES.py+= check/check_python_devel
-SUBST_FILES.py+= pygrub/Makefile
-SUBST_FILES.py+= python/Makefile
-SUBST_FILES.py+= security/Makefile
-SUBST_FILES.py+= include/xen-foreign/Makefile
-SUBST_FILES.py+= include/xen-foreign/mkheader.py
-SUBST_FILES.py+= ../xen/tools/get-fields.sh
-SUBST_SED.py= -e "s,python,${PYTHONBIN},g"
-
-SUBST_CLASSES+= conf
-SUBST_STAGE.conf= pre-configure
-SUBST_FILES.conf= python/xen/xend/XendOptions.py
-SUBST_FILES.conf+= python/xen/xend/osdep.py
-SUBST_FILES.conf+= python/xen/xm/create.py
-SUBST_FILES.conf+= python/xen/xm/addlabel.py
-SUBST_FILES.conf+= python/xen/xm/getlabel.py
-SUBST_FILES.conf+= python/xen/xm/rmlabel.py
-SUBST_FILES.conf+= xentrace/Makefile
-SUBST_FILES.conf+= ioemu/configure
-SUBST_FILES.conf+= ioemu/vl.c
-SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
-
-SUBST_CLASSES+= prefix
-SUBST_STAGE.prefix= pre-configure
-SUBST_FILES.prefix= python/xen/util/auxbin.py
-SUBST_FILES.prefix+= python/xen/xend/osdep.py
-SUBST_FILES.prefix+= misc/xen-python-path
-SUBST_FILES.prefix+= ioemu/vl.c
-SUBST_SED.prefix= -e "s,@PREFIX@,${PREFIX},g"
-
-REPLACE_PYTHON+= misc/xsview
-
-SUBST_CLASSES.NetBSD+= proc
-SUBST_STAGE.proc= pre-configure
-SUBST_FILES.proc= python/xen/xend/XendVnet.py
-SUBST_SED.proc= -e "s|/proc|/kern|g"
-
-OPSYSVARS+= PROCPATH
-PROCPATH.NetBSD= /kern
-PROCPATH.*= /proc
-
-RCD_SCRIPTS= xend xenbackendd xendomains
-FILES_SUBST+= RCD_INTERPRETER=${PYTHONBIN:Q}
-FILES_SUBST+= PROCPATH=${PROCPATH:Q}
-FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
-
-BLKTAP_FILES= blk_netbsd.c blktapctrl_netbsd.c
-
-XEND_SCRIPTS= block vif-bridge vif-ip qemu-ifup xen-subr
-
-CONF_FILES= ${EGDIR}/formats ${PKG_SYSCONFDIR}/formats
-
-CONF_FILES+= ${EGDIR}/xend-config.sxp \
- ${PKG_SYSCONFDIR}/xend-config.sxp
-.for s in ${XEND_SCRIPTS}
-CONF_FILES_PERMS+= ${EGDIR}/${s} ${PKG_SYSCONFDIR}/scripts/${s} \
- ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
-.endfor
-
-OWN_DIRS= ${PKG_SYSCONFDIR}/scripts /var/log/xen
-
-.include "../../mk/compiler.mk"
-.if !empty(PKGSRC_COMPILER:Mclang)
-EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes -Wno-error=format-security
-EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \
- -Wno-error=tautological-compare -Wno-error=null-dereference \
- -Wno-error=self-assign -Wno-error=sometimes-uninitialized \
- -Wno-error=unused-function
-.elif !empty(PKGSRC_COMPILER:Mgcc)
-EXTRA_CFLAGS+= -Wno-error=unused-but-set-variable
-.endif
-
-MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
-
-pre-build:
- rm -f ${WRKSRC}/check/check_x11_devel
-.for s in ${BLKTAP_FILES}
- cp ${FILESDIR}/${s} ${WRKSRC}/blktap/drivers/
-.endfor
- pod2man ${WRKSRC}/../docs/man/xend-config.sxp.pod.5 |\
- sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
- >${WRKDIR}/xend-config.sxp.5
- pod2man ${WRKSRC}/../docs/man/xmdomain.cfg.pod.5 |\
- sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
- >${WRKDIR}/xmdomain.cfg.5
- pod2man ${WRKSRC}/../docs/man/xm.pod.1 |\
- sed -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
- >${WRKDIR}/xm.1
-
-.if ${OPSYS} == "NetBSD"
-post-build:
- cd ${FILESDIR}; for src in *-nbsd; do \
- dst="$${src%-nbsd}"; \
- ${SED} -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g" \
- -e "s|@PREFIX@|${PREFIX}|g" \
- $$src > ${WRKSRC}/examples/$$dst; \
- done
- ${CC} ${CFLAGS} ${LDFLAGS} \
- -DVBD_SCRIPT=\"${PKG_SYSCONFDIR}/scripts/block\" \
- -DLOG_FILE=\"${VARBASE}/log/xenbackendd.log\" \
- -DPID_FILE=\"${VARBASE}/run/xenbackendd.pid\" \
- -o ${WRKDIR}/xenbackendd.bin ${FILESDIR}/xenbackendd.c \
- -I${WRKSRC}/libxc -I${WRKSRC}/include -L${WRKSRC}/libxc \
- -I${WRKSRC}/xenstore -L${WRKSRC}/xenstore \
- -lxenctrl -lxenstore
-
-.endif
-
-INSTALLATION_DIRS= ${EGDIR} ${PKGMANDIR}/man5
-
-post-install:
- ${INSTALL_PROGRAM} ${WRKDIR}/xenbackendd.bin \
- ${DESTDIR}${PREFIX}/sbin/xenbackendd
- for f in xend-config.sxp xmexample1 xmexample2 xmexample3 netbsd1; do \
- ${INSTALL_DATA} ${WRKSRC}/examples/$$f ${DESTDIR}${EGDIR}/$$f; \
- done
-.for s in ${XEND_SCRIPTS}
- ${INSTALL_SCRIPT} ${WRKSRC}/examples/${s} ${DESTDIR}${EGDIR}/${s}
-.endfor
- ${INSTALL_DATA} ${WRKDIR}/xend-config.sxp.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
- ${INSTALL_DATA} ${WRKDIR}/xmdomain.cfg.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
- ${INSTALL_DATA} ${WRKDIR}/xm.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
- for f in hvm qemu-ifup; do \
- ${INSTALL_DATA} ${WRKSRC}/examples/$$f ${DESTDIR}${EGDIR}/$$f; \
- done
-
-.include "../../lang/python/application.mk"
-.include "../../lang/python/extension.mk"
-.include "../../textproc/py-xml/buildlink3.mk"
-.include "../../devel/ncurses/buildlink3.mk"
-#.include "../../devel/SDL/buildlink3.mk"
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xentools33/PLIST b/sysutils/xentools33/PLIST
deleted file mode 100644
index 816761d5bf7..00000000000
--- a/sysutils/xentools33/PLIST
+++ /dev/null
@@ -1,552 +0,0 @@
-@comment $NetBSD: PLIST,v 1.11 2014/03/11 14:05:16 jperkin Exp $
-bin/lsevtchn
-bin/pygrub
-bin/readnotes
-bin/xc_restore
-bin/xc_save
-bin/xen-detect
-bin/xencons
-bin/xenconsole
-bin/xenctx
-bin/xenstore
-bin/xenstore-chmod
-bin/xenstore-control
-bin/xenstore-exists
-bin/xenstore-list
-bin/xenstore-ls
-bin/xenstore-read
-bin/xenstore-rm
-bin/xenstore-write
-bin/xentrace
-bin/xentrace_format
-bin/xentrace_setsize
-include/blktaplib.h
-include/flask.h
-include/fsimage.h
-include/fsimage_grub.h
-include/fsimage_plugin.h
-include/xen/COPYING
-include/xen/arch-ia64.h
-include/xen/arch-ia64/debug_op.h
-include/xen/arch-ia64/hvm/memmap.h
-include/xen/arch-ia64/hvm/save.h
-include/xen/arch-ia64/sioemu.h
-include/xen/arch-x86/cpuid.h
-include/xen/arch-x86/hvm/save.h
-include/xen/arch-x86/xen-mca.h
-include/xen/arch-x86/xen-x86_32.h
-include/xen/arch-x86/xen-x86_64.h
-include/xen/arch-x86/xen.h
-include/xen/arch-x86_32.h
-include/xen/arch-x86_64.h
-include/xen/callback.h
-include/xen/dom0_ops.h
-include/xen/domctl.h
-include/xen/elfnote.h
-include/xen/elfstructs.h
-include/xen/event_channel.h
-include/xen/features.h
-include/xen/foreign/ia64.h
-include/xen/foreign/x86_32.h
-include/xen/foreign/x86_64.h
-include/xen/grant_table.h
-include/xen/hvm/e820.h
-include/xen/hvm/hvm_info_table.h
-include/xen/hvm/hvm_op.h
-include/xen/hvm/ioreq.h
-include/xen/hvm/params.h
-include/xen/hvm/save.h
-include/xen/io/blkif.h
-include/xen/io/console.h
-include/xen/io/fbif.h
-include/xen/io/fsif.h
-include/xen/io/kbdif.h
-include/xen/io/netif.h
-include/xen/io/pciif.h
-include/xen/io/protocols.h
-include/xen/io/ring.h
-include/xen/io/tpmif.h
-include/xen/io/xenbus.h
-include/xen/io/xs_wire.h
-include/xen/kexec.h
-include/xen/libelf.h
-include/xen/memory.h
-include/xen/nmi.h
-include/xen/physdev.h
-include/xen/platform.h
-include/xen/sched.h
-include/xen/sys/evtchn.h
-include/xen/sys/privcmd.h
-include/xen/sysctl.h
-include/xen/trace.h
-include/xen/vcpu.h
-include/xen/version.h
-include/xen/xen-compat.h
-include/xen/xen.h
-include/xen/xencomm.h
-include/xen/xenoprof.h
-include/xen/xsm/acm.h
-include/xen/xsm/acm_ops.h
-include/xen/xsm/flask_op.h
-include/xenctrl.h
-include/xenguest.h
-include/xs.h
-include/xs_lib.h
-lib/fs/ext2fs/fsimage.so
-lib/fs/fat/fsimage.so
-lib/fs/iso9660/fsimage.so
-lib/fs/reiserfs/fsimage.so
-lib/fs/ufs/fsimage.so
-lib/fs/zfs/fsimage.so
-lib/libblktap.a
-lib/libblktap.so
-lib/libblktap.so.3.0
-lib/libblktap.so.3.0.0
-lib/libflask.a
-lib/libflask.so
-lib/libflask.so.1.0
-lib/libflask.so.1.0.0
-lib/libfsimage.so
-lib/libfsimage.so.1.0
-lib/libfsimage.so.1.0.0
-lib/libxenctrl.a
-lib/libxenctrl.so
-lib/libxenctrl.so.3.2
-lib/libxenctrl.so.3.2.0
-lib/libxenguest.a
-lib/libxenguest.so
-lib/libxenguest.so.3.2
-lib/libxenguest.so.3.2.0
-lib/libxenstore.a
-lib/libxenstore.so
-lib/libxenstore.so.3.0
-lib/libxenstore.so.3.0.0
-${PYSITELIB}/fsimage.so
-${PYSITELIB}/grub/GrubConf.py
-${PYSITELIB}/grub/GrubConf.pyc
-${PYSITELIB}/grub/LiloConf.py
-${PYSITELIB}/grub/LiloConf.pyc
-${PYSITELIB}/grub/__init__.py
-${PYSITELIB}/grub/__init__.pyc
-${PYSITELIB}/xen/__init__.py
-${PYSITELIB}/xen/__init__.pyc
-${PYSITELIB}/xen/lowlevel/__init__.py
-${PYSITELIB}/xen/lowlevel/__init__.pyc
-${PYSITELIB}/xen/lowlevel/acm.so
-${PYSITELIB}/xen/lowlevel/flask.so
-${PYSITELIB}/xen/lowlevel/ptsname.so
-${PYSITELIB}/xen/lowlevel/xc.so
-${PYSITELIB}/xen/lowlevel/xs.so
-${PYSITELIB}/xen/sv/CreateDomain.py
-${PYSITELIB}/xen/sv/CreateDomain.pyc
-${PYSITELIB}/xen/sv/DomInfo.py
-${PYSITELIB}/xen/sv/DomInfo.pyc
-${PYSITELIB}/xen/sv/GenTabbed.py
-${PYSITELIB}/xen/sv/GenTabbed.pyc
-${PYSITELIB}/xen/sv/HTMLBase.py
-${PYSITELIB}/xen/sv/HTMLBase.pyc
-${PYSITELIB}/xen/sv/Main.py
-${PYSITELIB}/xen/sv/Main.pyc
-${PYSITELIB}/xen/sv/NodeInfo.py
-${PYSITELIB}/xen/sv/NodeInfo.pyc
-${PYSITELIB}/xen/sv/RestoreDomain.py
-${PYSITELIB}/xen/sv/RestoreDomain.pyc
-${PYSITELIB}/xen/sv/Wizard.py
-${PYSITELIB}/xen/sv/Wizard.pyc
-${PYSITELIB}/xen/sv/__init__.py
-${PYSITELIB}/xen/sv/__init__.pyc
-${PYSITELIB}/xen/sv/util.py
-${PYSITELIB}/xen/sv/util.pyc
-${PYSITELIB}/xen/util/Brctl.py
-${PYSITELIB}/xen/util/Brctl.pyc
-${PYSITELIB}/xen/util/SSHTransport.py
-${PYSITELIB}/xen/util/SSHTransport.pyc
-${PYSITELIB}/xen/util/__init__.py
-${PYSITELIB}/xen/util/__init__.pyc
-${PYSITELIB}/xen/util/acmpolicy.py
-${PYSITELIB}/xen/util/acmpolicy.pyc
-${PYSITELIB}/xen/util/asserts.py
-${PYSITELIB}/xen/util/asserts.pyc
-${PYSITELIB}/xen/util/auxbin.py
-${PYSITELIB}/xen/util/auxbin.pyc
-${PYSITELIB}/xen/util/blkif.py
-${PYSITELIB}/xen/util/blkif.pyc
-${PYSITELIB}/xen/util/bootloader.py
-${PYSITELIB}/xen/util/bootloader.pyc
-${PYSITELIB}/xen/util/bugtool.py
-${PYSITELIB}/xen/util/bugtool.pyc
-${PYSITELIB}/xen/util/diagnose.py
-${PYSITELIB}/xen/util/diagnose.pyc
-${PYSITELIB}/xen/util/dictio.py
-${PYSITELIB}/xen/util/dictio.pyc
-${PYSITELIB}/xen/util/ip.py
-${PYSITELIB}/xen/util/ip.pyc
-${PYSITELIB}/xen/util/mac.py
-${PYSITELIB}/xen/util/mac.pyc
-${PYSITELIB}/xen/util/mkdir.py
-${PYSITELIB}/xen/util/mkdir.pyc
-${PYSITELIB}/xen/util/oshelp.py
-${PYSITELIB}/xen/util/oshelp.pyc
-${PYSITELIB}/xen/util/pci.py
-${PYSITELIB}/xen/util/pci.pyc
-${PYSITELIB}/xen/util/utils.py
-${PYSITELIB}/xen/util/utils.pyc
-${PYSITELIB}/xen/util/vscsi_util.py
-${PYSITELIB}/xen/util/vscsi_util.pyc
-${PYSITELIB}/xen/util/xmlrpcclient.py
-${PYSITELIB}/xen/util/xmlrpcclient.pyc
-${PYSITELIB}/xen/util/xmlrpclib2.py
-${PYSITELIB}/xen/util/xmlrpclib2.pyc
-${PYSITELIB}/xen/util/xpopen.py
-${PYSITELIB}/xen/util/xpopen.pyc
-${PYSITELIB}/xen/util/xsconstants.py
-${PYSITELIB}/xen/util/xsconstants.pyc
-${PYSITELIB}/xen/util/xsm/__init__.py
-${PYSITELIB}/xen/util/xsm/__init__.pyc
-${PYSITELIB}/xen/util/xsm/acm/__init__.py
-${PYSITELIB}/xen/util/xsm/acm/__init__.pyc
-${PYSITELIB}/xen/util/xsm/acm/acm.py
-${PYSITELIB}/xen/util/xsm/acm/acm.pyc
-${PYSITELIB}/xen/util/xsm/dummy/__init__.py
-${PYSITELIB}/xen/util/xsm/dummy/__init__.pyc
-${PYSITELIB}/xen/util/xsm/dummy/dummy.py
-${PYSITELIB}/xen/util/xsm/dummy/dummy.pyc
-${PYSITELIB}/xen/util/xsm/flask/__init__.py
-${PYSITELIB}/xen/util/xsm/flask/__init__.pyc
-${PYSITELIB}/xen/util/xsm/flask/flask.py
-${PYSITELIB}/xen/util/xsm/flask/flask.pyc
-${PYSITELIB}/xen/util/xsm/xsm.py
-${PYSITELIB}/xen/util/xsm/xsm.pyc
-${PYSITELIB}/xen/util/xsm/xsm_core.py
-${PYSITELIB}/xen/util/xsm/xsm_core.pyc
-${PYSITELIB}/xen/util/xspolicy.py
-${PYSITELIB}/xen/util/xspolicy.pyc
-${PYSITELIB}/xen/web/SrvBase.py
-${PYSITELIB}/xen/web/SrvBase.pyc
-${PYSITELIB}/xen/web/SrvDir.py
-${PYSITELIB}/xen/web/SrvDir.pyc
-${PYSITELIB}/xen/web/__init__.py
-${PYSITELIB}/xen/web/__init__.pyc
-${PYSITELIB}/xen/web/connection.py
-${PYSITELIB}/xen/web/connection.pyc
-${PYSITELIB}/xen/web/http.py
-${PYSITELIB}/xen/web/http.pyc
-${PYSITELIB}/xen/web/httpserver.py
-${PYSITELIB}/xen/web/httpserver.pyc
-${PYSITELIB}/xen/web/protocol.py
-${PYSITELIB}/xen/web/protocol.pyc
-${PYSITELIB}/xen/web/resource.py
-${PYSITELIB}/xen/web/resource.pyc
-${PYSITELIB}/xen/web/static.py
-${PYSITELIB}/xen/web/static.pyc
-${PYSITELIB}/xen/web/tcp.py
-${PYSITELIB}/xen/web/tcp.pyc
-${PYSITELIB}/xen/web/unix.py
-${PYSITELIB}/xen/web/unix.pyc
-${PYSITELIB}/xen/xend/Args.py
-${PYSITELIB}/xen/xend/Args.pyc
-${PYSITELIB}/xen/xend/PrettyPrint.py
-${PYSITELIB}/xen/xend/PrettyPrint.pyc
-${PYSITELIB}/xen/xend/Vifctl.py
-${PYSITELIB}/xen/xend/Vifctl.pyc
-${PYSITELIB}/xen/xend/XendAPI.py
-${PYSITELIB}/xen/xend/XendAPI.pyc
-${PYSITELIB}/xen/xend/XendAPIConstants.py
-${PYSITELIB}/xen/xend/XendAPIConstants.pyc
-${PYSITELIB}/xen/xend/XendAPIStore.py
-${PYSITELIB}/xen/xend/XendAPIStore.pyc
-${PYSITELIB}/xen/xend/XendAPIVersion.py
-${PYSITELIB}/xen/xend/XendAPIVersion.pyc
-${PYSITELIB}/xen/xend/XendAuthSessions.py
-${PYSITELIB}/xen/xend/XendAuthSessions.pyc
-${PYSITELIB}/xen/xend/XendBase.py
-${PYSITELIB}/xen/xend/XendBase.pyc
-${PYSITELIB}/xen/xend/XendBootloader.py
-${PYSITELIB}/xen/xend/XendBootloader.pyc
-${PYSITELIB}/xen/xend/XendCheckpoint.py
-${PYSITELIB}/xen/xend/XendCheckpoint.pyc
-${PYSITELIB}/xen/xend/XendClient.py
-${PYSITELIB}/xen/xend/XendClient.pyc
-${PYSITELIB}/xen/xend/XendConfig.py
-${PYSITELIB}/xen/xend/XendConfig.pyc
-${PYSITELIB}/xen/xend/XendConstants.py
-${PYSITELIB}/xen/xend/XendConstants.pyc
-${PYSITELIB}/xen/xend/XendDPCI.py
-${PYSITELIB}/xen/xend/XendDPCI.pyc
-${PYSITELIB}/xen/xend/XendDevices.py
-${PYSITELIB}/xen/xend/XendDevices.pyc
-${PYSITELIB}/xen/xend/XendDmesg.py
-${PYSITELIB}/xen/xend/XendDmesg.pyc
-${PYSITELIB}/xen/xend/XendDomain.py
-${PYSITELIB}/xen/xend/XendDomain.pyc
-${PYSITELIB}/xen/xend/XendDomainInfo.py
-${PYSITELIB}/xen/xend/XendDomainInfo.pyc
-${PYSITELIB}/xen/xend/XendError.py
-${PYSITELIB}/xen/xend/XendError.pyc
-${PYSITELIB}/xen/xend/XendLocalStorageRepo.py
-${PYSITELIB}/xen/xend/XendLocalStorageRepo.pyc
-${PYSITELIB}/xen/xend/XendLogging.py
-${PYSITELIB}/xen/xend/XendLogging.pyc
-${PYSITELIB}/xen/xend/XendMonitor.py
-${PYSITELIB}/xen/xend/XendMonitor.pyc
-${PYSITELIB}/xen/xend/XendNetwork.py
-${PYSITELIB}/xen/xend/XendNetwork.pyc
-${PYSITELIB}/xen/xend/XendNode.py
-${PYSITELIB}/xen/xend/XendNode.pyc
-${PYSITELIB}/xen/xend/XendOptions.py
-${PYSITELIB}/xen/xend/XendOptions.pyc
-${PYSITELIB}/xen/xend/XendPBD.py
-${PYSITELIB}/xen/xend/XendPBD.pyc
-${PYSITELIB}/xen/xend/XendPIF.py
-${PYSITELIB}/xen/xend/XendPIF.pyc
-${PYSITELIB}/xen/xend/XendPIFMetrics.py
-${PYSITELIB}/xen/xend/XendPIFMetrics.pyc
-${PYSITELIB}/xen/xend/XendPPCI.py
-${PYSITELIB}/xen/xend/XendPPCI.pyc
-${PYSITELIB}/xen/xend/XendProtocol.py
-${PYSITELIB}/xen/xend/XendProtocol.pyc
-${PYSITELIB}/xen/xend/XendQCoWStorageRepo.py
-${PYSITELIB}/xen/xend/XendQCoWStorageRepo.pyc
-${PYSITELIB}/xen/xend/XendStateStore.py
-${PYSITELIB}/xen/xend/XendStateStore.pyc
-${PYSITELIB}/xen/xend/XendStorageRepository.py
-${PYSITELIB}/xen/xend/XendStorageRepository.pyc
-${PYSITELIB}/xen/xend/XendTask.py
-${PYSITELIB}/xen/xend/XendTask.pyc
-${PYSITELIB}/xen/xend/XendTaskManager.py
-${PYSITELIB}/xen/xend/XendTaskManager.pyc
-${PYSITELIB}/xen/xend/XendVDI.py
-${PYSITELIB}/xen/xend/XendVDI.pyc
-${PYSITELIB}/xen/xend/XendVMMetrics.py
-${PYSITELIB}/xen/xend/XendVMMetrics.pyc
-${PYSITELIB}/xen/xend/XendVnet.py
-${PYSITELIB}/xen/xend/XendVnet.pyc
-${PYSITELIB}/xen/xend/XendXSPolicy.py
-${PYSITELIB}/xen/xend/XendXSPolicy.pyc
-${PYSITELIB}/xen/xend/XendXSPolicyAdmin.py
-${PYSITELIB}/xen/xend/XendXSPolicyAdmin.pyc
-${PYSITELIB}/xen/xend/__init__.py
-${PYSITELIB}/xen/xend/__init__.pyc
-${PYSITELIB}/xen/xend/arch.py
-${PYSITELIB}/xen/xend/arch.pyc
-${PYSITELIB}/xen/xend/balloon.py
-${PYSITELIB}/xen/xend/balloon.pyc
-${PYSITELIB}/xen/xend/encode.py
-${PYSITELIB}/xen/xend/encode.pyc
-${PYSITELIB}/xen/xend/image.py
-${PYSITELIB}/xen/xend/image.pyc
-${PYSITELIB}/xen/xend/osdep.py
-${PYSITELIB}/xen/xend/osdep.pyc
-${PYSITELIB}/xen/xend/server/BlktapController.py
-${PYSITELIB}/xen/xend/server/BlktapController.pyc
-${PYSITELIB}/xen/xend/server/ConsoleController.py
-${PYSITELIB}/xen/xend/server/ConsoleController.pyc
-${PYSITELIB}/xen/xend/server/DevController.py
-${PYSITELIB}/xen/xend/server/DevController.pyc
-${PYSITELIB}/xen/xend/server/SSLXMLRPCServer.py
-${PYSITELIB}/xen/xend/server/SSLXMLRPCServer.pyc
-${PYSITELIB}/xen/xend/server/SrvDaemon.py
-${PYSITELIB}/xen/xend/server/SrvDaemon.pyc
-${PYSITELIB}/xen/xend/server/SrvDmesg.py
-${PYSITELIB}/xen/xend/server/SrvDmesg.pyc
-${PYSITELIB}/xen/xend/server/SrvDomain.py
-${PYSITELIB}/xen/xend/server/SrvDomain.pyc
-${PYSITELIB}/xen/xend/server/SrvDomainDir.py
-${PYSITELIB}/xen/xend/server/SrvDomainDir.pyc
-${PYSITELIB}/xen/xend/server/SrvNode.py
-${PYSITELIB}/xen/xend/server/SrvNode.pyc
-${PYSITELIB}/xen/xend/server/SrvRoot.py
-${PYSITELIB}/xen/xend/server/SrvRoot.pyc
-${PYSITELIB}/xen/xend/server/SrvServer.py
-${PYSITELIB}/xen/xend/server/SrvServer.pyc
-${PYSITELIB}/xen/xend/server/SrvVnetDir.py
-${PYSITELIB}/xen/xend/server/SrvVnetDir.pyc
-${PYSITELIB}/xen/xend/server/SrvXendLog.py
-${PYSITELIB}/xen/xend/server/SrvXendLog.pyc
-${PYSITELIB}/xen/xend/server/XMLRPCServer.py
-${PYSITELIB}/xen/xend/server/XMLRPCServer.pyc
-${PYSITELIB}/xen/xend/server/__init__.py
-${PYSITELIB}/xen/xend/server/__init__.pyc
-${PYSITELIB}/xen/xend/server/blkif.py
-${PYSITELIB}/xen/xend/server/blkif.pyc
-${PYSITELIB}/xen/xend/server/iopif.py
-${PYSITELIB}/xen/xend/server/iopif.pyc
-${PYSITELIB}/xen/xend/server/irqif.py
-${PYSITELIB}/xen/xend/server/irqif.pyc
-${PYSITELIB}/xen/xend/server/netif.py
-${PYSITELIB}/xen/xend/server/netif.pyc
-${PYSITELIB}/xen/xend/server/params.py
-${PYSITELIB}/xen/xend/server/params.pyc
-${PYSITELIB}/xen/xend/server/pciif.py
-${PYSITELIB}/xen/xend/server/pciif.pyc
-${PYSITELIB}/xen/xend/server/pciquirk.py
-${PYSITELIB}/xen/xend/server/pciquirk.pyc
-${PYSITELIB}/xen/xend/server/relocate.py
-${PYSITELIB}/xen/xend/server/relocate.pyc
-${PYSITELIB}/xen/xend/server/tests/__init__.py
-${PYSITELIB}/xen/xend/server/tests/__init__.pyc
-${PYSITELIB}/xen/xend/server/tests/test_controllers.py
-${PYSITELIB}/xen/xend/server/tests/test_controllers.pyc
-${PYSITELIB}/xen/xend/server/tpmif.py
-${PYSITELIB}/xen/xend/server/tpmif.pyc
-${PYSITELIB}/xen/xend/server/vfbif.py
-${PYSITELIB}/xen/xend/server/vfbif.pyc
-${PYSITELIB}/xen/xend/server/vscsiif.py
-${PYSITELIB}/xen/xend/server/vscsiif.pyc
-${PYSITELIB}/xen/xend/sxp.py
-${PYSITELIB}/xen/xend/sxp.pyc
-${PYSITELIB}/xen/xend/tests/__init__.py
-${PYSITELIB}/xen/xend/tests/__init__.pyc
-${PYSITELIB}/xen/xend/tests/test_XendConfig.py
-${PYSITELIB}/xen/xend/tests/test_XendConfig.pyc
-${PYSITELIB}/xen/xend/tests/test_sxp.py
-${PYSITELIB}/xen/xend/tests/test_sxp.pyc
-${PYSITELIB}/xen/xend/tests/test_uuid.py
-${PYSITELIB}/xen/xend/tests/test_uuid.pyc
-${PYSITELIB}/xen/xend/uuid.py
-${PYSITELIB}/xen/xend/uuid.pyc
-${PYSITELIB}/xen/xend/xenstore/__init__.py
-${PYSITELIB}/xen/xend/xenstore/__init__.pyc
-${PYSITELIB}/xen/xend/xenstore/tests/__init__.py
-${PYSITELIB}/xen/xend/xenstore/tests/__init__.pyc
-${PYSITELIB}/xen/xend/xenstore/tests/stress_xs.py
-${PYSITELIB}/xen/xend/xenstore/tests/stress_xs.pyc
-${PYSITELIB}/xen/xend/xenstore/xstransact.py
-${PYSITELIB}/xen/xend/xenstore/xstransact.pyc
-${PYSITELIB}/xen/xend/xenstore/xsutil.py
-${PYSITELIB}/xen/xend/xenstore/xsutil.pyc
-${PYSITELIB}/xen/xend/xenstore/xswatch.py
-${PYSITELIB}/xen/xend/xenstore/xswatch.pyc
-${PYSITELIB}/xen/xm/XenAPI.py
-${PYSITELIB}/xen/xm/XenAPI.pyc
-${PYSITELIB}/xen/xm/__init__.py
-${PYSITELIB}/xen/xm/__init__.pyc
-${PYSITELIB}/xen/xm/addlabel.py
-${PYSITELIB}/xen/xm/addlabel.pyc
-${PYSITELIB}/xen/xm/console.py
-${PYSITELIB}/xen/xm/console.pyc
-${PYSITELIB}/xen/xm/create.py
-${PYSITELIB}/xen/xm/create.pyc
-${PYSITELIB}/xen/xm/dry-run.py
-${PYSITELIB}/xen/xm/dry-run.pyc
-${PYSITELIB}/xen/xm/dumppolicy.py
-${PYSITELIB}/xen/xm/dumppolicy.pyc
-${PYSITELIB}/xen/xm/getlabel.py
-${PYSITELIB}/xen/xm/getlabel.pyc
-${PYSITELIB}/xen/xm/getpolicy.py
-${PYSITELIB}/xen/xm/getpolicy.pyc
-${PYSITELIB}/xen/xm/help.py
-${PYSITELIB}/xen/xm/help.pyc
-${PYSITELIB}/xen/xm/labels.py
-${PYSITELIB}/xen/xm/labels.pyc
-${PYSITELIB}/xen/xm/main.py
-${PYSITELIB}/xen/xm/main.pyc
-${PYSITELIB}/xen/xm/migrate.py
-${PYSITELIB}/xen/xm/migrate.pyc
-${PYSITELIB}/xen/xm/new.py
-${PYSITELIB}/xen/xm/new.pyc
-${PYSITELIB}/xen/xm/opts.py
-${PYSITELIB}/xen/xm/opts.pyc
-${PYSITELIB}/xen/xm/resetpolicy.py
-${PYSITELIB}/xen/xm/resetpolicy.pyc
-${PYSITELIB}/xen/xm/resources.py
-${PYSITELIB}/xen/xm/resources.pyc
-${PYSITELIB}/xen/xm/rmlabel.py
-${PYSITELIB}/xen/xm/rmlabel.pyc
-${PYSITELIB}/xen/xm/setpolicy.py
-${PYSITELIB}/xen/xm/setpolicy.pyc
-${PYSITELIB}/xen/xm/shutdown.py
-${PYSITELIB}/xen/xm/shutdown.pyc
-${PYSITELIB}/xen/xm/tests/__init__.py
-${PYSITELIB}/xen/xm/tests/__init__.pyc
-${PYSITELIB}/xen/xm/tests/test_create.py
-${PYSITELIB}/xen/xm/tests/test_create.pyc
-${PYSITELIB}/xen/xm/xenapi_create.py
-${PYSITELIB}/xen/xm/xenapi_create.pyc
-${PYSITELIB}/xen/xsview/__init__.py
-${PYSITELIB}/xen/xsview/__init__.pyc
-${PYSITELIB}/xen/xsview/main.py
-${PYSITELIB}/xen/xsview/main.pyc
-${PYSITELIB}/xen/xsview/xsviewer.py
-${PYSITELIB}/xen/xsview/xsviewer.pyc
-lib/xen/boot/hvmloader
-libexec/qemu-dm
-libexec/qemu-dm.debug
-man/man1/xentop.1
-man/man1/xentrace_format.1
-man/man1/xm.1
-man/man5/xend-config.sxp.5
-man/man5/xmdomain.cfg.5
-man/man8/xentrace.8
-sbin/blktapctrl
-sbin/flask-loadpolicy
-sbin/fs-backend
-sbin/img2qcow
-sbin/qcow-create
-sbin/qcow2raw
-sbin/tapdisk
-sbin/tapdisk-ioemu
-sbin/xen-bugtool
-sbin/xen-python-path
-sbin/xenbackendd
-sbin/xenbaked
-sbin/xenconsoled
-sbin/xend
-sbin/xenmon.py
-sbin/xenperf
-sbin/xenpm
-sbin/xenstored
-sbin/xentop
-sbin/xentrace_setmask
-sbin/xm
-sbin/xsview
-share/doc/xen/README.blktap
-share/doc/xen/README.xenmon
-share/examples/xen/block
-share/examples/xen/formats
-share/examples/xen/hvm
-share/examples/xen/${LOWER_OPSYS}1
-share/examples/xen/qemu-ifup
-share/examples/xen/vif-bridge
-share/examples/xen/vif-ip
-share/examples/xen/xen-subr
-share/examples/xen/xend-config.sxp
-share/examples/xen/xmexample1
-share/examples/xen/xmexample2
-share/examples/xen/xmexample3
-share/xen/create.dtd
-share/xen/qemu/keymaps/ar
-share/xen/qemu/keymaps/common
-share/xen/qemu/keymaps/da
-share/xen/qemu/keymaps/de
-share/xen/qemu/keymaps/de-ch
-share/xen/qemu/keymaps/en-gb
-share/xen/qemu/keymaps/en-us
-share/xen/qemu/keymaps/es
-share/xen/qemu/keymaps/et
-share/xen/qemu/keymaps/fi
-share/xen/qemu/keymaps/fo
-share/xen/qemu/keymaps/fr
-share/xen/qemu/keymaps/fr-be
-share/xen/qemu/keymaps/fr-ca
-share/xen/qemu/keymaps/fr-ch
-share/xen/qemu/keymaps/hr
-share/xen/qemu/keymaps/hu
-share/xen/qemu/keymaps/is
-share/xen/qemu/keymaps/it
-share/xen/qemu/keymaps/ja
-share/xen/qemu/keymaps/lt
-share/xen/qemu/keymaps/lv
-share/xen/qemu/keymaps/mk
-share/xen/qemu/keymaps/modifiers
-share/xen/qemu/keymaps/nl
-share/xen/qemu/keymaps/nl-be
-share/xen/qemu/keymaps/no
-share/xen/qemu/keymaps/pl
-share/xen/qemu/keymaps/pt
-share/xen/qemu/keymaps/pt-br
-share/xen/qemu/keymaps/ru
-share/xen/qemu/keymaps/sl
-share/xen/qemu/keymaps/sv
-share/xen/qemu/keymaps/th
-share/xen/qemu/keymaps/tr
diff --git a/sysutils/xentools33/distinfo b/sysutils/xentools33/distinfo
deleted file mode 100644
index bd84eadd0dc..00000000000
--- a/sysutils/xentools33/distinfo
+++ /dev/null
@@ -1,68 +0,0 @@
-$NetBSD: distinfo,v 1.32 2016/05/18 21:24:44 joerg Exp $
-
-SHA1 (xen-3.3.2.tar.gz) = 7f438e73ac81b25cf5e1570709e87001066bafe4
-RMD160 (xen-3.3.2.tar.gz) = 28faa56286f2a418e35dcba6079570ea871d6c7b
-SHA512 (xen-3.3.2.tar.gz) = e080dd9599a6bdd91be924c87316ac1ed825040d258c07ebf6035d84f909b5f81b7b0e4383b358b561a5aba6bff6940d2e8013f6e2ca503f428bdf377820911c
-Size (xen-3.3.2.tar.gz) = 11357576 bytes
-SHA1 (patch-.._xen_patch-common_libelf_libelf-private.h) = b115b0118f932b15c653c131c0c9c9885e2480ff
-SHA1 (patch-CVE-2011-1583) = c9f59d9fbb20f0cb76733a4c2d136a67253cae0a
-SHA1 (patch-aa) = 74c3023e39baf488f8bae060e93f6175b32df61a
-SHA1 (patch-ab) = 393c908858c81e526462a07de9b38fb449d294c3
-SHA1 (patch-ac) = 70af1b1a787b9dad9e41a2ffe14d595c6797b4d7
-SHA1 (patch-ad) = ccd63ed718e5ba3a742f181ae84af82e85f2f0c4
-SHA1 (patch-ae) = bb7116a71bf6637591b639511f055836a13d9887
-SHA1 (patch-af) = 0d4cd2bc3c56934bd072bc72b34e5ed677d04969
-SHA1 (patch-ag) = 6b6c26c5fbb28b9cc37e76b250cc90fed111e78a
-SHA1 (patch-ah) = cc8d95c73d7f4a08f311e8417d26f53ffd010549
-SHA1 (patch-ai) = 0906a5ec3a7450fc987b01289e2560e60966d00d
-SHA1 (patch-aj) = 64c87cd4d1d22af745043bc66b4fbab884920278
-SHA1 (patch-ak) = 17deee0790c25513efe15656389905658a9adaa5
-SHA1 (patch-al) = fc25048cf5bdf7d293f0f634890620576d8f4b11
-SHA1 (patch-ba) = e1ac8768dd1676262309b422799adde7f151b3e2
-SHA1 (patch-bb) = dacb9f95908c07c066d5a7c3ceff8a3c10537d27
-SHA1 (patch-bc) = ea31de81114f52dd9d06f2510c1555d641570784
-SHA1 (patch-bd) = 15e87f1e15e92d15099c4d62123df36b6aa23b18
-SHA1 (patch-be) = 7567a4430b18399cd69f9088803567dfe7b20c9a
-SHA1 (patch-bf) = 51f4b08ccaa3e6c062a489d8e4a7a6a5ccdb221a
-SHA1 (patch-bg) = 0121c07ddc67b6801cdd15488bc681378a466949
-SHA1 (patch-bh) = a072c1e2dd21aa284303b5fcc7eae5ff841a5fbc
-SHA1 (patch-bi) = 49c1b77b451b63cfe3a1fded7f6d0410d4c3cf92
-SHA1 (patch-bj) = 4c6b6a73d3ea5fb2c57b12dd4651f59024119276
-SHA1 (patch-bk) = a79256edc3dc2a5f4bcdbe1a2d14037ad74f11de
-SHA1 (patch-blktap_drivers_block-qcow.c) = 035411d811171fea46c8dec6534018370ef22e14
-SHA1 (patch-blktaplib_h) = a37ecaaefcd694be54bb75163339650be69f9250
-SHA1 (patch-ca) = b62ec8f0db5e65d737d1aaf3bd44580f5969328b
-SHA1 (patch-cb) = 9b7834e367a1820f28c0c1053d3f351751a12283
-SHA1 (patch-cc) = 598f7cda0e3137188f97605037b0b1c26ae8d0c0
-SHA1 (patch-cd) = 5563a72e203e789a86f4166c71ddb3fcff5215c6
-SHA1 (patch-ce) = 24d71f68a93b59bd5c5441c257d34862e7302040
-SHA1 (patch-cf) = 055af260b497cbfaa5732f05267526e9fb1d1536
-SHA1 (patch-cg) = 1f6ec716a101256274b6fff47b825271403a1ee0
-SHA1 (patch-da) = f05d504ea9160af781f82652308fbb98c7925a8f
-SHA1 (patch-db) = 6e9e9d0e06716990c1532968aed97fe8a3877869
-SHA1 (patch-dc) = fdbe8e8c5f4f00b6c5212d429e830af5dc51d92b
-SHA1 (patch-dd) = e94a0ff0c0d30f7441675f52b5f13e575f09dff8
-SHA1 (patch-de) = 3e08b61cc625cfd1a4eaacbd4a325a28ce315919
-SHA1 (patch-df) = 46b99d00c6562c41e5fd96df8dbcb0653c1baa46
-SHA1 (patch-ea) = 4c5cd6bd798488c13a264b567a67aa7cb5f8a2e4
-SHA1 (patch-eb) = cf63c43ccbc6b7b435be871e392f9729bd392ab4
-SHA1 (patch-ec) = ec7745d92a74a7101391e07508a4ede9a72fd1d1
-SHA1 (patch-ed) = 613f4c4605af860e5f88b68c49a0e7870ba6ecde
-SHA1 (patch-ee) = 119029fda1d4ecee90d0a108151596cb3ef0ec74
-SHA1 (patch-ef) = c8740b1c9cfac686f2e4e32c7613b5f02206459d
-SHA1 (patch-eg) = 84e816c95167828314ef901e324772249a407c41
-SHA1 (patch-fa) = b4a4b7334357ebcd1646886c18c9772e8b9ae765
-SHA1 (patch-fb) = 22a07628566b43aa786c410927d29a283e8cf141
-SHA1 (patch-fc) = d5afc1a1e16f26203a5615142efda8fade48b371
-SHA1 (patch-fd) = 619b865b2f17814e6e62ebab21de9183474dd075
-SHA1 (patch-fe) = 85d42672766fe8ce2dc7f745938722710c6ee5a3
-SHA1 (patch-ff) = 6ff97fa4f34f29c276e4aaab4b4db9ccf7b09957
-SHA1 (patch-fg) = 913295d341c1dd5bf4d1ef78f27520920f138d4c
-SHA1 (patch-fs-back_Makefile) = ef6908d5f9fa33817f1b029a75badb6fe49ad653
-SHA1 (patch-io_ring_h) = 83b01462d5d2b48b4f97b3d9a7980aa3300ad0b3
-SHA1 (patch-ioemu_block-vvfat.c) = 4e6d998fe2c006bb68caaf8e1d11e641319ff5c2
-SHA1 (patch-libfsimage_ufs_ufs.h) = dc59f33cf3abd08a8cdee5977ca4168613327513
-SHA1 (patch-python_xen_util_xmlrpcclient.py) = 2f983bc67930b86b538743dab6bc81d9aacc6b35
-SHA1 (patch-python_xen_util_xmlrpclib2.py) = 4977ebd86c7d76e1dc861c0f839c506446e384a5
-SHA1 (patch-qemu-e1000-CVSE-2012-0029) = 8628504e1dfd013254f816cb4feeb7548b9ad2ec
-SHA1 (patch-qemu-phy-devices) = 29790e45372ae16157e906dc39a667229e8a0ba5
diff --git a/sysutils/xentools33/files/blk_netbsd.c b/sysutils/xentools33/files/blk_netbsd.c
deleted file mode 100644
index 81076a25a4d..00000000000
--- a/sysutils/xentools33/files/blk_netbsd.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <inttypes.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include "tapdisk.h"
-#include "blk.h"
-
-int blk_getimagesize(int fd, uint64_t *size)
-{
- int rc;
- struct disklabel dl;
-
- *size = 0;
- rc = ioctl(fd, DIOCGDINFO, &dl);
- if (rc) {
- DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image");
- return -EINVAL;
- }
-
- *size = dl.d_secsize * dl.d_secpercyl;
-
- return 0;
-}
-
-int blk_getsectorsize(int fd, uint64_t *sector_size)
-{
- int rc;
- struct disklabel dl;
-
- *sector_size = DEV_BSIZE;
- rc = ioctl(fd, DIOCGDINFO, &dl);
- if (rc) {
- DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image");
- return 0; /* fallback to DEV_BSIZE */
- }
-
- *sector_size = dl.d_secsize;
- return 0;
-}
-
diff --git a/sysutils/xentools33/files/blktapctrl_netbsd.c b/sysutils/xentools33/files/blktapctrl_netbsd.c
deleted file mode 100644
index 02a1e9f3018..00000000000
--- a/sysutils/xentools33/files/blktapctrl_netbsd.c
+++ /dev/null
@@ -1,16 +0,0 @@
-
-#include "blktaplib.h"
-#include "blktapctrl.h"
-
-
-int blktap_interface_open(void)
-{
- /* not yet implemented */
- return -1;
-}
-
-int blktap_interface_create(int ctlfd, int *major, int *minor, blkif_t *blkif)
-{
- /* not yet implemented */
- return -1;
-}
diff --git a/sysutils/xentools33/files/block-nbsd b/sysutils/xentools33/files/block-nbsd
deleted file mode 100644
index ba96e54dddf..00000000000
--- a/sysutils/xentools33/files/block-nbsd
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh -e
-
-# $NetBSD: block-nbsd,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $
-# Called by xenbackendd
-# Usage: block xsdir_backend_path state
-
-PATH=/bin:/usr/bin:@PREFIX@/bin:/sbin:/usr/sbin:@PREFIX@/sbin
-export PATH
-
-error() {
- echo "$@" >&2
- xenstore_write $xpath/hotplug-status error
- exit 1
-}
-
-
-xpath=$1
-xstatus=$2
-xtype=$(xenstore-read "$xpath/type")
-xparams=$(xenstore-read "$xpath/params")
-
-case $xstatus in
-6)
- # device removed
- case $xtype in
- file)
- vnd=$(xenstore-read "$xpath/vnd" || echo none)
- if [ $vnd != none ]; then
- vnconfig -u $vnd
- fi
- ;;
- phy)
- ;;
- *)
- echo "unknown type $xtype" >&2
- ;;
- esac
- xenstore-rm $xpath
- exit 0
- ;;
-2)
- case $xtype in
- file)
- # Store the list of available vnd(4) devices in
- #``available_disks'', and mark them as ``free''.
- list=`ls -1 /dev/vnd[0-9]*d | sed "s,/dev/vnd,,;s,d,," | sort -n`
- for i in $list; do
- disk="vnd$i"
- available_disks="$available_disks $disk"
- eval $disk=free
- done
- # Mark the used vnd(4) devices as ``used''.
- for disk in `sysctl hw.disknames`; do
- case $disk in
- vnd[0-9]*) eval $disk=used ;;
- esac
- done
- # Configure the first free vnd(4) device.
- for disk in $available_disks; do
- eval status=\$$disk
- if [ "$status" = "free" ] && \
- vnconfig /dev/${disk}d $xparams >/dev/null; then
- device=/dev/${disk}d
- echo vnconfig /dev/${disk}d $xparams
- break
- fi
- done
- if [ x$device = x ] ; then
- error "no available vnd device"
- fi
- echo xenstore-write $xpath/vnd $device
- xenstore-write $xpath/vnd $device
- ;;
- phy)
- device=$xparams
- ;;
- esac
- physical_device=$(stat -f '%r' "$device")
- echo xenstore-write $xpath/physical-device $physical_device
- xenstore-write $xpath/physical-device $physical_device
- echo xenstore-write $xpath/hotplug-status connected
- xenstore-write $xpath/hotplug-status connected
- exit 0
- ;;
-*)
- exit 0
- ;;
-esac
diff --git a/sysutils/xentools33/files/hvm-nbsd b/sysutils/xentools33/files/hvm-nbsd
deleted file mode 100644
index 2ff8181f827..00000000000
--- a/sysutils/xentools33/files/hvm-nbsd
+++ /dev/null
@@ -1,68 +0,0 @@
-#============================================================================
-# Python configuration setup for 'xm create'.
-# This script sets the parameters used when a domain is created using 'xm create'.
-# You use a separate script for each domain you want to create, or
-# you can set the parameters for the domain on the xm command line.
-#============================================================================
-
-#----------------------------------------------------------------------------
-# Kernel image file.
-kernel = "@PREFIX@/lib/xen/boot/hvmloader"
-
-builder='hvm'
-
-# Initial memory allocation (in megabytes) for the new domain.
-memory = 256
-
-# A name for your domain. All domains must have different names.
-name = "hvm"
-
-#Network interface. By default emules a realtek 8139. For a NetBSD guest you
-# have to disable re(4) and let rtk attach to use it.
-# ne2k_pci emulates a pci ne2000 clone; this his cpu-hungry in dom0
-# pcnet emulates a AMD PCnet-PCI controller; but it corrupts packets with
-# pcn(4) under NetBSD.
-#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=ne2k_pci' ]
-#vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu, model=pcnet' ]
-vif = [ 'mac=00:16:3e:00:00:13, bridge=bridge0, type=ioemu' ]
-
-#----------------------------------------------------------------------------
-# device model to use: only qemu-dm available for now
-device_model = '/usr/pkg/libexec/qemu-dm'
-
-# Define the disk devices you want the domain to have access to, and
-# what you want them accessible as.
-# Each disk entry is of the form phy:UNAME,DEV,MODE
-# where UNAME is the device, DEV is the device name the domain will see,
-# and MODE is r for read-only, w for read-write.
-# For hvm domains you can only use hda to hdd. You can set extra types
-# (e.g. cdrom)
-
-disk = [ 'file:/home/domains/vmx,ioemu:hda,w', 'file:/home/domains/i386cd.iso,ioemu:hdc:cdrom,r' ]
-
-# floppy images; this doesn't seem to work currently. Use a iso image instead.
-#fda = '/home/domains/boot1.fs'
-
-# boot device: a = floppy, c= hard drive, d= cdrom (with the disk entry
-# before)
-boot='d'
-
-# By default, 'xm create' will try to open an X window on the current display
-# for the virtal framebuffer. You can have the virtal framebuffer in vnc
-# instead, and connect using a vnc client (using localhost:$vncdisplay)
-# If vncunused is set to 1 (this is the default value), vncdisplay
-# will be set to the first unused port; so it's recommended to
-#vnc = 1
-#vncdisplay = 0
-#vncunused = 0
-
-#Xen emulates a PS/2 mouse, but the pointer in the guest has difficulties
-# tracking the absolute position. Xen can emulate a USB tablet in addition
-# to the mouse which will report the absolute position of the pointer,
-# and make the mouse much easier to use.
-#
-usb=1
-usbdevice='tablet'
-#usbdevice='mouse'
-
-#============================================================================
diff --git a/sysutils/xentools33/files/netbsd1-nbsd b/sysutils/xentools33/files/netbsd1-nbsd
deleted file mode 100644
index 0072c880172..00000000000
--- a/sysutils/xentools33/files/netbsd1-nbsd
+++ /dev/null
@@ -1,48 +0,0 @@
-# -*- mode: python; -*-
-#============================================================================
-# Python configuration setup for 'xm create'.
-# This script sets the parameters used when a domain is created using 'xm create'.
-# You use a separate script for each domain you want to create, or
-# you can set the parameters for the domain on the xm command line.
-#============================================================================
-
-#----------------------------------------------------------------------------
-# Kernel image file.
-kernel = "/usr/pkg/etc/xen/kernels/netbsd-XEN3_DOMU.gz"
-#kernel = "/usr/pkg/etc/xen/kernels/netbsd-INSTALL_XEN3_DOMU.gz"
-
-# Initial memory allocation (in megabytes) for the new domain.
-memory = 256
-
-# A name for your domain. All domains must have different names.
-name = "netbsd1"
-
-#----------------------------------------------------------------------------
-# network configuration.
-# The mac address is optional, it will use a random one if not specified.
-# By default we create a bridged configuration; when a vif is created
-# the script @PKG_SYSCONFDIR@/scripts/vif-bridge is called to connect
-# the bridge to the designated bridge (the bridge should already be up)
-vif = [ 'mac=00:16:3e:00:00:11, bridge=bridge0' ]
-
-#it's possible to use a different script when the vif is created;
-# for example to use a routed setup instead of bridged:
-# vif = [ 'mac=00:16:3e:00:00:11, ip=10.0.0.1 netmask 255.255.255.0, script=vif-ip' ]
-
-#----------------------------------------------------------------------------
-# Define the disk devices you want the domain to have access to, and
-# what you want them accessible as.
-# Each disk entry is of the form phy:UNAME,DEV,MODE
-# where UNAME is the device, DEV is the device name the domain will see,
-# and MODE is r for read-only, w for read-write.
-# For NetBSD guest DEV doesn't matter, so we can just use increasing numbers
-# here. For linux guests you have to use a linux device name (e.g. hda1)
-# or the corresponding device number (e.g 0x301 for hda1)
-
-disk = [ 'file:/home/domains/netbsd1,0x1,w' ]
-
-#----------------------------------------------------------------------------
-# Boot parameters (e.g. -s, -a, ...)
-extra = ""
-
-#============================================================================
diff --git a/sysutils/xentools33/files/qemu-ifup-nbsd b/sysutils/xentools33/files/qemu-ifup-nbsd
deleted file mode 100755
index eee78765d67..00000000000
--- a/sysutils/xentools33/files/qemu-ifup-nbsd
+++ /dev/null
@@ -1,3 +0,0 @@
-#!/bin/sh
-ifconfig $1 up
-exec /sbin/brconfig $2 add $1
diff --git a/sysutils/xentools33/files/vif-bridge-nbsd b/sysutils/xentools33/files/vif-bridge-nbsd
deleted file mode 100644
index 662f2fe09d0..00000000000
--- a/sysutils/xentools33/files/vif-bridge-nbsd
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh -e
-
-# $NetBSD: vif-bridge-nbsd,v 1.2 2011/01/12 00:12:14 jym Exp $
-# Called by xenbackendd
-# Usage: vif-bridge xsdir_backend_path state
-
-dir=$(dirname $0)
-. "$dir/xen-subr"
-
-PATH=/bin:/usr/bin:@PREFIX@/bin:/sbin:/usr/sbin:@PREFIX@/sbin
-export PATH
-
-xpath=$1
-xstatus=$2
-
-case $xstatus in
-6)
- # device removed
- xenstore-rm $xpath
- exit 0
- ;;
-2)
- xbridge=$(xenstore-read "$xpath/bridge")
- xfid=$(xenstore-read "$xpath/frontend-id")
- xhandle=$(xenstore-read "$xpath/handle")
- iface=$(xenstore_read_default "$xpath/vifname" "xvif$xfid.$xhandle")
- echo ifconfig $iface up
- ifconfig $iface up
- brconfig $xbridge add $iface
- echo brconfig $xbridge add $iface
- xenstore-write $xpath/hotplug-status connected
- echo xenstore-write $xpath/hotplug-status connected
- exit 0
- ;;
-*)
- exit 0
- ;;
-esac
diff --git a/sysutils/xentools33/files/vif-ip-nbsd b/sysutils/xentools33/files/vif-ip-nbsd
deleted file mode 100755
index 6b5b985d158..00000000000
--- a/sysutils/xentools33/files/vif-ip-nbsd
+++ /dev/null
@@ -1,36 +0,0 @@
-#!/bin/sh -e
-
-# $NetBSD: vif-ip-nbsd,v 1.2 2011/01/12 00:12:14 jym Exp $
-# Called by xenbackendd
-# Usage: vif-ip xsdir_backend_path state
-
-dir=$(dirname $0)
-. "$dir/xen-subr"
-
-PATH=/bin:/usr/bin:@PREFIX@/bin:/sbin:/usr/sbin:@PREFIX@/sbin
-export PATH
-
-xpath=$1
-xstatus=$2
-
-case $xstatus in
-6)
- # device removed
- xenstore-rm $xpath
- exit 0
- ;;
-2)
- xip=$(xenstore-read "$xpath/ip")
- xfid=$(xenstore-read "$xpath/frontend-id")
- xhandle=$(xenstore-read "$xpath/handle")
- iface=$(xenstore_read_default "$xpath/vifname" "xvif$xfid.$xhandle")
- echo ifconfig $iface $xip up
- ifconfig $iface $xip up
- xenstore-write $xpath/hotplug-status connected
- echo xenstore-write $xpath/hotplug-status connected
- exit 0
- ;;
-*)
- exit 0
- ;;
-esac
diff --git a/sysutils/xentools33/files/xen-subr-nbsd b/sysutils/xentools33/files/xen-subr-nbsd
deleted file mode 100644
index f0235fad828..00000000000
--- a/sysutils/xentools33/files/xen-subr-nbsd
+++ /dev/null
@@ -1,11 +0,0 @@
-# $NetBSD: xen-subr-nbsd,v 1.1 2011/01/12 00:12:14 jym Exp $
-#
-# Contains commonly used functions which are used by Xen scripts
-
-# xenstore_read_default path default
-#
-# Read the given path in XenStore. Return default if path does not exist
-#
-xenstore_read_default() {
- xenstore-read "$1" 2>/dev/null || echo "$2"
-}
diff --git a/sysutils/xentools33/files/xenbackendd.c b/sysutils/xentools33/files/xenbackendd.c
deleted file mode 100644
index 3eee3c0592f..00000000000
--- a/sysutils/xentools33/files/xenbackendd.c
+++ /dev/null
@@ -1,319 +0,0 @@
-/* $NetBSD: xenbackendd.c,v 1.1.1.1 2008/08/07 20:26:57 cegger Exp $ */
-/*
- * Copyright (C) 2006 Manuel bouyer
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; under version 2 of the License.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <fcntl.h>
-#include <err.h>
-#include <errno.h>
-#include <stdio.h>
-#include <getopt.h>
-#include <stdbool.h>
-#include <sys/socket.h>
-#include <sys/un.h>
-#include <string.h>
-#include <syslog.h>
-#include <stdarg.h>
-
-#include <xenctrl.h>
-#include <xs.h>
-
-#define DEVTYPE_UNKNOWN 0
-#define DEVTYPE_VIF 1
-#define DEVTYPE_VBD 2
-
-#define DOMAIN_PATH "/local/domain/0"
-
-#ifndef VBD_SCRIPT
-#define VBD_SCRIPT "/usr/pkg/etc/xen/scripts/block"
-#endif
-#ifndef LOG_FILE
-#define LOG_FILE "/var/log/xenbackendd.log"
-#endif
-#ifndef PID_FILE
-#define PID_FILE "/var/run/xenbackendd.pid"
-#endif
-
-
-struct xs_handle *xs;
-int xc;
-
-int xen_setup(void);
-void dolog(int, const char *, ...);
-void dodebug(const char *, ...);
-void doexec(const char *, const char *, const char *);
-void usage(void);
-
-int fflag = 0;
-int dflag = 0;
-
-const char *vbd_script = NULL;
-const char *log_file = NULL;
-const char *pidfile = NULL;
-int
-main(int argc, char * const argv[])
-{
- char **vec;
- unsigned int num;
- int i;
- char *s;
- int state;
- char *sstate;
- char *p;
- char buf[80];
- int type = DEVTYPE_UNKNOWN;
- extern char *optarg;
- extern int optind;
- int ch;
- int debug_fd;
- FILE *pidfile_f;
-
- while ((ch = getopt(argc, argv, "dfl:p:s:")) != -1) {
- switch (ch) {
- case 'd':
- dflag = 1;
- break;
- case 'f':
- fflag = 1;
- break;
- case 'l':
- log_file = optarg;
- break;
- case 'p':
- pidfile = pidfile;
- case 's':
- vbd_script = optarg;
- break;
- default:
- usage();
- }
- }
-
- if (vbd_script == NULL)
- vbd_script = VBD_SCRIPT;
- if (pidfile == NULL)
- pidfile = PID_FILE;
- if (log_file == NULL)
- log_file = LOG_FILE;
-
- openlog("xenbackendd", LOG_PID | LOG_NDELAY, LOG_DAEMON);
-
- if (fflag == 0) {
- /* open log file */
- debug_fd = open(log_file, O_RDWR | O_CREAT | O_TRUNC, 0644);
- if (debug_fd == -1) {
- dolog(LOG_ERR, "can't open %s: %s",
- log_file, strerror(errno));
- exit(1);
- }
- }
-
- if (fflag == 0) {
- /* daemonize */
- pidfile_f = fopen(pidfile, "w");
- if (pidfile_f == NULL) {
- dolog(LOG_ERR, "can't open %s: %s",
- pidfile, strerror(errno));
- exit(1);
- }
- if (daemon(0, 0) < 0) {
- dolog(LOG_ERR, "can't daemonize: %s",
- strerror(errno));
- exit(1);
- }
- fprintf(pidfile_f, "%d\n", (int)getpid());
- fclose(pidfile_f);
- /* retirect stderr to log file */
- if (dup2(debug_fd, STDERR_FILENO) < 0) {
- dolog(LOG_ERR, "can't redirect stderr to %s: %s\n",
- log_file, strerror(errno));
- exit(1);
- }
- /* also redirect stdout if we're in debug mode */
- if (dflag) {
- if (dup2(debug_fd, STDOUT_FILENO) < 0) {
- dolog(LOG_ERR,
- "can't redirect stdout to %s: %s\n",
- log_file, strerror(errno));
- exit(1);
- }
- }
- close(debug_fd);
- debug_fd = -1;
- }
-
- if (xen_setup() < 0) {
- exit(1);
- }
-
- while (1) {
- vec = xs_read_watch(xs, &num);
- if (!vec) {
- dolog(LOG_ERR, "xs_read_watch: NULL\n");
- continue;
- }
- if (strlen(vec[XS_WATCH_PATH]) < sizeof("state"))
- goto next1;
- /* find last component of path, check if it's "state" */
- p = &vec[XS_WATCH_PATH][
- strlen(vec[XS_WATCH_PATH]) - sizeof("state")];
- if (p[0] != '/')
- goto next1;
- p[0] = '\0';
- p++;
- if (strcmp(p, "state") != 0)
- goto next1;
- snprintf(buf, sizeof(buf), "%s/state", vec[XS_WATCH_PATH]);
- sstate = xs_read(xs, XBT_NULL, buf, 0);
- if (sstate == NULL) {
- dolog(LOG_ERR,
- "Failed to read %s (%s)", buf, strerror(errno));
- goto next1;
- }
- state = atoi(sstate);
- snprintf(buf, sizeof(buf), "%s/hotplug-status",
- vec[XS_WATCH_PATH]);
- s = xs_read(xs, XBT_NULL, buf, 0);
- if (s != NULL && state != 6 /* XenbusStateClosed */)
- goto next2;
- if (strncmp(vec[XS_WATCH_PATH],
- DOMAIN_PATH "/backend/vif",
- strlen(DOMAIN_PATH "/backend/vif")) == 0)
- type = DEVTYPE_VIF;
- if (strncmp(vec[XS_WATCH_PATH],
- DOMAIN_PATH "/backend/vbd",
- strlen(DOMAIN_PATH "/backend/vbd")) == 0)
- type = DEVTYPE_VBD;
- switch(type) {
- case DEVTYPE_VIF:
- if (s)
- free(s);
- snprintf(buf, sizeof(buf), "%s/script",
- vec[XS_WATCH_PATH]);
- s = xs_read(xs, XBT_NULL, buf, 0);
- if (s == NULL) {
- dolog(LOG_ERR,
- "Failed to read %s (%s)", buf,
- strerror(errno));
- goto next2;
- }
- doexec(s, vec[XS_WATCH_PATH], sstate);
- break;
- case DEVTYPE_VBD:
- doexec(vbd_script, vec[XS_WATCH_PATH], sstate);
- break;
- default:
- break;
- }
-next2:
- if (s)
- free(s);
- free(sstate);
-next1:
- free(vec);
- }
-}
-
-void
-dolog(int pri, const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- vfprintf(stderr, fmt, ap);
- va_end(ap);
- fprintf(stderr, "\n");
- fflush(stderr);
- va_start(ap, fmt);
- vsyslog(pri, fmt, ap);
- va_end(ap);
-}
-
-void
-dodebug(const char *fmt, ...)
-{
- va_list ap;
-
- if (dflag == 0)
- return;
- va_start(ap, fmt);
- vfprintf(stdout, fmt, ap);
- va_end(ap);
- printf("\n");
- fflush(stdout);
-}
-
-int
-xen_setup(void)
-{
-
- xs = xs_daemon_open();
- if (xs == NULL) {
- dolog(LOG_ERR,
- "Failed to contact xenstore (%s). Is it running?",
- strerror(errno));
- goto out;
- }
-
- xc = xc_interface_open();
- if (xc == -1) {
- dolog(LOG_ERR, "Failed to contact hypervisor (%s)",
- strerror(errno));
- goto out;
- }
- if (!xs_watch(xs, DOMAIN_PATH, "backend")) {
- dolog(LOG_ERR, "xenstore watch on backend fails.");
- goto out;
- }
- return 0;
- out:
- if (xs)
- xs_daemon_close(xs);
- if (xc != -1)
- xc_interface_close(xc);
- return -1;
-}
-
-void
-doexec(const char *cmd, const char *arg1, const char *arg2)
-{
- dodebug("exec %s %s %s", cmd, arg1, arg2);
- switch(vfork()) {
- case -1:
- dolog(LOG_ERR, "can't vfork: %s", strerror(errno));
- break;
- case 0:
- execl(cmd, cmd, arg1, arg2, NULL);
- dolog(LOG_ERR, "can't exec %s: %s", cmd, strerror(errno));
- exit(1);
- break;
- default:
- wait(NULL);
- break;
- }
-}
-
-void
-usage(void)
-{
- fprintf(stderr, "usage: %s [-d] [-f] [-l log_file] [-p pif_file] [-s vbd_script]\n",
- getprogname());
- exit(1);
-}
diff --git a/sysutils/xentools33/files/xenbackendd.sh b/sysutils/xentools33/files/xenbackendd.sh
deleted file mode 100644
index b0951df1314..00000000000
--- a/sysutils/xentools33/files/xenbackendd.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD: xenbackendd.sh,v 1.2 2011/10/07 22:37:06 shattered Exp $
-#
-
-# PROVIDE: xenbackendd
-# REQUIRE: xend
-
-$_rc_subr_loaded . /etc/rc.subr
-
-name="xenbackendd"
-rcvar=$name
-command="@PREFIX@/sbin/${name}"
-pidfile="/var/run/${name}.pid"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/sysutils/xentools33/files/xend.sh b/sysutils/xentools33/files/xend.sh
deleted file mode 100644
index 60cf916825d..00000000000
--- a/sysutils/xentools33/files/xend.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD: xend.sh,v 1.2 2009/01/17 12:31:10 bouyer Exp $
-#
-# PROVIDE: xend
-# REQUIRE: DAEMON
-
-. /etc/rc.subr
-
-name="xend"
-rcvar=$name
-command="@PREFIX@/sbin/xend"
-command_interpreter="@RCD_INTERPRETER@"
-start_cmd="@ECHO@ Starting ${name}. && PATH=${PATH}:@PREFIX@/sbin ${command} start"
-start_precmd="xen_precmd"
-privcmd_path="@PROCPATH@/xen/privcmd"
-
-xen_precmd()
-{
- if [ ! -f ${privcmd_path} ]; then
- @ECHO@ "${name}: Cannot find ${privcmd_path}!"
- exit 1
- fi
- mkdir -p /var/run/xend || exit 1
- mkdir -p /var/run/xend/boot || exit 1
- mkdir -p /var/run/xenstored || exit 1
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/sysutils/xentools33/files/xendomains.sh b/sysutils/xentools33/files/xendomains.sh
deleted file mode 100644
index 8108d8b8a33..00000000000
--- a/sysutils/xentools33/files/xendomains.sh
+++ /dev/null
@@ -1,136 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# $NetBSD: xendomains.sh,v 1.2 2012/07/16 22:55:25 jym Exp $
-#
-# PROVIDE: xendomains
-# REQUIRE: xenbackendd
-# KEYWORD: shutdown
-#
-# xendomains This required variable is a whitespace-separated
-# list of domains, e.g., xendomains="dom1 dom2 dom3".
-#
-# xendomains_config This optional variable is a format string that
-# represents the path to the configuration file for
-# each domain. "%s" is substituted with the name of
-# the domain. The default is "@PKG_SYSCONFDIR@/%s".
-#
-# xendomains_prehook This optional variable is a format string that
-# represents the command to run, if it exists, before
-# starting each domain. "%s" is substituted with the
-# name of the domain. The default is
-# "@PKG_SYSCONFDIR@/%s-pre".
-#
-# xendomains_posthook This optional variable is a format string that
-# represents the command to run, if it exists, after
-# stopping each domain. "%s" is substituted with the
-# name of the domain. The default is
-# "@PKG_SYSCONFDIR@/%s-post".
-#
-
-. /etc/rc.subr
-
-name="xendomains"
-ctl_command="@PREFIX@/sbin/xm"
-start_cmd="xendomains_start"
-stop_cmd="xendomains_stop"
-list_cmd="xendomains_list"
-extra_commands="list"
-privcmd_path="@PROCPATH@/xen/privcmd"
-
-xendomains_start()
-{
- [ -n "$xendomains" ] || return
-
- if [ ! -f ${privcmd_path} ]; then
- echo "${name}: Cannot find ${privcmd_path}!"
- exit 1
- fi
-
- echo "Starting xen domains."
- for domain in $xendomains; do
- case "$domain" in
- "") continue ;;
- esac
-
- # Start off by running the pre-hook script if it's present.
- if [ -n "${xendomains_prehook}" ]; then
- cmdline=`printf "${xendomains_prehook}" $domain`
- cmd="${cmdline%% *}"
- if [ -x "$cmd" ]; then
- if ! $cmdline; then
- echo "Pre-hook \`\`$cmdline'' failed... skipping $domain."
- continue
- fi
- fi
- fi
-
- # Ask xend to create the domain.
- if [ -n "${xendomains_config}" ]; then
- file=`printf "${xendomains_config}" $domain`
- if [ -f "$file" ]; then
- ${ctl_command} create "$file"
- fi
- fi
- done
-}
-
-xendomains_list() {
- # Output a whitespace-separated list of live guest domains.
- ${ctl_command} list | awk '
- (FNR <= 2) { next }
- ($5 !~ /s/) { s = s " " $1 }
- END { sub(" *", "", s); print s }'
-}
-
-xendomains_stop()
-{
- # Determine an appropriate timeout waiting for all domains to
- # stop -- always wait at least 60s, and add 5s per active domain.
- #
- numdomains=$(xendomains_list | awk '{ print NF }')
- [ $numdomains -gt 0 ] || return
- timeout=$((60 + numdomains * 5))
-
- # Ask xend to stop every domain, and poll xend every 10s up to the
- # timeout period to check if all the domains are stopped. We
- # consider a domain in the "s" (shutdown) state to be stopped.
- #
- echo "Stopping xen domains."
- for domain in $(xendomains_list); do
- ${ctl_command} shutdown --halt $domain
- done
- while [ $timeout -gt 0 ]; do
- livedomains=$(xendomains_list)
- [ -n "$livedomains" ] || break
- timeout=$((timeout - 10))
- sleep 10
- done
- livedomains=$(xendomains_list)
- if [ -n "$livedomains" ]; then
- echo "Failed to stop: $livedomains"
- else
- echo "All domains stopped."
- fi
-
- # Finish off by running the post-hook script if it's present.
- for domain in $xendomains; do
- case "$domain" in
- "") continue ;;
- esac
- if [ -n "${xendomains_posthook}" ]; then
- cmdline=`printf "${xendomains_posthook}" $domain`
- cmd="${cmdline%% *}"
- if [ -x "$cmd" ]; then
- $cmdline || echo "Post-hook \`\`$cmdline'' failed."
- fi
- fi
- done
-}
-
-load_rc_config $name
-
-: ${xendomains_config="@PKG_SYSCONFDIR@/%s"}
-: ${xendomains_prehook="@PKG_SYSCONFDIR@/%s-pre"}
-: ${xendomains_posthook="@PKG_SYSCONFDIR@/%s-post"}
-
-run_rc_command "$1"
diff --git a/sysutils/xentools33/patches/patch-.._xen_patch-common_libelf_libelf-private.h b/sysutils/xentools33/patches/patch-.._xen_patch-common_libelf_libelf-private.h
deleted file mode 100644
index 1d4e58613d4..00000000000
--- a/sysutils/xentools33/patches/patch-.._xen_patch-common_libelf_libelf-private.h
+++ /dev/null
@@ -1,10 +0,0 @@
-$NetBSD: patch-.._xen_patch-common_libelf_libelf-private.h,v 1.1 2013/07/19 12:57:51 joerg Exp $
-
---- ../xen/common/libelf/libelf-private.h.orig 2013-07-12 18:07:36.000000000 +0000
-+++ ../xen/common/libelf/libelf-private.h
-@@ -1,4 +1,4 @@
--#ifndef __LIBELF_PRIVATE_H__
-+#ifndef __LIBELF_PRIVATE_H_
- #define __LIBELF_PRIVATE_H_
-
- #ifdef __XEN__
diff --git a/sysutils/xentools33/patches/patch-CVE-2011-1583 b/sysutils/xentools33/patches/patch-CVE-2011-1583
deleted file mode 100644
index 81f63b9c0e7..00000000000
--- a/sysutils/xentools33/patches/patch-CVE-2011-1583
+++ /dev/null
@@ -1,84 +0,0 @@
-$NetBSD: patch-CVE-2011-1583,v 1.1 2011/05/12 15:39:05 bouyer Exp $
-
-from http://lists.xensource.com/archives/html/xen-devel/2011-05/msg00491.html
-
-# HG changeset patch
-# Parent 11931301845c3b4b6a358f2d7246874b1d10c05f
-
-diff -r 11931301845c libxc/xc_dom_bzimageloader.c
---- libxc/xc_dom_bzimageloader.c Mon Mar 14 16:59:49 2011 +0000
-+++ libxc/xc_dom_bzimageloader.c Tue May 03 10:09:28 2011 +0100
-@@ -61,18 +61,18 @@
-
- extern struct xc_dom_loader elf_loader;
-
--static unsigned int payload_offset(struct setup_header *hdr)
-+static int check_magic(struct xc_dom_image *dom, const void *magic, size_t len)
- {
-- unsigned int off;
-+ if (len > dom->kernel_size)
-+ return 0;
-
-- off = (hdr->setup_sects + 1) * 512;
-- off += hdr->payload_offset;
-- return off;
-+ return (memcmp(dom->kernel_blob, magic, len) == 0);
- }
-
- static int check_bzimage_kernel(struct xc_dom_image *dom, int verbose)
- {
- struct setup_header *hdr;
-+ uint64_t payload_offset, payload_length;
-
- if ( dom->kernel_blob == NULL )
- {
-@@ -107,14 +107,43 @@
- return -EINVAL;
- }
-
-- dom->kernel_blob = dom->kernel_blob + payload_offset(hdr);
-- dom->kernel_size = hdr->payload_length;
-
-- if ( xc_dom_try_gunzip(dom, &dom->kernel_blob, &dom->kernel_size) == -1 )
-+ /* upcast to 64 bits to avoid overflow */
-+ /* setup_sects is u8 and so cannot overflow */
-+ payload_offset = (hdr->setup_sects + 1) * 512;
-+ payload_offset += hdr->payload_offset;
-+ payload_length = hdr->payload_length;
-+
-+ if ( payload_offset >= dom->kernel_size )
- {
-- if ( verbose )
-- xc_dom_panic(XC_INVALID_KERNEL, "%s: unable to decompress kernel\n",
-- __FUNCTION__);
-+ xc_dom_panic(XC_INVALID_KERNEL, "%s: payload offset overflow",
-+ __FUNCTION__);
-+ return -EINVAL;
-+ }
-+ if ( (payload_offset + payload_length) > dom->kernel_size )
-+ {
-+ xc_dom_panic(XC_INVALID_KERNEL, "%s: payload length overflow",
-+ __FUNCTION__);
-+ return -EINVAL;
-+ }
-+
-+ dom->kernel_blob = dom->kernel_blob + payload_offset;
-+ dom->kernel_size = payload_length;
-+
-+ if ( check_magic(dom, "\037\213", 2) )
-+ {
-+ if ( xc_dom_try_gunzip(dom, &dom->kernel_blob, &dom->kernel_size) == -1 )
-+ {
-+ if ( verbose )
-+ xc_dom_panic(XC_INVALID_KERNEL, "%s: unable to decompress kernel\n",
-+ __FUNCTION__);
-+ return -EINVAL;
-+ }
-+ }
-+ else
-+ {
-+ xc_dom_panic(XC_INVALID_KERNEL, "%s: unknown compression format\n",
-+ __FUNCTION__);
- return -EINVAL;
- }
-
diff --git a/sysutils/xentools33/patches/patch-aa b/sysutils/xentools33/patches/patch-aa
deleted file mode 100644
index 672f304df49..00000000000
--- a/sysutils/xentools33/patches/patch-aa
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-aa,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ Makefile
-@@ -8,7 +8,6 @@ SUBDIRS-y += libxc
- SUBDIRS-y += flask
- SUBDIRS-y += xenstore
- SUBDIRS-y += misc
--SUBDIRS-y += examples
- SUBDIRS-y += xentrace
- SUBDIRS-$(CONFIG_XCUTILS) += xcutils
- SUBDIRS-$(CONFIG_X86) += firmware
-@@ -47,9 +46,6 @@ all: subdirs-all
-
- .PHONY: install
- install: subdirs-install
-- $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
-- $(INSTALL_DIR) $(DESTDIR)/var/log/xen
-- $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
-
- .PHONY: clean distclean
- clean distclean: subdirs-clean
diff --git a/sysutils/xentools33/patches/patch-ab b/sysutils/xentools33/patches/patch-ab
deleted file mode 100644
index 3b031566afd..00000000000
--- a/sysutils/xentools33/patches/patch-ab
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-ab,v 1.3 2013/04/11 19:57:52 joerg Exp $
-
---- ../Config.mk.orig 2009-08-06 13:17:07.000000000 +0000
-+++ ../Config.mk
-@@ -15,7 +15,7 @@ SHELL ?= /bin/sh
- # Tools to run on system hosting the build
- HOSTCC = gcc
- HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
--HOSTCFLAGS += -fno-strict-aliasing
-+HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS}
-
- DISTDIR ?= $(XEN_ROOT)/dist
- DESTDIR ?= /
-@@ -66,7 +66,7 @@ CFLAGS += -Wall -Wstrict-prototypes
-
- # -Wunused-value makes GCC 4.x too aggressive for my taste: ignoring the
- # result of any casted expression causes a warning.
--CFLAGS += -Wno-unused-value
-+CFLAGS += -Wno-unused-value -Wno-switch
-
- HOSTCFLAGS += $(call cc-option,$(HOSTCC),-Wdeclaration-after-statement,)
- CFLAGS += $(call cc-option,$(CC),-Wdeclaration-after-statement,)
-@@ -74,6 +74,8 @@ CFLAGS += $(call cc-option,$(CC),-Wd
- LDFLAGS += $(foreach i, $(EXTRA_LIB), -L$(i))
- CFLAGS += $(foreach i, $(EXTRA_INCLUDES), -I$(i))
-
-+CFLAGS += $(EXTRA_CFLAGS)
-+
- # Enable XSM security module. Enabling XSM requires selection of an
- # XSM security module (FLASK_ENABLE or ACM_SECURITY).
- XSM_ENABLE ?= n
-@@ -90,7 +92,7 @@ QEMU_REMOTE=http://xenbits.xensource.com
-
- # Specify which qemu-dm to use. This may be `ioemu' to use the old
- # Mercurial in-tree version, or a local directory, or a git URL.
--# CONFIG_QEMU ?= ioemu
-+CONFIG_QEMU ?= ioemu
- # CONFIG_QEMU ?= ../qemu-xen.git
- ifeq ($(XEN_TARGET_ARCH),ia64)
- CONFIG_QEMU ?= ioemu
diff --git a/sysutils/xentools33/patches/patch-ac b/sysutils/xentools33/patches/patch-ac
deleted file mode 100644
index 7efe58ccede..00000000000
--- a/sysutils/xentools33/patches/patch-ac
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-ac,v 1.2 2008/08/19 17:38:09 cegger Exp $
-
---- ../config/NetBSD.mk.orig 2008-08-14 15:26:06.000000000 +0000
-+++ ../config/NetBSD.mk
-@@ -2,3 +2,19 @@ include $(XEN_ROOT)/config/StdGNU.mk
-
- # Override settings for this OS
- CURSES_LIBS = -lcurses
-+
-+DESTDIR ?= ""
-+BINDIR = $(PREFIX)/bin
-+INCLUDEDIR = $(PREFIX)/include
-+LIBLEAFDIR = lib
-+LIBLEAFDIR_x86_64 = lib
-+LIBDIR = $(PREFIX)/$(LIBLEAFDIR)
-+LIBDIR_x86_64 = $(PREFIX)/$(LIBLEAFDIR_x86_64)
-+DOCDIR = $(PREFIX)/share/doc/xen
-+MANDIR = $(PREFIX)/man
-+MAN1DIR = $(MANDIR)/man1
-+MAN8DIR = $(MANDIR)/man8
-+SBINDIR = $(PREFIX)/sbin
-+
-+PRIVATE_PREFIX = $(PREFIX)
-+PRIVATE_BINDIR = $(PRIVATE_PREFIX)/bin
diff --git a/sysutils/xentools33/patches/patch-ad b/sysutils/xentools33/patches/patch-ad
deleted file mode 100644
index 38b4fb86112..00000000000
--- a/sysutils/xentools33/patches/patch-ad
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-ad,v 1.2 2010/01/01 00:34:53 ver Exp $
-
---- console/Makefile.orig 2009-08-06 12:56:32.000000000 +0000
-+++ console/Makefile
-@@ -29,9 +29,9 @@ xenconsole: $(patsubst %.c,%.o,$(wildcar
-
- .PHONY: install
- install: $(BIN)
-- $(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
-- $(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR)
-- $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
-- $(INSTALL_PROG) xenconsole $(DESTDIR)$(PRIVATE_BINDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)/$(SBINDIR)
-+ $(BSD_INSTALL_PROGRAM) xenconsoled $(DESTDIR)/$(SBINDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
-+ $(BSD_INSTALL_PROGRAM) xenconsole $(DESTDIR)$(PRIVATE_BINDIR)
-
- -include $(DEPS)
diff --git a/sysutils/xentools33/patches/patch-ae b/sysutils/xentools33/patches/patch-ae
deleted file mode 100644
index 833d3b9b868..00000000000
--- a/sysutils/xentools33/patches/patch-ae
+++ /dev/null
@@ -1,32 +0,0 @@
-$NetBSD: patch-ae,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- libxc/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ libxc/Makefile
-@@ -94,19 +94,19 @@ libs: $(LIB)
-
- .PHONY: install
- install: build
-- $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-- $(INSTALL_PROG) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-- $(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_LIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_LIB) libxenctrl.a $(DESTDIR)$(LIBDIR)
- ln -sf libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR)
- ln -sf libxenctrl.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so
-- $(INSTALL_DATA) xenctrl.h $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_DATA) xenctrl.h $(DESTDIR)$(INCLUDEDIR)
-
-- $(INSTALL_PROG) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-- $(INSTALL_DATA) libxenguest.a $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_LIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_LIB) libxenguest.a $(DESTDIR)$(LIBDIR)
- ln -sf libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR)
- ln -sf libxenguest.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenguest.so
-- $(INSTALL_DATA) xenguest.h $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_DATA) xenguest.h $(DESTDIR)$(INCLUDEDIR)
-
- .PHONY: TAGS
- TAGS:
diff --git a/sysutils/xentools33/patches/patch-af b/sysutils/xentools33/patches/patch-af
deleted file mode 100644
index 1883b01a0d1..00000000000
--- a/sysutils/xentools33/patches/patch-af
+++ /dev/null
@@ -1,46 +0,0 @@
-$NetBSD: patch-af,v 1.3 2009/08/07 12:49:21 cegger Exp $
-
---- misc/Makefile.orig 2009-08-06 14:56:36.000000000 +0200
-+++ misc/Makefile
-@@ -14,17 +14,21 @@ TARGETS-y := xenperf
- TARGETS-$(CONFIG_X86) += xen-detect xenpm
- TARGETS := $(TARGETS-y)
-
--SUBDIRS-$(CONFIG_LOMOUNT) += lomount
-+#SUBDIRS-$(CONFIG_LOMOUNT) += lomount
- SUBDIRS-$(CONFIG_MINITERM) += miniterm
- SUBDIRS := $(SUBDIRS-y)
-
--INSTALL_BIN-y := xencons
-+INSTALL_BIN-y :=
-+INSTALL_BIN_SCRIPT-y := xencons
- INSTALL_BIN-$(CONFIG_X86) += xen-detect
- INSTALL_BIN := $(INSTALL_BIN-y)
-+INSTALL_BIN_SCRIPT := $(INSTALL_BIN_SCRIPT-y)
-
--INSTALL_SBIN-y := xm xen-bugtool xen-python-path xend xenperf xsview
-+INSTALL_SBIN-y := xenperf
-+INSTALL_SBIN_SCRIPT-y := xm xen-bugtool xen-python-path xend xsview
- INSTALL_SBIN-$(CONFIG_X86) += xenpm
- INSTALL_SBIN := $(INSTALL_SBIN-y)
-+INSTALL_SBIN_SCRIPT := $(INSTALL_SBIN_SCRIPT-y)
-
- DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
- PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH)
-@@ -40,10 +44,12 @@ build: $(TARGETS)
-
- .PHONY: install
- install: build
-- $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-- $(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
-- $(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(BINDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
-+ $(BSD_INSTALL_PROGRAM) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
-+ $(BSD_INSTALL_SCRIPT) $(INSTALL_BIN_SCRIPT) $(DESTDIR)$(BINDIR)
-+ $(BSD_INSTALL_PROGRAM) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
-+ $(BSD_INSTALL_SCRIPT) $(INSTALL_SBIN_SCRIPT) $(DESTDIR)$(SBINDIR)
- set -e; for d in $(SUBDIRS); do $(MAKE) -C $$d install-recurse; done
-
- .PHONY: clean
diff --git a/sysutils/xentools33/patches/patch-ag b/sysutils/xentools33/patches/patch-ag
deleted file mode 100644
index bc7924a6b7f..00000000000
--- a/sysutils/xentools33/patches/patch-ag
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD: patch-ag,v 1.4 2008/09/30 15:08:34 joerg Exp $
-
---- xentrace/Makefile.orig 2008-08-22 09:49:09.000000000 +0000
-+++ xentrace/Makefile
-@@ -14,6 +14,7 @@ LIBBIN =
- SCRIPTS = xentrace_format
- MAN1 = $(wildcard *.1)
- MAN8 = $(wildcard *.8)
-+CONFIGDIR = @XENDCONFDIR@
-
- ifeq ($(XEN_TARGET_ARCH),x86_32)
- LIBBIN += xenctx
-@@ -35,14 +36,16 @@ build: $(BIN) $(LIBBIN)
-
- .PHONY: install
- install: build
-- $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-- [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
-- $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR)
-- $(INSTALL_DIR) $(DESTDIR)$(MAN8DIR)
-- $(INSTALL_PROG) $(BIN) $(SCRIPTS) $(DESTDIR)$(BINDIR)
-- [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR)
-- $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR)
-- $(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(BINDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(MAN1DIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(MAN8DIR)
-+ $(BSD_INSTALL_PROGRAM) $(BIN) $(DESTDIR)$(BINDIR)
-+ $(BSD_INSTALL_LIB) $(SCRIPTS) $(DESTDIR)$(BINDIR)
-+ $(BSD_INSTALL_PROGRAM) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR)
-+ $(BSD_INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR)
-+ $(BSD_INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)
-+ $(BSD_INSTALL_DATA) formats $(DESTDIR)$(PREFIX)/share/examples/xen
-
- .PHONY: clean
- clean:
diff --git a/sysutils/xentools33/patches/patch-ah b/sysutils/xentools33/patches/patch-ah
deleted file mode 100644
index 90e97460691..00000000000
--- a/sysutils/xentools33/patches/patch-ah
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ah,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- xenmon/Makefile.orig 2008-08-07 10:56:22.000000000 +0200
-+++ xenmon/Makefile
-@@ -29,12 +29,12 @@ build: $(BIN)
-
- .PHONY: install
- install: build
-- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-- $(INSTALL_PROG) xenbaked $(DESTDIR)$(SBINDIR)/xenbaked
-- $(INSTALL_PROG) xentrace_setmask $(DESTDIR)$(SBINDIR)/xentrace_setmask
-- $(INSTALL_PROG) xenmon.py $(DESTDIR)$(SBINDIR)/xenmon.py
-- $(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
-- $(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.xenmon
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
-+ $(BSD_INSTALL_PROGRAM) xenbaked $(DESTDIR)$(SBINDIR)/xenbaked
-+ $(BSD_INSTALL_PROGRAM) xentrace_setmask $(DESTDIR)$(SBINDIR)/xentrace_setmask
-+ $(BSD_INSTALL_DATA) xenmon.py $(DESTDIR)$(SBINDIR)/xenmon.py
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(DOCDIR)
-+ $(BSD_INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.xenmon
-
- .PHONY: clean
- clean:
diff --git a/sysutils/xentools33/patches/patch-ai b/sysutils/xentools33/patches/patch-ai
deleted file mode 100644
index b429650b69f..00000000000
--- a/sysutils/xentools33/patches/patch-ai
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ai,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- blktap/drivers/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ blktap/drivers/Makefile
-@@ -37,9 +37,11 @@ BLK-OBJS-y += block-qcow2.o
- BLK-OBJS-y += aes.o
- BLK-OBJS-y += tapaio.o
- BLK-OBJS-$(CONFIG_Linux) += blk_linux.o
-+BLK-OBJS-$(CONFIG_NetBSD) += blk_netbsd.o
-
- BLKTAB-OBJS-y := blktapctrl.o
- BLKTAB-OBJS-$(CONFIG_Linux) += blktapctrl_linux.o
-+BLKTAB-OBJS-$(CONFIG_NetBSD) += blktapctrl_netbsd.o
-
- all: $(IBIN) qcow-util
-
diff --git a/sysutils/xentools33/patches/patch-aj b/sysutils/xentools33/patches/patch-aj
deleted file mode 100644
index 4c9077f9291..00000000000
--- a/sysutils/xentools33/patches/patch-aj
+++ /dev/null
@@ -1,58 +0,0 @@
-$NetBSD: patch-aj,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- libxc/xc_netbsd.c.orig 2008-08-01 16:38:07.000000000 +0200
-+++ libxc/xc_netbsd.c
-@@ -263,6 +263,53 @@ void discard_file_cache(int fd, int flus
- }
- }
-
-+int xc_gnttab_open(void)
-+{
-+ /* implement me */
-+ return -1;
-+}
-+
-+int xc_gnttab_close(int xcg_handle)
-+{
-+ /* implement me */
-+ return -1;
-+}
-+
-+void *xc_gnttab_map_grant_ref(int xcg_handle, uint32_t domid,
-+ uint32_t ref, int prot)
-+{
-+ /* implement me */
-+ return NULL;
-+}
-+
-+void *xc_gnttab_map_grant_refs(int xcg_handle, uint32_t count,
-+ uint32_t *domids, uint32_t *refs, int prot)
-+{
-+ /* implement me */
-+ return NULL;
-+}
-+
-+void *xc_gnttab_map_domain_grant_refs(int xcg_handle,
-+ uint32_t count, uint32_t domid,
-+ uint32_t *refs, int prot)
-+{
-+ /* implement me */
-+ return NULL;
-+}
-+
-+int xc_gnttab_munmap(int xcg_handle, void *start_address, uint32_t count)
-+{
-+ /* implement me */
-+ errno = EINVAL;
-+ return -1;
-+}
-+
-+int xc_gnttab_set_max_grants(int xcg_handle, uint32_t count)
-+{
-+ /* implement me */
-+ return -1;
-+}
-+
- /*
- * Local variables:
- * mode: C
diff --git a/sysutils/xentools33/patches/patch-ak b/sysutils/xentools33/patches/patch-ak
deleted file mode 100644
index e30d5925a42..00000000000
--- a/sysutils/xentools33/patches/patch-ak
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-ak,v 1.1 2010/10/30 20:06:52 tnn Exp $
-
-From emulators/qemu/patches/patch-ee.
-
-qemu-0.13.x will include this fix:
-http://git.qemu.org/qemu.git/commit/?id=9651ac55e5de0e1534d898316cc851af6ffc4334
-
---- ioemu/hw/e1000.c.orig 2009-08-06 12:56:34.000000000 +0000
-+++ ioemu/hw/e1000.c
-@@ -244,16 +244,20 @@ set_eecd(E1000State *s, int index, uint3
-
- s->eecd_state.old_eecd = val & (E1000_EECD_SK | E1000_EECD_CS |
- E1000_EECD_DI|E1000_EECD_FWE_MASK|E1000_EECD_REQ);
-+ if (!(E1000_EECD_CS & val)) // CS inactive; nothing to do
-+ return;
-+ if (E1000_EECD_CS & (val ^ oldval)) { // CS rise edge; reset state
-+ s->eecd_state.val_in = 0;
-+ s->eecd_state.bitnum_in = 0;
-+ s->eecd_state.bitnum_out = 0;
-+ s->eecd_state.reading = 0;
-+ }
- if (!(E1000_EECD_SK & (val ^ oldval))) // no clock edge
- return;
- if (!(E1000_EECD_SK & val)) { // falling edge
- s->eecd_state.bitnum_out++;
- return;
- }
-- if (!(val & E1000_EECD_CS)) { // rising, no CS (EEPROM reset)
-- memset(&s->eecd_state, 0, sizeof s->eecd_state);
-- return;
-- }
- s->eecd_state.val_in <<= 1;
- if (val & E1000_EECD_DI)
- s->eecd_state.val_in |= 1;
diff --git a/sysutils/xentools33/patches/patch-al b/sysutils/xentools33/patches/patch-al
deleted file mode 100644
index 1c300d6a1b2..00000000000
--- a/sysutils/xentools33/patches/patch-al
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-al,v 1.1 2010/12/13 13:37:49 wiz Exp $
-
-Compatibility fix for texi2html-5.0.
-
---- ioemu-qemu-xen/Makefile.orig 2009-08-04 14:53:20.000000000 +0000
-+++ ioemu-qemu-xen/Makefile
-@@ -237,7 +237,7 @@ cscope:
-
- # documentation
- %.html: %.texi
-- texi2html -monolithic -number $<
-+ texi2html -monolithic -number-sections $<
-
- %.info: %.texi
- makeinfo $< -o $@
diff --git a/sysutils/xentools33/patches/patch-ba b/sysutils/xentools33/patches/patch-ba
deleted file mode 100644
index 43e09fea1f5..00000000000
--- a/sysutils/xentools33/patches/patch-ba
+++ /dev/null
@@ -1,45 +0,0 @@
-$NetBSD: patch-ba,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ python/Makefile
-@@ -20,7 +20,7 @@ PODIR := xen/xm/messages
- POTFILE := $(PODIR)/xen-xm.pot
- I18NSRCFILES = $(shell find xen/xm/ -name '*.py')
- CATALOGS = $(patsubst %,xen/xm/messages/%.mo,$(LINGUAS))
--NLSDIR = /usr/share/locale
-+NLSDIR = $(PREFIX)/share/locale
-
- .PHONY: build buildpy
- buildpy: xsm.py
-@@ -77,23 +77,23 @@ xsm.py:
- ifndef XEN_PYTHON_NATIVE_INSTALL
- install: LIBPATH=$(shell PYTHONPATH=xen/util python -c "import auxbin; print auxbin.libpath()")
- install: install-messages install-dtd
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --force --install-lib="$(DESTDIR)$(LIBPATH)/python"
-+ python setup.py install --root=${DESTDIR}
- else
- install: install-messages install-dtd
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)" --force
-+ python setup.py install --root=${DESTDIR}
- endif
-
- install-dtd: all
-- $(INSTALL_DIR) $(DESTDIR)/usr/share/xen
-- $(INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)/usr/share/xen
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(PREFIX)/share/xen
-+ $(BSD_INSTALL_DATA) xen/xm/create.dtd $(DESTDIR)$(PREFIX)/share/xen
-
- install-messages: all
- set -e; if which $(MSGFMT) >/dev/null ; then \
-- mkdir -p $(DESTDIR)$(NLSDIR); \
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(NLSDIR); \
- for l in $(LINGUAS); do \
-- $(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l; \
-- $(INSTALL_DIR) $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES; \
-- $(INSTALL_DATA) $(PODIR)/$$l.mo \
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(NLSDIR)/$$l; \
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES; \
-+ $(BSD_INSTALL_DATA) $(PODIR)/$$l.mo \
- $(DESTDIR)$(NLSDIR)/$$l/LC_MESSAGES/$(POPACKAGE).mo; \
- done ; \
- fi
diff --git a/sysutils/xentools33/patches/patch-bb b/sysutils/xentools33/patches/patch-bb
deleted file mode 100644
index a10755862fb..00000000000
--- a/sysutils/xentools33/patches/patch-bb
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bb,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/xend/XendOptions.py.orig 2008-08-01 16:38:07.000000000 +0200
-+++ python/xen/xend/XendOptions.py
-@@ -362,7 +362,7 @@ class XendOptions:
- class XendOptionsFile(XendOptions):
-
- """Default path to the config file."""
-- config_default = "/etc/xen/xend-config.sxp"
-+ config_default = "@XENDCONFDIR@/xend-config.sxp"
-
- """Environment variable used to override config_default."""
- config_var = "XEND_CONFIG"
diff --git a/sysutils/xentools33/patches/patch-bc b/sysutils/xentools33/patches/patch-bc
deleted file mode 100644
index 8e273507047..00000000000
--- a/sysutils/xentools33/patches/patch-bc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-bc,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/xm/create.py.orig 2008-08-01 16:38:07.000000000 +0200
-+++ python/xen/xm/create.py
-@@ -70,7 +70,7 @@ gopts.opt('quiet', short='q',
- use="Quiet.")
-
- gopts.opt('path', val='PATH',
-- fn=set_value, default='.:/etc/xen',
-+ fn=set_value, default='.:@XENDCONFDIR@',
- use="Search path for configuration scripts. "
- "The value of PATH is a colon-separated directory list.")
-
-@@ -375,7 +375,7 @@ gopts.var('vtpm', val="instance=INSTANCE
- preferred instance number. The hotplug script will determine
- which instance number will actually be assigned to the domain.
- The associtation between virtual machine and the TPM instance
-- number can be found in /etc/xen/vtpm.db. Use the backend in the
-+ number can be found in @XENDCONFDIR@/vtpm.db. Use the backend in the
- given domain.
- The type parameter can be used to select a specific driver type
- that the VM can use. To prevent a fully virtualized domain (HVM)
diff --git a/sysutils/xentools33/patches/patch-bd b/sysutils/xentools33/patches/patch-bd
deleted file mode 100644
index fbba10008b8..00000000000
--- a/sysutils/xentools33/patches/patch-bd
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bd,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/xm/addlabel.py.orig 2008-08-01 16:38:07.000000000 +0200
-+++ python/xen/xm/addlabel.py
-@@ -220,7 +220,7 @@ def main(argv):
- if argv[2].lower() == "dom":
- configfile = argv[3]
- if configfile[0] != '/':
-- for prefix in [os.path.realpath(os.path.curdir), "/etc/xen"]:
-+ for prefix in [os.path.realpath(os.path.curdir), "@XENDCONFDIR@"]:
- configfile = prefix + "/" + configfile
- if os.path.isfile(configfile):
- break
diff --git a/sysutils/xentools33/patches/patch-be b/sysutils/xentools33/patches/patch-be
deleted file mode 100644
index 092480ff20c..00000000000
--- a/sysutils/xentools33/patches/patch-be
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-be,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/xm/getlabel.py.orig 2008-08-01 16:38:07.000000000 +0200
-+++ python/xen/xm/getlabel.py
-@@ -59,7 +59,7 @@ def get_domain_label(configfile):
- if configfile[0] == '/':
- fd = open(configfile, "rb")
- else:
-- for prefix in [".", "/etc/xen"]:
-+ for prefix in [".", "@XENDCONFDIR@"]:
- abs_file = prefix + "/" + configfile
- if os.path.isfile(abs_file):
- fd = open(abs_file, "rb")
diff --git a/sysutils/xentools33/patches/patch-bf b/sysutils/xentools33/patches/patch-bf
deleted file mode 100644
index bb3acc3a704..00000000000
--- a/sysutils/xentools33/patches/patch-bf
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bf,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/xm/rmlabel.py.orig 2008-08-01 16:38:07.000000000 +0200
-+++ python/xen/xm/rmlabel.py
-@@ -81,7 +81,7 @@ def rm_domain_label(configfile):
- fil = configfile
- fd = open(fil, "rb")
- else:
-- for prefix in [".", "/etc/xen"]:
-+ for prefix in [".", "@XENDCONFDIR@"]:
- fil = prefix + "/" + configfile
- if os.path.isfile(fil):
- fd = open(fil, "rb")
diff --git a/sysutils/xentools33/patches/patch-bg b/sysutils/xentools33/patches/patch-bg
deleted file mode 100644
index a612122b7b2..00000000000
--- a/sysutils/xentools33/patches/patch-bg
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-bg,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- xcutils/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ xcutils/Makefile
-@@ -33,8 +33,8 @@ $(PROGRAMS): %: %.o
-
- .PHONY: install
- install: build
-- $(INSTALL_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
-- $(INSTALL_PROG) $(PROGRAMS) $(DESTDIR)$(PRIVATE_BINDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(PRIVATE_BINDIR)
-+ $(BSD_INSTALL_PROGRAM) $(PROGRAMS) $(DESTDIR)$(PRIVATE_BINDIR)
-
-
- .PHONY: clean
diff --git a/sysutils/xentools33/patches/patch-bh b/sysutils/xentools33/patches/patch-bh
deleted file mode 100644
index aa4f54238fe..00000000000
--- a/sysutils/xentools33/patches/patch-bh
+++ /dev/null
@@ -1,19 +0,0 @@
-$NetBSD: patch-bh,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- xenstat/xentop/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ xenstat/xentop/Makefile
-@@ -28,10 +28,10 @@ all: xentop
-
- .PHONY: install
- install: xentop xentop.1
-- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-- $(INSTALL_PROG) xentop $(DESTDIR)$(SBINDIR)/xentop
-- $(INSTALL_DIR) $(DESTDIR)$(MAN1DIR)
-- $(INSTALL_DATA) xentop.1 $(DESTDIR)$(MAN1DIR)/xentop.1
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
-+ $(BSD_INSTALL_PROGRAM) xentop $(DESTDIR)$(SBINDIR)/xentop
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(MAN1DIR)
-+ $(BSD_INSTALL_DATA) xentop.1 $(DESTDIR)$(MAN1DIR)/xentop.1
-
- endif
-
diff --git a/sysutils/xentools33/patches/patch-bi b/sysutils/xentools33/patches/patch-bi
deleted file mode 100644
index c948a34932a..00000000000
--- a/sysutils/xentools33/patches/patch-bi
+++ /dev/null
@@ -1,43 +0,0 @@
-$NetBSD: patch-bi,v 1.2 2009/08/07 12:49:21 cegger Exp $
-
---- xenstore/Makefile.orig 2009-08-06 14:56:38.000000000 +0200
-+++ xenstore/Makefile
-@@ -90,24 +90,24 @@ tarball: clean
-
- .PHONY: install
- install: all
-- $(INSTALL_DIR) $(DESTDIR)/var/run/xenstored
-- $(INSTALL_DIR) $(DESTDIR)/var/lib/xenstored
-- $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-- $(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
-- $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
-- $(INSTALL_PROG) xenstore $(DESTDIR)/usr/bin
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)/var/run/xenstored
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)/var/lib/xenstored
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(BINDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_PROGRAM) xenstored $(DESTDIR)$(SBINDIR)
-+ $(BSD_INSTALL_PROGRAM) xenstore-control $(DESTDIR)$(BINDIR)
-+ $(BSD_INSTALL_PROGRAM) xenstore $(DESTDIR)$(BINDIR)
- set -e ; for c in $(CLIENTS) ; do \
-- ln -f $(DESTDIR)/usr/bin/xenstore $(DESTDIR)/usr/bin/$${c} ; \
-+ ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
- done
-- $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-- $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_LIB) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
- ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
- ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
-- $(INSTALL_DATA) libxenstore.a $(DESTDIR)$(LIBDIR)
-- $(INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR)
-- $(INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_LIB) libxenstore.a $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR)
-
- -include $(DEPS)
-
diff --git a/sysutils/xentools33/patches/patch-bj b/sysutils/xentools33/patches/patch-bj
deleted file mode 100644
index 9d56e6da060..00000000000
--- a/sysutils/xentools33/patches/patch-bj
+++ /dev/null
@@ -1,56 +0,0 @@
-$NetBSD: patch-bj,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/xend/XendNode.py.orig 2008-08-01 14:38:07.000000000 +0000
-+++ python/xen/xend/XendNode.py
-@@ -245,28 +245,29 @@ class XendNode:
- except KeyError:
- pass
-
-- for pci_dev in PciUtil.get_all_pci_devices():
-- ppci_record = {
-- 'domain': pci_dev.domain,
-- 'bus': pci_dev.bus,
-- 'slot': pci_dev.slot,
-- 'func': pci_dev.func,
-- 'vendor_id': pci_dev.vendor,
-- 'vendor_name': pci_dev.vendorname,
-- 'device_id': pci_dev.device,
-- 'device_name': pci_dev.devicename,
-- 'revision_id': pci_dev.revision,
-- 'class_code': pci_dev.classcode,
-- 'class_name': pci_dev.classname,
-- 'subsystem_vendor_id': pci_dev.subvendor,
-- 'subsystem_vendor_name': pci_dev.subvendorname,
-- 'subsystem_id': pci_dev.subdevice,
-- 'subsystem_name': pci_dev.subdevicename,
-- 'driver': pci_dev.driver
-- }
-- # If saved uuid exists, use it. Otherwise create one.
-- ppci_uuid = saved_ppci_table.get(pci_dev.name, uuid.createString())
-- XendPPCI(ppci_uuid, ppci_record)
-+ pass
-+ #for pci_dev in PciUtil.get_all_pci_devices():
-+ # ppci_record = {
-+ # 'domain': pci_dev.domain,
-+ # 'bus': pci_dev.bus,
-+ # 'slot': pci_dev.slot,
-+ # 'func': pci_dev.func,
-+ # 'vendor_id': pci_dev.vendor,
-+ # 'vendor_name': pci_dev.vendorname,
-+ # 'device_id': pci_dev.device,
-+ # 'device_name': pci_dev.devicename,
-+ # 'revision_id': pci_dev.revision,
-+ # 'class_code': pci_dev.classcode,
-+ # 'class_name': pci_dev.classname,
-+ # 'subsystem_vendor_id': pci_dev.subvendor,
-+ # 'subsystem_vendor_name': pci_dev.subvendorname,
-+ # 'subsystem_id': pci_dev.subdevice,
-+ # 'subsystem_name': pci_dev.subdevicename,
-+ # 'driver': pci_dev.driver
-+ # }
-+ # # If saved uuid exists, use it. Otherwise create one.
-+ # ppci_uuid = saved_ppci_table.get(pci_dev.name, uuid.createString())
-+ # XendPPCI(ppci_uuid, ppci_record)
-
-
- ## def network_destroy(self, net_uuid):
diff --git a/sysutils/xentools33/patches/patch-bk b/sysutils/xentools33/patches/patch-bk
deleted file mode 100644
index d36da109eec..00000000000
--- a/sysutils/xentools33/patches/patch-bk
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bk,v 1.1 2008/08/14 13:12:53 cegger Exp $
-
---- examples/xend-config.sxp.orig 2008-08-07 08:56:22.000000000 +0000
-+++ examples/xend-config.sxp
-@@ -185,7 +185,7 @@
-
- # Whether to enable auto-ballooning of dom0 to allow domUs to be created.
- # If enable-dom0-ballooning = no, dom0 will never balloon out.
--(enable-dom0-ballooning yes)
-+(enable-dom0-ballooning no)
-
- # In SMP system, dom0 will use dom0-cpus # of CPUS
- # If dom0-cpus = 0, dom0 will take all cpus available
diff --git a/sysutils/xentools33/patches/patch-blktap_drivers_block-qcow.c b/sysutils/xentools33/patches/patch-blktap_drivers_block-qcow.c
deleted file mode 100644
index 9791a35d655..00000000000
--- a/sysutils/xentools33/patches/patch-blktap_drivers_block-qcow.c
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-blktap_drivers_block-qcow.c,v 1.1 2013/04/11 19:57:53 joerg Exp $
-
---- blktap/drivers/block-qcow.c.orig 2013-03-28 16:51:10.000000000 +0000
-+++ blktap/drivers/block-qcow.c
-@@ -1078,7 +1078,8 @@ static int tdqcow_close(struct disk_driv
- offset = sizeof(QCowHeader) + sizeof(uint32_t);
- lseek(fd, offset, SEEK_SET);
- out = cpu_to_be32(cksum);
-- if (write(fd, &out, sizeof(uint32_t))) ;
-+ if (write(fd, &out, sizeof(uint32_t)))
-+ ;
- close(fd);
- }
-
diff --git a/sysutils/xentools33/patches/patch-blktaplib_h b/sysutils/xentools33/patches/patch-blktaplib_h
deleted file mode 100644
index f252644f19e..00000000000
--- a/sysutils/xentools33/patches/patch-blktaplib_h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-blktaplib_h,v 1.1 2012/01/09 14:06:34 cegger Exp $
-
---- blktap/lib/blktaplib.h.orig 2009-08-06 12:56:32.000000000 +0000
-+++ blktap/lib/blktaplib.h
-@@ -42,7 +42,7 @@
- #include <sys/types.h>
- #include <unistd.h>
-
--#define BLK_RING_SIZE __RING_SIZE((blkif_sring_t *)0, XC_PAGE_SIZE)
-+#define BLK_RING_SIZE __CONST_RING_SIZE(blkif, XC_PAGE_SIZE)
-
- /* size of the extra VMA area to map in attached pages. */
- #define BLKTAP_VMA_PAGES BLK_RING_SIZE
diff --git a/sysutils/xentools33/patches/patch-ca b/sysutils/xentools33/patches/patch-ca
deleted file mode 100644
index e0df42e8b4a..00000000000
--- a/sysutils/xentools33/patches/patch-ca
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ca,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/util/auxbin.py.orig 2008-08-01 16:38:07.000000000 +0200
-+++ python/xen/util/auxbin.py
-@@ -16,9 +16,9 @@
- #============================================================================
-
-
--LIB_32 = "/usr/lib"
--LIB_64 = "/usr/lib64"
--LIB_BIN_SUFFIX = "xen/bin"
-+LIB_32 = "@PREFIX@/bin"
-+LIB_64 = "@PREFIX@/bin"
-+LIB_BIN_SUFFIX = ""
-
- ## The architectures on which the LIB_64 directory is used. This
- # deliberately excludes ia64 and ppc64, and Solaris.
diff --git a/sysutils/xentools33/patches/patch-cb b/sysutils/xentools33/patches/patch-cb
deleted file mode 100644
index 22bc52aa55c..00000000000
--- a/sysutils/xentools33/patches/patch-cb
+++ /dev/null
@@ -1,90 +0,0 @@
-$NetBSD: patch-cb,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/xend/osdep.py.orig 2008-08-01 14:38:07.000000000 +0000
-+++ python/xen/xend/osdep.py
-@@ -22,6 +22,7 @@ import os
- _scripts_dir = {
- "Linux": "/etc/xen/scripts",
- "SunOS": "/usr/lib/xen/scripts",
-+ "NetBSD": "@XENDCONFDIR@/scripts",
- }
-
- _xend_autorestart = {
-@@ -31,7 +32,8 @@ _xend_autorestart = {
- }
-
- _pygrub_path = {
-- "SunOS": "/usr/lib/xen/bin/pygrub"
-+ "SunOS": "/usr/lib/xen/bin/pygrub",
-+ "NetBSD": "@PREFIX@/bin/pygrub",
- }
-
- _vif_script = {
-@@ -62,6 +64,19 @@ def _linux_balloon_stat(label):
- finally:
- f.close()
-
-+def _netbsd_balloon_stat(label):
-+ """Returns the value for the named label, or None if an error occurs."""
-+
-+ import commands
-+
-+ if label != 'current':
-+ return None
-+ cmd = "/sbin/sysctl hw.physmem64"
-+ sysctloutput = commands.getoutput(cmd)
-+ (name, value) = sysctloutput.split('=')
-+ """Return value in KB."""
-+ return int(value) / 1024
-+
- def _solaris_balloon_stat(label):
- """Returns the value for the named label, or None if an error occurs."""
-
-@@ -90,7 +105,8 @@ def _solaris_balloon_stat(label):
- f.close()
-
- _balloon_stat = {
-- "SunOS": _solaris_balloon_stat
-+ "SunOS": _solaris_balloon_stat,
-+ "NetBSD": _netbsd_balloon_stat,
- }
-
- def _linux_get_cpuinfo():
-@@ -117,13 +133,36 @@ def _linux_get_cpuinfo():
- finally:
- f.close()
-
-+def _netbsd_get_cpuinfo():
-+ import commands
-+ cpuinfo = {}
-+
-+ cmd = "/sbin/sysctl hw.ncpu"
-+ sysctloutput = commands.getoutput(cmd)
-+ (name, ncpu) = sysctloutput.split('=')
-+
-+ for i in range(int(ncpu)):
-+ if not cpuinfo.has_key(i):
-+ cpuinfo[i] = {}
-+
-+ # Translate NetBSD tokens into what xend expects
-+ for key in cpuinfo.keys():
-+ cpuinfo[key]['flags'] = ""
-+ cpuinfo[key]['vendor_id'] = ""
-+ cpuinfo[key]['model name'] = ""
-+ cpuinfo[key]['stepping'] = ""
-+ cpuinfo[key]['cpu MHz'] = 0
-+
-+ return cpuinfo
-+
- _get_cpuinfo = {
-+ "NetBSD": _netbsd_get_cpuinfo,
- }
-
- def _get(var, default=None):
- return var.get(os.uname()[0], default)
-
--scripts_dir = _get(_scripts_dir, "/etc/xen/scripts")
-+scripts_dir = _get(_scripts_dir, "@XENDCONFDIR@/scripts")
- xend_autorestart = _get(_xend_autorestart)
- pygrub_path = _get(_pygrub_path, "/usr/bin/pygrub")
- vif_script = _get(_vif_script, "vif-bridge")
diff --git a/sysutils/xentools33/patches/patch-cc b/sysutils/xentools33/patches/patch-cc
deleted file mode 100644
index 95b74d9cf66..00000000000
--- a/sysutils/xentools33/patches/patch-cc
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD: patch-cc,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- ../docs/man/xend-config.sxp.pod.5.orig 2008-08-01 16:38:07.000000000 +0200
-+++ ../docs/man/xend-config.sxp.pod.5
-@@ -4,7 +4,7 @@ xend-config.sxp - Xen daemon configurati
-
- =head1 SYNOPSIS
-
--/etc/xen/xend-config.sxp
-+@XENDCONFDIR@/xend-config.sxp
-
- =head1 DESCRIPTION
-
-@@ -12,7 +12,7 @@ The xend(1) program requires xend-config
- parameters which determine the behavior of the daemon at runtime.
-
- The parameters are specified in S-expression format. See the example
--configuration file in I</etc/xen/xend-config.sxp> for details.
-+configuration file in I<@XENDCONFDIR@/xend-config.sxp> for details.
-
- =head1 OPTIONS
-
-@@ -82,13 +82,13 @@ Defaults to I<1024>.
-
- =item I<network-script>
-
--The name of the script in I</etc/xen/scripts> that will be run to
-+The name of the script in I<@XENDCONFDIR@/scripts> that will be run to
- setup the networking environment. This can be any name, but in
- general is either I<network-bridge> or I<network-route>.
-
- =item I<vif-script>
-
--The name of the script in I</etc/xen/scripts> that will be run to
-+The name of the script in I<@XENDCONFDIR@/scripts> that will be run to
- setup a virtual interface when it is created or destroyed. This needs
- to (in general) work in unison with the I<network-script>.
-
-@@ -113,7 +113,7 @@ domains should be saved when a crash occ
-
- The name of an application or script that can handle external device
- migration, such as for example virtual TPM migration. An example
--script is I</etc/xen/scripts/external-device-migrate>.
-+script is I<@XENDCONFDIR@/scripts/external-device-migrate>.
-
- =back
-
diff --git a/sysutils/xentools33/patches/patch-cd b/sysutils/xentools33/patches/patch-cd
deleted file mode 100644
index d236276b8d3..00000000000
--- a/sysutils/xentools33/patches/patch-cd
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD: patch-cd,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- ../docs/man/xmdomain.cfg.pod.5.orig 2008-08-01 16:38:07.000000000 +0200
-+++ ../docs/man/xmdomain.cfg.pod.5
-@@ -4,9 +4,9 @@ xmdomain.cfg - xm domain config file for
-
- =head1 SYNOPSIS
-
-- /etc/xen/myxendomain
-- /etc/xen/myxendomain2
-- /etc/xen/auto/myxenautostarted
-+ @XENDCONFDIR@/myxendomain
-+ @XENDCONFDIR@/myxendomain2
-+ @XENDCONFDIR@/auto/myxenautostarted
-
- =head1 DESCRIPTION
-
-@@ -14,14 +14,14 @@ The B<xm>(1) program uses python executa
- domains to create from scratch. Each of these config files needs to
- contain a number of required options, and may specify many more.
-
--Domain configuration files live in /etc/xen by default, if you store
-+Domain configuration files live in @XENDCONFDIR@ by default, if you store
- config files anywhere else the full path to the config file must be
- specified in the I<xm create> command.
-
--/etc/xen/auto is a special case. Domain config files in that
-+@XENDCONFDIR@/auto is a special case. Domain config files in that
- directory will be started automatically at system boot if the
--xendomain init script is enabled. The contents of /etc/xen/auto
--should be symlinks to files in /etc/xen to allow I<xm create> to be
-+xendomain init script is enabled. The contents of @XENDCONFDIR@/auto
-+should be symlinks to files in @XENDCONFDIR@ to allow I<xm create> to be
- used without full paths.
-
- Options are specified by I<name = value> statements in the
diff --git a/sysutils/xentools33/patches/patch-ce b/sysutils/xentools33/patches/patch-ce
deleted file mode 100644
index 9e505df9304..00000000000
--- a/sysutils/xentools33/patches/patch-ce
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-ce,v 1.2 2009/01/13 13:48:33 cegger Exp $
-
---- ../docs/man/xm.pod.1.orig 2009-01-05 11:26:58.000000000 +0000
-+++ ../docs/man/xm.pod.1
-@@ -75,7 +75,7 @@ in the config file. See L<xmdomain.cfg>
- format, and possible options used in either the configfile or for I<vars>.
-
- I<configfile> can either be an absolute path to a file, or a relative
--path to a file located in /etc/xen.
-+path to a file located in @XENDCONFDIR@.
-
- Create will return B<as soon> as the domain is started. This B<does
- not> mean the guest OS in the domain has actually booted, or is
-@@ -156,7 +156,7 @@ B<EXAMPLES>
-
- xm create Fedora4
-
--This creates a domain with the file /etc/xen/Fedora4, and returns as
-+This creates a domain with the file @XENDCONFDIR@/Fedora4, and returns as
- soon as it is run.
-
- =item I<without config file>
-@@ -388,7 +388,7 @@ file format, and possible options used i
- I<vars>.
-
- I<configfile> can either be an absolute path to a file, or a relative
--path to a file located in /etc/xen.
-+path to a file located in @XENDCONFDIR@.
-
- The new subcommand will return without starting the domain. The
- domain needs to be started using the B<xm start> command.
-@@ -1068,7 +1068,7 @@ I<policy> is a dot-separated list of nam
- name pre-fix for the policy XML file. The preceding name parts are
- translated into the local path pointing to the policy XML file
- relative to the global policy root directory
--(/etc/xen/acm-security/policies). For example,
-+(@XENDCONFDIR@/acm-security/policies). For example,
- example.chwall_ste.client_v1 denotes the policy file
- example/chwall_ste/client_v1-security_policy.xml relative to the
- global policy root directory.
diff --git a/sysutils/xentools33/patches/patch-cf b/sysutils/xentools33/patches/patch-cf
deleted file mode 100644
index 2b3627ff621..00000000000
--- a/sysutils/xentools33/patches/patch-cf
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-cf,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- misc/xen-python-path.orig 2008-08-01 16:38:07.000000000 +0200
-+++ misc/xen-python-path
-@@ -32,6 +32,7 @@ usr = os.path.dirname(os.path.dirname(
- list = [ os.path.join(usr,'lib64') ]
- list += [ os.path.join(usr,'lib') ]
- list += ['/usr/lib64', '/usr/lib']
-+list += ['@PREFIX@/lib']
-
- for l in list:
- for p in ['python%s' % sys.version[:3], 'python']:
diff --git a/sysutils/xentools33/patches/patch-cg b/sysutils/xentools33/patches/patch-cg
deleted file mode 100644
index c437de49af2..00000000000
--- a/sysutils/xentools33/patches/patch-cg
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-cg,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- libfsimage/Rules.mk.orig 2008-08-01 16:38:07.000000000 +0200
-+++ libfsimage/Rules.mk
-@@ -21,8 +21,8 @@ fs-all: $(FSLIB)
-
- .PHONY: fs-install
- fs-install: fs-all
-- $(INSTALL_DIR) $(DESTDIR)$(FSDIR)
-- $(INSTALL_PROG) $(FSLIB) $(DESTDIR)$(FSDIR)
-+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(FSDIR)
-+ $(BSD_INSTALL_LIB) $(FSLIB) $(DESTDIR)$(FSDIR)
-
- $(FSLIB): $(PIC_OBJS)
- $(CC) $(CFLAGS) $(LDFLAGS) $(SHLIB_CFLAGS) -o $@ $^ -lfsimage $(FS_LIBDEPS)
diff --git a/sysutils/xentools33/patches/patch-da b/sysutils/xentools33/patches/patch-da
deleted file mode 100644
index 24c4f0bba42..00000000000
--- a/sysutils/xentools33/patches/patch-da
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-da,v 1.2 2009/08/07 12:49:21 cegger Exp $
-
---- libfsimage/common/Makefile.orig 2009-08-06 14:56:35.000000000 +0200
-+++ libfsimage/common/Makefile
-@@ -4,6 +4,8 @@ include $(XEN_ROOT)/tools/Rules.mk
- MAJOR = 1.0
- MINOR = 0
-
-+CFLAGS += -DFSIMAGE_FSDIR=\"$(LIBDIR)/fs\"
-+
- LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
- LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
- LDFLAGS = $(LDFLAGS-y)
-@@ -19,14 +21,14 @@ all: $(LIB)
-
- .PHONY: install
- install: all
-- $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-- $(INSTALL_PROG) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_LIB) libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
- ln -sf libfsimage.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libfsimage.so.$(MAJOR)
- ln -sf libfsimage.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libfsimage.so
-- $(INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR)
-- $(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR)
-- $(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR)
-
- clean distclean:
- rm -f $(PIC_OBJS) $(LIB) $(DEPS)
diff --git a/sysutils/xentools33/patches/patch-db b/sysutils/xentools33/patches/patch-db
deleted file mode 100644
index 0979bd1ac30..00000000000
--- a/sysutils/xentools33/patches/patch-db
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-db,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- pygrub/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ pygrub/Makefile
-@@ -10,14 +10,12 @@ build:
-
- .PHONY: install
- ifndef XEN_PYTHON_NATIVE_INSTALL
--install: LIBPATH=$(shell PYTHONPATH=../python/xen/util python -c "import auxbin; print auxbin.libpath()")
-+install: LIBPATH=$(shell PYTHONPATH=../py{}thon/xen/util python -c "import auxbin; print auxbin.libpath()")
- install: all
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --home="$(DESTDIR)/usr" --prefix="" --install-lib="$(DESTDIR)$(LIBPATH)/python"
-- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-+ python setup.py install --root=${DESTDIR}
- else
- install: all
-- CC="$(CC)" CFLAGS="$(CFLAGS)" python setup.py install --root="$(DESTDIR)"
-- $(INSTALL_DIR) $(DESTDIR)/var/run/xend/boot
-+ python setup.py install --root=${DESTDIR}
- endif
-
- .PHONY: clean
diff --git a/sysutils/xentools33/patches/patch-dc b/sysutils/xentools33/patches/patch-dc
deleted file mode 100644
index 362389fac03..00000000000
--- a/sysutils/xentools33/patches/patch-dc
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-dc,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- flask/libflask/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ flask/libflask/Makefile
-@@ -33,13 +33,13 @@ build:
-
- .PHONY: install
- install: build
-- $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-- $(INSTALL_PROG) libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-- $(INSTALL_DATA) libflask.a $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_LIB_DIR) $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_LIB) libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-+ $(BSD_INSTALL_LIB) libflask.a $(DESTDIR)$(LIBDIR)
- ln -sf libflask.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libflask.so.$(MAJOR)
- ln -sf libflask.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libflask.so
-- $(INSTALL_DATA) include/flask.h $(DESTDIR)$(INCLUDEDIR)
-+ $(BSD_INSTALL_DATA) include/flask.h $(DESTDIR)$(INCLUDEDIR)
-
- .PHONY: TAGS
- TAGS:
diff --git a/sysutils/xentools33/patches/patch-dd b/sysutils/xentools33/patches/patch-dd
deleted file mode 100644
index c430c17b731..00000000000
--- a/sysutils/xentools33/patches/patch-dd
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-dd,v 1.2 2009/08/07 12:49:21 cegger Exp $
-
---- flask/loadpolicy/Makefile.orig 2009-08-06 14:56:33.000000000 +0200
-+++ flask/loadpolicy/Makefile
-@@ -48,8 +48,8 @@ print-end:
-
- .PHONY: install
- install: all
-- $(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-- $(INSTALL_PROG) $(CLIENTS) $(DESTDIR)$(SBINDIR)
-+ $(BSD_INSTALL_PROGRAM_DIR) $(DESTDIR)$(SBINDIR)
-+ $(BSD_INSTALL_PROGRAM) $(CLIENTS) $(DESTDIR)$(SBINDIR)
-
- -include $(DEPS)
-
diff --git a/sysutils/xentools33/patches/patch-de b/sysutils/xentools33/patches/patch-de
deleted file mode 100644
index cd912645149..00000000000
--- a/sysutils/xentools33/patches/patch-de
+++ /dev/null
@@ -1,119 +0,0 @@
-$NetBSD: patch-de,v 1.2 2009/08/07 12:49:21 cegger Exp $
-
---- examples/Makefile.orig 2009-08-06 14:56:33.000000000 +0200
-+++ examples/Makefile
-@@ -7,7 +7,7 @@ XENDOMAINS_INITD = init.d/xendomains
- XENDOMAINS_SYSCONFIG = init.d/sysconfig.xendomains
-
- # Xen configuration dir and configs to go there.
--XEN_CONFIG_DIR = /etc/xen
-+XEN_CONFIG_DIR = ${PKG_SYSCONFDIR}/xen
- XEN_READMES = README
- XEN_READMES += README.incompatibilities
- XEN_CONFIGS = xend-config.sxp
-@@ -25,7 +25,7 @@ XEN_CONFIGS += xend-pci-quirks.sxp
- XEN_CONFIGS += xend-pci-permissive.sxp
-
- # Xen script dir and scripts to go there.
--XEN_SCRIPT_DIR = /etc/xen/scripts
-+XEN_SCRIPT_DIR = ${PKG_SYSCONFDIR}/xen/scripts
- XEN_SCRIPTS = network-bridge vif-bridge
- XEN_SCRIPTS += network-route vif-route
- XEN_SCRIPTS += network-nat vif-nat
-@@ -41,7 +41,7 @@ XEN_SCRIPT_DATA += xen-hotplug-common.sh
- XEN_SCRIPT_DATA += block-common.sh vtpm-common.sh vtpm-hotplug-common.sh
- XEN_SCRIPT_DATA += vtpm-migration.sh vtpm-impl
-
--XEN_HOTPLUG_DIR = /etc/hotplug
-+XEN_HOTPLUG_DIR = ${PKG_SYSCONFDIR}/hotplug
- XEN_HOTPLUG_SCRIPTS = xen-backend.agent
-
- UDEVVER = 0
-@@ -52,7 +52,7 @@ ifeq ($(shell [ -x /usr/bin/udevinfo ] &
- UDEVVER = $(shell /usr/bin/udevinfo -V | sed -e 's/^[^0-9]* \([0-9]\{1,\}\)[^0-9]\{0,\}/\1/' )
- endif
-
--UDEV_RULES_DIR = /etc/udev
-+UDEV_RULES_DIR = ${PKG_SYSCONFDIR}/udev
- UDEV_RULES = xen-backend.rules
-
- DI = $(if $(DISTDIR),$(shell readlink -f $(DISTDIR)),)
-@@ -79,60 +79,55 @@ install: all install-readmes install-ini
- .PHONY: install-readmes
- install-readmes:
- [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
-- $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
- set -e; for i in $(XEN_READMES); \
- do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
-- $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
-+ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
- done
-
- .PHONY: install-initd
- install-initd:
-- [ -d $(DESTDIR)/etc/init.d ] || $(INSTALL_DIR) $(DESTDIR)/etc/init.d
-- [ -d $(DESTDIR)/etc/sysconfig ] || $(INSTALL_DIR) $(DESTDIR)/etc/sysconfig
-- $(INSTALL_PROG) $(XEND_INITD) $(DESTDIR)/etc/init.d
-- $(INSTALL_PROG) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
-- $(INSTALL_PROG) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)/etc/init.d
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)/etc/sysconfig
-+ $(BSD_INSTALL_DATA) $(XEND_INITD) $(DESTDIR)/etc/init.d
-+ $(BSD_INSTALL_DATA) $(XENDOMAINS_INITD) $(DESTDIR)/etc/init.d
-+ $(BSD_INSTALL_DATA) $(XENDOMAINS_SYSCONFIG) $(DESTDIR)/etc/sysconfig/xendomains
-
- .PHONY: install-configs
- install-configs: $(XEN_CONFIGS)
-- [ -d $(DESTDIR)$(XEN_CONFIG_DIR) ] || \
-- $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
-- [ -d $(DESTDIR)$(XEN_CONFIG_DIR)/auto ] || \
-- $(INSTALL_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_CONFIG_DIR)/auto
- set -e; for i in $(XEN_CONFIGS); \
-- do [ -e $(DESTDIR)$(XEN_CONFIG_DIR)/$$i ] || \
-- $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
-+ do \
-+ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_CONFIG_DIR); \
- done
-
- .PHONY: install-scripts
- install-scripts:
-- [ -d $(DESTDIR)$(XEN_SCRIPT_DIR) ] || \
-- $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
- set -e; for i in $(XEN_SCRIPTS); \
- do \
-- $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
-+ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
- done
- set -e; for i in $(XEN_SCRIPT_DATA); \
- do \
-- $(INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
-+ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
- done
-
- .PHONY: install-hotplug
- install-hotplug:
-- [ -d $(DESTDIR)$(XEN_HOTPLUG_DIR) ] || \
-- $(INSTALL_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(XEN_HOTPLUG_DIR)
- set -e; for i in $(XEN_HOTPLUG_SCRIPTS); \
- do \
-- $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
-+ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(XEN_HOTPLUG_DIR); \
- done
-
- .PHONY: install-udev
- install-udev:
-- [ -d $(DESTDIR)$(UDEV_RULES_DIR) ] || \
-- $(INSTALL_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(UDEV_RULES_DIR)/rules.d
- set -e; for i in $(UDEV_RULES); \
- do \
-- $(INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
-+ $(BSD_INSTALL_DATA) $$i $(DESTDIR)$(UDEV_RULES_DIR); \
- ln -sf ../$$i $(DESTDIR)$(UDEV_RULES_DIR)/rules.d; \
- done
-
diff --git a/sysutils/xentools33/patches/patch-df b/sysutils/xentools33/patches/patch-df
deleted file mode 100644
index ae375b9897b..00000000000
--- a/sysutils/xentools33/patches/patch-df
+++ /dev/null
@@ -1,51 +0,0 @@
-$NetBSD: patch-df,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- include/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ include/Makefile
-@@ -20,26 +20,26 @@ xen/.dir:
-
- .PHONY: install
- install: all
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64/hvm
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/foreign
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/hvm
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/io
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/sys
-- $(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/xsm
-- $(INSTALL_DATA) xen/COPYING $(DESTDIR)$(INCLUDEDIR)/xen
-- $(INSTALL_DATA) xen/*.h $(DESTDIR)$(INCLUDEDIR)/xen
-- $(INSTALL_DATA) xen/arch-ia64/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64
-- $(INSTALL_DATA) xen/arch-ia64/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64/hvm
-- $(INSTALL_DATA) xen/arch-x86/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
-- $(INSTALL_DATA) xen/arch-x86/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
-- $(INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(INCLUDEDIR)/xen/foreign
-- $(INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/hvm
-- $(INSTALL_DATA) xen/io/*.h $(DESTDIR)$(INCLUDEDIR)/xen/io
-- $(INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(INCLUDEDIR)/xen/sys
-- $(INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/xsm
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64/hvm
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/foreign
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/hvm
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/io
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/sys
-+ $(BSD_INSTALL_DATA_DIR) $(DESTDIR)$(INCLUDEDIR)/xen/xsm
-+ $(BSD_INSTALL_DATA) xen/COPYING $(DESTDIR)$(INCLUDEDIR)/xen
-+ $(BSD_INSTALL_DATA) xen/*.h $(DESTDIR)$(INCLUDEDIR)/xen
-+ $(BSD_INSTALL_DATA) xen/arch-ia64/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64
-+ $(BSD_INSTALL_DATA) xen/arch-ia64/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-ia64/hvm
-+ $(BSD_INSTALL_DATA) xen/arch-x86/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
-+ $(BSD_INSTALL_DATA) xen/arch-x86/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
-+ $(BSD_INSTALL_DATA) xen/foreign/*.h $(DESTDIR)$(INCLUDEDIR)/xen/foreign
-+ $(BSD_INSTALL_DATA) xen/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/hvm
-+ $(BSD_INSTALL_DATA) xen/io/*.h $(DESTDIR)$(INCLUDEDIR)/xen/io
-+ $(BSD_INSTALL_DATA) xen/sys/*.h $(DESTDIR)$(INCLUDEDIR)/xen/sys
-+ $(BSD_INSTALL_DATA) xen/xsm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/xsm
-
- .PHONY: clean
- clean:
diff --git a/sysutils/xentools33/patches/patch-ea b/sysutils/xentools33/patches/patch-ea
deleted file mode 100644
index bfbbbaefd6c..00000000000
--- a/sysutils/xentools33/patches/patch-ea
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ea,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/util/xsm/acm/acm.py.orig 2008-08-01 16:38:07.000000000 +0200
-+++ python/xen/util/xsm/acm/acm.py
-@@ -35,7 +35,7 @@ from xen.util import dictio, xsconstants
- from xen.xend.XendConstants import *
-
- #global directories and tools for security management
--install_policy_dir_prefix = "/etc/xen/acm-security/policies"
-+install_policy_dir_prefix = "@XENDCONFDIR@/acm-security/policies"
- security_dir_prefix = XendOptions.instance().get_xend_security_path()
- policy_dir_prefix = security_dir_prefix + "/policies"
- res_label_filename = policy_dir_prefix + "/resource_labels"
diff --git a/sysutils/xentools33/patches/patch-eb b/sysutils/xentools33/patches/patch-eb
deleted file mode 100644
index 511db77a7f1..00000000000
--- a/sysutils/xentools33/patches/patch-eb
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-eb,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- python/xen/xm/setpolicy.py.orig 2008-08-01 16:38:07.000000000 +0200
-+++ python/xen/xm/setpolicy.py
-@@ -47,7 +47,7 @@ def help():
-
- The filename of the policy is the policy name plus the suffic
- '-security_policy.xml'. The location of the policy file is either
-- the the current directory or '/etc/xen/acm-security/policies'.
-+ the the current directory or '@XENDCONFDIR@/acm-security/policies'.
-
- """
-
diff --git a/sysutils/xentools33/patches/patch-ec b/sysutils/xentools33/patches/patch-ec
deleted file mode 100644
index 8a135b85351..00000000000
--- a/sysutils/xentools33/patches/patch-ec
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ec,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- security/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ security/Makefile
-@@ -21,7 +21,7 @@ ACM_EZPOLICY = xensec_ezpolicy
- ACM_OBJS = $(OBJS_TOOL) $(OBJS_GETD)
- ACM_SCRIPTS = python/xensec_tools/acm_getlabel
-
--ACM_CONFIG_DIR = /etc/xen/acm-security
-+ACM_CONFIG_DIR = @XENDCONFDIR@/acm-security
- ACM_POLICY_DIR = $(ACM_CONFIG_DIR)/policies
- ACM_SCRIPT_DIR = $(ACM_CONFIG_DIR)/scripts
-
diff --git a/sysutils/xentools33/patches/patch-ed b/sysutils/xentools33/patches/patch-ed
deleted file mode 100644
index 70cfba7f9a4..00000000000
--- a/sysutils/xentools33/patches/patch-ed
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-ed,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- security/policytools.txt.orig 2008-08-01 16:38:07.000000000 +0200
-+++ security/policytools.txt
-@@ -16,10 +16,10 @@ XML. Read in the user manual about the n
- name is used by the Xen management tools to identify existing
- policies. Creating the security policy means creating a policy
- description in XML:
--/etc/xen/acm-security/policies/example/chwall_ste/test-security_policy.xml.
-+@XENDCONFDIR@/acm-security/policies/example/chwall_ste/test-security_policy.xml.
-
- The policy XML description must follow the XML schema definition in
--/etc/xen/acm-security/policies/security_policy.xsd. The policy tools
-+@XENDCONFDIR@/acm-security/policies/security_policy.xsd. The policy tools
- are written against this schema; they will create and refine policies
- that conform to this scheme.
-
-@@ -144,5 +144,5 @@ policy file naming conventions based on
- choose to use.
-
- To get a feel for the tool, you could use one of the example policy
--definitions files from /etc/xen/acm-security/policies/example as
-+definitions files from @XENDCONFDIR@/acm-security/policies/example as
- input or a policy created by the xensec_ezpolicy tool.
diff --git a/sysutils/xentools33/patches/patch-ee b/sysutils/xentools33/patches/patch-ee
deleted file mode 100644
index 64e409847ee..00000000000
--- a/sysutils/xentools33/patches/patch-ee
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-ee,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- security/xensec_ezpolicy.orig 2008-08-01 16:38:07.000000000 +0200
-+++ security/xensec_ezpolicy
-@@ -935,7 +935,7 @@ class ezFrame(wx.Frame):
- policyname = transInfo()
- if not policyname:
- return
-- path="/etc/xen/acm-security/policies/"
-+ path="@XENDCONFDIR@/acm-security/policies/"
- nameparts=string.split(policyname, ".")
- if len(nameparts) > 1:
- path = path + "/".join(nameparts[0:len(nameparts)-1])
-@@ -1592,7 +1592,7 @@ where you merely replace &quot;NAME&quot
- Save the policy under the name proposed by the tool in the proposed directory
- if you are using this tool in your Xen environment. Otherwise, you need
- to copy the resulting file into your Xen environment to the directory
--&quot;/etc/xen/acm-security/policies/example/chwall_ste/&quot;.<BR>
-+&quot;@XENDCONFDIR@/acm-security/policies/example/chwall_ste/&quot;.<BR>
- <BR>
- This tool creates policies for the Xen Chinese Wall and Simple Type Enforcement
- policy. The Xen access control policy in general is more expressive and
diff --git a/sysutils/xentools33/patches/patch-ef b/sysutils/xentools33/patches/patch-ef
deleted file mode 100644
index 3c4de3489b0..00000000000
--- a/sysutils/xentools33/patches/patch-ef
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ef,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- xm-test/tests/security-acm/Makefile.am.orig 2008-08-01 16:38:07.000000000 +0200
-+++ xm-test/tests/security-acm/Makefile.am
-@@ -19,10 +19,10 @@ TESTS_ENVIRONMENT=@TENV@
- %.test: %.py
- cp $< $@
- chmod +x $@
-- @if [ -d /etc/xen/acm-security/policies ]; then \
-+ @if [ -d @XENDCONFDIR@/acm-security/policies ]; then \
- cp -f xm-test-security_policy.xml \
- xm-test-update-security_policy.xml\
-- /etc/xen/acm-security/policies; \
-+ @XENDCONFDIR@/acm-security/policies; \
- fi;
-
- clean-local: am_config_clean-local
diff --git a/sysutils/xentools33/patches/patch-eg b/sysutils/xentools33/patches/patch-eg
deleted file mode 100644
index 5ec104b8d35..00000000000
--- a/sysutils/xentools33/patches/patch-eg
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-eg,v 1.1.1.1 2008/08/07 20:26:58 cegger Exp $
-
---- xm-test/runtest.sh.orig 2008-08-01 16:38:07.000000000 +0200
-+++ xm-test/runtest.sh
-@@ -220,9 +220,9 @@ unsafe=no
- GROUPENTERED=default
-
- #Prepare for usage with ACM
--if [ -d /etc/xen/acm-security/policies ]; then
-+if [ -d @XENDCONFDIR@/acm-security/policies ]; then
- cp -f tests/security-acm/xm-test-security_policy.xml \
-- /etc/xen/acm-security/policies
-+ @XENDCONFDIR@/acm-security/policies
- fi
-
- unset XM_MANAGED_DOMAINS
diff --git a/sysutils/xentools33/patches/patch-fa b/sysutils/xentools33/patches/patch-fa
deleted file mode 100644
index 77261a26209..00000000000
--- a/sysutils/xentools33/patches/patch-fa
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-fa,v 1.1.1.1 2008/08/07 20:26:59 cegger Exp $
-
---- firmware/Makefile.orig 2008-08-01 14:38:07.000000000 +0000
-+++ firmware/Makefile
-@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
- # hvmloader is a 32-bit protected mode binary.
- # It belongs in /usr/lib, not /usr/lib64.
- TARGET := hvmloader/hvmloader
--INST_DIR := $(DESTDIR)/usr/lib/xen/boot
-+INST_DIR := $(DESTDIR)$(LIBDIR)/xen/boot
-
- SUBDIRS :=
- SUBDIRS += rombios
-@@ -27,8 +27,8 @@ all:
-
- .PHONY: install
- install: all
-- [ -d $(INST_DIR) ] || $(INSTALL_DIR) $(INST_DIR)
-- [ ! -e $(TARGET) ] || $(INSTALL_DATA) $(TARGET) $(INST_DIR)
-+ $(BSD_INSTALL_LIB_DIR) $(INST_DIR)
-+ $(BSD_INSTALL_LIB) $(TARGET) $(INST_DIR)
-
- .PHONY: clean
- clean: subdirs-clean
diff --git a/sysutils/xentools33/patches/patch-fb b/sysutils/xentools33/patches/patch-fb
deleted file mode 100644
index 8b80b7cb024..00000000000
--- a/sysutils/xentools33/patches/patch-fb
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD: patch-fb,v 1.1.1.1 2008/08/07 20:26:59 cegger Exp $
-
---- ioemu/configure.orig 2008-08-01 14:38:07.000000000 +0000
-+++ ioemu/configure
-@@ -591,17 +591,17 @@ fi
- mandir="$prefix"
- datadir="$prefix"
- docdir="$prefix"
--bindir="$prefix"
--configdir=""
-+bindir="$prefix/libexec"
-+configdir="@XENDCONFDIR@"
- else
- if test -z "$prefix" ; then
- prefix="/usr/local"
- fi
--mandir="$prefix/share/man"
-+mandir="$prefix/man"
- datadir="$prefix/share/xen/qemu"
- docdir="$prefix/share/doc/qemu"
--bindir="$prefix/$libdir/xen/bin"
--configdir="/etc/xen"
-+bindir="$prefix/libexec"
-+configdir="@XENDCONFDIR@"
- fi
-
- if test "$stubdom" = "yes"; then
-@@ -744,6 +744,8 @@ if test "$mingw32" = "yes" ; then
- echo "#define CONFIG_WIN32 1" >> $config_h
- elif test -f "/usr/include/byteswap.h" ; then
- echo "#define HAVE_BYTESWAP_H 1" >> $config_h
-+elif test -f "/usr/include/machine/bswap.h" ; then
-+ echo "#define HAVE_MACHINE_BSWAP_H 1" >> $config_h
- fi
- if test "$darwin" = "yes" ; then
- echo "CONFIG_DARWIN=yes" >> $config_mak
diff --git a/sysutils/xentools33/patches/patch-fc b/sysutils/xentools33/patches/patch-fc
deleted file mode 100644
index 8e3715f3c77..00000000000
--- a/sysutils/xentools33/patches/patch-fc
+++ /dev/null
@@ -1,35 +0,0 @@
-$NetBSD: patch-fc,v 1.3 2009/10/18 21:28:10 bouyer Exp $
-
---- ioemu/vl.c.orig 2009-01-05 12:26:59.000000000 +0100
-+++ ioemu/vl.c 2009-10-18 23:08:55.000000000 +0200
-@@ -108,7 +108,7 @@
-
- #include "exec-all.h"
-
--#define DEFAULT_NETWORK_SCRIPT "/etc/xen/qemu-ifup"
-+#define DEFAULT_NETWORK_SCRIPT "@XENDCONFDIR@/scripts/qemu-ifup"
- #ifdef _BSD
- #define DEFAULT_BRIDGE "bridge0"
- #else
-@@ -117,7 +117,7 @@
- #ifdef __sun__
- #define SMBD_COMMAND "/usr/sfw/sbin/smbd"
- #else
--#define SMBD_COMMAND "/usr/sbin/smbd"
-+#define SMBD_COMMAND "@PREFIX@/sbin/smbd"
- #endif
-
- //#define DEBUG_UNUSED_IOPORT
-@@ -1914,8 +1914,11 @@
- }
-
- /* Set raw attributes on the pty. */
-+ if (tcgetattr(master_fd, &tty) < 0)
-+ perror("tcgetattr");
- cfmakeraw(&tty);
-- tcsetattr(slave_fd, TCSAFLUSH, &tty);
-+ if (tcsetattr(slave_fd, TCSAFLUSH, &tty) < 0)
-+ perror("tcsetattr");
-
- fprintf(stderr, "char device redirected to %s\n", ptsname(master_fd));
-
diff --git a/sysutils/xentools33/patches/patch-fd b/sysutils/xentools33/patches/patch-fd
deleted file mode 100644
index 41f5efe0112..00000000000
--- a/sysutils/xentools33/patches/patch-fd
+++ /dev/null
@@ -1,66 +0,0 @@
-$NetBSD: patch-fd,v 1.3 2010/12/13 13:37:49 wiz Exp $
-
-Last chunk: Compatibility fix for texi2html-5.0.
-
---- ioemu/Makefile.orig 2009-08-06 12:56:33.000000000 +0000
-+++ ioemu/Makefile
-@@ -44,10 +44,11 @@ subdir-%:
-
- recurse-all: $(patsubst %,subdir-%, $(TARGET_DIRS))
-
--tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
--tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
--tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
--tapdisk-ioemu: CPPFLAGS += -I$(XEN_ROOT)/tools/include
-+CPPFLAGS += -I$(XEN_ROOT)/tools/libxc
-+CPPFLAGS += -I$(XEN_ROOT)/tools/blktap/lib
-+CPPFLAGS += -I$(XEN_ROOT)/tools/xenstore
-+CPPFLAGS += -I$(XEN_ROOT)/tools/include
-+
- tapdisk-ioemu: tapdisk-ioemu.c cutils.c block.c block-raw.c block-cow.c block-qcow.c aes.c block-vmdk.c block-cloop.c block-dmg.c block-bochs.c block-vpc.c block-vvfat.c block-qcow2.c hw/xen_blktap.c osdep.c
- $(CC) -DQEMU_TOOL $(CFLAGS) $(CPPFLAGS) $(BASE_CFLAGS) $(LDFLAGS) $(BASE_LDFLAGS) -o $@ $^ -lz $(LIBS)
-
-@@ -78,16 +79,16 @@ ar de en-us fi fr-be hr
- common de-ch es fo fr-ca hu ja mk nl-be pt sl tr
-
- install-doc: $(DOCS)
-- mkdir -p "$(DESTDIR)$(docdir)"
-- $(INSTALL_DATA) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
-+ #$(BSD_INSTALL_DATA_DIR) "$(DESTDIR)$(docdir)"
-+ #$(BSD_INSTALL_DATA) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
- ifndef CONFIG_WIN32
-- mkdir -p "$(DESTDIR)$(mandir)/man1"
-- $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
-+ #$(BSD_INSTALL_DATA_DIR) "$(DESTDIR)$(mandir)/man1"
-+ #$(BSD_INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
- endif
-
- install: all $(if $(BUILD_DOCS),install-doc)
-- mkdir -p "$(DESTDIR)$(bindir)"
-- $(INSTALL) -m 755 $(TOOLS) "$(DESTDIR)$(SBINDIR)"
-+ $(BSD_INSTALL_PROGRAM_DIR) "$(DESTDIR)$(bindir)"
-+ $(BSD_INSTALL_PROGRAM) -m 755 $(TOOLS) "$(DESTDIR)$(SBINDIR)"
- # mkdir -p "$(DESTDIR)$(datadir)"
- # for x in bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
- # video.x openbios-sparc32 linux_boot.bin pxe-ne2k_pci.bin \
-@@ -95,9 +96,9 @@ install: all $(if $(BUILD_DOCS),install-
- # $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
- # done
- ifndef CONFIG_WIN32
-- mkdir -p "$(DESTDIR)$(datadir)/keymaps"
-+ $(BSD_INSTALL_DATA_DIR) "$(DESTDIR)$(datadir)/keymaps"
- set -e; for x in $(KEYMAPS); do \
-- $(INSTALL_DATA) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
-+ $(BSD_INSTALL_DATA) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
- done
- endif
- for d in $(TARGET_DIRS); do \
-@@ -118,7 +119,7 @@ cscope:
-
- # documentation
- %.html: %.texi
-- texi2html -monolithic -number $<
-+ texi2html -monolithic -number-sections $<
-
- %.info: %.texi
- makeinfo $< -o $@
diff --git a/sysutils/xentools33/patches/patch-fe b/sysutils/xentools33/patches/patch-fe
deleted file mode 100644
index f43f134246f..00000000000
--- a/sysutils/xentools33/patches/patch-fe
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD: patch-fe,v 1.3 2008/08/15 14:06:54 cegger Exp $
-
---- ioemu/Makefile.target.orig 2008-08-14 15:26:06.000000000 +0000
-+++ ioemu/Makefile.target
-@@ -382,6 +382,7 @@ AUDIODRV += sdlaudio.o
- endif
- ifdef CONFIG_OSS
- AUDIODRV += ossaudio.o
-+LIBS += -lossaudio
- endif
- ifdef CONFIG_COREAUDIO
- AUDIODRV += coreaudio.o
-@@ -544,7 +545,7 @@ $(QEMU_SYSTEM): $(VL_OBJS) libqemu.a
- ifdef CONFIG_STUBDOM
- $(AR) rcs $@ $(VL_OBJS)
- else
-- $(CC) $(VL_LDFLAGS) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
-+ $(CC) $(VL_LDFLAGS) -Wl,-rpath,$(LIBDIR) -o $@ $^ $(LIBS) $(SDL_LIBS) $(COCOA_LIBS) $(VL_LIBS)
- endif
-
- cocoa.o: cocoa.m
-@@ -660,12 +661,11 @@ distclean: clean
- rm -rf config.mak config.h
-
- install: all
-- mkdir -p "$(DESTDIR)$(bindir)" "$(DESTDIR)$(configdir)"
-+ $(BSD_INSTALL_PROGRAM_DIR) "$(DESTDIR)$(bindir)" "$(DESTDIR)$(configdir)"
- ifneq ($(PROGS),)
-- $(INSTALL_PROG) $(PROGS) "$(DESTDIR)$(bindir)"
-+ $(BSD_INSTALL_PROGRAM) $(PROGS) "$(DESTDIR)$(bindir)"
- endif
-- $(INSTALL_PROG) $(TARGET_PATH)/qemu-dm.debug "$(DESTDIR)$(bindir)"
-- $(INSTALL_PROG) $(TARGET_PATH)/qemu-ifup "$(DESTDIR)$(configdir)"
-+ $(BSD_INSTALL_DATA) $(TARGET_PATH)/qemu-dm.debug "$(DESTDIR)$(bindir)"
-
- ifneq ($(wildcard .depend),)
- include .depend
diff --git a/sysutils/xentools33/patches/patch-ff b/sysutils/xentools33/patches/patch-ff
deleted file mode 100644
index 9bd163209b4..00000000000
--- a/sysutils/xentools33/patches/patch-ff
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD: patch-ff,v 1.1 2010/05/05 06:12:36 cegger Exp $
-
---- python/xen/util/acmpolicy.py.orig 2009-08-06 12:56:37.000000000 +0000
-+++ python/xen/util/acmpolicy.py
-@@ -17,12 +17,19 @@
- #============================================================================
-
- import os
--import sha
- import stat
- import array
- import struct
- import shutil
- import commands
-+
-+# sha is deprecated as of python 2.6
-+try:
-+ from hashlib import sha1
-+except ImportError:
-+ # but hashlib was only added in python 2.5
-+ from sha import new as sha1
-+
- from xml.dom import minidom, Node
- from xen.xend.XendLogging import log
- from xen.util import xsconstants, bootloader, mkdir
-@@ -1102,8 +1109,8 @@ class ACMPolicy(XSPolicy):
- return None
-
- def hash(self):
-- """ Calculate a SAH1 hash of the XML policy """
-- return sha.sha(self.toxml())
-+ """ Calculate a SHA1 hash of the XML policy """
-+ return sha1(self.toxml())
-
- def save(self):
- ### Save the XML policy into a file ###
diff --git a/sysutils/xentools33/patches/patch-fg b/sysutils/xentools33/patches/patch-fg
deleted file mode 100644
index 2cc3dd19ae2..00000000000
--- a/sysutils/xentools33/patches/patch-fg
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD: patch-fg,v 1.1 2010/05/05 06:12:36 cegger Exp $
-
---- python/xen/xend/XendAPI.py.orig 2009-08-06 12:56:37.000000000 +0000
-+++ python/xen/xend/XendAPI.py
-@@ -18,7 +18,6 @@
- import inspect
- import os
- import Queue
--import sets
- import string
- import sys
- import traceback
-@@ -26,6 +25,12 @@ import threading
- import time
- import xmlrpclib
-
-+# sets is deprecated as of python 2.6, but set is unavailable in 2.3
-+try:
-+ set
-+except NameError:
-+ from sets import Set as set
-+
- import XendDomain, XendDomainInfo, XendNode, XendDmesg
- import XendLogging, XendTaskManager, XendAPIStore
-
-@@ -117,16 +122,17 @@ event_registrations = {}
- def event_register(session, reg_classes):
- if session not in event_registrations:
- event_registrations[session] = {
-- 'classes' : sets.Set(),
-+ 'classes' : set(),
- 'queue' : Queue.Queue(EVENT_QUEUE_LENGTH),
- 'next-id' : 1
- }
- if not reg_classes:
- reg_classes = classes
-- if hasattr(set, 'union_update'):
-- event_registrations[session]['classes'].union_update(reg_classes)
-+ sessionclasses = event_registrations[session]['classes']
-+ if hasattr(sessionclasses, 'union_update'):
-+ sessionclasses.union_update(reg_classes)
- else:
-- event_registrations[session]['classes'].update(reg_classes)
-+ sessionclasses.update(reg_classes)
-
-
-
diff --git a/sysutils/xentools33/patches/patch-fs-back_Makefile b/sysutils/xentools33/patches/patch-fs-back_Makefile
deleted file mode 100644
index ba0b318b906..00000000000
--- a/sysutils/xentools33/patches/patch-fs-back_Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-fs-back_Makefile,v 1.1 2016/05/18 21:24:44 joerg Exp $
-
---- fs-back/Makefile.orig 2016-05-18 11:39:28.000000000 +0000
-+++ fs-back/Makefile
-@@ -13,7 +13,7 @@ CFLAGS += $(CFLAGS_libxenstore)
- CFLAGS += $(INCLUDES) -I.
- CFLAGS += -D_GNU_SOURCE
-
--LIBS := -L. -L.. -L../lib
-+LIBS := -L. -L.. -L../lib ${COMPILER_RPATH_FLAG}$(LIBDIR)
- LIBS += $(LDFLAGS_libxenctrl)
- LIBS += $(LDFLAGS_libxenstore)
- LIBS += -lpthread -lrt
diff --git a/sysutils/xentools33/patches/patch-io_ring_h b/sysutils/xentools33/patches/patch-io_ring_h
deleted file mode 100644
index b76e9f80a64..00000000000
--- a/sysutils/xentools33/patches/patch-io_ring_h
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-io_ring_h,v 1.1 2012/01/09 14:06:34 cegger Exp $
-
---- ../xen/include/public/io/ring.h.orig 2009-08-06 12:56:43.000000000 +0000
-+++ ../xen/include/public/io/ring.h
-@@ -50,6 +50,12 @@ typedef unsigned int RING_IDX;
- * A ring contains as many entries as will fit, rounded down to the nearest
- * power of two (so we can mask with (size-1) to loop around).
- */
-+#define __CONST_RING_SIZE(_s, _sz) \
-+ (__RD32(((_sz) - offsetof(struct _s##_sring, ring)) / \
-+ sizeof(((struct _s##_sring *)0)->ring[0])))
-+/*
-+ * The same for passing in an actual pointer instead of a name tag.
-+ */
- #define __RING_SIZE(_s, _sz) \
- (__RD32(((_sz) - (long)(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
-
diff --git a/sysutils/xentools33/patches/patch-ioemu_block-vvfat.c b/sysutils/xentools33/patches/patch-ioemu_block-vvfat.c
deleted file mode 100644
index 127c53d3c40..00000000000
--- a/sysutils/xentools33/patches/patch-ioemu_block-vvfat.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ioemu_block-vvfat.c,v 1.1 2013/04/11 19:57:53 joerg Exp $
-
---- ioemu/block-vvfat.c.orig 2013-03-28 16:52:33.000000000 +0000
-+++ ioemu/block-vvfat.c
-@@ -175,7 +175,7 @@ static inline int array_roll(array_t* ar
- return 0;
- }
-
--inline int array_remove_slice(array_t* array,int index, int count)
-+static inline int array_remove_slice(array_t* array,int index, int count)
- {
- assert(index >=0);
- assert(count > 0);
diff --git a/sysutils/xentools33/patches/patch-libfsimage_ufs_ufs.h b/sysutils/xentools33/patches/patch-libfsimage_ufs_ufs.h
deleted file mode 100644
index bfb682ec144..00000000000
--- a/sysutils/xentools33/patches/patch-libfsimage_ufs_ufs.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-libfsimage_ufs_ufs.h,v 1.1 2013/07/19 12:57:51 joerg Exp $
-
---- libfsimage/ufs/ufs.h.orig 2013-07-14 19:44:35.000000000 +0000
-+++ libfsimage/ufs/ufs.h
-@@ -4,7 +4,7 @@
- */
-
- #ifndef _GRUB_UFS_H
--#define _GRUB_UFS_H_
-+#define _GRUB_UFS_H
-
- /* ufs specific constants */
- #define UFS_SBLOCK 16
diff --git a/sysutils/xentools33/patches/patch-python_xen_util_xmlrpcclient.py b/sysutils/xentools33/patches/patch-python_xen_util_xmlrpcclient.py
deleted file mode 100644
index b2c8e1fae53..00000000000
--- a/sysutils/xentools33/patches/patch-python_xen_util_xmlrpcclient.py
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-python_xen_util_xmlrpcclient.py,v 1.1 2012/04/07 14:48:12 bsiegert Exp $
-
---- python/xen/util/xmlrpcclient.py.orig 2012-04-02 21:17:56.000000000 +0000
-+++ python/xen/util/xmlrpcclient.py
-@@ -22,6 +22,7 @@ import socket
- import string
- import xmlrpclib
- from types import StringTypes
-+from sys import hexversion
-
-
- try:
-@@ -54,7 +55,12 @@ class UnixTransport(xmlrpclib.Transport)
- return xmlrpclib.Transport.request(self, host, '/RPC2',
- request_body, verbose)
- def make_connection(self, host):
-- return HTTPUnix(self.__handler)
-+ if hexversion < 0x02070000:
-+ # python 2.6 or earlier
-+ return HTTPUnix(self.__handler)
-+ else:
-+ # xmlrpclib.Transport changed in python 2.7
-+ return HTTPUnixConnection(self.__handler)
-
-
- # We need our own transport for HTTPS, because xmlrpclib.SafeTransport is
diff --git a/sysutils/xentools33/patches/patch-python_xen_util_xmlrpclib2.py b/sysutils/xentools33/patches/patch-python_xen_util_xmlrpclib2.py
deleted file mode 100644
index 29c2fc45d57..00000000000
--- a/sysutils/xentools33/patches/patch-python_xen_util_xmlrpclib2.py
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-python_xen_util_xmlrpclib2.py,v 1.1 2012/04/07 14:48:12 bsiegert Exp $
-
---- python/xen/util/xmlrpclib2.py.orig 2012-04-02 21:20:21.000000000 +0000
-+++ python/xen/util/xmlrpclib2.py
-@@ -58,6 +58,9 @@ def stringify(value):
- # some bugs in Keep-Alive handling and also enabled it by default
- class XMLRPCRequestHandler(SimpleXMLRPCRequestHandler):
- protocol_version = "HTTP/1.1"
-+ # xend crashes in python 2.7 unless disable_nagle_algorithm = False
-+ # it isn't used in earlier versions so it is harmless to set it generally
-+ disable_nagle_algorithm = False
-
- def __init__(self, hosts_allowed, request, client_address, server):
- self.hosts_allowed = hosts_allowed
diff --git a/sysutils/xentools33/patches/patch-qemu-e1000-CVSE-2012-0029 b/sysutils/xentools33/patches/patch-qemu-e1000-CVSE-2012-0029
deleted file mode 100644
index 533f1503ceb..00000000000
--- a/sysutils/xentools33/patches/patch-qemu-e1000-CVSE-2012-0029
+++ /dev/null
@@ -1,39 +0,0 @@
-$NetBSD: patch-qemu-e1000-CVSE-2012-0029,v 1.1 2012/02/03 17:00:25 bouyer Exp $
-
-Backported from:
-From 3cf61880403b4e484539596a95937cc066243388 Mon Sep 17 00:00:00 2001
-From: Ian Campbell <Ian.Campbell@citrix.com>
-Date: Thu, 2 Feb 2012 13:47:06 +0000
-Subject: [PATCH] e1000: bounds packet size against buffer size
-
-Otherwise we can write beyond the buffer and corrupt memory. This is tracked
-as CVE-2012-0029.
-
-Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
-
-(Backported from qemu upstream 65f82df0d7a71ce1b10cd4c5ab08888d176ac840
- by Ian Campbell.)
-
-Signed-off-by: Ian Campbell <Ian.Campbell@citrix.com>
-(cherry picked from commit ebe37b2a3f844bad02dcc30d081f39eda06118f8)
-
-
---- ioemu/hw/e1000.c.orig 2009-08-06 14:56:34.000000000 +0200
-+++ ioemu/hw/e1000.c 2012-02-03 14:51:56.000000000 +0100
-@@ -397,6 +401,8 @@
- bytes = split_size;
- if (tp->size + bytes > msh)
- bytes = msh - tp->size;
-+
-+ bytes = MIN(sizeof(tp->data) - tp->size, bytes);
- cpu_physical_memory_read(addr, tp->data + tp->size, bytes);
- if ((sz = tp->size + bytes) >= hdr && tp->size < hdr)
- memmove(tp->header, tp->data, hdr);
-@@ -412,6 +418,7 @@
- // context descriptor TSE is not set, while data descriptor TSE is set
- DBGOUT(TXERR, "TCP segmentaion Error\n");
- } else {
-+ split_size = MIN(sizeof(tp->data) - tp->size, split_size);
- cpu_physical_memory_read(addr, tp->data + tp->size, split_size);
- tp->size += split_size;
- }
diff --git a/sysutils/xentools33/patches/patch-qemu-phy-devices b/sysutils/xentools33/patches/patch-qemu-phy-devices
deleted file mode 100644
index ffbb50af99c..00000000000
--- a/sysutils/xentools33/patches/patch-qemu-phy-devices
+++ /dev/null
@@ -1,91 +0,0 @@
-$NetBSD: patch-qemu-phy-devices,v 1.1 2011/05/20 17:09:21 bouyer Exp $
-
-This does 2 things:
-- use the correct way to get the size of a disk device or partition (from
- haad@NetBSD.org)
-- if given a block device, use the character device instead.
-
---- ioemu/block-raw.c.orig 2009-08-06 14:56:33.000000000 +0200
-+++ ioemu/block-raw.c 2011-05-20 18:55:59.000000000 +0200
-@@ -63,6 +63,13 @@
- #include <sys/disklabel.h>
- #include <sys/dkio.h>
- #endif
-+#if defined(__NetBSD__)
-+#include <sys/ioctl.h>
-+#include <sys/disklabel.h>
-+#include <sys/dkio.h>
-+#include <sys/disk.h>
-+#include <sys/param.h>
-+#endif
-
- //#define DEBUG_FLOPPY
-
-@@ -101,6 +108,33 @@
- {
- BDRVRawState *s = bs->opaque;
- int fd, open_flags, ret;
-+#ifdef __NetBSD__
-+ struct stat sb;
-+ static char namebuf[MAXPATHLEN];
-+ const char *dp;
-+
-+ if (lstat(filename, &sb) < 0) {
-+ fprintf(stderr, "%s: stat failed: %s\n", filename, strerror(errno));
-+ return -errno;
-+ }
-+ if (S_ISLNK(sb.st_mode)) {
-+ fprintf(stderr, "%s: symolink links not supported by qemu-dm\n",
-+ filename);
-+ return -EINVAL;
-+ }
-+ if (S_ISBLK(sb.st_mode)) {
-+ dp = strrchr(filename, '/');
-+ if (dp == NULL) {
-+ snprintf(namebuf, MAXPATHLEN, "r%s", filename);
-+ } else {
-+ snprintf(namebuf, MAXPATHLEN, "%.*s/r%s",
-+ (int)(dp - filename), filename, dp + 1);
-+ }
-+ fprintf(stderr, "%s is a block device", filename);
-+ filename = namebuf;
-+ fprintf(stderr, ", using %s\n", filename);
-+ }
-+#endif
-
- s->lseek_err_cnt = 0;
-
-@@ -533,7 +567,7 @@
- return 0;
- }
-
--#ifdef __OpenBSD__
-+#if defined(__OpenBSD__) || defined(__NetBSD__)
- static int64_t raw_getlength(BlockDriverState *bs)
- {
- int fd = ((BDRVRawState*)bs->opaque)->fd;
-@@ -541,11 +575,24 @@
- if(fstat(fd, &st))
- return -1;
- if(S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)){
-+#ifdef __OpenBSD__
- struct disklabel dl;
- if(ioctl(fd, DIOCGDINFO, &dl))
- return -1;
- return (uint64_t)dl.d_secsize *
- dl.d_partitions[DISKPART(st.st_rdev)].p_size;
-+#else
-+ struct dkwedge_info dkw;
-+ if (ioctl(fd, DIOCGWEDGEINFO, &dkw) != -1) {
-+ return dkw.dkw_size * 512;
-+ } else {
-+ struct disklabel dl;
-+ if(ioctl(fd, DIOCGDINFO, &dl))
-+ return -1;
-+ return (uint64_t)dl.d_secsize *
-+ dl.d_partitions[DISKPART(st.st_rdev)].p_size;
-+ }
-+#endif
- }else
- return st.st_size;
- }
diff --git a/sysutils/xentools41/DESCR b/sysutils/xentools41/DESCR
deleted file mode 100644
index 04e509483fc..00000000000
--- a/sysutils/xentools41/DESCR
+++ /dev/null
@@ -1,5 +0,0 @@
-The Xen virtual machine monitor allows running several virtual machines
-on a single physical machine. The xentools41 package contains the
-tools to create, destroy and control the virtual machines.
-
-This package contains the tools for Xen 4.1.x
diff --git a/sysutils/xentools41/MESSAGE.NetBSD b/sysutils/xentools41/MESSAGE.NetBSD
deleted file mode 100644
index 28dae84aab1..00000000000
--- a/sysutils/xentools41/MESSAGE.NetBSD
+++ /dev/null
@@ -1,17 +0,0 @@
-===========================================================================
-$NetBSD: MESSAGE.NetBSD,v 1.1.1.1 2011/04/06 09:10:26 cegger Exp $
-
-Please ensure that the Xen-specific devices needed by xend(8) exist:
-
- cd /dev && sh MAKEDEV xen
-
-There are example configuration files for setting up a guest domain in:
-
- ${EGDIR}/
-
-Please also refer to the the "NetBSD/xen How-To" for more information on
-creating a Xen setup:
-
- http://www.NetBSD.org/ports/xen/howto.html
-
-===========================================================================
diff --git a/sysutils/xentools41/Makefile b/sysutils/xentools41/Makefile
deleted file mode 100644
index 14adae51595..00000000000
--- a/sysutils/xentools41/Makefile
+++ /dev/null
@@ -1,204 +0,0 @@
-# $NetBSD: Makefile,v 1.65 2016/12/20 10:22:29 bouyer Exp $
-#
-# VERSION is set in version.mk as it is shared with other packages
-.include "version.mk"
-
-DISTNAME= xen-${VERSION}
-PKGNAME= xentools41-${VERSION}
-PKGREVISION= 18
-CATEGORIES= sysutils
-MASTER_SITES= http://bits.xensource.com/oss-xen/release/${VERSION}/
-
-DISTFILES= ${DISTNAME}.tar.gz
-DISTFILES+= ipxe-git-v${VERSION_IPXE}.tar.gz
-SITES.ipxe-git-v${VERSION_IPXE}.tar.gz += http://xenbits.xensource.com/xen-extfiles/
-
-MAINTAINER= pkgsrc-users@NetBSD.org
-HOMEPAGE= http://xen.org/
-COMMENT= Userland Tools for Xen 4.1.x
-
-LICENSE= gnu-gpl-v2
-
-#DEPENDS+= ${PYPKGPREFIX}-readline-[0-9]*:../../devel/py-readline
-DEPENDS+= ${PYPKGPREFIX}-curses>=0nb4:../../devel/py-curses
-
-# XXX add version check: Xen requires dev86 >= 0.16.14
-BUILD_DEPENDS+= dev86-[0-9]*:../../devel/dev86 # needed to build firmware
-.if !exists(/usr/bin/iasl)
-BUILD_DEPENDS+= acpica-utils-[0-9]*:../../sysutils/acpica-utils
-.endif
-
-PYTHON_VERSIONS_INCOMPATIBLE= 34 35 # py-xml
-
-PKG_SYSCONFSUBDIR= xen
-
-ONLY_FOR_PLATFORM= Linux-2.6*-i386 Linux-2.6*-x86_64
-ONLY_FOR_PLATFORM+= NetBSD-[5-9].*-x86_64 NetBSD-[5-9].*-i386
-
-CONFLICTS+= libxen-[0-9]*
-CONFLICTS+= xentools20-[0-9]*
-CONFLICTS+= xentools3*
-CONFLICTS+= xenstoretools-*
-
-WRKSRC= ${WRKDIR}/xen-${VERSION}/tools
-CHECK_PORTABILITY_SKIP= examples/*
-
-EGDIR= ${PREFIX}/share/examples/xen
-MESSAGE_SUBST= EGDIR=${EGDIR}
-
-USE_TOOLS+= perl #for pod2man
-USE_TOOLS+= gmake pkg-config
-
-MAKE_ENV+= PREFIX=${prefix:Q} WRKSRC=${WRKSRC}
-MAKE_ENV+= EGDIR=${EGDIR:Q}
-MAKE_ENV+= BASH_COMPLETION_DIR=${EGDIR:Q}
-MAKE_ENV+= MV=${MV:Q} PYTHON=${PYTHONBIN:Q} SED=${SED:Q}
-MAKE_ENV+= VARBASE=${VARBASE}
-MAKE_ENV+= XEN_CONFIG_DIR=${PKG_SYSCONFDIR}
-MAKE_ENV+= V=YES
-
-#MAKE_ENV+= INSTALL_DIR=${BSD_INSTALL_DATA_DIR}
-#MAKE_ENV+= INSTALL_DATA=${BSD_INSTALL_DATA}
-#MAKE_ENV+= INSTALL_PROG=${BSD_INSTALL_PROGRAM}
-
-PY_PATCHPLIST= yes
-#REPLACE_PYTHON+= misc/xm
-#REPLACE_PYTHON+= misc/netfix
-#REPLACE_PYTHON+= misc/xen-bugtool
-#REPLACE_PYTHON+= misc/xencons
-#REPLACE_PYTHON+= misc/xend
-#REPLACE_PYTHON+= misc/xensymoops
-#REPLACE_PYTHON+= misc/xen-python-path
-#REPLACE_PYTHON+= pygrub/src/pygrub
-#REPLACE_PYTHON+= python/xen/util/*.py
-#REPLACE_PYTHON+= python/xen/xend/*.py
-#REPLACE_PYTHON+= python/xen/xm/*.py
-#REPLACE_PYTHON+= python/xen/util/*.py
-#REPLACE_PYTHON+= python/*.py
-#REPLACE_PYTHON+= security/python/xensec_gen/cgi-bin/policy.cgi
-#REPLACE_PYTHON+= security/python/xensec_gen/*.py
-#REPLACE_PYTHON+= security/python/*.py
-#REPLACE_PYTHON+= security/*.py
-#REPLACE_PYTHON+= xenmon/*.py
-#REPLACE_PYTHON+= xentrace/xentrace_format
-
-REPLACE_PYTHON+= python/xen/remus/*.py
-REPLACE_PYTHON+= python/xen/util/*.py
-REPLACE_PYTHON+= python/xen/xend/*.py
-REPLACE_PYTHON+= python/xen/xm/*.py
-REPLACE_PYTHON+= xenmon/xenmon.py
-
-SUBST_CLASSES+= pathsvar
-SUBST_STAGE.pathsvar= pre-configure
-SUBST_FILES.pathsvar= Makefile \
- examples/xend-config.sxp \
- hotplug/Linux/init.d/sysconfig.xendomains \
- python/xen/xend/XendOptions.py \
- python/xen/xend/server/relocate.py \
- python/xen/xend/tests/xend-config.sxp \
- security/Makefile \
- security/python/xensec_gen/main.py \
- xenstore/xs_lib.c
-SUBST_SED.pathsvar= -e "s|/var/lib|${VARBASE}/run|g"
-
-SUBST_CLASSES+= conf
-SUBST_STAGE.conf= pre-configure
-SUBST_FILES.conf+= python/xen/xm/create.py
-SUBST_FILES.conf+= ocaml/xenstored/define.ml
-SUBST_SED.conf= -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g"
-
-XEND_SCRIPTS= block vif-bridge vif-ip qemu-ifup hotplugpath.sh
-
-SUBST_CLASSES.NetBSD+= proc
-SUBST_STAGE.proc= pre-configure
-SUBST_FILES.proc= python/xen/xend/XendVnet.py
-SUBST_FILES.proc+= ocaml/xenstored/define.ml
-SUBST_SED.proc= -e "s|/proc|/kern|g"
-
-OPSYSVARS+= PROCPATH
-PROCPATH.NetBSD= /kern
-PROCPATH.*= /proc
-
-.include "../../mk/bsd.prefs.mk"
-
-SUBST_CLASSES+= procdev
-SUBST_STAGE.procdev= pre-configure
-SUBST_FILES.procdev= ocaml/xenstored/define.ml
-.if ${OPSYS} == "NetBSD"
-SUBST_SED.procdev= -e "s|@PROCDEV@|/dev|g"
-.else
-SUBST_SED.procdev= -e "s|@PROCDEV@|/proc/xen|g"
-.endif
-
-RCD_SCRIPTS= xen-watchdog xencommons xend xendomains
-FILES_SUBST+= RCD_INTERPRETER=${PYTHONBIN:Q}
-FILES_SUBST+= PROCPATH=${PROCPATH:Q}
-FILES_SUBST+= PKG_SYSCONFDIR=${PKG_SYSCONFDIR:Q}
-FILES_SUBST+= PREFIX=${PREFIX:Q}
-
-BLKTAP_FILES= blk_netbsd.c blktapctrl_netbsd.c
-
-CONF_FILES+= ${EGDIR}/xend-config.sxp ${PKG_SYSCONFDIR}/xend-config.sxp
-CONF_FILES+= ${EGDIR}/formats ${PKG_SYSCONFDIR}/formats
-CONF_FILES+= ${EGDIR}/xm-config.xml ${PKG_SYSCONFDIR}/xm-config.xml
-
-OWN_DIRS= ${PKG_SYSCONFDIR}/scripts ${VARBASE}/log/xen ${VARBASE}/lib
-
-.for s in ${XEND_SCRIPTS}
-CONF_FILES_PERMS+= ${EGDIR}/scripts/${s} ${PKG_SYSCONFDIR}/scripts/${s} \
- ${REAL_ROOT_USER} ${REAL_ROOT_GROUP} 0755
-.endfor
-
-pre-build:
- rm -f ${WRKSRC}/check/check_x11_devel
-.for s in ${BLKTAP_FILES}
- ${CP} ${FILESDIR}/${s} ${WRKSRC}/blktap/drivers/
-.endfor
- pod2man ${WRKSRC}/../docs/man/xend-config.sxp.pod.5 |\
- ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
- >${WRKDIR}/xend-config.sxp.5
- pod2man ${WRKSRC}/../docs/man/xmdomain.cfg.pod.5 |\
- ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
- >${WRKDIR}/xmdomain.cfg.5
- pod2man ${WRKSRC}/../docs/man/xm.pod.1 |\
- ${SED} -e "s,@XENDCONFDIR@,${PKG_SYSCONFDIR},g" \
- >${WRKDIR}/xm.1
-
-INSTALLATION_DIRS= ${EGDIR} ${PKGMANDIR}/man5
-
-post-install:
- for f in xend-config.sxp xmexample1 xmexample2 xmexample3; do \
- ${INSTALL_DATA} ${WRKSRC}/examples/$$f ${DESTDIR}${EGDIR}/$$f; \
- done
- ${INSTALL_DATA} ${WRKDIR}/xend-config.sxp.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
- ${INSTALL_DATA} ${WRKDIR}/xmdomain.cfg.5 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man5
- ${INSTALL_DATA} ${WRKDIR}/xm.1 ${DESTDIR}${PREFIX}/${PKGMANDIR}/man1
-
-.if (${OPSYS} == "NetBSD" && \
- (empty(OS_VERSION:M6.99.[3-9]?) && empty(OS_VERSION:M[7-9].*)))
-CPPFLAGS+= -Dshm_open=open -Dshm_unlink=unlink
-.endif
-
-.include "../../mk/compiler.mk"
-.if !empty(PKGSRC_COMPILER:Mclang)
-EXTRA_HOSTCFLAGS+= -Wno-error=ignored-attributes
-EXTRA_CFLAGS+= -Wno-error=ignored-attributes -no-integrated-as \
- -Wno-error=tautological-compare -Wno-error=null-dereference \
- -Wno-error=empty-body -Wno-error=self-assign \
- -Wno-error=sometimes-uninitialized -Wno-error=unused-function
-BUILDLINK_TRANSFORM+= rm:-falign-jumps=1 rm:-falign-loops=1 \
- rm:-mpreferred-stack-boundary=2
-.endif
-
-MAKE_ENV+= EXTRA_HOSTCFLAGS=${EXTRA_HOSTCFLAGS:Q} EXTRA_CFLAGS=${EXTRA_CFLAGS:Q}
-
-.include "../../lang/python/application.mk"
-.include "../../lang/python/extension.mk"
-.include "../../textproc/py-xml/buildlink3.mk"
-.include "../../devel/ncurses/buildlink3.mk"
-#.include "../../devel/SDL/buildlink3.mk"
-.include "../../lang/ocaml/buildlink3.mk"
-.include "../../devel/ocaml-findlib/buildlink3.mk"
-.include "../../sysutils/pciutils/buildlink3.mk"
-
-.include "../../mk/bsd.pkg.mk"
diff --git a/sysutils/xentools41/PLIST b/sysutils/xentools41/PLIST
deleted file mode 100644
index 9958acc4dec..00000000000
--- a/sysutils/xentools41/PLIST
+++ /dev/null
@@ -1,756 +0,0 @@
-@comment $NetBSD: PLIST,v 1.5 2014/03/11 14:05:16 jperkin Exp $
-bin/lsevtchn
-bin/pygrub
-bin/qemu-img-xen
-bin/readnotes
-bin/remus
-bin/xc_restore
-bin/xc_save
-bin/xen-detect
-bin/xencons
-bin/xenconsole
-bin/xenctx
-bin/xenstore
-bin/xenstore-chmod
-bin/xenstore-control
-bin/xenstore-exists
-bin/xenstore-list
-bin/xenstore-ls
-bin/xenstore-read
-bin/xenstore-rm
-bin/xenstore-watch
-bin/xenstore-write
-bin/xentrace
-bin/xentrace_format
-bin/xentrace_setsize
-include/_libxl_types.h
-include/blktaplib.h
-include/fsimage.h
-include/fsimage_grub.h
-include/fsimage_plugin.h
-include/libxl.h
-include/libxl_uuid.h
-include/xen/COPYING
-include/xen/arch-ia64.h
-include/xen/arch-ia64/debug_op.h
-include/xen/arch-ia64/hvm/memmap.h
-include/xen/arch-ia64/hvm/save.h
-include/xen/arch-ia64/sioemu.h
-include/xen/arch-x86/cpuid.h
-include/xen/arch-x86/hvm/save.h
-include/xen/arch-x86/xen-mca.h
-include/xen/arch-x86/xen-x86_32.h
-include/xen/arch-x86/xen-x86_64.h
-include/xen/arch-x86/xen.h
-include/xen/arch-x86_32.h
-include/xen/arch-x86_64.h
-include/xen/callback.h
-include/xen/dom0_ops.h
-include/xen/domctl.h
-include/xen/elfnote.h
-include/xen/event_channel.h
-include/xen/features.h
-include/xen/foreign/ia64.h
-include/xen/foreign/x86_32.h
-include/xen/foreign/x86_64.h
-include/xen/grant_table.h
-include/xen/hvm/e820.h
-include/xen/hvm/hvm_info_table.h
-include/xen/hvm/hvm_op.h
-include/xen/hvm/ioreq.h
-include/xen/hvm/params.h
-include/xen/hvm/save.h
-include/xen/io/blkif.h
-include/xen/io/console.h
-include/xen/io/fbif.h
-include/xen/io/fsif.h
-include/xen/io/kbdif.h
-include/xen/io/netif.h
-include/xen/io/pciif.h
-include/xen/io/protocols.h
-include/xen/io/ring.h
-include/xen/io/tpmif.h
-include/xen/io/usbif.h
-include/xen/io/vscsiif.h
-include/xen/io/xenbus.h
-include/xen/io/xs_wire.h
-include/xen/kexec.h
-include/xen/mem_event.h
-include/xen/memory.h
-include/xen/nmi.h
-include/xen/physdev.h
-include/xen/platform.h
-include/xen/sched.h
-include/xen/sys/evtchn.h
-include/xen/sys/gntdev.h
-include/xen/sys/privcmd.h
-include/xen/sysctl.h
-include/xen/tmem.h
-include/xen/trace.h
-include/xen/vcpu.h
-include/xen/version.h
-include/xen/xen-compat.h
-include/xen/xen.h
-include/xen/xencomm.h
-include/xen/xenoprof.h
-include/xen/xsm/acm.h
-include/xen/xsm/acm_ops.h
-include/xen/xsm/flask_op.h
-include/xen/xsm/libflask.h
-include/xenctrl.h
-include/xenctrlosdep.h
-include/xenguest.h
-include/xentoollog.h
-include/xs.h
-include/xs_lib.h
-lib/fs/ext2fs/fsimage.so
-lib/fs/fat/fsimage.so
-lib/fs/iso9660/fsimage.so
-lib/fs/reiserfs/fsimage.so
-lib/fs/ufs/fsimage.so
-lib/fs/zfs/fsimage.so
-lib/libblktap.a
-lib/libblktap.so
-lib/libblktap.so.3.0
-lib/libblktap.so.3.0.0
-lib/libflask.a
-lib/libflask.so
-lib/libflask.so.1.0
-lib/libflask.so.1.0.0
-lib/libfsimage.so
-lib/libfsimage.so.1.0
-lib/libfsimage.so.1.0.0
-lib/libxenctrl.a
-lib/libxenctrl.so
-lib/libxenctrl.so.4.0
-lib/libxenctrl.so.4.0.0
-lib/libxenguest.a
-lib/libxenguest.so
-lib/libxenguest.so.4.0
-lib/libxenguest.so.4.0.0
-lib/libxenlight.a
-lib/libxenlight.so
-lib/libxenlight.so.1.0
-lib/libxenlight.so.1.0.0
-lib/libxenstore.a
-lib/libxenstore.so
-lib/libxenstore.so.3.0
-lib/libxenstore.so.3.0.0
-lib/libxlutil.a
-lib/libxlutil.so
-lib/libxlutil.so.1.0
-lib/libxlutil.so.1.0.0
-lib/ocaml/site-lib/eventchn/META
-lib/ocaml/site-lib/eventchn/dlleventchn_stubs.so
-lib/ocaml/site-lib/eventchn/eventchn.a
-lib/ocaml/site-lib/eventchn/eventchn.cma
-lib/ocaml/site-lib/eventchn/eventchn.cmi
-lib/ocaml/site-lib/eventchn/eventchn.cmx
-lib/ocaml/site-lib/eventchn/eventchn.cmxa
-lib/ocaml/site-lib/eventchn/libeventchn_stubs.a
-lib/ocaml/site-lib/log/META
-lib/ocaml/site-lib/log/dllsyslog_stubs.so
-lib/ocaml/site-lib/log/libsyslog_stubs.a
-lib/ocaml/site-lib/log/log.a
-lib/ocaml/site-lib/log/log.cma
-lib/ocaml/site-lib/log/log.cmi
-lib/ocaml/site-lib/log/log.cmx
-lib/ocaml/site-lib/log/log.cmxa
-lib/ocaml/site-lib/log/logs.cmi
-lib/ocaml/site-lib/log/logs.cmx
-lib/ocaml/site-lib/log/syslog.cmi
-lib/ocaml/site-lib/log/syslog.cmx
-lib/ocaml/site-lib/mmap/META
-lib/ocaml/site-lib/mmap/dllmmap_stubs.so
-lib/ocaml/site-lib/mmap/libmmap_stubs.a
-lib/ocaml/site-lib/mmap/mmap.a
-lib/ocaml/site-lib/mmap/mmap.cma
-lib/ocaml/site-lib/mmap/mmap.cmi
-lib/ocaml/site-lib/mmap/mmap.cmx
-lib/ocaml/site-lib/mmap/mmap.cmxa
-lib/ocaml/site-lib/uuid/META
-lib/ocaml/site-lib/uuid/uuid.a
-lib/ocaml/site-lib/uuid/uuid.cma
-lib/ocaml/site-lib/uuid/uuid.cmi
-lib/ocaml/site-lib/uuid/uuid.cmx
-lib/ocaml/site-lib/uuid/uuid.cmxa
-lib/ocaml/site-lib/xb/META
-lib/ocaml/site-lib/xb/dllxb_stubs.so
-lib/ocaml/site-lib/xb/libxb_stubs.a
-lib/ocaml/site-lib/xb/op.cmi
-lib/ocaml/site-lib/xb/op.cmx
-lib/ocaml/site-lib/xb/packet.cmi
-lib/ocaml/site-lib/xb/packet.cmx
-lib/ocaml/site-lib/xb/partial.cmx
-lib/ocaml/site-lib/xb/xb.a
-lib/ocaml/site-lib/xb/xb.cma
-lib/ocaml/site-lib/xb/xb.cmi
-lib/ocaml/site-lib/xb/xb.cmx
-lib/ocaml/site-lib/xb/xb.cmxa
-lib/ocaml/site-lib/xb/xs_ring.cmx
-lib/ocaml/site-lib/xc/META
-lib/ocaml/site-lib/xc/dllxc_stubs.so
-lib/ocaml/site-lib/xc/libxc_stubs.a
-lib/ocaml/site-lib/xc/xc.a
-lib/ocaml/site-lib/xc/xc.cma
-lib/ocaml/site-lib/xc/xc.cmi
-lib/ocaml/site-lib/xc/xc.cmx
-lib/ocaml/site-lib/xc/xc.cmxa
-lib/ocaml/site-lib/xl/META
-lib/ocaml/site-lib/xl/dllxl_stubs.so
-lib/ocaml/site-lib/xl/libxl_stubs.a
-lib/ocaml/site-lib/xl/xl.a
-lib/ocaml/site-lib/xl/xl.cma
-lib/ocaml/site-lib/xl/xl.cmi
-lib/ocaml/site-lib/xl/xl.cmx
-lib/ocaml/site-lib/xl/xl.cmxa
-lib/ocaml/site-lib/xs/META
-lib/ocaml/site-lib/xs/queueop.cmx
-lib/ocaml/site-lib/xs/xs.a
-lib/ocaml/site-lib/xs/xs.cma
-lib/ocaml/site-lib/xs/xs.cmi
-lib/ocaml/site-lib/xs/xs.cmx
-lib/ocaml/site-lib/xs/xs.cmxa
-lib/ocaml/site-lib/xs/xs.mli
-lib/ocaml/site-lib/xs/xsraw.cmi
-lib/ocaml/site-lib/xs/xsraw.cmx
-lib/ocaml/site-lib/xs/xsraw.mli
-lib/ocaml/site-lib/xs/xst.cmi
-lib/ocaml/site-lib/xs/xst.cmx
-lib/ocaml/site-lib/xs/xst.mli
-${PYSITELIB}/fsimage.so
-${PYSITELIB}/grub/ExtLinuxConf.py
-${PYSITELIB}/grub/ExtLinuxConf.pyc
-${PYSITELIB}/grub/GrubConf.py
-${PYSITELIB}/grub/GrubConf.pyc
-${PYSITELIB}/grub/LiloConf.py
-${PYSITELIB}/grub/LiloConf.pyc
-${PYSITELIB}/grub/__init__.py
-${PYSITELIB}/grub/__init__.pyc
-${PYSITELIB}/xen/__init__.py
-${PYSITELIB}/xen/__init__.pyc
-${PYSITELIB}/xen/lowlevel/__init__.py
-${PYSITELIB}/xen/lowlevel/__init__.pyc
-${PYSITELIB}/xen/lowlevel/acm.so
-${PYSITELIB}/xen/lowlevel/flask.so
-${PYSITELIB}/xen/lowlevel/ptsname.so
-${PYSITELIB}/xen/lowlevel/xc.so
-${PYSITELIB}/xen/lowlevel/xl.so
-${PYSITELIB}/xen/lowlevel/xs.so
-${PYSITELIB}/xen/remus/__init__.py
-${PYSITELIB}/xen/remus/__init__.pyc
-${PYSITELIB}/xen/remus/blkdev.py
-${PYSITELIB}/xen/remus/blkdev.pyc
-${PYSITELIB}/xen/remus/device.py
-${PYSITELIB}/xen/remus/device.pyc
-${PYSITELIB}/xen/remus/image.py
-${PYSITELIB}/xen/remus/image.pyc
-${PYSITELIB}/xen/remus/netlink.py
-${PYSITELIB}/xen/remus/netlink.pyc
-${PYSITELIB}/xen/remus/profile.py
-${PYSITELIB}/xen/remus/profile.pyc
-${PYSITELIB}/xen/remus/qdisc.py
-${PYSITELIB}/xen/remus/qdisc.pyc
-${PYSITELIB}/xen/remus/save.py
-${PYSITELIB}/xen/remus/save.pyc
-${PYSITELIB}/xen/remus/tapdisk.py
-${PYSITELIB}/xen/remus/tapdisk.pyc
-${PYSITELIB}/xen/remus/util.py
-${PYSITELIB}/xen/remus/util.pyc
-${PYSITELIB}/xen/remus/vbd.py
-${PYSITELIB}/xen/remus/vbd.pyc
-${PYSITELIB}/xen/remus/vdi.py
-${PYSITELIB}/xen/remus/vdi.pyc
-${PYSITELIB}/xen/remus/vif.py
-${PYSITELIB}/xen/remus/vif.pyc
-${PYSITELIB}/xen/remus/vm.py
-${PYSITELIB}/xen/remus/vm.pyc
-${PYSITELIB}/xen/sv/CreateDomain.py
-${PYSITELIB}/xen/sv/CreateDomain.pyc
-${PYSITELIB}/xen/sv/DomInfo.py
-${PYSITELIB}/xen/sv/DomInfo.pyc
-${PYSITELIB}/xen/sv/GenTabbed.py
-${PYSITELIB}/xen/sv/GenTabbed.pyc
-${PYSITELIB}/xen/sv/HTMLBase.py
-${PYSITELIB}/xen/sv/HTMLBase.pyc
-${PYSITELIB}/xen/sv/Main.py
-${PYSITELIB}/xen/sv/Main.pyc
-${PYSITELIB}/xen/sv/NodeInfo.py
-${PYSITELIB}/xen/sv/NodeInfo.pyc
-${PYSITELIB}/xen/sv/RestoreDomain.py
-${PYSITELIB}/xen/sv/RestoreDomain.pyc
-${PYSITELIB}/xen/sv/Wizard.py
-${PYSITELIB}/xen/sv/Wizard.pyc
-${PYSITELIB}/xen/sv/__init__.py
-${PYSITELIB}/xen/sv/__init__.pyc
-${PYSITELIB}/xen/sv/util.py
-${PYSITELIB}/xen/sv/util.pyc
-${PYSITELIB}/xen/util/Brctl.py
-${PYSITELIB}/xen/util/Brctl.pyc
-${PYSITELIB}/xen/util/SSHTransport.py
-${PYSITELIB}/xen/util/SSHTransport.pyc
-${PYSITELIB}/xen/util/__init__.py
-${PYSITELIB}/xen/util/__init__.pyc
-${PYSITELIB}/xen/util/acmpolicy.py
-${PYSITELIB}/xen/util/acmpolicy.pyc
-${PYSITELIB}/xen/util/asserts.py
-${PYSITELIB}/xen/util/asserts.pyc
-${PYSITELIB}/xen/util/auxbin.py
-${PYSITELIB}/xen/util/auxbin.pyc
-${PYSITELIB}/xen/util/blkif.py
-${PYSITELIB}/xen/util/blkif.pyc
-${PYSITELIB}/xen/util/bootloader.py
-${PYSITELIB}/xen/util/bootloader.pyc
-${PYSITELIB}/xen/util/bugtool.py
-${PYSITELIB}/xen/util/bugtool.pyc
-${PYSITELIB}/xen/util/diagnose.py
-${PYSITELIB}/xen/util/diagnose.pyc
-${PYSITELIB}/xen/util/dictio.py
-${PYSITELIB}/xen/util/dictio.pyc
-${PYSITELIB}/xen/util/fileuri.py
-${PYSITELIB}/xen/util/fileuri.pyc
-${PYSITELIB}/xen/util/ip.py
-${PYSITELIB}/xen/util/ip.pyc
-${PYSITELIB}/xen/util/mac.py
-${PYSITELIB}/xen/util/mac.pyc
-${PYSITELIB}/xen/util/mkdir.py
-${PYSITELIB}/xen/util/mkdir.pyc
-${PYSITELIB}/xen/util/oshelp.py
-${PYSITELIB}/xen/util/oshelp.pyc
-${PYSITELIB}/xen/util/path.py
-${PYSITELIB}/xen/util/path.pyc
-${PYSITELIB}/xen/util/pci.py
-${PYSITELIB}/xen/util/pci.pyc
-${PYSITELIB}/xen/util/rwlock.py
-${PYSITELIB}/xen/util/rwlock.pyc
-${PYSITELIB}/xen/util/sxputils.py
-${PYSITELIB}/xen/util/sxputils.pyc
-${PYSITELIB}/xen/util/utils.py
-${PYSITELIB}/xen/util/utils.pyc
-${PYSITELIB}/xen/util/vscsi_util.py
-${PYSITELIB}/xen/util/vscsi_util.pyc
-${PYSITELIB}/xen/util/vusb_util.py
-${PYSITELIB}/xen/util/vusb_util.pyc
-${PYSITELIB}/xen/util/xmlrpcclient.py
-${PYSITELIB}/xen/util/xmlrpcclient.pyc
-${PYSITELIB}/xen/util/xmlrpclib2.py
-${PYSITELIB}/xen/util/xmlrpclib2.pyc
-${PYSITELIB}/xen/util/xpopen.py
-${PYSITELIB}/xen/util/xpopen.pyc
-${PYSITELIB}/xen/util/xsconstants.py
-${PYSITELIB}/xen/util/xsconstants.pyc
-${PYSITELIB}/xen/util/xsm/__init__.py
-${PYSITELIB}/xen/util/xsm/__init__.pyc
-${PYSITELIB}/xen/util/xsm/acm/__init__.py
-${PYSITELIB}/xen/util/xsm/acm/__init__.pyc
-${PYSITELIB}/xen/util/xsm/acm/acm.py
-${PYSITELIB}/xen/util/xsm/acm/acm.pyc
-${PYSITELIB}/xen/util/xsm/dummy/__init__.py
-${PYSITELIB}/xen/util/xsm/dummy/__init__.pyc
-${PYSITELIB}/xen/util/xsm/dummy/dummy.py
-${PYSITELIB}/xen/util/xsm/dummy/dummy.pyc
-${PYSITELIB}/xen/util/xsm/flask/__init__.py
-${PYSITELIB}/xen/util/xsm/flask/__init__.pyc
-${PYSITELIB}/xen/util/xsm/flask/flask.py
-${PYSITELIB}/xen/util/xsm/flask/flask.pyc
-${PYSITELIB}/xen/util/xsm/xsm.py
-${PYSITELIB}/xen/util/xsm/xsm.pyc
-${PYSITELIB}/xen/util/xsm/xsm_core.py
-${PYSITELIB}/xen/util/xsm/xsm_core.pyc
-${PYSITELIB}/xen/util/xspolicy.py
-${PYSITELIB}/xen/util/xspolicy.pyc
-${PYSITELIB}/xen/web/SrvBase.py
-${PYSITELIB}/xen/web/SrvBase.pyc
-${PYSITELIB}/xen/web/SrvDir.py
-${PYSITELIB}/xen/web/SrvDir.pyc
-${PYSITELIB}/xen/web/__init__.py
-${PYSITELIB}/xen/web/__init__.pyc
-${PYSITELIB}/xen/web/connection.py
-${PYSITELIB}/xen/web/connection.pyc
-${PYSITELIB}/xen/web/http.py
-${PYSITELIB}/xen/web/http.pyc
-${PYSITELIB}/xen/web/httpserver.py
-${PYSITELIB}/xen/web/httpserver.pyc
-${PYSITELIB}/xen/web/protocol.py
-${PYSITELIB}/xen/web/protocol.pyc
-${PYSITELIB}/xen/web/resource.py
-${PYSITELIB}/xen/web/resource.pyc
-${PYSITELIB}/xen/web/static.py
-${PYSITELIB}/xen/web/static.pyc
-${PYSITELIB}/xen/web/tcp.py
-${PYSITELIB}/xen/web/tcp.pyc
-${PYSITELIB}/xen/web/unix.py
-${PYSITELIB}/xen/web/unix.pyc
-${PYSITELIB}/xen/xend/Args.py
-${PYSITELIB}/xen/xend/Args.pyc
-${PYSITELIB}/xen/xend/MemoryPool.py
-${PYSITELIB}/xen/xend/MemoryPool.pyc
-${PYSITELIB}/xen/xend/PrettyPrint.py
-${PYSITELIB}/xen/xend/PrettyPrint.pyc
-${PYSITELIB}/xen/xend/Vifctl.py
-${PYSITELIB}/xen/xend/Vifctl.pyc
-${PYSITELIB}/xen/xend/XendAPI.py
-${PYSITELIB}/xen/xend/XendAPI.pyc
-${PYSITELIB}/xen/xend/XendAPIConstants.py
-${PYSITELIB}/xen/xend/XendAPIConstants.pyc
-${PYSITELIB}/xen/xend/XendAPIStore.py
-${PYSITELIB}/xen/xend/XendAPIStore.pyc
-${PYSITELIB}/xen/xend/XendAPIVersion.py
-${PYSITELIB}/xen/xend/XendAPIVersion.pyc
-${PYSITELIB}/xen/xend/XendAuthSessions.py
-${PYSITELIB}/xen/xend/XendAuthSessions.pyc
-${PYSITELIB}/xen/xend/XendBase.py
-${PYSITELIB}/xen/xend/XendBase.pyc
-${PYSITELIB}/xen/xend/XendBootloader.py
-${PYSITELIB}/xen/xend/XendBootloader.pyc
-${PYSITELIB}/xen/xend/XendCPUPool.py
-${PYSITELIB}/xen/xend/XendCPUPool.pyc
-${PYSITELIB}/xen/xend/XendCheckpoint.py
-${PYSITELIB}/xen/xend/XendCheckpoint.pyc
-${PYSITELIB}/xen/xend/XendClient.py
-${PYSITELIB}/xen/xend/XendClient.pyc
-${PYSITELIB}/xen/xend/XendConfig.py
-${PYSITELIB}/xen/xend/XendConfig.pyc
-${PYSITELIB}/xen/xend/XendConstants.py
-${PYSITELIB}/xen/xend/XendConstants.pyc
-${PYSITELIB}/xen/xend/XendDPCI.py
-${PYSITELIB}/xen/xend/XendDPCI.pyc
-${PYSITELIB}/xen/xend/XendDSCSI.py
-${PYSITELIB}/xen/xend/XendDSCSI.pyc
-${PYSITELIB}/xen/xend/XendDevices.py
-${PYSITELIB}/xen/xend/XendDevices.pyc
-${PYSITELIB}/xen/xend/XendDmesg.py
-${PYSITELIB}/xen/xend/XendDmesg.pyc
-${PYSITELIB}/xen/xend/XendDomain.py
-${PYSITELIB}/xen/xend/XendDomain.pyc
-${PYSITELIB}/xen/xend/XendDomainInfo.py
-${PYSITELIB}/xen/xend/XendDomainInfo.pyc
-${PYSITELIB}/xen/xend/XendError.py
-${PYSITELIB}/xen/xend/XendError.pyc
-${PYSITELIB}/xen/xend/XendLocalStorageRepo.py
-${PYSITELIB}/xen/xend/XendLocalStorageRepo.pyc
-${PYSITELIB}/xen/xend/XendLogging.py
-${PYSITELIB}/xen/xend/XendLogging.pyc
-${PYSITELIB}/xen/xend/XendMonitor.py
-${PYSITELIB}/xen/xend/XendMonitor.pyc
-${PYSITELIB}/xen/xend/XendNetwork.py
-${PYSITELIB}/xen/xend/XendNetwork.pyc
-${PYSITELIB}/xen/xend/XendNode.py
-${PYSITELIB}/xen/xend/XendNode.pyc
-${PYSITELIB}/xen/xend/XendOptions.py
-${PYSITELIB}/xen/xend/XendOptions.pyc
-${PYSITELIB}/xen/xend/XendPBD.py
-${PYSITELIB}/xen/xend/XendPBD.pyc
-${PYSITELIB}/xen/xend/XendPIF.py
-${PYSITELIB}/xen/xend/XendPIF.pyc
-${PYSITELIB}/xen/xend/XendPIFMetrics.py
-${PYSITELIB}/xen/xend/XendPIFMetrics.pyc
-${PYSITELIB}/xen/xend/XendPPCI.py
-${PYSITELIB}/xen/xend/XendPPCI.pyc
-${PYSITELIB}/xen/xend/XendPSCSI.py
-${PYSITELIB}/xen/xend/XendPSCSI.pyc
-${PYSITELIB}/xen/xend/XendProtocol.py
-${PYSITELIB}/xen/xend/XendProtocol.pyc
-${PYSITELIB}/xen/xend/XendQCoWStorageRepo.py
-${PYSITELIB}/xen/xend/XendQCoWStorageRepo.pyc
-${PYSITELIB}/xen/xend/XendSXPDev.py
-${PYSITELIB}/xen/xend/XendSXPDev.pyc
-${PYSITELIB}/xen/xend/XendStateStore.py
-${PYSITELIB}/xen/xend/XendStateStore.pyc
-${PYSITELIB}/xen/xend/XendStorageRepository.py
-${PYSITELIB}/xen/xend/XendStorageRepository.pyc
-${PYSITELIB}/xen/xend/XendTask.py
-${PYSITELIB}/xen/xend/XendTask.pyc
-${PYSITELIB}/xen/xend/XendTaskManager.py
-${PYSITELIB}/xen/xend/XendTaskManager.pyc
-${PYSITELIB}/xen/xend/XendVDI.py
-${PYSITELIB}/xen/xend/XendVDI.pyc
-${PYSITELIB}/xen/xend/XendVMMetrics.py
-${PYSITELIB}/xen/xend/XendVMMetrics.pyc
-${PYSITELIB}/xen/xend/XendVnet.py
-${PYSITELIB}/xen/xend/XendVnet.pyc
-${PYSITELIB}/xen/xend/XendXSPolicy.py
-${PYSITELIB}/xen/xend/XendXSPolicy.pyc
-${PYSITELIB}/xen/xend/XendXSPolicyAdmin.py
-${PYSITELIB}/xen/xend/XendXSPolicyAdmin.pyc
-${PYSITELIB}/xen/xend/__init__.py
-${PYSITELIB}/xen/xend/__init__.pyc
-${PYSITELIB}/xen/xend/arch.py
-${PYSITELIB}/xen/xend/arch.pyc
-${PYSITELIB}/xen/xend/balloon.py
-${PYSITELIB}/xen/xend/balloon.pyc
-${PYSITELIB}/xen/xend/encode.py
-${PYSITELIB}/xen/xend/encode.pyc
-${PYSITELIB}/xen/xend/image.py
-${PYSITELIB}/xen/xend/image.pyc
-${PYSITELIB}/xen/xend/osdep.py
-${PYSITELIB}/xen/xend/osdep.pyc
-${PYSITELIB}/xen/xend/server/BlktapController.py
-${PYSITELIB}/xen/xend/server/BlktapController.pyc
-${PYSITELIB}/xen/xend/server/ConsoleController.py
-${PYSITELIB}/xen/xend/server/ConsoleController.pyc
-${PYSITELIB}/xen/xend/server/DevConstants.py
-${PYSITELIB}/xen/xend/server/DevConstants.pyc
-${PYSITELIB}/xen/xend/server/DevController.py
-${PYSITELIB}/xen/xend/server/DevController.pyc
-${PYSITELIB}/xen/xend/server/SSLXMLRPCServer.py
-${PYSITELIB}/xen/xend/server/SSLXMLRPCServer.pyc
-${PYSITELIB}/xen/xend/server/SrvDaemon.py
-${PYSITELIB}/xen/xend/server/SrvDaemon.pyc
-${PYSITELIB}/xen/xend/server/SrvDmesg.py
-${PYSITELIB}/xen/xend/server/SrvDmesg.pyc
-${PYSITELIB}/xen/xend/server/SrvDomain.py
-${PYSITELIB}/xen/xend/server/SrvDomain.pyc
-${PYSITELIB}/xen/xend/server/SrvDomainDir.py
-${PYSITELIB}/xen/xend/server/SrvDomainDir.pyc
-${PYSITELIB}/xen/xend/server/SrvNode.py
-${PYSITELIB}/xen/xend/server/SrvNode.pyc
-${PYSITELIB}/xen/xend/server/SrvRoot.py
-${PYSITELIB}/xen/xend/server/SrvRoot.pyc
-${PYSITELIB}/xen/xend/server/SrvServer.py
-${PYSITELIB}/xen/xend/server/SrvServer.pyc
-${PYSITELIB}/xen/xend/server/SrvVnetDir.py
-${PYSITELIB}/xen/xend/server/SrvVnetDir.pyc
-${PYSITELIB}/xen/xend/server/SrvXendLog.py
-${PYSITELIB}/xen/xend/server/SrvXendLog.pyc
-${PYSITELIB}/xen/xend/server/XMLRPCServer.py
-${PYSITELIB}/xen/xend/server/XMLRPCServer.pyc
-${PYSITELIB}/xen/xend/server/__init__.py
-${PYSITELIB}/xen/xend/server/__init__.pyc
-${PYSITELIB}/xen/xend/server/blkif.py
-${PYSITELIB}/xen/xend/server/blkif.pyc
-${PYSITELIB}/xen/xend/server/iopif.py
-${PYSITELIB}/xen/xend/server/iopif.pyc
-${PYSITELIB}/xen/xend/server/irqif.py
-${PYSITELIB}/xen/xend/server/irqif.pyc
-${PYSITELIB}/xen/xend/server/netif.py
-${PYSITELIB}/xen/xend/server/netif.pyc
-${PYSITELIB}/xen/xend/server/netif2.py
-${PYSITELIB}/xen/xend/server/netif2.pyc
-${PYSITELIB}/xen/xend/server/params.py
-${PYSITELIB}/xen/xend/server/params.pyc
-${PYSITELIB}/xen/xend/server/pciif.py
-${PYSITELIB}/xen/xend/server/pciif.pyc
-${PYSITELIB}/xen/xend/server/pciquirk.py
-${PYSITELIB}/xen/xend/server/pciquirk.pyc
-${PYSITELIB}/xen/xend/server/relocate.py
-${PYSITELIB}/xen/xend/server/relocate.pyc
-${PYSITELIB}/xen/xend/server/tests/__init__.py
-${PYSITELIB}/xen/xend/server/tests/__init__.pyc
-${PYSITELIB}/xen/xend/server/tests/test_controllers.py
-${PYSITELIB}/xen/xend/server/tests/test_controllers.pyc
-${PYSITELIB}/xen/xend/server/tpmif.py
-${PYSITELIB}/xen/xend/server/tpmif.pyc
-${PYSITELIB}/xen/xend/server/udevevent.py
-${PYSITELIB}/xen/xend/server/udevevent.pyc
-${PYSITELIB}/xen/xend/server/vfbif.py
-${PYSITELIB}/xen/xend/server/vfbif.pyc
-${PYSITELIB}/xen/xend/server/vscsiif.py
-${PYSITELIB}/xen/xend/server/vscsiif.pyc
-${PYSITELIB}/xen/xend/server/vusbif.py
-${PYSITELIB}/xen/xend/server/vusbif.pyc
-${PYSITELIB}/xen/xend/sxp.py
-${PYSITELIB}/xen/xend/sxp.pyc
-${PYSITELIB}/xen/xend/tests/__init__.py
-${PYSITELIB}/xen/xend/tests/__init__.pyc
-${PYSITELIB}/xen/xend/tests/test_XendConfig.py
-${PYSITELIB}/xen/xend/tests/test_XendConfig.pyc
-${PYSITELIB}/xen/xend/tests/test_sxp.py
-${PYSITELIB}/xen/xend/tests/test_sxp.pyc
-${PYSITELIB}/xen/xend/tests/test_uuid.py
-${PYSITELIB}/xen/xend/tests/test_uuid.pyc
-${PYSITELIB}/xen/xend/uuid.py
-${PYSITELIB}/xen/xend/uuid.pyc
-${PYSITELIB}/xen/xend/xenstore/__init__.py
-${PYSITELIB}/xen/xend/xenstore/__init__.pyc
-${PYSITELIB}/xen/xend/xenstore/tests/__init__.py
-${PYSITELIB}/xen/xend/xenstore/tests/__init__.pyc
-${PYSITELIB}/xen/xend/xenstore/tests/stress_xs.py
-${PYSITELIB}/xen/xend/xenstore/tests/stress_xs.pyc
-${PYSITELIB}/xen/xend/xenstore/xstransact.py
-${PYSITELIB}/xen/xend/xenstore/xstransact.pyc
-${PYSITELIB}/xen/xend/xenstore/xsutil.py
-${PYSITELIB}/xen/xend/xenstore/xsutil.pyc
-${PYSITELIB}/xen/xend/xenstore/xswatch.py
-${PYSITELIB}/xen/xend/xenstore/xswatch.pyc
-${PYSITELIB}/xen/xm/XenAPI.py
-${PYSITELIB}/xen/xm/XenAPI.pyc
-${PYSITELIB}/xen/xm/__init__.py
-${PYSITELIB}/xen/xm/__init__.pyc
-${PYSITELIB}/xen/xm/addlabel.py
-${PYSITELIB}/xen/xm/addlabel.pyc
-${PYSITELIB}/xen/xm/console.py
-${PYSITELIB}/xen/xm/console.pyc
-${PYSITELIB}/xen/xm/cpupool-create.py
-${PYSITELIB}/xen/xm/cpupool-create.pyc
-${PYSITELIB}/xen/xm/cpupool-new.py
-${PYSITELIB}/xen/xm/cpupool-new.pyc
-${PYSITELIB}/xen/xm/cpupool.py
-${PYSITELIB}/xen/xm/cpupool.pyc
-${PYSITELIB}/xen/xm/create.py
-${PYSITELIB}/xen/xm/create.pyc
-${PYSITELIB}/xen/xm/dry-run.py
-${PYSITELIB}/xen/xm/dry-run.pyc
-${PYSITELIB}/xen/xm/dumppolicy.py
-${PYSITELIB}/xen/xm/dumppolicy.pyc
-${PYSITELIB}/xen/xm/getenforce.py
-${PYSITELIB}/xen/xm/getenforce.pyc
-${PYSITELIB}/xen/xm/getlabel.py
-${PYSITELIB}/xen/xm/getlabel.pyc
-${PYSITELIB}/xen/xm/getpolicy.py
-${PYSITELIB}/xen/xm/getpolicy.pyc
-${PYSITELIB}/xen/xm/help.py
-${PYSITELIB}/xen/xm/help.pyc
-${PYSITELIB}/xen/xm/labels.py
-${PYSITELIB}/xen/xm/labels.pyc
-${PYSITELIB}/xen/xm/main.py
-${PYSITELIB}/xen/xm/main.pyc
-${PYSITELIB}/xen/xm/migrate.py
-${PYSITELIB}/xen/xm/migrate.pyc
-${PYSITELIB}/xen/xm/new.py
-${PYSITELIB}/xen/xm/new.pyc
-${PYSITELIB}/xen/xm/opts.py
-${PYSITELIB}/xen/xm/opts.pyc
-${PYSITELIB}/xen/xm/resetpolicy.py
-${PYSITELIB}/xen/xm/resetpolicy.pyc
-${PYSITELIB}/xen/xm/resources.py
-${PYSITELIB}/xen/xm/resources.pyc
-${PYSITELIB}/xen/xm/rmlabel.py
-${PYSITELIB}/xen/xm/rmlabel.pyc
-${PYSITELIB}/xen/xm/setenforce.py
-${PYSITELIB}/xen/xm/setenforce.pyc
-${PYSITELIB}/xen/xm/setpolicy.py
-${PYSITELIB}/xen/xm/setpolicy.pyc
-${PYSITELIB}/xen/xm/shutdown.py
-${PYSITELIB}/xen/xm/shutdown.pyc
-${PYSITELIB}/xen/xm/tests/__init__.py
-${PYSITELIB}/xen/xm/tests/__init__.pyc
-${PYSITELIB}/xen/xm/tests/test_create.py
-${PYSITELIB}/xen/xm/tests/test_create.pyc
-${PYSITELIB}/xen/xm/xenapi_create.py
-${PYSITELIB}/xen/xm/xenapi_create.pyc
-${PYSITELIB}/xen/xsview/__init__.py
-${PYSITELIB}/xen/xsview/__init__.pyc
-${PYSITELIB}/xen/xsview/main.py
-${PYSITELIB}/xen/xsview/main.pyc
-${PYSITELIB}/xen/xsview/xsviewer.py
-${PYSITELIB}/xen/xsview/xsviewer.pyc
-lib/xen/boot/hvmloader
-libexec/qemu-dm
-man/man1/xentop.1
-man/man1/xentrace_format.1
-man/man1/xm.1
-man/man5/xend-config.sxp.5
-man/man5/xmdomain.cfg.5
-man/man8/xentrace.8
-sbin/blktapctrl
-sbin/flask-getenforce
-sbin/flask-loadpolicy
-sbin/flask-setenforce
-sbin/gdbsx
-sbin/gtracestat
-sbin/gtraceview
-sbin/img2qcow
-sbin/kdd
-sbin/oxenstored
-sbin/qcow-create
-sbin/qcow2raw
-sbin/tapdisk
-sbin/xen-bugtool
-sbin/xen-hptool
-sbin/xen-hvmcrash
-sbin/xen-hvmctx
-sbin/xen-python-path
-sbin/xen-tmem-list-parse
-sbin/xenbackendd
-sbin/xenbaked
-sbin/xenconsoled
-sbin/xend
-sbin/xenlockprof
-sbin/xenmon.py
-sbin/xenpaging
-sbin/xenperf
-sbin/xenpm
-sbin/xenpmd
-sbin/xenstored
-sbin/xentop
-sbin/xentrace_setmask
-sbin/xenwatchdogd
-sbin/xl
-sbin/xm
-sbin/xsview
-share/doc/xen/README.blktap
-share/doc/xen/README.xenmon
-share/examples/xen/README
-share/examples/xen/README.incompatibilities
-share/examples/xen/cpupool
-share/examples/xen/formats
-share/examples/xen/scripts/hotplugpath.sh
-share/examples/xen/scripts/block
-share/examples/xen/scripts/qemu-ifup
-share/examples/xen/scripts/vif-bridge
-share/examples/xen/scripts/vif-ip
-share/examples/xen/xend-config.sxp
-share/examples/xen/xend-pci-permissive.sxp
-share/examples/xen/xend-pci-quirks.sxp
-share/examples/xen/xl.conf
-share/examples/xen/xl.sh
-share/examples/xen/xm-config.xml
-share/examples/xen/xmexample.hvm
-share/examples/xen/xmexample.hvm-stubdom
-share/examples/xen/xmexample.nbd
-share/examples/xen/xmexample.pv-grub
-share/examples/xen/xmexample.vti
-share/examples/xen/xmexample1
-share/examples/xen/xmexample2
-share/examples/xen/xmexample3
-share/xen/create.dtd
-share/xen/qemu/bamboo.dtb
-share/xen/qemu/bios.bin
-share/xen/qemu/keymaps/ar
-share/xen/qemu/keymaps/common
-share/xen/qemu/keymaps/da
-share/xen/qemu/keymaps/de
-share/xen/qemu/keymaps/de-ch
-share/xen/qemu/keymaps/en-gb
-share/xen/qemu/keymaps/en-us
-share/xen/qemu/keymaps/es
-share/xen/qemu/keymaps/et
-share/xen/qemu/keymaps/fi
-share/xen/qemu/keymaps/fo
-share/xen/qemu/keymaps/fr
-share/xen/qemu/keymaps/fr-be
-share/xen/qemu/keymaps/fr-ca
-share/xen/qemu/keymaps/fr-ch
-share/xen/qemu/keymaps/hr
-share/xen/qemu/keymaps/hu
-share/xen/qemu/keymaps/is
-share/xen/qemu/keymaps/it
-share/xen/qemu/keymaps/ja
-share/xen/qemu/keymaps/lt
-share/xen/qemu/keymaps/lv
-share/xen/qemu/keymaps/mk
-share/xen/qemu/keymaps/modifiers
-share/xen/qemu/keymaps/nl
-share/xen/qemu/keymaps/nl-be
-share/xen/qemu/keymaps/no
-share/xen/qemu/keymaps/pl
-share/xen/qemu/keymaps/pt
-share/xen/qemu/keymaps/pt-br
-share/xen/qemu/keymaps/ru
-share/xen/qemu/keymaps/sl
-share/xen/qemu/keymaps/sv
-share/xen/qemu/keymaps/th
-share/xen/qemu/keymaps/tr
-share/xen/qemu/openbios-ppc
-share/xen/qemu/openbios-sparc32
-share/xen/qemu/openbios-sparc64
-share/xen/qemu/ppc_rom.bin
-share/xen/qemu/pxe-e1000.bin
-share/xen/qemu/pxe-ne2k_pci.bin
-share/xen/qemu/pxe-pcnet.bin
-share/xen/qemu/pxe-rtl8139.bin
-share/xen/qemu/vgabios-cirrus.bin
-share/xen/qemu/vgabios.bin
-share/xen/qemu/video.x
-@pkgdir share/examples/xen/auto
diff --git a/sysutils/xentools41/distinfo b/sysutils/xentools41/distinfo
deleted file mode 100644
index 4c7d5aaeb4a..00000000000
--- a/sysutils/xentools41/distinfo
+++ /dev/null
@@ -1,74 +0,0 @@
-$NetBSD: distinfo,v 1.44 2016/12/20 10:22:29 bouyer Exp $
-
-SHA1 (ipxe-git-v1.0.0.tar.gz) = da052c8de5f3485fe0253c19cf52ed6d72528485
-RMD160 (ipxe-git-v1.0.0.tar.gz) = dcd9b6eaafa1ce05c1ebf2a15f2f73ad7a8c5547
-SHA512 (ipxe-git-v1.0.0.tar.gz) = 6921fb857ca615899a5912d5590ca36b6f46daf828b85edc75461c08a189d9fed71ee74a82e42724da7a1355e45070d28a0a61694b3a4872c3554390e4bb4147
-Size (ipxe-git-v1.0.0.tar.gz) = 1996881 bytes
-SHA1 (xen-4.1.6.1.tar.gz) = e5f15feb0821578817a65ede16110c6eac01abd0
-RMD160 (xen-4.1.6.1.tar.gz) = bff11421fc44a26f2cc3156713267abcb36d7a19
-SHA512 (xen-4.1.6.1.tar.gz) = 5f6106514ffb57708009e3d6763824b13d9038699048d1a91fa09ad223e0391b92b6ea0f25714a0bbf8ac8373c58fc7871ca0bce9c3ff7873d41fb2eeae13ed8
-Size (xen-4.1.6.1.tar.gz) = 10428485 bytes
-SHA1 (patch-.._.._ipxe_src_arch_i386_include_librm.h) = 4549ac641b112321b4731a918d85219c3fce6808
-SHA1 (patch-.._.._ipxe_src_core_settings.c) = 240ff973757403b983f12b2cbed826584c4a8aba
-SHA1 (patch-.._.._ipxe_src_net_tls.c) = c0cfbc2ab2b92c659c146601c4f80d58c951ca62
-SHA1 (patch-.._Config.mk) = 9b971a41f67bb3974d3a4459bb9d96fbbd636c96
-SHA1 (patch-CVE-2014-1950) = b0d900722fd0f59a50f1e1eda1471105d5b557e5
-SHA1 (patch-CVE-2015-2752) = f9bca0b8744233e20ff97c3e8e2e404522e87f49
-SHA1 (patch-CVE-2015-2756) = 07aaac4bcd0dfc6d708c1823288b9fc789ebd125
-SHA1 (patch-CVE-2015-8550) = dfd72a54d27211c1059579819b9b4c702399a0fc
-SHA1 (patch-CVE-2015-8554) = 7f444009519399038c657fa3e59fd2170f99bb70
-SHA1 (patch-XSA-197) = 4980664bbb3f3d8277f888f6304a8552ec714a26
-SHA1 (patch-XSA-198) = 98a18927de1e3427cb4fbcc5675fa608d1cd5ba8
-SHA1 (patch-XSA-199) = 406f14cdb356f0d7abe3a843a5efa1dc398c77bd
-SHA1 (patch-aa) = 9b53ba4a809dad7a1de34c8fa0dbe493d7256ada
-SHA1 (patch-ab) = 0906a5ec3a7450fc987b01289e2560e60966d00d
-SHA1 (patch-ac) = c3cc5335a1d6b066307c5f03fe72f513a9eb2bdb
-SHA1 (patch-ad) = 5eb15470bff85d30b6d26d8fe094f59fc8e34175
-SHA1 (patch-ae) = 400bd6cac23af1e75f45c3e4e88e3130a3517129
-SHA1 (patch-af) = e866e7d96766b735a53432350275810803eeb510
-SHA1 (patch-ag) = 90893326dcce4e3e2ef273f22ec5ddf5af0f7cd8
-SHA1 (patch-ah) = ab91c41ef6bbdd7f7f3d992b9f81e43056a765e2
-SHA1 (patch-ai) = 8da6bba38bd7677ea829ca35058f7d2d1d7acad4
-SHA1 (patch-aj) = d0999d8dcbc1eef4de7037db0e54dcd8d2f706eb
-SHA1 (patch-ak) = 722a6b0541b036d84c703037134e25bc47f3eb65
-SHA1 (patch-al) = d9a310c16db708dd86170a13946f87e4cd21eb7a
-SHA1 (patch-am) = b89785a97208454eb3f2e1e43ba4674ad0828aa6
-SHA1 (patch-ba) = 2c65e4b4b85e91e92dfb3aa402ebc44694bdff06
-SHA1 (patch-bb) = 64a61fb156bcb6a99ff0963063a0716b808e3b61
-SHA1 (patch-bc) = 25c99a428fda6dee709888ddbcfdcfef5f654564
-SHA1 (patch-ca) = 36afc7b063f83adfe5b927ed0be586b102684020
-SHA1 (patch-cb) = 5563a72e203e789a86f4166c71ddb3fcff5215c6
-SHA1 (patch-cc) = 24d71f68a93b59bd5c5441c257d34862e7302040
-SHA1 (patch-cd) = 7b25b3b3a8d58effae395d776f2a4b94d79acfcb
-SHA1 (patch-ce) = 613f4c4605af860e5f88b68c49a0e7870ba6ecde
-SHA1 (patch-cf) = c8740b1c9cfac686f2e4e32c7613b5f02206459d
-SHA1 (patch-cg) = 119029fda1d4ecee90d0a108151596cb3ef0ec74
-SHA1 (patch-ch) = 84e816c95167828314ef901e324772249a407c41
-SHA1 (patch-config_StdGNU.mk) = bbded4d6da3fae55bfd8dad42ac9b45721ee1ebe
-SHA1 (patch-da) = 06c07b32d70f8259a762ebcdc738218cfad57ad4
-SHA1 (patch-db) = 4766f9925462023332793bcea4321072758e289d
-SHA1 (patch-dc) = d860fe3725978227278d58f09e7d5157001e463e
-SHA1 (patch-dd) = e66d9cc0028ba922b050fc142862b4095cd018f3
-SHA1 (patch-de) = fae94b61a430a1a7dd98c9a6a04e4513824c6d8d
-SHA1 (patch-df) = e7b41242fcb4a0d4fb9e22376af6a50d1081f96c
-SHA1 (patch-firmware_hvmloader_Makefile) = b2914e4988ba004d45403d67f1580b1f9725d006
-SHA1 (patch-ioemu-qemu-xen_hw_pass-through.c) = 76185c239078f29cb42b953d6c2cd1f59e240989
-SHA1 (patch-ioemu-qemu-xen_hw_pass-through.h) = 98c26798d1ad99d3eee8b33deb08f747c958c886
-SHA1 (patch-ioemu-qemu-xen_hw_piix4acpi.c) = ca19457e9bde2d844a86a866960ac6de1f3d084c
-SHA1 (patch-ioemu-qemu-xen_hw_pt-graphics.c) = 3c03404f1d711c667559a1332e717a5f1b5ceda8
-SHA1 (patch-ioemu-qemu-xen_hw_pt-msi.c) = 2dcebc65f591988bb95dea74c3b21f7066154a9f
-SHA1 (patch-ioemu-qemu-xen_hw_pt-msi.h) = d1bb1a8ad90d6577056f11df96f5469ffe74a3b0
-SHA1 (patch-ioemu-qemu-xen_xen-hooks.mak) = a00d9a9fd0fbb9fd89788b9dfaf5b389a28d47e2
-SHA1 (patch-libfsimage_ufs_ufs.h) = dc59f33cf3abd08a8cdee5977ca4168613327513
-SHA1 (patch-libxl_libxl_create.c) = 02b661ca684609939c6ef762c0ddd1c5e62ad4d0
-SHA1 (patch-libxl_libxl_internal.h) = e126e5e998117903f0c66cc370d350c504ed33d9
-SHA1 (patch-libxl_xl__cmdimpl.c) = 0e038b9702e131ec527d49cb2c21e4acf581cbfe
-SHA1 (patch-ocaml_Makefile.rules) = 104f9d40186e5e4ca6a2e6359bbb369c3c91d1dc
-SHA1 (patch-ocaml_common.make) = c59d32301198d65691ab23529dd791de5ac40199
-SHA1 (patch-ocaml_libs_xb_xs__ring__stubs.c) = 944ce96d18cefdc70babe83d3337ff94604b0f04
-SHA1 (patch-ocaml_xenstored_define.ml) = f44841625554ceba6e83dbb41f688993c2a8d9a2
-SHA1 (patch-ocaml_xenstored_utils.ml) = cc792a696743fa348b274b1c23783ea1a0d7da47
-SHA1 (patch-qemu-phy-devices) = fef90e50ef0a58db2f2b49b6c23218f371791de5
-SHA1 (patch-xenstat_libxenstat_Makefile) = 800dfa58e9f65cfc9694ff4ee8a85c96d6336cfe
-SHA1 (patch-xenstat_xentop_Makefile) = 6b59d1a8024f0b7f493a2205afd1d90495f01151
-SHA1 (patch-xenstore_Makefile) = 4fa0ed7b76a96011c3cca9c5017be4b5151489f7
diff --git a/sysutils/xentools41/files/blk_netbsd.c b/sysutils/xentools41/files/blk_netbsd.c
deleted file mode 100644
index 81076a25a4d..00000000000
--- a/sysutils/xentools41/files/blk_netbsd.c
+++ /dev/null
@@ -1,39 +0,0 @@
-#include <inttypes.h>
-#include <sys/ioctl.h>
-#include <sys/disklabel.h>
-#include "tapdisk.h"
-#include "blk.h"
-
-int blk_getimagesize(int fd, uint64_t *size)
-{
- int rc;
- struct disklabel dl;
-
- *size = 0;
- rc = ioctl(fd, DIOCGDINFO, &dl);
- if (rc) {
- DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image");
- return -EINVAL;
- }
-
- *size = dl.d_secsize * dl.d_secpercyl;
-
- return 0;
-}
-
-int blk_getsectorsize(int fd, uint64_t *sector_size)
-{
- int rc;
- struct disklabel dl;
-
- *sector_size = DEV_BSIZE;
- rc = ioctl(fd, DIOCGDINFO, &dl);
- if (rc) {
- DPRINTF("ERR: DIOCGDINFO failed, couldn't stat image");
- return 0; /* fallback to DEV_BSIZE */
- }
-
- *sector_size = dl.d_secsize;
- return 0;
-}
-
diff --git a/sysutils/xentools41/files/blktapctrl_netbsd.c b/sysutils/xentools41/files/blktapctrl_netbsd.c
deleted file mode 100644
index 02a1e9f3018..00000000000
--- a/sysutils/xentools41/files/blktapctrl_netbsd.c
+++ /dev/null
@@ -1,16 +0,0 @@
-
-#include "blktaplib.h"
-#include "blktapctrl.h"
-
-
-int blktap_interface_open(void)
-{
- /* not yet implemented */
- return -1;
-}
-
-int blktap_interface_create(int ctlfd, int *major, int *minor, blkif_t *blkif)
-{
- /* not yet implemented */
- return -1;
-}
diff --git a/sysutils/xentools41/files/xen-watchdog.sh b/sysutils/xentools41/files/xen-watchdog.sh
deleted file mode 100644
index 4d2a96b24ce..00000000000
--- a/sysutils/xentools41/files/xen-watchdog.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# PROVIDE: xen-watchdog
-# REQUIRE: DAEMON
-#
-# description: Run domain watchdog daemon
-#
-
-. /etc/rc.subr
-
-name="xenwatchdog"
-rcvar=$name
-command="@PREFIX@/sbin/xenwatchdogd"
-start_cmd="echo Starting ${name}. && PATH=${PATH}:@PREFIX@/sbin ${command} 30 15"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/sysutils/xentools41/files/xencommons.sh b/sysutils/xentools41/files/xencommons.sh
deleted file mode 100644
index 62403c37ccd..00000000000
--- a/sysutils/xentools41/files/xencommons.sh
+++ /dev/null
@@ -1,120 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# PROVIDE: xencommons
-# REQUIRE: DAEMON
-
-. /etc/rc.subr
-
-name="xencommons"
-rcvar=xend
-start_precmd="xen_precmd"
-start_cmd="xen_startcmd"
-stop_cmd="xen_stop"
-status_cmd="xen_status"
-extra_commands="status"
-required_files="/kern/xen/privcmd"
-
-XENSTORED_PIDFILE="/var/run/xenstored.pid"
-XENCONSOLED_PIDFILE="/var/run/xenconsoled.pid"
-XENBACKENDD_PIDFILE="/var/run/xenbackendd.pid"
-
-SBINDIR=@PREFIX@/sbin
-
-xen_precmd()
-{
- mkdir -p /var/run/xend || exit 1
- mkdir -p /var/run/xend/boot || exit 1
- mkdir -p /var/run/xenstored || exit 1
-}
-
-xen_startcmd()
-{
- printf "Starting xenservices: xenstored, xenconsoled, xenbackendd.\n"
- XENSTORED_ARGS=" --pid-file ${XENSTORED_PIDFILE}"
- if [ -n "${XENSTORED_TRACE}" ]; then
- XENSTORED_ARGS="${XENSTORED_ARGS} -T /var/log/xen/xenstored-trace.log"
- fi
-
- ${SBINDIR}/xenstored ${XENSTORED_ARGS}
- sleep 5
-
- XENCONSOLED_ARGS=""
- if [ -n "${XENCONSOLED_TRACE}" ]; then
- XENCONSOLED_ARGS="${XENCONSOLED_ARGS} --log=${XENCONSOLED_TRACE}"
- fi
-
- ${SBINDIR}/xenconsoled ${XENCONSOLED_ARGS}
-
- XENBACKENDD_ARGS=""
- if [ -n "${XENBACKENDD_DEBUG}" ]; then
- XENBACKENDD_ARGS="${XENBACKENDD_ARGS} -d"
- fi
-
- ${SBINDIR}/xenbackendd ${XENBACKENDD_ARGS}
-}
-
-xen_stop()
-{
- pids=""
- printf "Stopping xencommons"
-
- rc_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd)
- pids="$pids $rc_pid"
- rc_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
- pids="$pids $rc_pid"
- rc_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
- pids="$pids $rc_pid"
-
- kill -${sig_stop:-TERM} $pids
- wait_for_pids $pids
-
- printf ".\n"
-}
-
-xen_status()
-{
- xenstored_pid=$(check_pidfile ${XENSTORED_PIDFILE} ${SBINDIR}/xenstored)
- if test -n ${xenstored_pid}; then
- pids="$pids $xenstored_pid"
- fi
-
- xenconsoled_pid=$(check_pidfile ${XENCONSOLED_PIDFILE} ${SBINDIR}/xenconsoled)
- if test -n ${xenconsoled_pid}; then
- pids="$pids $xenconsoled_pid"
- fi
-
- xenbackend_pid=$(check_pidfile ${XENBACKENDD_PIDFILE} ${SBINDIR}/xenbackendd)
- if test -n ${xenbackend_pid}; then
- pids="$pids $xenbackend_pid"
- fi
-
- if test -n "$xenbackend_pid" -a -n "$xenconsoled_pid" -a -n "$xenstored_pid";
- then
- echo "xencommons are running as pids $pids."
- return 0
- fi
- if test -z "$xenbackend_pid" -a -z "$xenconsoled_pid" -a -z "$xenstored_pid";
- then
- echo "xencommons are not running."
- return 0
- fi
-
- if test -n $xenstored_pid; then
- echo "xenstored is running as pid $xenstored_pid."
- else
- echo "xenstored is not running."
- fi
- if test -n $xenconsoled_pid; then
- echo "xenconsoled is running as pid $xenconsoled_pid."
- else
- echo "xenconsoled is not running."
- fi
- if test -n $xenbackend_pid; then
- echo "xenbackendd is running as pid $xenbackend_pid."
- else
- echo "xenbackendd is not running."
- fi
-}
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/sysutils/xentools41/files/xend.sh b/sysutils/xentools41/files/xend.sh
deleted file mode 100644
index 9bd4b870e9b..00000000000
--- a/sysutils/xentools41/files/xend.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# PROVIDE: xend
-# REQUIRE: xencommons
-
-. /etc/rc.subr
-
-name="xend"
-rcvar=$name
-command="@PREFIX@/sbin/xend"
-command_interpreter="@RCD_INTERPRETER@"
-start_cmd="echo Starting ${name}. && PATH=${PATH}:@PREFIX@/sbin ${command} start"
-pidfile="/var/run/xend.pid"
-
-load_rc_config $name
-run_rc_command "$1"
diff --git a/sysutils/xentools41/files/xendomains.sh b/sysutils/xentools41/files/xendomains.sh
deleted file mode 100644
index 92390adddbb..00000000000
--- a/sysutils/xentools41/files/xendomains.sh
+++ /dev/null
@@ -1,129 +0,0 @@
-#!@RCD_SCRIPTS_SHELL@
-#
-# PROVIDE: xendomains
-# REQUIRE: xend
-# KEYWORD: shutdown
-#
-# xendomains This required variable is a whitespace-separated
-# list of domains, e.g., xendomains="dom1 dom2 dom3".
-#
-# xendomains_config This optional variable is a format string that
-# represents the path to the configuration file for
-# each domain. "%s" is substituted with the name of
-# the domain. The default is "@PKG_SYSCONFDIR@/%s".
-#
-# xendomains_prehook This optional variable is a format string that
-# represents the command to run, if it exists, before
-# starting each domain. "%s" is substituted with the
-# name of the domain. The default is
-# "@PKG_SYSCONFDIR@/%s-pre".
-#
-# xendomains_posthook This optional variable is a format string that
-# represents the command to run, if it exists, after
-# stopping each domain. "%s" is substituted with the
-# name of the domain. The default is
-# "@PKG_SYSCONFDIR@/%s-post".
-#
-
-. /etc/rc.subr
-
-name="xendomains"
-ctl_command="@PREFIX@/sbin/xm"
-start_cmd="xendomains_start"
-stop_cmd="xendomains_stop"
-list_cmd="xendomains_list"
-extra_commands="list"
-required_files="/kern/xen/privcmd"
-
-xendomains_start()
-{
- [ -n "$xendomains" ] || return
-
- echo "Starting xen domains."
- for domain in $xendomains; do
- case "$domain" in
- "") continue ;;
- esac
-
- # Start off by running the pre-hook script if it's present.
- if [ -n "${xendomains_prehook}" ]; then
- cmdline=`printf "${xendomains_prehook}" $domain`
- cmd="${cmdline%% *}"
- if [ -x "$cmd" ]; then
- if ! $cmdline; then
- echo "Pre-hook \`\`$cmdline'' failed... skipping $domain."
- continue
- fi
- fi
- fi
-
- # Ask xend to create the domain.
- if [ -n "${xendomains_config}" ]; then
- file=`printf "${xendomains_config}" $domain`
- if [ -f "$file" ]; then
- ${ctl_command} create "$file"
- fi
- fi
- done
-}
-
-xendomains_list() {
- # Output a whitespace-separated list of live guest domains.
- ${ctl_command} list | awk '
- (FNR <= 2) { next }
- ($5 !~ /s/) { s = s " " $1 }
- END { sub(" *", "", s); print s }'
-}
-
-xendomains_stop()
-{
- # Determine an appropriate timeout waiting for all domains to
- # stop -- always wait at least 60s, and add 5s per active domain.
- #
- numdomains=$(xendomains_list | awk '{ print NF }')
- [ $numdomains -gt 0 ] || return
- timeout=$((60 + numdomains * 5))
-
- # Ask xend to stop every domain, and poll xend every 10s up to the
- # timeout period to check if all the domains are stopped. We
- # consider a domain in the "s" (shutdown) state to be stopped.
- #
- echo "Stopping xen domains."
- for domain in $(xendomains_list); do
- ${ctl_command} shutdown $domain
- done
- while [ $timeout -gt 0 ]; do
- livedomains=$(xendomains_list)
- [ -n "$livedomains" ] || break
- timeout=$((timeout - 10))
- sleep 10
- done
- livedomains=$(xendomains_list)
- if [ -n "$livedomains" ]; then
- echo "Failed to stop: $livedomains"
- else
- echo "All domains stopped."
- fi
-
- # Finish off by running the post-hook script if it's present.
- for domain in $xendomains; do
- case "$domain" in
- "") continue ;;
- esac
- if [ -n "${xendomains_posthook}" ]; then
- cmdline=`printf "${xendomains_posthook}" $domain`
- cmd="${cmdline%% *}"
- if [ -x "$cmd" ]; then
- $cmdline || echo "Post-hook \`\`$cmdline'' failed."
- fi
- fi
- done
-}
-
-load_rc_config $name
-
-: ${xendomains_config="@PKG_SYSCONFDIR@/%s"}
-: ${xendomains_prehook="@PKG_SYSCONFDIR@/%s-pre"}
-: ${xendomains_posthook="@PKG_SYSCONFDIR@/%s-post"}
-
-run_rc_command "$1"
diff --git a/sysutils/xentools41/patches/patch-.._.._ipxe_src_arch_i386_include_librm.h b/sysutils/xentools41/patches/patch-.._.._ipxe_src_arch_i386_include_librm.h
deleted file mode 100644
index 8627e8a2470..00000000000
--- a/sysutils/xentools41/patches/patch-.._.._ipxe_src_arch_i386_include_librm.h
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-.._.._ipxe_src_arch_i386_include_librm.h,v 1.1 2013/04/11 19:57:53 joerg Exp $
-
---- ../../ipxe/src/arch/i386/include/librm.h.orig 2010-02-02 16:12:44.000000000 +0000
-+++ ../../ipxe/src/arch/i386/include/librm.h
-@@ -122,8 +122,9 @@ extern char *text16;
- _data16_ ## variable __asm__ ( #variable )
-
- #define __bss16_array( variable, array ) \
-- __attribute__ (( section ( ".bss16" ) )) \
-- _data16_ ## variable array __asm__ ( #variable )
-+ _data16_ ## variable array \
-+ __asm__ ( #variable ) \
-+ __attribute__ (( section ( ".bss16" ) ))
-
- #define __text16( variable ) \
- __attribute__ (( section ( ".text16.data" ) )) \
diff --git a/sysutils/xentools41/patches/patch-.._.._ipxe_src_core_settings.c b/sysutils/xentools41/patches/patch-.._.._ipxe_src_core_settings.c
deleted file mode 100644
index 5b5bdbc27d6..00000000000
--- a/sysutils/xentools41/patches/patch-.._.._ipxe_src_core_settings.c
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-.._.._ipxe_src_core_settings.c,v 1.1 2013/04/11 19:57:53 joerg Exp $
-
---- ../../ipxe/src/core/settings.c.orig 2013-03-25 18:48:57.000000000 +0000
-+++ ../../ipxe/src/core/settings.c
-@@ -263,10 +263,12 @@ static struct settings * find_child_sett
- */
- static struct settings * autovivify_child_settings ( struct settings *parent,
- const char *name ) {
-+ size_t nlen = strlen ( name ) + 1 /* NUL */;
- struct {
- struct generic_settings generic;
-- char name[ strlen ( name ) + 1 /* NUL */ ];
-+ char name[];
- } *new_child;
-+ size_t tlen = sizeof(*new_child) + nlen;
- struct settings *settings;
-
- /* Return existing settings, if existent */
-@@ -274,13 +276,13 @@ static struct settings * autovivify_chil
- return settings;
-
- /* Create new generic settings block */
-- new_child = zalloc ( sizeof ( *new_child ) );
-+ new_child = zalloc ( tlen );
- if ( ! new_child ) {
- DBGC ( parent, "Settings %p could not create child %s\n",
- parent, name );
- return NULL;
- }
-- memcpy ( new_child->name, name, sizeof ( new_child->name ) );
-+ memcpy ( new_child->name, name, nlen );
- generic_settings_init ( &new_child->generic, NULL, new_child->name );
- settings = &new_child->generic.settings;
- register_settings ( settings, parent );
diff --git a/sysutils/xentools41/patches/patch-.._.._ipxe_src_net_tls.c b/sysutils/xentools41/patches/patch-.._.._ipxe_src_net_tls.c
deleted file mode 100644
index 6a3da777c66..00000000000
--- a/sysutils/xentools41/patches/patch-.._.._ipxe_src_net_tls.c
+++ /dev/null
@@ -1,69 +0,0 @@
-$NetBSD: patch-.._.._ipxe_src_net_tls.c,v 1.1 2013/04/11 19:57:53 joerg Exp $
-
---- ../../ipxe/src/net/tls.c.orig 2013-03-25 18:53:57.000000000 +0000
-+++ ../../ipxe/src/net/tls.c
-@@ -650,18 +650,22 @@ static int tls_send_client_key_exchange
- RSA_CTX *rsa_ctx;
- RSA_pub_key_new ( &rsa_ctx, tls->rsa.modulus, tls->rsa.modulus_len,
- tls->rsa.exponent, tls->rsa.exponent_len );
-+ size_t elen = rsa_ctx->num_octets;
- struct {
- uint32_t type_length;
- uint16_t encrypted_pre_master_secret_len;
-- uint8_t encrypted_pre_master_secret[rsa_ctx->num_octets];
-- } __attribute__ (( packed )) key_xchg;
--
-- memset ( &key_xchg, 0, sizeof ( key_xchg ) );
-- key_xchg.type_length = ( cpu_to_le32 ( TLS_CLIENT_KEY_EXCHANGE ) |
-- htonl ( sizeof ( key_xchg ) -
-- sizeof ( key_xchg.type_length ) ) );
-- key_xchg.encrypted_pre_master_secret_len
-- = htons ( sizeof ( key_xchg.encrypted_pre_master_secret ) );
-+ uint8_t encrypted_pre_master_secret[];
-+ } __attribute__ (( packed )) *key_xchg;
-+ size_t klen = sizeof(*key_xchg) + elen;
-+
-+ key_xchg = alloca(klen);
-+
-+ memset ( key_xchg, 0, klen );
-+ key_xchg->type_length = ( cpu_to_le32 ( TLS_CLIENT_KEY_EXCHANGE ) |
-+ htonl ( klen -
-+ sizeof ( key_xchg->type_length ) ) );
-+ key_xchg->encrypted_pre_master_secret_len
-+ = htons ( elen );
-
- /* FIXME: Hack alert */
- DBGC ( tls, "RSA encrypting plaintext, modulus, exponent:\n" );
-@@ -671,14 +675,13 @@ static int tls_send_client_key_exchange
- DBGC_HD ( tls, tls->rsa.exponent, tls->rsa.exponent_len );
- RSA_encrypt ( rsa_ctx, ( const uint8_t * ) &tls->pre_master_secret,
- sizeof ( tls->pre_master_secret ),
-- key_xchg.encrypted_pre_master_secret, 0 );
-+ key_xchg->encrypted_pre_master_secret, 0 );
- DBGC ( tls, "RSA encrypt done. Ciphertext:\n" );
-- DBGC_HD ( tls, &key_xchg.encrypted_pre_master_secret,
-- sizeof ( key_xchg.encrypted_pre_master_secret ) );
-+ DBGC_HD ( tls, &key_xchg->encrypted_pre_master_secret, elen );
- RSA_free ( rsa_ctx );
-
-
-- return tls_send_handshake ( tls, &key_xchg, sizeof ( key_xchg ) );
-+ return tls_send_handshake ( tls, key_xchg, klen );
- }
-
- /**
-@@ -802,12 +805,12 @@ static int tls_new_server_hello ( struct
- uint8_t session_id_len;
- char next[0];
- } __attribute__ (( packed )) *hello_a = data;
-+ size_t slen = hello_a->session_id_len;
- struct {
-- uint8_t session_id[hello_a->session_id_len];
- uint16_t cipher_suite;
- uint8_t compression_method;
- char next[0];
-- } __attribute__ (( packed )) *hello_b = ( void * ) &hello_a->next;
-+ } __attribute__ (( packed )) *hello_b = ( void * ) ((uint8_t *)&hello_a->next + slen);
- void *end = hello_b->next;
- int rc;
-
diff --git a/sysutils/xentools41/patches/patch-.._Config.mk b/sysutils/xentools41/patches/patch-.._Config.mk
deleted file mode 100644
index 9bf3cef29cd..00000000000
--- a/sysutils/xentools41/patches/patch-.._Config.mk
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-.._Config.mk,v 1.1 2013/04/11 19:57:53 joerg Exp $
-
---- ../Config.mk.orig 2013-03-25 09:51:57.000000000 +0000
-+++ ../Config.mk
-@@ -15,7 +15,7 @@ SHELL ?= /bin/sh
- # Tools to run on system hosting the build
- HOSTCC = gcc
- HOSTCFLAGS = -Wall -Werror -Wstrict-prototypes -O2 -fomit-frame-pointer
--HOSTCFLAGS += -fno-strict-aliasing
-+HOSTCFLAGS += -fno-strict-aliasing ${EXTRA_HOSTCFLAGS}
-
- DISTDIR ?= $(XEN_ROOT)/dist
- DESTDIR ?= /
-@@ -141,6 +141,8 @@ CFLAGS += -Wall -Wstrict-prototypes
- # result of any casted expression causes a warning.
- CFLAGS += -Wno-unused-value
-
-+CFLAGS += ${EXTRA_CFLAGS}
-+
- $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
- $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)
- $(call cc-option-add,CFLAGS,CC,-Wno-unused-but-set-variable)
diff --git a/sysutils/xentools41/patches/patch-CVE-2014-1950 b/sysutils/xentools41/patches/patch-CVE-2014-1950
deleted file mode 100644
index 8b00d5b5779..00000000000
--- a/sysutils/xentools41/patches/patch-CVE-2014-1950
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-CVE-2014-1950,v 1.1 2014/02/13 11:12:58 drochner Exp $
-
-http://lists.xenproject.org/archives/html/xen-announce/2014-02/msg00006.html
-
---- libxc/xc_cpupool.c.orig 2014-02-12 16:27:31.000000000 +0000
-+++ libxc/xc_cpupool.c 2014-02-12 16:28:11.000000000 +0000
-@@ -104,6 +104,7 @@ xc_cpupoolinfo_t *xc_cpupool_getinfo(xc_
- info->cpumap = xc_cpumap_alloc(xch);
- if (!info->cpumap) {
- free(info);
-+ info = NULL;
- goto out;
- }
- info->cpupool_id = sysctl.u.cpupool_op.cpupool_id;
diff --git a/sysutils/xentools41/patches/patch-CVE-2015-2752 b/sysutils/xentools41/patches/patch-CVE-2015-2752
deleted file mode 100644
index fe77b5d644d..00000000000
--- a/sysutils/xentools41/patches/patch-CVE-2015-2752
+++ /dev/null
@@ -1,83 +0,0 @@
-$NetBSD: patch-CVE-2015-2752,v 1.1 2015/04/19 13:13:21 spz Exp $
-
-Patch for CVE-2015-2752 aka XSA-125 from
-http://xenbits.xenproject.org/xsa/xsa125-4.2.patch
-
---- libxc/xc_domain.c.orig 2013-09-10 06:42:18.000000000 +0000
-+++ libxc/xc_domain.c
-@@ -1322,6 +1322,13 @@ int xc_domain_bind_pt_isa_irq(
- PT_IRQ_TYPE_ISA, 0, 0, 0, machine_irq));
- }
-
-+#ifndef min
-+#define min(X, Y) ({ \
-+ const typeof (X) _x = (X); \
-+ const typeof (Y) _y = (Y); \
-+ (void) (&_x == &_y); \
-+ (_x < _y) ? _x : _y; })
-+#endif
- int xc_domain_memory_mapping(
- xc_interface *xch,
- uint32_t domid,
-@@ -1331,17 +1338,55 @@ int xc_domain_memory_mapping(
- uint32_t add_mapping)
- {
- DECLARE_DOMCTL;
-+ int ret = 0, err;
-+ unsigned long done = 0, nr, max_batch_sz;
-+
-+ if ( !nr_mfns )
-+ return 0;
-
- domctl.cmd = XEN_DOMCTL_memory_mapping;
- domctl.domain = domid;
-- domctl.u.memory_mapping.first_gfn = first_gfn;
-- domctl.u.memory_mapping.first_mfn = first_mfn;
-- domctl.u.memory_mapping.nr_mfns = nr_mfns;
- domctl.u.memory_mapping.add_mapping = add_mapping;
-+ max_batch_sz = nr_mfns;
-+ do
-+ {
-+ nr = min(nr_mfns - done, max_batch_sz);
-+ domctl.u.memory_mapping.nr_mfns = nr;
-+ domctl.u.memory_mapping.first_gfn = first_gfn + done;
-+ domctl.u.memory_mapping.first_mfn = first_mfn + done;
-+ err = do_domctl(xch, &domctl);
-+ if ( err && errno == E2BIG )
-+ {
-+ if ( max_batch_sz <= 1 )
-+ break;
-+ max_batch_sz >>= 1;
-+ continue;
-+ }
-+ /* Save the first error... */
-+ if ( !ret )
-+ ret = err;
-+ /* .. and ignore the rest of them when removing. */
-+ if ( err && add_mapping != DPCI_REMOVE_MAPPING )
-+ break;
-+
-+ done += nr;
-+ } while ( done < nr_mfns );
-+
-+ /*
-+ * Undo what we have done unless unmapping, by unmapping the entire region.
-+ * Errors here are ignored.
-+ */
-+ if ( ret && add_mapping != DPCI_REMOVE_MAPPING )
-+ xc_domain_memory_mapping(xch, domid, first_gfn, first_mfn, nr_mfns,
-+ DPCI_REMOVE_MAPPING);
-+
-+ /* We might get E2BIG so many times that we never advance. */
-+ if ( !done && !ret )
-+ ret = -1;
-
-- return do_domctl(xch, &domctl);
-+ return ret;
- }
--
-+#undef min
- int xc_domain_ioport_mapping(
- xc_interface *xch,
- uint32_t domid,
-
diff --git a/sysutils/xentools41/patches/patch-CVE-2015-2756 b/sysutils/xentools41/patches/patch-CVE-2015-2756
deleted file mode 100644
index d8bc6cd63f8..00000000000
--- a/sysutils/xentools41/patches/patch-CVE-2015-2756
+++ /dev/null
@@ -1,142 +0,0 @@
-$NetBSD: patch-CVE-2015-2756,v 1.1 2015/04/19 13:13:21 spz Exp $
-
-patch for CVE-2015-2756 aka XSA-126 from
-http://xenbits.xenproject.org/xsa/xsa126-qemut.patch
-
---- ioemu-qemu-xen/hw/pass-through.c.orig 2013-07-17 10:59:40.000000000 +0000
-+++ ioemu-qemu-xen/hw/pass-through.c
-@@ -171,9 +171,6 @@ static int pt_word_reg_read(struct pt_de
- static int pt_long_reg_read(struct pt_dev *ptdev,
- struct pt_reg_tbl *cfg_entry,
- uint32_t *value, uint32_t valid_mask);
--static int pt_cmd_reg_read(struct pt_dev *ptdev,
-- struct pt_reg_tbl *cfg_entry,
-- uint16_t *value, uint16_t valid_mask);
- static int pt_bar_reg_read(struct pt_dev *ptdev,
- struct pt_reg_tbl *cfg_entry,
- uint32_t *value, uint32_t valid_mask);
-@@ -277,9 +274,9 @@ static struct pt_reg_info_tbl pt_emu_reg
- .size = 2,
- .init_val = 0x0000,
- .ro_mask = 0xF880,
-- .emu_mask = 0x0740,
-+ .emu_mask = 0x0743,
- .init = pt_common_reg_init,
-- .u.w.read = pt_cmd_reg_read,
-+ .u.w.read = pt_word_reg_read,
- .u.w.write = pt_cmd_reg_write,
- .u.w.restore = pt_cmd_reg_restore,
- },
-@@ -1865,7 +1862,7 @@ static int pt_dev_is_virtfn(struct pci_d
- return rc;
- }
-
--static int pt_register_regions(struct pt_dev *assigned_device)
-+static int pt_register_regions(struct pt_dev *assigned_device, uint16_t *cmd)
- {
- int i = 0;
- uint32_t bar_data = 0;
-@@ -1885,17 +1882,26 @@ static int pt_register_regions(struct pt
-
- /* Register current region */
- if ( pci_dev->base_addr[i] & PCI_ADDRESS_SPACE_IO )
-+ {
- pci_register_io_region((PCIDevice *)assigned_device, i,
- (uint32_t)pci_dev->size[i], PCI_ADDRESS_SPACE_IO,
- pt_ioport_map);
-+ *cmd |= PCI_COMMAND_IO;
-+ }
- else if ( pci_dev->base_addr[i] & PCI_ADDRESS_SPACE_MEM_PREFETCH )
-+ {
- pci_register_io_region((PCIDevice *)assigned_device, i,
- (uint32_t)pci_dev->size[i], PCI_ADDRESS_SPACE_MEM_PREFETCH,
- pt_iomem_map);
-+ *cmd |= PCI_COMMAND_MEMORY;
-+ }
- else
-+ {
- pci_register_io_region((PCIDevice *)assigned_device, i,
- (uint32_t)pci_dev->size[i], PCI_ADDRESS_SPACE_MEM,
- pt_iomem_map);
-+ *cmd |= PCI_COMMAND_MEMORY;
-+ }
-
- PT_LOG("IO region registered (size=0x%08x base_addr=0x%08x)\n",
- (uint32_t)(pci_dev->size[i]),
-@@ -3221,27 +3227,6 @@ static int pt_long_reg_read(struct pt_de
- return 0;
- }
-
--/* read Command register */
--static int pt_cmd_reg_read(struct pt_dev *ptdev,
-- struct pt_reg_tbl *cfg_entry,
-- uint16_t *value, uint16_t valid_mask)
--{
-- struct pt_reg_info_tbl *reg = cfg_entry->reg;
-- uint16_t valid_emu_mask = 0;
-- uint16_t emu_mask = reg->emu_mask;
--
-- if ( ptdev->is_virtfn )
-- emu_mask |= PCI_COMMAND_MEMORY;
-- if ( pt_is_iomul(ptdev) )
-- emu_mask |= PCI_COMMAND_IO;
--
-- /* emulate word register */
-- valid_emu_mask = emu_mask & valid_mask;
-- *value = PT_MERGE_VALUE(*value, cfg_entry->data, ~valid_emu_mask);
--
-- return 0;
--}
--
- /* read BAR */
- static int pt_bar_reg_read(struct pt_dev *ptdev,
- struct pt_reg_tbl *cfg_entry,
-@@ -3376,19 +3361,13 @@ static int pt_cmd_reg_write(struct pt_de
- uint16_t writable_mask = 0;
- uint16_t throughable_mask = 0;
- uint16_t wr_value = *value;
-- uint16_t emu_mask = reg->emu_mask;
--
-- if ( ptdev->is_virtfn )
-- emu_mask |= PCI_COMMAND_MEMORY;
-- if ( pt_is_iomul(ptdev) )
-- emu_mask |= PCI_COMMAND_IO;
-
- /* modify emulate register */
- writable_mask = ~reg->ro_mask & valid_mask;
- cfg_entry->data = PT_MERGE_VALUE(*value, cfg_entry->data, writable_mask);
-
- /* create value for writing to I/O device register */
-- throughable_mask = ~emu_mask & valid_mask;
-+ throughable_mask = ~reg->emu_mask & valid_mask;
-
- if (*value & PCI_COMMAND_DISABLE_INTx)
- {
-@@ -4151,6 +4130,7 @@ static struct pt_dev * register_real_dev
- struct pt_dev *assigned_device = NULL;
- struct pci_dev *pci_dev;
- uint8_t e_device, e_intx;
-+ uint16_t cmd = 0;
- char *key, *val;
- int msi_translate, power_mgmt;
-
-@@ -4240,7 +4220,7 @@ static struct pt_dev * register_real_dev
- assigned_device->dev.config[i] = pci_read_byte(pci_dev, i);
-
- /* Handle real device's MMIO/PIO BARs */
-- pt_register_regions(assigned_device);
-+ pt_register_regions(assigned_device, &cmd);
-
- /* Setup VGA bios for passthroughed gfx */
- if ( setup_vga_pt(assigned_device) < 0 )
-@@ -4318,6 +4298,10 @@ static struct pt_dev * register_real_dev
- }
-
- out:
-+ if (cmd)
-+ pci_write_word(pci_dev, PCI_COMMAND,
-+ *(uint16_t *)(&assigned_device->dev.config[PCI_COMMAND]) | cmd);
-+
- PT_LOG("Real physical device %02x:%02x.%x registered successfuly!\n"
- "IRQ type = %s\n", r_bus, r_dev, r_func,
- assigned_device->msi_trans_en? "MSI-INTx":"INTx");
diff --git a/sysutils/xentools41/patches/patch-CVE-2015-8550 b/sysutils/xentools41/patches/patch-CVE-2015-8550
deleted file mode 100644
index 739ffba9109..00000000000
--- a/sysutils/xentools41/patches/patch-CVE-2015-8550
+++ /dev/null
@@ -1,134 +0,0 @@
-$NetBSD: patch-CVE-2015-8550,v 1.1 2016/01/07 17:55:55 bouyer Exp $
-
-patch for CVE-2015-8550 aka XSA-155 from
-http://xenbits.xenproject.org/xsa/xsa155-xen-0001-xen-Add-RING_COPY_REQUEST.patch
-http://xenbits.xenproject.org/xsa/xsa155-xen-0002-blktap2-Use-RING_COPY_REQUEST.patch
-http://xenbits.xenproject.org/xsa/xsa155-qemut-qdisk-double-access.patch
-http://xenbits.xenproject.org/xsa/xsa155-qemut-xenfb.patch
-
---- ../xen/include/public/io/ring.h.orig
-+++ ../xen/include/public/io/ring.h
-@@ -212,6 +212,20 @@ typedef struct __name##_back_ring __name##_back_ring_t
- #define RING_GET_REQUEST(_r, _idx) \
- (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].req))
-
-+/*
-+ * Get a local copy of a request.
-+ *
-+ * Use this in preference to RING_GET_REQUEST() so all processing is
-+ * done on a local copy that cannot be modified by the other end.
-+ *
-+ * Note that https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58145 may cause this
-+ * to be ineffective where _req is a struct which consists of only bitfields.
-+ */
-+#define RING_COPY_REQUEST(_r, _idx, _req) do { \
-+ /* Use volatile to force the copy into _req. */ \
-+ *(_req) = *(volatile typeof(_req))RING_GET_REQUEST(_r, _idx); \
-+} while (0)
-+
- #define RING_GET_RESPONSE(_r, _idx) \
- (&((_r)->sring->ring[((_idx) & (RING_SIZE(_r) - 1))].rsp))
-
---- blktap2/drivers/block-log.c.orig
-+++ blktap2/drivers/block-log.c
-@@ -494,11 +494,12 @@ static int ctl_kick(struct tdlog_state* s, int fd)
- reqstart = s->bring.req_cons;
- reqend = s->sring->req_prod;
-
-+ xen_mb();
- BDPRINTF("ctl: ring kicked (start = %u, end = %u)", reqstart, reqend);
-
- while (reqstart != reqend) {
- /* XXX actually submit these! */
-- memcpy(&req, RING_GET_REQUEST(&s->bring, reqstart), sizeof(req));
-+ RING_COPY_REQUEST(&s->bring, reqstart, &req);
- BDPRINTF("ctl: read request %"PRIu64":%u", req.sector, req.count);
- s->bring.req_cons = ++reqstart;
-
---- blktap2/drivers/tapdisk-vbd.c.orig
-+++ blktap2/drivers/tapdisk-vbd.c
-@@ -1555,7 +1555,7 @@ tapdisk_vbd_pull_ring_requests(td_vbd_t *vbd)
- int idx;
- RING_IDX rp, rc;
- td_ring_t *ring;
-- blkif_request_t *req;
-+ blkif_request_t req;
- td_vbd_request_t *vreq;
-
- ring = &vbd->ring;
-@@ -1566,16 +1566,16 @@ tapdisk_vbd_pull_ring_requests(td_vbd_t *vbd)
- xen_rmb();
-
- for (rc = ring->fe_ring.req_cons; rc != rp; rc++) {
-- req = RING_GET_REQUEST(&ring->fe_ring, rc);
-+ RING_COPY_REQUEST(&ring->fe_ring, rc, &req);
- ++ring->fe_ring.req_cons;
-
-- idx = req->id;
-+ idx = req.id;
- vreq = &vbd->request_list[idx];
-
- ASSERT(list_empty(&vreq->next));
- ASSERT(vreq->secs_pending == 0);
-
-- memcpy(&vreq->req, req, sizeof(blkif_request_t));
-+ memcpy(&vreq->req, &req, sizeof(blkif_request_t));
- vbd->received++;
- vreq->vbd = vbd;
-
---- ioemu-qemu-xen/hw/xen_blkif.h.orig
-+++ ioemu-qemu-xen/hw/xen_blkif.h
-@@ -79,8 +79,10 @@ static inline void blkif_get_x86_32_req(blkif_request_t *dst, blkif_x86_32_reque
- dst->handle = src->handle;
- dst->id = src->id;
- dst->sector_number = src->sector_number;
-- if (n > src->nr_segments)
-- n = src->nr_segments;
-+ /* prevent the compiler from optimizing the code and using src->nr_segments instead */
-+ xen_mb();
-+ if (n > dst->nr_segments)
-+ n = dst->nr_segments;
- for (i = 0; i < n; i++)
- dst->seg[i] = src->seg[i];
- }
-@@ -94,8 +96,10 @@ static inline void blkif_get_x86_64_req(blkif_request_t *dst, blkif_x86_64_reque
- dst->handle = src->handle;
- dst->id = src->id;
- dst->sector_number = src->sector_number;
-- if (n > src->nr_segments)
-- n = src->nr_segments;
-+ /* prevent the compiler from optimizing the code and using src->nr_segments instead */
-+ xen_mb();
-+ if (n > dst->nr_segments)
-+ n = dst->nr_segments;
- for (i = 0; i < n; i++)
- dst->seg[i] = src->seg[i];
- }
-
---- ioemu-qemu-xen/hw/xenfb.c
-+++ ioemu-qemu-xen/hw/xenfb.c
-@@ -827,18 +827,20 @@ static void xenfb_invalidate(void *opaque)
-
- static void xenfb_handle_events(struct XenFB *xenfb)
- {
-- uint32_t prod, cons;
-+ uint32_t prod, cons, out_cons;
- struct xenfb_page *page = xenfb->c.page;
-
- prod = page->out_prod;
-- if (prod == page->out_cons)
-+ out_cons = page->out_cons;
-+ if (prod == out_cons)
- return;
- xen_rmb(); /* ensure we see ring contents up to prod */
-- for (cons = page->out_cons; cons != prod; cons++) {
-+ for (cons = out_cons; cons != prod; cons++) {
- union xenfb_out_event *event = &XENFB_OUT_RING_REF(page, cons);
-+ uint8_t type = event->type;
- int x, y, w, h;
-
-- switch (event->type) {
-+ switch (type) {
- case XENFB_TYPE_UPDATE:
- if (xenfb->up_count == UP_QUEUE)
- xenfb->up_fullscreen = 1;
diff --git a/sysutils/xentools41/patches/patch-CVE-2015-8554 b/sysutils/xentools41/patches/patch-CVE-2015-8554
deleted file mode 100644
index 9516e638960..00000000000
--- a/sysutils/xentools41/patches/patch-CVE-2015-8554
+++ /dev/null
@@ -1,21 +0,0 @@
-$NetBSD: patch-CVE-2015-8554,v 1.1 2016/01/07 17:55:55 bouyer Exp $
-
-patch for CVE-2015-8554 aka XSA-164 from
-http://xenbits.xenproject.org/xsa/xsa164.patch
-
---- ioemu-qemu-xen/hw/pt-msi.c.orig
-+++ ioemu-qemu-xen/hw/pt-msi.c
-@@ -440,6 +440,13 @@ static void pci_msix_writel(void *opaque
- return;
- }
-
-+ if ( addr - msix->mmio_base_addr >= msix->total_entries * 16 )
-+ {
-+ PT_LOG("Error: Out of bounds write to MSI-X table,"
-+ " addr %016"PRIx64"\n", addr);
-+ return;
-+ }
-+
- entry_nr = (addr - msix->mmio_base_addr) / 16;
- entry = &msix->msix_entry[entry_nr];
- offset = ((addr - msix->mmio_base_addr) % 16) / 4;
diff --git a/sysutils/xentools41/patches/patch-XSA-197 b/sysutils/xentools41/patches/patch-XSA-197
deleted file mode 100644
index b875273c39e..00000000000
--- a/sysutils/xentools41/patches/patch-XSA-197
+++ /dev/null
@@ -1,69 +0,0 @@
-$NetBSD: patch-XSA-197,v 1.1 2016/11/22 20:53:40 bouyer Exp $
-
-Backported from:
-
-From: Jan Beulich <jbeulich@suse.com>
-Subject: xen: fix ioreq handling
-
-Avoid double fetches and bounds check size to avoid overflowing
-internal variables.
-
-This is XSA-197.
-
-Reported-by: yanghongke <yanghongke@huawei.com>
-Signed-off-by: Jan Beulich <jbeulich@suse.com>
-Reviewed-by: Ian Jackson <ian.jackson@eu.citrix.com>
-
---- ioemu-qemu-xen/i386-dm/helper2.c.orig 2013-07-17 12:59:40.000000000 +0200
-+++ ioemu-qemu-xen/i386-dm/helper2.c 2016-11-22 16:15:32.000000000 +0100
-@@ -333,6 +333,11 @@
-
- sign = req->df ? -1 : 1;
-
-+ if (req->size > sizeof(unsigned long)) {
-+ fprintf(stderr, "PIO: bad size (%u)\n", req->size);
-+ exit(-1);
-+ }
-+
- if (req->dir == IOREQ_READ) {
- if (!req->data_is_ptr) {
- req->data = do_inp(env, req->addr, req->size);
-@@ -368,6 +373,11 @@
-
- sign = req->df ? -1 : 1;
-
-+ if (req->size > sizeof(req->data)) {
-+ fprintf(stderr, "MMIO: bad size (%u)\n", req->size);
-+ exit(-1);
-+ }
-+
- if (!req->data_is_ptr) {
- if (req->dir == IOREQ_READ) {
- for (i = 0; i < req->count; i++) {
-@@ -481,11 +491,13 @@
- req.df = 1;
- req.type = buf_req->type;
- req.data_is_ptr = 0;
-+ xen_rmb();
- qw = (req.size == 8);
- if (qw) {
- buf_req = &buffered_io_page->buf_ioreq[
- (buffered_io_page->read_pointer+1) % IOREQ_BUFFER_SLOT_NUM];
- req.data |= ((uint64_t)buf_req->data) << 32;
-+ xen_rmb();
- }
-
- __handle_ioreq(env, &req);
-@@ -512,7 +524,11 @@
-
- __handle_buffered_iopage(env);
- if (req) {
-- __handle_ioreq(env, req);
-+ ioreq_t copy = *req;
-+
-+ xen_rmb();
-+ __handle_ioreq(env, &copy);
-+ req->data = copy.data;
-
- if (req->state != STATE_IOREQ_INPROCESS) {
- fprintf(logfile, "Badness in I/O request ... not in service?!: "
diff --git a/sysutils/xentools41/patches/patch-XSA-198 b/sysutils/xentools41/patches/patch-XSA-198
deleted file mode 100644
index 29bb8cdaa79..00000000000
--- a/sysutils/xentools41/patches/patch-XSA-198
+++ /dev/null
@@ -1,58 +0,0 @@
-$NetBSD: patch-XSA-198,v 1.1 2016/11/22 20:53:40 bouyer Exp $
-
-Backported from:
-
-From 71a389ae940bc52bf897a6e5becd73fd8ede94c5 Mon Sep 17 00:00:00 2001
-From: Ian Jackson <ian.jackson@eu.citrix.com>
-Date: Thu, 3 Nov 2016 16:37:40 +0000
-Subject: [PATCH] pygrub: Properly quote results, when returning them to the
- caller:
-
-* When the caller wants sexpr output, use `repr()'
- This is what Xend expects.
-
- The returned S-expressions are now escaped and quoted by Python,
- generally using '...'. Previously kernel and ramdisk were unquoted
- and args was quoted with "..." but without proper escaping. This
- change may break toolstacks which do not properly dequote the
- returned S-expressions.
-
-* When the caller wants "simple" output, crash if the delimiter is
- contained in the returned value.
-
- With --output-format=simple it does not seem like this could ever
- happen, because the bootloader config parsers all take line-based
- input from the various bootloader config files.
-
- With --output-format=simple0, this can happen if the bootloader
- config file contains nul bytes.
-
-This is XSA-198.
-
-Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
-Tested-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
-Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
-
---- pygrub/src/pygrub.orig 2013-09-10 08:42:18.000000000 +0200
-+++ pygrub/src/pygrub 2016-11-22 16:26:10.000000000 +0100
-@@ -653,14 +653,17 @@
- return cfg
-
- def format_sxp(kernel, ramdisk, args):
-- s = "linux (kernel %s)" % kernel
-+ s = "linux (kernel %s)" % repr(kernel)
- if ramdisk:
-- s += "(ramdisk %s)" % ramdisk
-+ s += "(ramdisk %s)" % repr(ramdisk)
- if args:
-- s += "(args \"%s\")" % args
-+ s += "(args %s)" % repr(args)
- return s
-
- def format_simple(kernel, ramdisk, args, sep):
-+ for check in (kernel, ramdisk, args):
-+ if check is not None and sep in check:
-+ raise RuntimeError, "simple format cannot represent delimiter-containing value"
- s = ("kernel %s" % kernel) + sep
- if ramdisk:
- s += ("ramdisk %s" % ramdisk) + sep
diff --git a/sysutils/xentools41/patches/patch-XSA-199 b/sysutils/xentools41/patches/patch-XSA-199
deleted file mode 100644
index af551486fd5..00000000000
--- a/sysutils/xentools41/patches/patch-XSA-199
+++ /dev/null
@@ -1,90 +0,0 @@
-$NetBSD: patch-XSA-199,v 1.1 2016/12/20 10:22:29 bouyer Exp $
-
-From b73bd1edc05d1bad5c018228146930d79315a5da Mon Sep 17 00:00:00 2001
-From: Ian Jackson <ian.jackson@eu.citrix.com>
-Date: Mon, 14 Nov 2016 17:19:46 +0000
-Subject: [PATCH] qemu: ioport_read, ioport_write: be defensive about 32-bit
- addresses
-
-On x86, ioport addresses are 16-bit. That these functions take 32-bit
-arguments is a mistake. Changing the argument type to 16-bit will
-discard the top bits of any erroneous values from elsewhere in qemu.
-
-Also, check just before use that the value is in range. (This turns
-an ill-advised change to MAX_IOPORTS into a possible guest crash
-rather than a privilege escalation vulnerability.)
-
-And, in the Xen ioreq processor, clamp incoming ioport addresses to
-16-bit values. Xen will never write >16-bit values but the guest may
-have access to the ioreq ring. We want to defend the rest of the qemu
-code from wrong values.
-
-This is XSA-199.
-
-Reported-by: yanghongke <yanghongke@huawei.com>
-Signed-off-by: Ian Jackson <Ian.Jackson@eu.citrix.com>
----
- i386-dm/helper2.c | 2 ++
- vl.c | 9 +++++++--
- 2 files changed, 9 insertions(+), 2 deletions(-)
-
-diff --git a/i386-dm/helper2.c b/i386-dm/helper2.c
-index 2706f2e..5d276bb 100644
---- ioemu-qemu-xen/i386-dm/helper2.c.orig
-+++ ioemu-qemu-xen/i386-dm/helper2.c
-@@ -375,6 +375,8 @@ static void cpu_ioreq_pio(CPUState *env, ioreq_t *req)
-
- sign = req->df ? -1 : 1;
-
-+ req->addr &= 0x0ffffU;
-+
- if (req->size > sizeof(req->data)) {
- fprintf(stderr, "MMIO: bad size (%u)\n", req->size);
- exit(-1);
-diff --git a/vl.c b/vl.c
-index f9c4d7e..c3c5d63 100644
---- ioemu-qemu-xen/vl.c.orig
-+++ ioemu-qemu-xen/vl.c
-@@ -52,6 +52,7 @@
-
- #include <xen/hvm/hvm_info_table.h>
-
-+#include <assert.h>
- #include <unistd.h>
- #include <fcntl.h>
- #include <signal.h>
-@@ -290,26 +291,30 @@ PicState2 *isa_pic;
- static IOPortReadFunc default_ioport_readb, default_ioport_readw, default_ioport_readl;
- static IOPortWriteFunc default_ioport_writeb, default_ioport_writew, default_ioport_writel;
-
--static uint32_t ioport_read(int index, uint32_t address)
-+static uint32_t ioport_read(int index, uint16_t address)
- {
- static IOPortReadFunc *default_func[3] = {
- default_ioport_readb,
- default_ioport_readw,
- default_ioport_readl
- };
-+ if (address >= MAX_IOPORTS)
-+ abort();
- IOPortReadFunc *func = ioport_read_table[index][address];
- if (!func)
- func = default_func[index];
- return func(ioport_opaque[address], address);
- }
-
--static void ioport_write(int index, uint32_t address, uint32_t data)
-+static void ioport_write(int index, uint16_t address, uint32_t data)
- {
- static IOPortWriteFunc *default_func[3] = {
- default_ioport_writeb,
- default_ioport_writew,
- default_ioport_writel
- };
-+ if (address >= MAX_IOPORTS)
-+ abort();
- IOPortWriteFunc *func = ioport_write_table[index][address];
- if (!func)
- func = default_func[index];
---
-2.1.4
diff --git a/sysutils/xentools41/patches/patch-aa b/sysutils/xentools41/patches/patch-aa
deleted file mode 100644
index 3e9d07e5285..00000000000
--- a/sysutils/xentools41/patches/patch-aa
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-aa,v 1.2 2011/05/07 18:39:06 tnn Exp $
-
---- xentrace/Makefile.orig 2010-04-07 16:12:05.000000000 +0000
-+++ xentrace/Makefile
-@@ -43,6 +43,7 @@ install: build
- [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(PRIVATE_BINDIR)
- $(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR)
- $(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)
-+ $(INSTALL_DATA) formats $(DESTDIR)$(EGDIR)
-
- .PHONY: clean
- clean:
diff --git a/sysutils/xentools41/patches/patch-ab b/sysutils/xentools41/patches/patch-ab
deleted file mode 100644
index f63bdd234eb..00000000000
--- a/sysutils/xentools41/patches/patch-ab
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ab,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- blktap/drivers/Makefile.orig 2008-08-01 16:38:07.000000000 +0200
-+++ blktap/drivers/Makefile
-@@ -37,9 +37,11 @@ BLK-OBJS-y += block-qcow2.o
- BLK-OBJS-y += aes.o
- BLK-OBJS-y += tapaio.o
- BLK-OBJS-$(CONFIG_Linux) += blk_linux.o
-+BLK-OBJS-$(CONFIG_NetBSD) += blk_netbsd.o
-
- BLKTAB-OBJS-y := blktapctrl.o
- BLKTAB-OBJS-$(CONFIG_Linux) += blktapctrl_linux.o
-+BLKTAB-OBJS-$(CONFIG_NetBSD) += blktapctrl_netbsd.o
-
- all: $(IBIN) qcow-util
-
diff --git a/sysutils/xentools41/patches/patch-ac b/sysutils/xentools41/patches/patch-ac
deleted file mode 100644
index 1db6996f612..00000000000
--- a/sysutils/xentools41/patches/patch-ac
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ac,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- libfsimage/common/Makefile.orig 2010-05-11 21:27:58.000000000 +0000
-+++ libfsimage/common/Makefile
-@@ -4,6 +4,8 @@ include $(XEN_ROOT)/tools/Rules.mk
- MAJOR = 1.0
- MINOR = 0
-
-+CFLAGS += -DFSIMAGE_FSDIR=\"$(LIBDIR)/fs\"
-+
- LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
- LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
- LDFLAGS = $(LDFLAGS-y)
diff --git a/sysutils/xentools41/patches/patch-ad b/sysutils/xentools41/patches/patch-ad
deleted file mode 100644
index ed4b844728a..00000000000
--- a/sysutils/xentools41/patches/patch-ad
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ad,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- examples/xend-config.sxp.orig 2010-04-07 16:12:04.000000000 +0000
-+++ examples/xend-config.sxp
-@@ -190,7 +190,7 @@
-
- # Whether to enable auto-ballooning of dom0 to allow domUs to be created.
- # If enable-dom0-ballooning = no, dom0 will never balloon out.
--(enable-dom0-ballooning yes)
-+(enable-dom0-ballooning no)
-
- # 32-bit paravirtual domains can only consume physical
- # memory below 168GB. On systems with memory beyond that address,
diff --git a/sysutils/xentools41/patches/patch-ae b/sysutils/xentools41/patches/patch-ae
deleted file mode 100644
index 7d7080a3421..00000000000
--- a/sysutils/xentools41/patches/patch-ae
+++ /dev/null
@@ -1,14 +0,0 @@
-$NetBSD: patch-ae,v 1.2 2011/12/14 04:01:37 sbd Exp $
-
---- Makefile.orig 2011-10-20 17:05:41.000000000 +0000
-+++ Makefile
-@@ -24,7 +24,8 @@ SUBDIRS-$(CONFIG_Linux) += memshr
- SUBDIRS-$(CONFIG_Linux) += blktap
- SUBDIRS-$(CONFIG_Linux) += blktap2
- SUBDIRS-$(CONFIG_NetBSD) += libaio
--SUBDIRS-$(CONFIG_NetBSD) += blktap2
-+SUBDIRS-$(CONFIG_NetBSD) += blktap
-+#SUBDIRS-$(CONFIG_NetBSD) += blktap2
- SUBDIRS-$(CONFIG_NetBSD) += xenbackendd
- SUBDIRS-y += libfsimage
- SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
diff --git a/sysutils/xentools41/patches/patch-af b/sysutils/xentools41/patches/patch-af
deleted file mode 100644
index 88ea8591c18..00000000000
--- a/sysutils/xentools41/patches/patch-af
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-af,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- firmware/etherboot/Makefile.orig 2011-03-25 10:42:50.000000000 +0000
-+++ firmware/etherboot/Makefile
-@@ -34,18 +34,10 @@ eb-roms.h: Config
- $(MAKE) NO_WERROR=1 $@.new
- mv -f $@.new $@
-
--$T:
-- if ! wget -O _$T $(IPXE_TARBALL_URL); then \
-- $(GIT) clone $(IPXE_GIT_URL) $D.git; \
-- (cd $D.git && $(GIT) archive --format=tar --prefix=$D/ \
-- $(IPXE_GIT_TAG) | gzip >../_$T); \
-- rm -rf $D.git; \
-- fi
-- mv _$T $T
-+$D:
-+ ln -sf $(WRKSRC)/../../ipxe $D
-
--$D/src/arch/i386/Makefile: $T Config
-- rm -rf $D
-- gzip -dc $T | tar xf -
-+$D/src/arch/i386/Makefile: $D Config
- for i in $$(cat patches/series) ; do \
- patch -d $D -p1 --quiet <patches/$$i || exit 1 ; \
- done
diff --git a/sysutils/xentools41/patches/patch-ag b/sysutils/xentools41/patches/patch-ag
deleted file mode 100644
index 731699e3b93..00000000000
--- a/sysutils/xentools41/patches/patch-ag
+++ /dev/null
@@ -1,23 +0,0 @@
-$NetBSD: patch-ag,v 1.2 2011/04/15 10:32:22 bouyer Exp $
-
---- ../config/NetBSD.mk.orig 2011-03-25 11:42:47.000000000 +0100
-+++ ../config/NetBSD.mk 2011-04-15 11:36:19.000000000 +0200
-@@ -7,12 +7,13 @@
- LIBEXEC = $(PREFIX)/libexec
- PRIVATE_BINDIR = $(BINDIR)
-
-+MANDIR = $(PREFIX)/man
-+MAN1DIR = $(MANDIR)/man1
-+MAN8DIR = $(MANDIR)/man8
-+
- DLOPEN_LIBS =
-
--ifeq ($(PREFIX),/usr)
--XEN_LOCK_DIR = /var/lib
--else
--XEN_LOCK_DIR = $(PREFIX)/var/lib
--endif
-+XEN_LOCK_DIR = $(VARBASE)/run
-+XEN_EXAMPLES_DIR=$(PREFIX)/share/examples/xen
-
- WGET = ftp
diff --git a/sysutils/xentools41/patches/patch-ah b/sysutils/xentools41/patches/patch-ah
deleted file mode 100644
index 84b0d927fe0..00000000000
--- a/sysutils/xentools41/patches/patch-ah
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-ah,v 1.2 2011/04/15 10:32:22 bouyer Exp $
-
---- hotplug/NetBSD/Makefile.orig 2011-03-25 11:42:50.000000000 +0100
-+++ hotplug/NetBSD/Makefile 2011-04-15 11:38:32.000000000 +0200
-@@ -8,7 +8,7 @@
- XEN_SCRIPTS += vif-ip
-
- XEN_SCRIPT_DATA =
--XEN_RCD_PROG = rc.d/xencommons rc.d/xend rc.d/xendomains rc.d/xen-watchdog
-+#XEN_RCD_PROG = rc.d/xencommons rc.d/xend rc.d/xendomains rc.d/xen-watchdog
-
- .PHONY: all
- all:
-@@ -21,10 +21,11 @@
-
- .PHONY: install-scripts
- install-scripts:
-- $(INSTALL_DIR) $(DESTDIR)$(XEN_SCRIPT_DIR)
-+ $(INSTALL_DIR) $(DESTDIR)$(XEN_EXAMPLES_DIR)
-+ $(INSTALL_DIR) $(DESTDIR)$(XEN_EXAMPLES_DIR)/scripts
- set -e; for i in $(XEN_SCRIPTS); \
- do \
-- $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_SCRIPT_DIR); \
-+ $(INSTALL_PROG) $$i $(DESTDIR)$(XEN_EXAMPLES_DIR)/scripts; \
- done
- set -e; for i in $(XEN_SCRIPT_DATA); \
- do \
-@@ -33,12 +34,6 @@
-
- .PHONY: install-rcd
- install-rcd:
-- $(INSTALL_DIR) $(DESTDIR)$(CONFIG_DIR)/rc.d
-- set -e; for i in $(XEN_RCD_PROG); \
-- do \
-- $(INSTALL_PROG) $$i $(DESTDIR)$(CONFIG_DIR)/rc.d; \
-- done
-- $(INSTALL_DATA) ../common/hotplugpath.sh $(DESTDIR)$(CONFIG_DIR)/rc.d/xen-hotplugpath.sh
-
- .PHONY: clean
- clean:
diff --git a/sysutils/xentools41/patches/patch-ai b/sysutils/xentools41/patches/patch-ai
deleted file mode 100644
index 1a9cad03681..00000000000
--- a/sysutils/xentools41/patches/patch-ai
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-ai,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- python/xen/xend/osdep.py.orig 2011-04-01 12:03:13.000000000 +0200
-+++ python/xen/xend/osdep.py 2011-04-01 13:49:45.000000000 +0200
-@@ -94,8 +94,12 @@
- return None
- cmd = "/sbin/sysctl " + cmdarg
- sysctloutput = commands.getoutput(cmd)
-+ div = 1
-+ if label == 'current' and '=' not in sysctloutput:
-+ sysctloutput = commands.getoutput( "/sbin/sysctl hw.physmem64")
-+ div = 1024
- (name, value) = sysctloutput.split('=')
-- return int(value)
-+ return int(value) / div
-
- def _solaris_balloon_stat(label):
- """Returns the value for the named label, or None if an error occurs."""
diff --git a/sysutils/xentools41/patches/patch-aj b/sysutils/xentools41/patches/patch-aj
deleted file mode 100644
index f2e93e65bf9..00000000000
--- a/sysutils/xentools41/patches/patch-aj
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-aj,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- hotplug/NetBSD/vif-bridge.orig 2011-03-25 11:42:50.000000000 +0100
-+++ hotplug/NetBSD/vif-bridge 2011-04-01 14:55:58.000000000 +0200
-@@ -23,7 +23,10 @@
- xbridge=$(xenstore-read "$xpath/bridge")
- xfid=$(xenstore-read "$xpath/frontend-id")
- xhandle=$(xenstore-read "$xpath/handle")
-- iface=$(xenstore-read "$xpath/vifname")
-+ iface=$(xenstore-read "$xpath/vifname") || true
-+ if [ x${iface} = "x" ] ; then
-+ iface=xvif$xfid.$xhandle
-+ fi
- echo ifconfig $iface up
- ifconfig $iface up
- brconfig $xbridge add $iface
diff --git a/sysutils/xentools41/patches/patch-ak b/sysutils/xentools41/patches/patch-ak
deleted file mode 100644
index ccb48792e91..00000000000
--- a/sysutils/xentools41/patches/patch-ak
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ak,v 1.2 2011/04/15 13:35:05 bouyer Exp $
-
---- hotplug/NetBSD/vif-ip.orig 2011-04-01 16:04:24.000000000 +0200
-+++ hotplug/NetBSD/vif-ip 2011-04-01 16:04:54.000000000 +0200
-@@ -23,7 +23,10 @@
- xip=$(xenstore-read "$xpath/ip")
- xfid=$(xenstore-read "$xpath/frontend-id")
- xhandle=$(xenstore-read "$xpath/handle")
-- iface=$(xenstore-read "$xpath/vifname")
-+ iface=$(xenstore-read "$xpath/vifname") || true
-+ if [ x${iface} = "x" ] ; then
-+ iface=xvif$xfid.$xhandle
-+ fi
- echo ifconfig $iface $xip up
- ifconfig $iface $xip up
- xenstore-write $xpath/hotplug-status connected
diff --git a/sysutils/xentools41/patches/patch-al b/sysutils/xentools41/patches/patch-al
deleted file mode 100644
index 88936f1e595..00000000000
--- a/sysutils/xentools41/patches/patch-al
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-al,v 1.1 2011/04/15 10:32:22 bouyer Exp $
-
---- ioemu-qemu-xen/i386-dm/hookstarget.mak.orig 2011-04-15 11:45:21.000000000 +0200
-+++ ioemu-qemu-xen/i386-dm/hookstarget.mak 2011-04-15 11:46:36.000000000 +0200
-@@ -2,5 +2,5 @@
-
- install-hook:
- $(INSTALL_DIR) "$(DESTDIR)/$(bindir)"
-- $(INSTALL_DIR) "$(DESTDIR)/$(configdir)"
-- $(INSTALL_PROG) $(QEMU_ROOT)/i386-dm/qemu-ifup-$(IOEMU_OS) "$(DESTDIR)/$(configdir)/qemu-ifup"
-+ $(INSTALL_DIR) "$(DESTDIR)/$(XEN_EXAMPLES_DIR)/scripts"
-+ $(INSTALL_PROG) $(QEMU_ROOT)/i386-dm/qemu-ifup-$(IOEMU_OS) "$(DESTDIR)/$(XEN_EXAMPLES_DIR)/scripts/qemu-ifup"
diff --git a/sysutils/xentools41/patches/patch-am b/sysutils/xentools41/patches/patch-am
deleted file mode 100644
index 238db793030..00000000000
--- a/sysutils/xentools41/patches/patch-am
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-am,v 1.1 2013/11/29 19:31:47 drochner Exp $
-
---- libxc/xc_dom.h.orig 2013-11-29 18:20:47.000000000 +0000
-+++ libxc/xc_dom.h 2013-11-29 18:22:14.000000000 +0000
-@@ -303,7 +303,7 @@ static inline void *xc_dom_vaddr_to_ptr(
- if ( ptr == NULL )
- return ptr;
- *safe_region_out = (safe_region_count << XC_DOM_PAGE_SHIFT(dom)) - offset;
-- return ptr;
-+ return ptr + offset;
- }
-
- static inline int xc_dom_feature_translated(struct xc_dom_image *dom)
diff --git a/sysutils/xentools41/patches/patch-ba b/sysutils/xentools41/patches/patch-ba
deleted file mode 100644
index 1bcb19b9830..00000000000
--- a/sysutils/xentools41/patches/patch-ba
+++ /dev/null
@@ -1,56 +0,0 @@
-$NetBSD: patch-ba,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- python/xen/xend/XendNode.py.orig 2010-04-07 16:12:05.000000000 +0000
-+++ python/xen/xend/XendNode.py
-@@ -276,28 +276,29 @@ class XendNode:
- except KeyError:
- pass
-
-- for pci_dev in PciUtil.get_all_pci_devices():
-- ppci_record = {
-- 'domain': pci_dev.domain,
-- 'bus': pci_dev.bus,
-- 'slot': pci_dev.slot,
-- 'func': pci_dev.func,
-- 'vendor_id': pci_dev.vendor,
-- 'vendor_name': pci_dev.vendorname,
-- 'device_id': pci_dev.device,
-- 'device_name': pci_dev.devicename,
-- 'revision_id': pci_dev.revision,
-- 'class_code': pci_dev.classcode,
-- 'class_name': pci_dev.classname,
-- 'subsystem_vendor_id': pci_dev.subvendor,
-- 'subsystem_vendor_name': pci_dev.subvendorname,
-- 'subsystem_id': pci_dev.subdevice,
-- 'subsystem_name': pci_dev.subdevicename,
-- 'driver': pci_dev.driver
-- }
-- # If saved uuid exists, use it. Otherwise create one.
-- ppci_uuid = saved_ppci_table.get(pci_dev.name, uuid.createString())
-- XendPPCI(ppci_uuid, ppci_record)
-+ pass
-+ #for pci_dev in PciUtil.get_all_pci_devices():
-+ # ppci_record = {
-+ # 'domain': pci_dev.domain,
-+ # 'bus': pci_dev.bus,
-+ # 'slot': pci_dev.slot,
-+ # 'func': pci_dev.func,
-+ # 'vendor_id': pci_dev.vendor,
-+ # 'vendor_name': pci_dev.vendorname,
-+ # 'device_id': pci_dev.device,
-+ # 'device_name': pci_dev.devicename,
-+ # 'revision_id': pci_dev.revision,
-+ # 'class_code': pci_dev.classcode,
-+ # 'class_name': pci_dev.classname,
-+ # 'subsystem_vendor_id': pci_dev.subvendor,
-+ # 'subsystem_vendor_name': pci_dev.subvendorname,
-+ # 'subsystem_id': pci_dev.subdevice,
-+ # 'subsystem_name': pci_dev.subdevicename,
-+ # 'driver': pci_dev.driver
-+ # }
-+ # # If saved uuid exists, use it. Otherwise create one.
-+ # ppci_uuid = saved_ppci_table.get(pci_dev.name, uuid.createString())
-+ # XendPPCI(ppci_uuid, ppci_record)
-
- def _init_PSCSIs(self):
- # Initialise PSCSIs and PSCSI_HBAs
diff --git a/sysutils/xentools41/patches/patch-bb b/sysutils/xentools41/patches/patch-bb
deleted file mode 100644
index eeaf66e2964..00000000000
--- a/sysutils/xentools41/patches/patch-bb
+++ /dev/null
@@ -1,213 +0,0 @@
-$NetBSD: patch-bb,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- libxc/xc_netbsd.c.orig 2011-03-29 17:09:58.000000000 +0000
-+++ libxc/xc_netbsd.c
-@@ -21,6 +21,7 @@
- #include "xc_private.h"
-
- #include <xen/sys/evtchn.h>
-+#include <xen/sys/gntdev.h>
- #include <unistd.h>
- #include <fcntl.h>
-
-@@ -351,7 +352,189 @@ void discard_file_cache(xc_interface *xc
- errno = saved_errno;
- }
-
--static struct xc_osdep_ops *netbsd_osdep_init(xc_interface *xch, enum xc_osdep_type type)
-+#define DEVXEN "/dev/xen/"
-+
-+static xc_osdep_handle
-+netbsd_gnttab_open(xc_gnttab *xcg)
-+{
-+ int fd;
-+
-+ fd = open(DEVXEN "gntdev", O_RDWR);
-+ if (fd == -1)
-+ return XC_OSDEP_OPEN_ERROR;
-+
-+ return (xc_osdep_handle)fd;
-+}
-+
-+static int
-+netbsd_gnttab_close(xc_gnttab *xcg, xc_osdep_handle h)
-+{
-+ int fd = (int)h;
-+ return close(fd);
-+}
-+
-+static void *
-+netbsd_gnttab_map_grant_ref(xc_gnttab *xch, xc_osdep_handle h,
-+ uint32_t domid, uint32_t ref, int prot)
-+{
-+ int fd = (int)h;
-+ struct ioctl_gntdev_map_grant_ref map;
-+ void *addr;
-+
-+ map.count = 1;
-+ map.refs[0].domid = domid;
-+ map.refs[0].ref = ref;
-+
-+ if ( ioctl(fd, IOCTL_GNTDEV_MAP_GRANT_REF, &map) ) {
-+ PERROR("netbsd_gnttab_map_grant_ref: ioctl MAP_GRANT_REF failed");
-+ return NULL;
-+ }
-+
-+mmap_again:
-+ addr = mmap(NULL, XC_PAGE_SIZE, prot, MAP_SHARED, fd, map.index);
-+ if ( addr == MAP_FAILED )
-+ {
-+ int saved_errno = errno;
-+ struct ioctl_gntdev_unmap_grant_ref unmap_grant;
-+
-+ if ( saved_errno == EAGAIN )
-+ {
-+ usleep(1000);
-+ goto mmap_again;
-+ }
-+ /* Unmap the driver slots used to store the grant information. */
-+ PERROR("netbsd_gnttab_map_grant_ref: mmap failed");
-+ unmap_grant.index = map.index;
-+ unmap_grant.count = 1;
-+ ioctl(fd, IOCTL_GNTDEV_UNMAP_GRANT_REF, &unmap_grant);
-+ errno = saved_errno;
-+ return NULL;
-+ }
-+
-+ return addr;
-+}
-+
-+static void *
-+do_gnttab_map_grant_refs(xc_gnttab *xch, xc_osdep_handle h,
-+ uint32_t count, uint32_t *domids, int domids_stride,
-+ uint32_t *refs, int prot)
-+{
-+ int fd = (int)h;
-+ struct ioctl_gntdev_map_grant_ref *map;
-+ void *addr = NULL;
-+ int i;
-+
-+ map = malloc(sizeof(*map) +
-+ (count - 1) * sizeof(struct ioctl_gntdev_map_grant_ref));
-+ if ( map == NULL )
-+ return NULL;
-+
-+ for ( i = 0; i < count; i++ )
-+ {
-+ map->refs[i].domid = domids[i * domids_stride];
-+ map->refs[i].ref = refs[i];
-+ }
-+
-+ map->count = count;
-+
-+ if ( ioctl(fd, IOCTL_GNTDEV_MAP_GRANT_REF, map) ) {
-+ PERROR("xc_gnttab_map_grant_refs: ioctl MAP_GRANT_REF failed");
-+ goto out;
-+ }
-+
-+ addr = mmap(NULL, XC_PAGE_SIZE * count, prot, MAP_SHARED, fd,
-+ map->index);
-+ if ( addr == MAP_FAILED )
-+ {
-+ int saved_errno = errno;
-+ struct ioctl_gntdev_unmap_grant_ref unmap_grant;
-+
-+ /* Unmap the driver slots used to store the grant information. */
-+ PERROR("xc_gnttab_map_grant_refs: mmap failed");
-+ unmap_grant.index = map->index;
-+ unmap_grant.count = count;
-+ ioctl(fd, IOCTL_GNTDEV_UNMAP_GRANT_REF, &unmap_grant);
-+ errno = saved_errno;
-+ addr = NULL;
-+ }
-+
-+ out:
-+ free(map);
-+
-+ return addr;
-+}
-+
-+static void *
-+netbsd_gnttab_map_grant_refs(xc_gnttab *xcg, xc_osdep_handle h,
-+ uint32_t count, uint32_t *domids, uint32_t *refs, int prot)
-+{
-+ return do_gnttab_map_grant_refs(xcg, h, count, domids, 1, refs, prot);
-+}
-+
-+static void *
-+netbsd_gnttab_map_domain_grant_refs(xc_gnttab *xcg, xc_osdep_handle h,
-+ uint32_t count, uint32_t domid, uint32_t *refs, int prot)
-+{
-+ return do_gnttab_map_grant_refs(xcg, h, count, &domid, 0, refs, prot);
-+}
-+
-+static int
-+netbsd_gnttab_munmap(xc_gnttab *xcg, xc_osdep_handle h,
-+ void *start_address, uint32_t count)
-+{
-+ int fd = (int)h;
-+ struct ioctl_gntdev_get_offset_for_vaddr get_offset;
-+ struct ioctl_gntdev_unmap_grant_ref unmap_grant;
-+ int rc;
-+
-+ if ( start_address == NULL )
-+ {
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ /* First, it is necessary to get the offset which was initially used to
-+ * mmap() the pages.
-+ */
-+ get_offset.vaddr = (unsigned long)start_address;
-+ rc = ioctl(fd, IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR, &get_offset);
-+ if ( rc )
-+ return rc;
-+
-+ if ( get_offset.count != count )
-+ {
-+ errno = EINVAL;
-+ return -1;
-+ }
-+
-+ /* Next, unmap the memory. */
-+ rc = munmap(start_address, count * getpagesize());
-+ if ( rc )
-+ return rc;
-+
-+ /* Finally, unmap the driver slots used to store the grant information. */
-+ unmap_grant.index = get_offset.offset;
-+ unmap_grant.count = count;
-+ rc = ioctl(fd, IOCTL_GNTDEV_UNMAP_GRANT_REF, &unmap_grant);
-+ if ( rc )
-+ return rc;
-+ return 0;
-+}
-+
-+static struct xc_osdep_ops netbsd_gnttab_ops = {
-+ .open = &netbsd_gnttab_open,
-+ .close = &netbsd_gnttab_close,
-+
-+ .u.gnttab = {
-+ .map_grant_ref = &netbsd_gnttab_map_grant_ref,
-+ .map_grant_refs = &netbsd_gnttab_map_grant_refs,
-+ .map_domain_grant_refs = &netbsd_gnttab_map_domain_grant_refs,
-+ .munmap = &netbsd_gnttab_munmap,
-+ },
-+};
-+
-+static struct xc_osdep_ops *
-+netbsd_osdep_init(xc_interface *xch, enum xc_osdep_type type)
- {
- switch ( type )
- {
-@@ -360,8 +543,7 @@ static struct xc_osdep_ops *netbsd_osdep
- case XC_OSDEP_EVTCHN:
- return &netbsd_evtchn_ops;
- case XC_OSDEP_GNTTAB:
-- ERROR("GNTTAB interface not supported on this platform");
-- return NULL;
-+ return &netbsd_gnttab_ops;
- default:
- return NULL;
- }
diff --git a/sysutils/xentools41/patches/patch-bc b/sysutils/xentools41/patches/patch-bc
deleted file mode 100644
index d082975117a..00000000000
--- a/sysutils/xentools41/patches/patch-bc
+++ /dev/null
@@ -1,110 +0,0 @@
-$NetBSD: patch-bc,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- include/xen-sys/NetBSD/gntdev.h.orig 2011-03-29 17:10:31.000000000 +0000
-+++ include/xen-sys/NetBSD/gntdev.h
-@@ -0,0 +1,105 @@
-+/******************************************************************************
-+ * gntdev.h
-+ *
-+ * Interface to /dev/xen/gntdev.
-+ *
-+ * Copyright (c) 2007, D G Murray
-+ *
-+ * This program is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU General Public License version 2
-+ * as published by the Free Software Foundation; or, when distributed
-+ * separately from the Linux kernel or incorporated into other
-+ * software packages, subject to the following license:
-+ *
-+ * Permission is hereby granted, free of charge, to any person obtaining a copy
-+ * of this source file (the "Software"), to deal in the Software without
-+ * restriction, including without limitation the rights to use, copy, modify,
-+ * merge, publish, distribute, sublicense, and/or sell copies of the Software,
-+ * and to permit persons to whom the Software is furnished to do so, subject to
-+ * the following conditions:
-+ *
-+ * The above copyright notice and this permission notice shall be included in
-+ * all copies or substantial portions of the Software.
-+ *
-+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
-+ * IN THE SOFTWARE.
-+ */
-+
-+#ifndef __NetBSD_PUBLIC_GNTDEV_H__
-+#define __NetBSD_PUBLIC_GNTDEV_H__
-+
-+struct ioctl_gntdev_grant_ref {
-+ /* The domain ID of the grant to be mapped. */
-+ uint32_t domid;
-+ /* The grant reference of the grant to be mapped. */
-+ uint32_t ref;
-+};
-+
-+/*
-+ * Inserts the grant references into the mapping table of an instance
-+ * of gntdev. N.B. This does not perform the mapping, which is deferred
-+ * until mmap() is called with @index as the offset.
-+ */
-+#define IOCTL_GNTDEV_MAP_GRANT_REF \
-+ _IOWR('G', 0, sizeof(struct ioctl_gntdev_map_grant_ref))
-+struct ioctl_gntdev_map_grant_ref {
-+ /* IN parameters */
-+ /* The number of grants to be mapped. */
-+ uint32_t count;
-+ uint32_t pad;
-+ /* OUT parameters */
-+ /* The offset to be used on a subsequent call to mmap(). */
-+ uint64_t index;
-+ /* Variable IN parameter. */
-+ /* Array of grant references, of size @count. */
-+ struct ioctl_gntdev_grant_ref refs[1];
-+};
-+
-+/*
-+ * Removes the grant references from the mapping table of an instance of
-+ * of gntdev. N.B. munmap() must be called on the relevant virtual address(es)
-+ * before this ioctl is called, or an error will result.
-+ */
-+#define IOCTL_GNTDEV_UNMAP_GRANT_REF \
-+ _IOW('G', 1, sizeof(struct ioctl_gntdev_unmap_grant_ref))
-+struct ioctl_gntdev_unmap_grant_ref {
-+ /* IN parameters */
-+ /* The offset was returned by the corresponding map operation. */
-+ uint64_t index;
-+ /* The number of pages to be unmapped. */
-+ uint32_t count;
-+ uint32_t pad;
-+};
-+
-+/*
-+ * Returns the offset in the driver's address space that corresponds
-+ * to @vaddr. This can be used to perform a munmap(), followed by an
-+ * UNMAP_GRANT_REF ioctl, where no state about the offset is retained by
-+ * the caller. The number of pages that were allocated at the same time as
-+ * @vaddr is returned in @count.
-+ *
-+ * N.B. Where more than one page has been mapped into a contiguous range, the
-+ * supplied @vaddr must correspond to the start of the range; otherwise
-+ * an error will result. It is only possible to munmap() the entire
-+ * contiguously-allocated range at once, and not any subrange thereof.
-+ */
-+#define IOCTL_GNTDEV_GET_OFFSET_FOR_VADDR \
-+ _IOWR('G', 2, sizeof(struct ioctl_gntdev_get_offset_for_vaddr))
-+struct ioctl_gntdev_get_offset_for_vaddr {
-+ /* IN parameters */
-+ /* The virtual address of the first mapped page in a range. */
-+ uint64_t vaddr;
-+ /* OUT parameters */
-+ /* The offset that was used in the initial mmap() operation. */
-+ uint64_t offset;
-+ /* The number of pages mapped in the VM area that begins at @vaddr. */
-+ uint32_t count;
-+ uint32_t pad;
-+};
-+
-+#endif /* __NetBSD_PUBLIC_GNTDEV_H__ */
diff --git a/sysutils/xentools41/patches/patch-ca b/sysutils/xentools41/patches/patch-ca
deleted file mode 100644
index 6e7a5fa665d..00000000000
--- a/sysutils/xentools41/patches/patch-ca
+++ /dev/null
@@ -1,47 +0,0 @@
-$NetBSD: patch-ca,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- ../docs/man/xend-config.sxp.pod.5.orig 2010-04-07 16:12:04.000000000 +0000
-+++ ../docs/man/xend-config.sxp.pod.5
-@@ -4,7 +4,7 @@ xend-config.sxp - Xen daemon configurati
-
- =head1 SYNOPSIS
-
--/etc/xen/xend-config.sxp
-+@XENDCONFDIR@/xend-config.sxp
-
- =head1 DESCRIPTION
-
-@@ -12,7 +12,7 @@ The xend(1) program requires xend-config
- parameters which determine the behavior of the daemon at runtime.
-
- The parameters are specified in S-expression format. See the example
--configuration file in I</etc/xen/xend-config.sxp> for details.
-+configuration file in I<@XENDCONFDIR@/xend-config.sxp> for details.
-
- =head1 OPTIONS
-
-@@ -82,13 +82,13 @@ Defaults to I<1024>.
-
- =item I<network-script>
-
--The name of the script in I</etc/xen/scripts> that will be run to
-+The name of the script in I<@XENDCONFDIR@/scripts> that will be run to
- setup the networking environment. This can be any name, but in
- general is either I<network-bridge> or I<network-route>.
-
- =item I<vif-script>
-
--The name of the script in I</etc/xen/scripts> that will be run to
-+The name of the script in I<@XENDCONFDIR@/scripts> that will be run to
- setup a virtual interface when it is created or destroyed. This needs
- to (in general) work in unison with the I<network-script>.
-
-@@ -113,7 +113,7 @@ domains should be saved when a crash occ
-
- The name of an application or script that can handle external device
- migration, such as for example virtual TPM migration. An example
--script is I</etc/xen/scripts/external-device-migrate>.
-+script is I<@XENDCONFDIR@/scripts/external-device-migrate>.
-
- =item I<device-create-timeout>
-
diff --git a/sysutils/xentools41/patches/patch-cb b/sysutils/xentools41/patches/patch-cb
deleted file mode 100644
index 74aa5bd0068..00000000000
--- a/sysutils/xentools41/patches/patch-cb
+++ /dev/null
@@ -1,36 +0,0 @@
-$NetBSD: patch-cb,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- ../docs/man/xmdomain.cfg.pod.5.orig 2008-08-01 16:38:07.000000000 +0200
-+++ ../docs/man/xmdomain.cfg.pod.5
-@@ -4,9 +4,9 @@ xmdomain.cfg - xm domain config file for
-
- =head1 SYNOPSIS
-
-- /etc/xen/myxendomain
-- /etc/xen/myxendomain2
-- /etc/xen/auto/myxenautostarted
-+ @XENDCONFDIR@/myxendomain
-+ @XENDCONFDIR@/myxendomain2
-+ @XENDCONFDIR@/auto/myxenautostarted
-
- =head1 DESCRIPTION
-
-@@ -14,14 +14,14 @@ The B<xm>(1) program uses python executa
- domains to create from scratch. Each of these config files needs to
- contain a number of required options, and may specify many more.
-
--Domain configuration files live in /etc/xen by default, if you store
-+Domain configuration files live in @XENDCONFDIR@ by default, if you store
- config files anywhere else the full path to the config file must be
- specified in the I<xm create> command.
-
--/etc/xen/auto is a special case. Domain config files in that
-+@XENDCONFDIR@/auto is a special case. Domain config files in that
- directory will be started automatically at system boot if the
--xendomain init script is enabled. The contents of /etc/xen/auto
--should be symlinks to files in /etc/xen to allow I<xm create> to be
-+xendomain init script is enabled. The contents of @XENDCONFDIR@/auto
-+should be symlinks to files in @XENDCONFDIR@ to allow I<xm create> to be
- used without full paths.
-
- Options are specified by I<name = value> statements in the
diff --git a/sysutils/xentools41/patches/patch-cc b/sysutils/xentools41/patches/patch-cc
deleted file mode 100644
index 33eb6446b57..00000000000
--- a/sysutils/xentools41/patches/patch-cc
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-cc,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- ../docs/man/xm.pod.1.orig 2009-01-05 11:26:58.000000000 +0000
-+++ ../docs/man/xm.pod.1
-@@ -75,7 +75,7 @@ in the config file. See L<xmdomain.cfg>
- format, and possible options used in either the configfile or for I<vars>.
-
- I<configfile> can either be an absolute path to a file, or a relative
--path to a file located in /etc/xen.
-+path to a file located in @XENDCONFDIR@.
-
- Create will return B<as soon> as the domain is started. This B<does
- not> mean the guest OS in the domain has actually booted, or is
-@@ -156,7 +156,7 @@ B<EXAMPLES>
-
- xm create Fedora4
-
--This creates a domain with the file /etc/xen/Fedora4, and returns as
-+This creates a domain with the file @XENDCONFDIR@/Fedora4, and returns as
- soon as it is run.
-
- =item I<without config file>
-@@ -388,7 +388,7 @@ file format, and possible options used i
- I<vars>.
-
- I<configfile> can either be an absolute path to a file, or a relative
--path to a file located in /etc/xen.
-+path to a file located in @XENDCONFDIR@.
-
- The new subcommand will return without starting the domain. The
- domain needs to be started using the B<xm start> command.
-@@ -1068,7 +1068,7 @@ I<policy> is a dot-separated list of nam
- name pre-fix for the policy XML file. The preceding name parts are
- translated into the local path pointing to the policy XML file
- relative to the global policy root directory
--(/etc/xen/acm-security/policies). For example,
-+(@XENDCONFDIR@/acm-security/policies). For example,
- example.chwall_ste.client_v1 denotes the policy file
- example/chwall_ste/client_v1-security_policy.xml relative to the
- global policy root directory.
diff --git a/sysutils/xentools41/patches/patch-cd b/sysutils/xentools41/patches/patch-cd
deleted file mode 100644
index 06a796a5936..00000000000
--- a/sysutils/xentools41/patches/patch-cd
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-cd,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- python/xen/xm/create.py.orig 2010-04-07 16:12:05.000000000 +0000
-+++ python/xen/xm/create.py
-@@ -426,7 +426,7 @@ gopts.var('vtpm', val="instance=INSTANCE
- preferred instance number. The hotplug script will determine
- which instance number will actually be assigned to the domain.
- The associtation between virtual machine and the TPM instance
-- number can be found in /etc/xen/vtpm.db. Use the backend in the
-+ number can be found in @XENDCONFDIR@/vtpm.db. Use the backend in the
- given domain.
- The type parameter can be used to select a specific driver type
- that the VM can use. To prevent a fully virtualized domain (HVM)
diff --git a/sysutils/xentools41/patches/patch-ce b/sysutils/xentools41/patches/patch-ce
deleted file mode 100644
index bd14472245e..00000000000
--- a/sysutils/xentools41/patches/patch-ce
+++ /dev/null
@@ -1,24 +0,0 @@
-$NetBSD: patch-ce,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- security/policytools.txt.orig 2008-08-01 16:38:07.000000000 +0200
-+++ security/policytools.txt
-@@ -16,10 +16,10 @@ XML. Read in the user manual about the n
- name is used by the Xen management tools to identify existing
- policies. Creating the security policy means creating a policy
- description in XML:
--/etc/xen/acm-security/policies/example/chwall_ste/test-security_policy.xml.
-+@XENDCONFDIR@/acm-security/policies/example/chwall_ste/test-security_policy.xml.
-
- The policy XML description must follow the XML schema definition in
--/etc/xen/acm-security/policies/security_policy.xsd. The policy tools
-+@XENDCONFDIR@/acm-security/policies/security_policy.xsd. The policy tools
- are written against this schema; they will create and refine policies
- that conform to this scheme.
-
-@@ -144,5 +144,5 @@ policy file naming conventions based on
- choose to use.
-
- To get a feel for the tool, you could use one of the example policy
--definitions files from /etc/xen/acm-security/policies/example as
-+definitions files from @XENDCONFDIR@/acm-security/policies/example as
- input or a policy created by the xensec_ezpolicy tool.
diff --git a/sysutils/xentools41/patches/patch-cf b/sysutils/xentools41/patches/patch-cf
deleted file mode 100644
index b6129f6fdd1..00000000000
--- a/sysutils/xentools41/patches/patch-cf
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-cf,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- xm-test/tests/security-acm/Makefile.am.orig 2008-08-01 16:38:07.000000000 +0200
-+++ xm-test/tests/security-acm/Makefile.am
-@@ -19,10 +19,10 @@ TESTS_ENVIRONMENT=@TENV@
- %.test: %.py
- cp $< $@
- chmod +x $@
-- @if [ -d /etc/xen/acm-security/policies ]; then \
-+ @if [ -d @XENDCONFDIR@/acm-security/policies ]; then \
- cp -f xm-test-security_policy.xml \
- xm-test-update-security_policy.xml\
-- /etc/xen/acm-security/policies; \
-+ @XENDCONFDIR@/acm-security/policies; \
- fi;
-
- clean-local: am_config_clean-local
diff --git a/sysutils/xentools41/patches/patch-cg b/sysutils/xentools41/patches/patch-cg
deleted file mode 100644
index 51a794c2f2f..00000000000
--- a/sysutils/xentools41/patches/patch-cg
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-cg,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- security/xensec_ezpolicy.orig 2008-08-01 16:38:07.000000000 +0200
-+++ security/xensec_ezpolicy
-@@ -935,7 +935,7 @@ class ezFrame(wx.Frame):
- policyname = transInfo()
- if not policyname:
- return
-- path="/etc/xen/acm-security/policies/"
-+ path="@XENDCONFDIR@/acm-security/policies/"
- nameparts=string.split(policyname, ".")
- if len(nameparts) > 1:
- path = path + "/".join(nameparts[0:len(nameparts)-1])
-@@ -1592,7 +1592,7 @@ where you merely replace &quot;NAME&quot
- Save the policy under the name proposed by the tool in the proposed directory
- if you are using this tool in your Xen environment. Otherwise, you need
- to copy the resulting file into your Xen environment to the directory
--&quot;/etc/xen/acm-security/policies/example/chwall_ste/&quot;.<BR>
-+&quot;@XENDCONFDIR@/acm-security/policies/example/chwall_ste/&quot;.<BR>
- <BR>
- This tool creates policies for the Xen Chinese Wall and Simple Type Enforcement
- policy. The Xen access control policy in general is more expressive and
diff --git a/sysutils/xentools41/patches/patch-ch b/sysutils/xentools41/patches/patch-ch
deleted file mode 100644
index 2649cd2da10..00000000000
--- a/sysutils/xentools41/patches/patch-ch
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-ch,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- xm-test/runtest.sh.orig 2008-08-01 16:38:07.000000000 +0200
-+++ xm-test/runtest.sh
-@@ -220,9 +220,9 @@ unsafe=no
- GROUPENTERED=default
-
- #Prepare for usage with ACM
--if [ -d /etc/xen/acm-security/policies ]; then
-+if [ -d @XENDCONFDIR@/acm-security/policies ]; then
- cp -f tests/security-acm/xm-test-security_policy.xml \
-- /etc/xen/acm-security/policies
-+ @XENDCONFDIR@/acm-security/policies
- fi
-
- unset XM_MANAGED_DOMAINS
diff --git a/sysutils/xentools41/patches/patch-config_StdGNU.mk b/sysutils/xentools41/patches/patch-config_StdGNU.mk
deleted file mode 100644
index dbf1058da80..00000000000
--- a/sysutils/xentools41/patches/patch-config_StdGNU.mk
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-config_StdGNU.mk,v 1.1 2012/05/10 16:07:36 abs Exp $
-
-Allow XEN_CONFIG_DIR to be overriden in the environment
-
---- ../config/StdGNU.mk.orig 2012-05-10 15:51:14.000000000 +0000
-+++ ../config/StdGNU.mk
-@@ -53,7 +53,7 @@ endif
-
- SYSCONFIG_DIR = $(CONFIG_DIR)/$(CONFIG_LEAF_DIR)
-
--XEN_CONFIG_DIR = $(CONFIG_DIR)/xen
-+XEN_CONFIG_DIR ?= $(CONFIG_DIR)/xen
- XEN_SCRIPT_DIR = $(XEN_CONFIG_DIR)/scripts
-
- SOCKET_LIBS =
diff --git a/sysutils/xentools41/patches/patch-da b/sysutils/xentools41/patches/patch-da
deleted file mode 100644
index 99881b60cf5..00000000000
--- a/sysutils/xentools41/patches/patch-da
+++ /dev/null
@@ -1,42 +0,0 @@
-$NetBSD: patch-da,v 1.3 2014/08/28 14:30:03 bouyer Exp $
-
---- ioemu-qemu-xen/configure.orig 2013-07-17 12:59:40.000000000 +0200
-+++ ioemu-qemu-xen/configure 2014-08-28 13:59:55.000000000 +0200
-@@ -1089,7 +1089,7 @@
- # Check if tools are available to build documentation.
- if [ -x "`which texi2html 2>/dev/null`" ] && \
- [ -x "`which pod2man 2>/dev/null`" ]; then
-- build_docs="yes"
-+# build_docs="yes"
- fi
-
- ##########################################
-@@ -1124,7 +1124,7 @@
- if test -z "$prefix" ; then
- prefix="/usr/local"
- fi
-- mansuffix="/share/man"
-+ mansuffix="/man"
- datasuffix="/share/qemu"
- docsuffix="/share/doc/qemu"
- binsuffix="/bin"
-@@ -1215,6 +1215,9 @@
- echo "#define CONFIG_QEMU_SHAREDIR \"$prefix$datasuffix\"" >> $config_h
- echo "MAKE=$make" >> $config_mak
- echo "INSTALL=$install" >> $config_mak
-+echo "INSTALL_DIR=$install -d -m0755 -p" >> $config_mak
-+echo "INSTALL_DATA=$install -d -m0644 -p" >> $config_mak
-+echo "INSTALL_PROG=$install -d -m0755 -p" >> $config_mak
- echo "CC=$cc" >> $config_mak
- echo "HOST_CC=$host_cc" >> $config_mak
- echo "AR=$ar" >> $config_mak
-@@ -1492,7 +1495,9 @@
- # XXX: suppress that
- if [ "$bsd" = "yes" ] ; then
- echo "#define O_LARGEFILE 0" >> $config_h
-+ echo "#ifndef MAP_ANONYMOUS" >> $config_h
- echo "#define MAP_ANONYMOUS MAP_ANON" >> $config_h
-+ echo "#endif" >> $config_h
- echo "#define _BSD 1" >> $config_h
- fi
-
diff --git a/sysutils/xentools41/patches/patch-db b/sysutils/xentools41/patches/patch-db
deleted file mode 100644
index 0f14778103f..00000000000
--- a/sysutils/xentools41/patches/patch-db
+++ /dev/null
@@ -1,85 +0,0 @@
-$NetBSD: patch-db,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
---- ioemu-qemu-xen/Makefile.orig 2011-02-11 17:54:51.000000000 +0000
-+++ ioemu-qemu-xen/Makefile
-@@ -1,7 +1,7 @@
- # Makefile for QEMU.
-
--include config-host.mak
--include $(SRC_PATH)/rules.mak
-+-include config-host.mak
-+-include $(SRC_PATH)/rules.mak
-
- .PHONY: all clean cscope distclean dvi html info install install-doc \
- recurse-all speed tar tarbin test
-@@ -231,30 +231,30 @@ BLOBS=
- endif
-
- install-doc: $(DOCS)
-- mkdir -p "$(DESTDIR)$(docdir)"
-- $(INSTALL) -m 644 qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
-+ $(INSTALL_DIR) "$(DESTDIR)$(docdir)"
-+ $(INSTALL_DATA) qemu-doc.html qemu-tech.html "$(DESTDIR)$(docdir)"
- ifndef CONFIG_WIN32
-- mkdir -p "$(DESTDIR)$(mandir)/man1"
-- $(INSTALL) -m 644 qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
-- mkdir -p "$(DESTDIR)$(mandir)/man8"
-- $(INSTALL) -m 644 qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
-+ $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man1"
-+ $(INSTALL_DATA) qemu.1 qemu-img.1 "$(DESTDIR)$(mandir)/man1"
-+ $(INSTALL_DIR) "$(DESTDIR)$(mandir)/man8"
-+ $(INSTALL_DATA) qemu-nbd.8 "$(DESTDIR)$(mandir)/man8"
- endif
-
- install: all $(if $(BUILD_DOCS),install-doc)
-- mkdir -p "$(DESTDIR)$(bindir)"
-+ $(INSTALL_DIR) "$(DESTDIR)$(bindir)"
- ifneq ($(TOOLS),)
-- $(INSTALL) -m 755 -s $(TOOLS) "$(DESTDIR)$(bindir)"
-+ $(INSTALL_PROG) -s $(TOOLS) "$(DESTDIR)$(bindir)"
- endif
- ifneq ($(BLOBS),)
-- mkdir -p "$(DESTDIR)$(datadir)"
-+ $(INSTALL_DIR) "$(DESTDIR)$(datadir)"
- set -e; for x in $(BLOBS); do \
-- $(INSTALL) -m 644 $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
-+ $(INSTALL_DATA) $(SRC_PATH)/pc-bios/$$x "$(DESTDIR)$(datadir)"; \
- done
- endif
- ifndef CONFIG_WIN32
-- mkdir -p "$(DESTDIR)$(datadir)/keymaps"
-+ $(INSTALL_DIR) "$(DESTDIR)$(datadir)/keymaps"
- set -e; for x in $(KEYMAPS); do \
-- $(INSTALL) -m 644 $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
-+ $(INSTALL_DATA) $(SRC_PATH)/keymaps/$$x "$(DESTDIR)$(datadir)/keymaps"; \
- done
- endif
- for d in $(TARGET_DIRS); do \
-@@ -275,7 +275,7 @@ cscope:
-
- # documentation
- %.html: %.texi
-- texi2html -monolithic -number $<
-+ texi2html -monolithic -number-sections $<
-
- %.info: %.texi
- makeinfo $< -o $@
-@@ -284,15 +284,15 @@ cscope:
- texi2dvi $<
-
- qemu.1: qemu-doc.texi
-- $(SRC_PATH)/texi2pod.pl $< qemu.pod
-+ perl $(SRC_PATH)/texi2pod.pl $< qemu.pod
- pod2man --section=1 --center=" " --release=" " qemu.pod > $@
-
- qemu-img.1: qemu-img.texi
-- $(SRC_PATH)/texi2pod.pl $< qemu-img.pod
-+ perl $(SRC_PATH)/texi2pod.pl $< qemu-img.pod
- pod2man --section=1 --center=" " --release=" " qemu-img.pod > $@
-
- qemu-nbd.8: qemu-nbd.texi
-- $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod
-+ perl $(SRC_PATH)/texi2pod.pl $< qemu-nbd.pod
- pod2man --section=8 --center=" " --release=" " qemu-nbd.pod > $@
-
- info: qemu-doc.info qemu-tech.info
diff --git a/sysutils/xentools41/patches/patch-dc b/sysutils/xentools41/patches/patch-dc
deleted file mode 100644
index 6b54034f40a..00000000000
--- a/sysutils/xentools41/patches/patch-dc
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-dc,v 1.1.1.1 2011/04/06 09:10:27 cegger Exp $
-
-From sysutils/xentools33/patches/patch-ak.
-
-qemu-0.13.x will include this fix:
-http://git.qemu.org/qemu.git/commit/?id=9651ac55e5de0e1534d898316cc851af6ffc4334
-
---- ioemu-qemu-xen/hw/e1000.c.orig 2009-08-06 12:56:34.000000000 +0000
-+++ ioemu-qemu-xen/hw/e1000.c
-@@ -244,16 +244,20 @@ set_eecd(E1000State *s, int index, uint3
-
- s->eecd_state.old_eecd = val & (E1000_EECD_SK | E1000_EECD_CS |
- E1000_EECD_DI|E1000_EECD_FWE_MASK|E1000_EECD_REQ);
-+ if (!(E1000_EECD_CS & val)) // CS inactive; nothing to do
-+ return;
-+ if (E1000_EECD_CS & (val ^ oldval)) { // CS rise edge; reset state
-+ s->eecd_state.val_in = 0;
-+ s->eecd_state.bitnum_in = 0;
-+ s->eecd_state.bitnum_out = 0;
-+ s->eecd_state.reading = 0;
-+ }
- if (!(E1000_EECD_SK & (val ^ oldval))) // no clock edge
- return;
- if (!(E1000_EECD_SK & val)) { // falling edge
- s->eecd_state.bitnum_out++;
- return;
- }
-- if (!(val & E1000_EECD_CS)) { // rising, no CS (EEPROM reset)
-- memset(&s->eecd_state, 0, sizeof s->eecd_state);
-- return;
-- }
- s->eecd_state.val_in <<= 1;
- if (val & E1000_EECD_DI)
- s->eecd_state.val_in |= 1;
diff --git a/sysutils/xentools41/patches/patch-dd b/sysutils/xentools41/patches/patch-dd
deleted file mode 100644
index b32e08c243f..00000000000
--- a/sysutils/xentools41/patches/patch-dd
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: patch-dd,v 1.3 2011/10/26 13:39:49 bouyer Exp $
-
---- ../tools/examples/Makefile.orig 2011-10-20 19:05:41.000000000 +0200
-+++ ../tools/examples/Makefile 2011-10-26 13:55:46.000000000 +0200
-@@ -1,5 +1,6 @@
- XEN_ROOT = $(CURDIR)/../..
- include $(XEN_ROOT)/tools/Rules.mk
-+XEN_CONFIG_DIR=${EGDIR}
-
- # Init scripts.
- XEND_INITD = init.d/xend
diff --git a/sysutils/xentools41/patches/patch-de b/sysutils/xentools41/patches/patch-de
deleted file mode 100644
index 8fe1dc8cd15..00000000000
--- a/sysutils/xentools41/patches/patch-de
+++ /dev/null
@@ -1,11 +0,0 @@
-$NetBSD: patch-de,v 1.3 2011/10/26 13:39:49 bouyer Exp $
-
---- ../tools/hotplug/common/Makefile.orig 2011-10-20 19:05:42.000000000 +0200
-+++ ../tools/hotplug/common/Makefile 2011-10-26 13:57:09.000000000 +0200
-@@ -1,5 +1,6 @@
- XEN_ROOT = $(CURDIR)/../../..
- include $(XEN_ROOT)/tools/Rules.mk
-+XEN_SCRIPT_DIR = ${EGDIR}/scripts
-
- HOTPLUGPATH="hotplugpath.sh"
-
diff --git a/sysutils/xentools41/patches/patch-df b/sysutils/xentools41/patches/patch-df
deleted file mode 100644
index 7d117eeb23f..00000000000
--- a/sysutils/xentools41/patches/patch-df
+++ /dev/null
@@ -1,37 +0,0 @@
-$NetBSD: patch-df,v 1.2 2015/06/11 17:42:43 bouyer Exp $
-
---- ioemu-qemu-xen/hw/ide.c.orig 2014-01-09 13:44:42.000000000 +0100
-+++ ioemu-qemu-xen/hw/ide.c 2015-06-11 16:15:49.000000000 +0200
-@@ -757,10 +757,15 @@
- put_le16(p + 58, oldsize >> 16);
- if (s->mult_sectors)
- put_le16(p + 59, 0x100 | s->mult_sectors);
-- put_le16(p + 60, s->nb_sectors);
-- put_le16(p + 61, s->nb_sectors >> 16);
-+ if (s->nb_sectors > 0x10000000)
-+ oldsize = 0x10000000; /* report only 128GB */
-+ else
-+ oldsize = s->nb_sectors;
-+ put_le16(p + 60, oldsize);
-+ put_le16(p + 61, oldsize >> 16);
- put_le16(p + 62, 0x07); /* single word dma0-2 supported */
- put_le16(p + 63, 0x07); /* mdma0-2 supported */
-+ put_le16(p + 64, 0x03); /* pio3-4 supported */
- put_le16(p + 65, 120);
- put_le16(p + 66, 120);
- put_le16(p + 67, 120);
-@@ -812,13 +817,12 @@
- put_le16(p + 53, 7); /* words 64-70, 54-58, 88 valid */
- put_le16(p + 62, 7); /* single word dma0-2 supported */
- put_le16(p + 63, 7); /* mdma0-2 supported */
-- put_le16(p + 64, 0x3f); /* PIO modes supported */
- #else
- put_le16(p + 49, 1 << 9); /* LBA supported, no DMA */
- put_le16(p + 53, 3); /* words 64-70, 54-58 valid */
- put_le16(p + 63, 0x103); /* DMA modes XXX: may be incorrect */
-- put_le16(p + 64, 1); /* PIO modes */
- #endif
-+ put_le16(p + 64, 3); /* pio3-4 supported */
- put_le16(p + 65, 0xb4); /* minimum DMA multiword tx cycle time */
- put_le16(p + 66, 0xb4); /* recommended DMA multiword tx cycle time */
- put_le16(p + 67, 0x12c); /* minimum PIO cycle time without flow control */
diff --git a/sysutils/xentools41/patches/patch-firmware_hvmloader_Makefile b/sysutils/xentools41/patches/patch-firmware_hvmloader_Makefile
deleted file mode 100644
index 3c0d5803166..00000000000
--- a/sysutils/xentools41/patches/patch-firmware_hvmloader_Makefile
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-firmware_hvmloader_Makefile,v 1.1 2013/04/11 19:57:53 joerg Exp $
-
---- firmware/hvmloader/Makefile.orig 2013-03-25 19:35:30.000000000 +0000
-+++ firmware/hvmloader/Makefile
-@@ -26,7 +26,7 @@ SUBDIRS := acpi
- # The HVM loader is started in 32-bit mode at the address below:
- LOADADDR = 0x100000
-
--CFLAGS += $(CFLAGS_include) -I.
-+CFLAGS += $(CFLAGS_include) -I. $(EXTRA_CFLAGS)
-
- SRCS = hvmloader.c mp_tables.c util.c smbios.c
- SRCS += 32bitbios_support.c smp.c cacheattr.c xenbus.c
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c
deleted file mode 100644
index 8ae45bf86a9..00000000000
--- a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ioemu-qemu-xen_hw_pass-through.c,v 1.2 2012/05/30 03:27:05 taca Exp $
-
---- ioemu-qemu-xen/hw/pass-through.c.orig 2012-05-24 16:05:23.000000000 +0200
-+++ ioemu-qemu-xen/hw/pass-through.c 2012-05-24 16:06:19.000000000 +0200
-@@ -84,8 +84,6 @@
- */
-
- #include "pass-through.h"
--#include "pci/header.h"
--#include "pci/pci.h"
- #include "pt-msi.h"
- #include "qemu-xen.h"
- #include "iomulti.h"
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h
deleted file mode 100644
index 265f4dc8a25..00000000000
--- a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pass-through.h
+++ /dev/null
@@ -1,18 +0,0 @@
-$NetBSD: patch-ioemu-qemu-xen_hw_pass-through.h,v 1.1 2012/05/29 15:01:34 bouyer Exp $
-
---- ioemu-qemu-xen/hw/pass-through.h.orig 2012-05-24 15:57:12.000000000 +0200
-+++ ioemu-qemu-xen/hw/pass-through.h 2012-05-24 15:58:46.000000000 +0200
-@@ -20,8 +20,13 @@
-
- #include "hw.h"
- #include "pci.h"
-+#ifdef __NetBSD__
-+#include "pciutils/header.h"
-+#include "pciutils/pci.h"
-+#else
- #include "pci/header.h"
- #include "pci/pci.h"
-+#endif
- #include "exec-all.h"
- #include "sys-queue.h"
- #include "qemu-timer.h"
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_piix4acpi.c b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_piix4acpi.c
deleted file mode 100644
index 225d4a283d2..00000000000
--- a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_piix4acpi.c
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-ioemu-qemu-xen_hw_piix4acpi.c,v 1.1 2012/05/30 08:29:44 bouyer Exp $
-
---- ioemu-qemu-xen/hw/piix4acpi.c.orig 2012-05-30 10:21:32.000000000 +0200
-+++ ioemu-qemu-xen/hw/piix4acpi.c 2012-05-30 10:23:11.000000000 +0200
-@@ -41,8 +41,12 @@
- #define PIIX4ACPI_LOG(level, fmt, ...) do { if (level <= PIIX4ACPI_LOGLEVEL) qemu_log(fmt, ## __VA_ARGS__); } while (0)
-
- #ifdef CONFIG_PASSTHROUGH
-+#ifdef __NetBSD__
-+#include <pciutils/header.h>
-+#else
- #include <pci/header.h>
- #endif
-+#endif
-
- /* PM1a_CNT bits, as defined in the ACPI specification. */
- #define SCI_EN (1 << 0)
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c
deleted file mode 100644
index 9ef4c7fe9c0..00000000000
--- a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-graphics.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ioemu-qemu-xen_hw_pt-graphics.c,v 1.1 2012/05/29 15:01:34 bouyer Exp $
-
---- ioemu-qemu-xen/hw/pt-graphics.c.orig 2012-05-24 16:16:49.000000000 +0200
-+++ ioemu-qemu-xen/hw/pt-graphics.c 2012-05-24 16:16:55.000000000 +0200
-@@ -3,8 +3,6 @@
- */
-
- #include "pass-through.h"
--#include "pci/header.h"
--#include "pci/pci.h"
-
- #include <unistd.h>
- #include <sys/ioctl.h>
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c
deleted file mode 100644
index 16a062bf7c9..00000000000
--- a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.c
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-ioemu-qemu-xen_hw_pt-msi.c,v 1.1 2012/05/29 15:01:34 bouyer Exp $
-
---- ioemu-qemu-xen/hw/pt-msi.c.orig 2012-05-24 13:27:50.000000000 +0200
-+++ ioemu-qemu-xen/hw/pt-msi.c 2012-05-24 13:28:42.000000000 +0200
-@@ -22,6 +22,10 @@
- #include "pt-msi.h"
- #include <sys/mman.h>
-
-+#ifdef __NetBSD__
-+#define MAP_LOCKED MAP_WIRED
-+#endif
-+
- void msi_set_enable(struct pt_dev *dev, int en)
- {
- uint16_t val = 0;
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h
deleted file mode 100644
index bad2a3451c5..00000000000
--- a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_hw_pt-msi.h
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-ioemu-qemu-xen_hw_pt-msi.h,v 1.1 2012/05/29 15:01:34 bouyer Exp $
-
---- ioemu-qemu-xen/hw/pt-msi.h.orig 2012-05-24 16:09:24.000000000 +0200
-+++ ioemu-qemu-xen/hw/pt-msi.h 2012-05-24 16:15:19.000000000 +0200
-@@ -1,7 +1,6 @@
- #ifndef _PT_MSI_H
- #define _PT_MSI_H
-
--#include "pci/pci.h"
- #include "pass-through.h"
-
- #define PCI_CAP_ID_MSI 0x05 /* Message Signalled Interrupts */
diff --git a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak b/sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak
deleted file mode 100644
index 81bfc32a0e1..00000000000
--- a/sysutils/xentools41/patches/patch-ioemu-qemu-xen_xen-hooks.mak
+++ /dev/null
@@ -1,34 +0,0 @@
-$NetBSD: patch-ioemu-qemu-xen_xen-hooks.mak,v 1.1 2012/05/29 15:01:34 bouyer Exp $
-
-enable PCI passthrough when pciutils is present
-
---- ioemu-qemu-xen/xen-hooks.mak.orig 2012-05-24 15:41:11.000000000 +0200
-+++ ioemu-qemu-xen/xen-hooks.mak 2012-05-24 15:46:21.000000000 +0200
-@@ -55,17 +55,25 @@
- ifdef CONFIG_STUBDOM
- CONFIG_PASSTHROUGH=1
- else
-- ifeq (,$(wildcard /usr/include/pci))
-+ ifeq ($(CONFIG_NetBSD), y)
-+CONFIG_PASSTHROUGH=1
-+ else
-+ ifeq (,$(wildcard /usr/include/pci))
- $(warning === pciutils-dev package not found - missing /usr/include/pci)
- $(warning === PCI passthrough capability has been disabled)
-- else
-+ else
- CONFIG_PASSTHROUGH=1
-+ endif
- endif
- endif
-
- ifdef CONFIG_PASSTHROUGH
- OBJS+= pass-through.o pt-msi.o pt-graphics.o
-+ifeq ($(CONFIG_NetBSD), y)
-+LIBS += -lpciutils -lpci
-+else
- LIBS += -lpci
-+endif
- CFLAGS += -DCONFIG_PASSTHROUGH
- $(info === PCI passthrough capability has been enabled ===)
- endif
diff --git a/sysutils/xentools41/patches/patch-libfsimage_ufs_ufs.h b/sysutils/xentools41/patches/patch-libfsimage_ufs_ufs.h
deleted file mode 100644
index 8e09493fc06..00000000000
--- a/sysutils/xentools41/patches/patch-libfsimage_ufs_ufs.h
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-libfsimage_ufs_ufs.h,v 1.1 2013/07/16 22:28:26 joerg Exp $
-
---- libfsimage/ufs/ufs.h.orig 2013-07-14 19:44:35.000000000 +0000
-+++ libfsimage/ufs/ufs.h
-@@ -4,7 +4,7 @@
- */
-
- #ifndef _GRUB_UFS_H
--#define _GRUB_UFS_H_
-+#define _GRUB_UFS_H
-
- /* ufs specific constants */
- #define UFS_SBLOCK 16
diff --git a/sysutils/xentools41/patches/patch-libxl_libxl_create.c b/sysutils/xentools41/patches/patch-libxl_libxl_create.c
deleted file mode 100644
index cc244e3e1a7..00000000000
--- a/sysutils/xentools41/patches/patch-libxl_libxl_create.c
+++ /dev/null
@@ -1,40 +0,0 @@
-$NetBSD: patch-libxl_libxl_create.c,v 1.1 2011/10/29 14:16:53 jmcneill Exp $
-
---- libxl/libxl_create.c.orig 2011-10-20 17:05:42.000000000 +0000
-+++ libxl/libxl_create.c
-@@ -171,7 +171,7 @@ int libxl__domain_build(libxl_ctx *ctx,
- vments[2] = "image/ostype";
- vments[3] = "hvm";
- vments[4] = "start_time";
-- vments[5] = libxl__sprintf(&gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
-+ vments[5] = libxl__sprintf(&gc, "%llu.%02d", (unsigned long long)start_time.tv_sec,(int)start_time.tv_usec/10000);
- } else {
- ret = libxl__build_pv(ctx, domid, info, state);
- if (ret)
-@@ -184,7 +184,7 @@ int libxl__domain_build(libxl_ctx *ctx,
- vments[i++] = "image/kernel";
- vments[i++] = (char*) info->kernel.path;
- vments[i++] = "start_time";
-- vments[i++] = libxl__sprintf(&gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
-+ vments[i++] = libxl__sprintf(&gc, "%llu.%02d", (unsigned long long)start_time.tv_sec,(int)start_time.tv_usec/10000);
- if (info->u.pv.ramdisk.path) {
- vments[i++] = "image/ramdisk";
- vments[i++] = (char*) info->u.pv.ramdisk.path;
-@@ -227,7 +227,7 @@ static int domain_restore(libxl_ctx *ctx
- vments[2] = "image/ostype";
- vments[3] = "hvm";
- vments[4] = "start_time";
-- vments[5] = libxl__sprintf(&gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
-+ vments[5] = libxl__sprintf(&gc, "%llu.%02d", (unsigned long long)start_time.tv_sec,(int)start_time.tv_usec/10000);
- } else {
- vments = libxl__calloc(&gc, 11, sizeof(char *));
- i = 0;
-@@ -236,7 +236,7 @@ static int domain_restore(libxl_ctx *ctx
- vments[i++] = "image/kernel";
- vments[i++] = (char*) info->kernel.path;
- vments[i++] = "start_time";
-- vments[i++] = libxl__sprintf(&gc, "%lu.%02d", start_time.tv_sec,(int)start_time.tv_usec/10000);
-+ vments[i++] = libxl__sprintf(&gc, "%llu.%02d", (unsigned long long)start_time.tv_sec,(int)start_time.tv_usec/10000);
- if (info->u.pv.ramdisk.path) {
- vments[i++] = "image/ramdisk";
- vments[i++] = (char*) info->u.pv.ramdisk.path;
diff --git a/sysutils/xentools41/patches/patch-libxl_libxl_internal.h b/sysutils/xentools41/patches/patch-libxl_libxl_internal.h
deleted file mode 100644
index 6173ba379c8..00000000000
--- a/sysutils/xentools41/patches/patch-libxl_libxl_internal.h
+++ /dev/null
@@ -1,16 +0,0 @@
-$NetBSD: patch-libxl_libxl_internal.h,v 1.1 2012/05/29 15:01:34 bouyer Exp $
-
---- libxl/libxl_internal.h.orig 2012-05-24 13:31:11.000000000 +0200
-+++ libxl/libxl_internal.h 2012-05-24 13:31:14.000000000 +0200
-@@ -109,7 +109,11 @@
- #define XC_PCI_BDF "0x%x, 0x%x, 0x%x, 0x%x"
- #define AUTO_PHP_SLOT 0x100
- #define SYSFS_PCI_DEV "/sys/bus/pci/devices"
-+#ifdef __NetBSD__
-+#define SYSFS_PCIBACK_DRIVER "/kern/xen/pci"
-+#else
- #define SYSFS_PCIBACK_DRIVER "/sys/bus/pci/drivers/pciback"
-+#endif
- #define XENSTORE_PID_FILE "/var/run/xenstored.pid"
-
- #define PROC_PCI_NUM_RESOURCES 7
diff --git a/sysutils/xentools41/patches/patch-libxl_xl__cmdimpl.c b/sysutils/xentools41/patches/patch-libxl_xl__cmdimpl.c
deleted file mode 100644
index c431959d3bc..00000000000
--- a/sysutils/xentools41/patches/patch-libxl_xl__cmdimpl.c
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-libxl_xl__cmdimpl.c,v 1.1 2013/05/06 14:59:11 joerg Exp $
-
---- libxl/xl_cmdimpl.c.orig 2013-05-05 19:37:21.000000000 +0000
-+++ libxl/xl_cmdimpl.c
-@@ -922,7 +922,7 @@ skip:
-
- for (p = strtok(buf2, ","); p; p = strtok(NULL, ",")) {
- char* val;
-- while (isblank(*p))
-+ while (isblank((unsigned char)*p))
- p++;
- val = strchr(p, '=');
- if (val == NULL)
diff --git a/sysutils/xentools41/patches/patch-ocaml_Makefile.rules b/sysutils/xentools41/patches/patch-ocaml_Makefile.rules
deleted file mode 100644
index 90bcedcea83..00000000000
--- a/sysutils/xentools41/patches/patch-ocaml_Makefile.rules
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ocaml_Makefile.rules,v 1.1 2013/03/15 16:10:58 is Exp $
-
---- ocaml/Makefile.rules.orig 2012-08-10 13:51:28.000000000 +0000
-+++ ocaml/Makefile.rules
-@@ -65,7 +65,7 @@ define OCAML_LIBRARY_template
- $(1)_stubs.a: $(foreach obj,$$($(1)_C_OBJS),$(obj).o)
- $(call mk-caml-stubs,$$@, $$+)
- lib$(1)_stubs.a: $(foreach obj,$($(1)_C_OBJS),$(obj).o)
-- $(call mk-caml-lib-stubs,$$@, $$+, $(LIBS_$(1)))
-+ $(call mk-caml-lib-stubs,$$@, $$+, -dllpath $(PREFIX)/lib $(LIBS_$(1)))
- endef
-
- define OCAML_NOC_LIBRARY_template
diff --git a/sysutils/xentools41/patches/patch-ocaml_common.make b/sysutils/xentools41/patches/patch-ocaml_common.make
deleted file mode 100644
index 97b9995fd9e..00000000000
--- a/sysutils/xentools41/patches/patch-ocaml_common.make
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ocaml_common.make,v 1.1 2013/03/15 16:10:58 is Exp $
-
---- ocaml/common.make.orig 2013-03-13 09:31:47.000000000 +0000
-+++ ocaml/common.make
-@@ -3,7 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk
- CC ?= gcc
- OCAMLOPT ?= ocamlopt
- OCAMLC ?= ocamlc
--OCAMLMKLIB ?= ocamlmklib
-+OCAMLMKLIB ?= ocamlmklib -elfmode
- OCAMLDEP ?= ocamldep
- OCAMLLEX ?= ocamllex
- OCAMLYACC ?= ocamlyacc
diff --git a/sysutils/xentools41/patches/patch-ocaml_libs_xb_xs__ring__stubs.c b/sysutils/xentools41/patches/patch-ocaml_libs_xb_xs__ring__stubs.c
deleted file mode 100644
index 15639b668f2..00000000000
--- a/sysutils/xentools41/patches/patch-ocaml_libs_xb_xs__ring__stubs.c
+++ /dev/null
@@ -1,26 +0,0 @@
-$NetBSD: patch-ocaml_libs_xb_xs__ring__stubs.c,v 1.1 2016/10/01 13:07:23 joerg Exp $
-
---- ocaml/libs/xb/xs_ring_stubs.c.orig 2016-09-30 12:57:34.000000000 +0000
-+++ ocaml/libs/xb/xs_ring_stubs.c
-@@ -46,8 +46,8 @@ static int xs_ring_read(struct mmap_inte
- XENSTORE_RING_IDX cons, prod; /* offsets only */
- int to_read;
-
-- cons = *(volatile uint32*)&intf->req_cons;
-- prod = *(volatile uint32*)&intf->req_prod;
-+ cons = *(volatile uint32_t*)&intf->req_cons;
-+ prod = *(volatile uint32_t*)&intf->req_prod;
- xen_mb();
-
- if ((prod - cons) > XENSTORE_RING_SIZE)
-@@ -76,8 +76,8 @@ static int xs_ring_write(struct mmap_int
- XENSTORE_RING_IDX cons, prod;
- int can_write;
-
-- cons = *(volatile uint32*)&intf->rsp_cons;
-- prod = *(volatile uint32*)&intf->rsp_prod;
-+ cons = *(volatile uint32_t*)&intf->rsp_cons;
-+ prod = *(volatile uint32_t*)&intf->rsp_prod;
- xen_mb();
- if ( (prod - cons) >= XENSTORE_RING_SIZE )
- return 0;
diff --git a/sysutils/xentools41/patches/patch-ocaml_xenstored_define.ml b/sysutils/xentools41/patches/patch-ocaml_xenstored_define.ml
deleted file mode 100644
index b9551239022..00000000000
--- a/sysutils/xentools41/patches/patch-ocaml_xenstored_define.ml
+++ /dev/null
@@ -1,20 +0,0 @@
-$NetBSD: patch-ocaml_xenstored_define.ml,v 1.1 2013/03/15 16:10:58 is Exp $
-
---- ocaml/xenstored/define.ml.orig 2012-11-24 07:27:21.000000000 +0000
-+++ ocaml/xenstored/define.ml 2012-11-24 07:33:59.000000000 +0000
-@@ -17,13 +17,13 @@
- let xenstored_major = 1
- let xenstored_minor = 0
-
--let xenstored_proc_kva = "/proc/xen/xsd_kva"
-+let xenstored_proc_kva = "@PROCDEV@/xsd_kva"
- let xenstored_proc_port = "/proc/xen/xsd_port"
-
- let xs_daemon_socket = "/var/run/xenstored/socket"
- let xs_daemon_socket_ro = "/var/run/xenstored/socket_ro"
-
--let default_config_dir = "/etc/xensource"
-+let default_config_dir = "@XENDCONFDIR@"
-
- let maxwatch = ref (50)
- let maxtransaction = ref (20)
diff --git a/sysutils/xentools41/patches/patch-ocaml_xenstored_utils.ml b/sysutils/xentools41/patches/patch-ocaml_xenstored_utils.ml
deleted file mode 100644
index f22413b3b61..00000000000
--- a/sysutils/xentools41/patches/patch-ocaml_xenstored_utils.ml
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ocaml_xenstored_utils.ml,v 1.1 2013/03/15 16:10:58 is Exp $
-
---- ocaml/xenstored/utils.ml.orig
-+++ ocaml/xenstored/utils.ml
-@@ -87,7 +83,7 @@ let read_file_single_integer filename =
- let buf = String.make 20 (char_of_int 0) in
- let sz = Unix.read fd buf 0 20 in
- Unix.close fd;
-- int_of_string (String.sub buf 0 sz)
-+ int_of_string (String.trim (String.sub buf 0 sz))
-
- let path_complete path connection_path =
- if String.get path 0 <> '/' then
diff --git a/sysutils/xentools41/patches/patch-qemu-phy-devices b/sysutils/xentools41/patches/patch-qemu-phy-devices
deleted file mode 100644
index fd1ec60fc65..00000000000
--- a/sysutils/xentools41/patches/patch-qemu-phy-devices
+++ /dev/null
@@ -1,97 +0,0 @@
-$NetBSD: patch-qemu-phy-devices,v 1.1 2011/05/20 17:09:21 bouyer Exp $
-
-This does 2 things:
-- use the correct way to get the size of a disk device or partition (from
- haad@NetBSD.org)
-- if given a block device, use the character device instead.
-
---- ioemu-qemu-xen/block-raw-posix.c.orig 2011-05-20 16:47:37.000000000 +0200
-+++ ioemu-qemu-xen/block-raw-posix.c 2011-05-20 18:06:44.000000000 +0200
-@@ -66,6 +66,13 @@
- #include <sys/disklabel.h>
- #include <sys/dkio.h>
- #endif
-+#if defined(__NetBSD__)
-+#include <sys/ioctl.h>
-+#include <sys/disklabel.h>
-+#include <sys/dkio.h>
-+#define SLIST_ENTRY(x) int /*XXXX !*/
-+#include <sys/disk.h>
-+#endif
-
- //#define DEBUG_FLOPPY
-
-@@ -120,6 +127,33 @@
- {
- BDRVRawState *s = bs->opaque;
- int fd, open_flags, ret;
-+#ifdef __NetBSD__
-+ struct stat sb;
-+ static char namebuf[MAXPATHLEN];
-+ const char *dp;
-+
-+ if (lstat(filename, &sb) < 0) {
-+ fprintf(stderr, "%s: stat failed: %s\n", filename, strerror(errno));
-+ return -errno;
-+ }
-+ if (S_ISLNK(sb.st_mode)) {
-+ fprintf(stderr, "%s: symolink links not supported by qemu-dm\n",
-+ filename);
-+ return -EINVAL;
-+ }
-+ if (S_ISBLK(sb.st_mode)) {
-+ dp = strrchr(filename, '/');
-+ if (dp == NULL) {
-+ snprintf(namebuf, MAXPATHLEN, "r%s", filename);
-+ } else {
-+ snprintf(namebuf, MAXPATHLEN, "%.*s/r%s",
-+ (int)(dp - filename), filename, dp + 1);
-+ }
-+ fprintf(stderr, "%s is a block device", filename);
-+ filename = namebuf;
-+ fprintf(stderr, ", using %s\n", filename);
-+ }
-+#endif
-
- posix_aio_init();
-
-@@ -749,7 +783,7 @@
- return 0;
- }
-
--#ifdef __OpenBSD__
-+#if defined(__OpenBSD__) || defined(__NetBSD__)
- static int64_t raw_getlength(BlockDriverState *bs)
- {
- BDRVRawState *s = bs->opaque;
-@@ -759,16 +793,29 @@
- if (fstat(fd, &st))
- return -1;
- if (S_ISCHR(st.st_mode) || S_ISBLK(st.st_mode)) {
-+#if defined(__OpenBSD__)
- struct disklabel dl;
-
- if (ioctl(fd, DIOCGDINFO, &dl))
- return -1;
- return (uint64_t)dl.d_secsize *
- dl.d_partitions[DISKPART(st.st_rdev)].p_size;
-+#else
-+ struct dkwedge_info dkw;
-+ if (ioctl(fd, DIOCGWEDGEINFO, &dkw) != -1) {
-+ return dkw.dkw_size * 512;
-+ } else {
-+ struct disklabel dl;
-+ if(ioctl(fd, DIOCGDINFO, &dl))
-+ return -1;
-+ return (uint64_t)dl.d_secsize *
-+ dl.d_partitions[DISKPART(st.st_rdev)].p_size;
-+ }
-+#endif
- } else
- return st.st_size;
- }
--#else /* !__OpenBSD__ */
-+#else /* !__OpenBSD__ && ! __NetBSD__ */
- static int64_t raw_getlength(BlockDriverState *bs)
- {
- BDRVRawState *s = bs->opaque;
diff --git a/sysutils/xentools41/patches/patch-xenstat_libxenstat_Makefile b/sysutils/xentools41/patches/patch-xenstat_libxenstat_Makefile
deleted file mode 100644
index 617c96d8b2d..00000000000
--- a/sysutils/xentools41/patches/patch-xenstat_libxenstat_Makefile
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-xenstat_libxenstat_Makefile,v 1.2 2014/05/14 20:22:41 bouyer Exp $
-
---- xenstat/libxenstat/Makefile.orig 2013-03-25 19:37:42.000000000 +0000
-+++ xenstat/libxenstat/Makefile
-@@ -40,7 +40,7 @@
- LDFLAGS+=-Lsrc -L$(XEN_XENSTORE)/ -L$(XEN_LIBXC)/
- LDLIBS-y = -lxenstore -lxenctrl
- LDLIBS-$(CONFIG_SunOS) += -lkstat
--ARLIBS-y = $(XEN_XENSTORE)/libxenstore.so $(XEN_LIBXC)/libxenctrl.so
-+ARLIBS-y =
- ARLIBS-x86_64 = /usr/lib/amd64/libkstat.so
- ARLIBS-x86_32 = /usr/lib/libkstat.so
- ARLIBS-$(CONFIG_SunOS) += $(ARLIBS-$(XEN_TARGET_ARCH))
-@@ -57,13 +57,13 @@
- $(OBJECTS-y) $(LDLIBS-y)
-
- src/xenstat.o: src/xenstat.c src/xenstat.h src/xenstat_priv.h
-- $(CC) $(CFLAGS) $(WARN_FLAGS) -c -o $@ $<
-+ $(CC) $(WARN_FLAGS) $(CFLAGS) -c -o $@ $<
-
- src/xenstat_linux.o: src/xenstat_linux.c src/xenstat_priv.h
-- $(CC) $(CFLAGS) $(WARN_FLAGS) -c -o $@ $<
-+ $(CC) $(WARN_FLAGS) $(CFLAGS) -c -o $@ $<
-
- src/xenstat_solaris.o: src/xenstat_solaris.c src/xenstat_priv.h
-- $(CC) $(CFLAGS) $(WARN_FLAGS) -c -o $@ $<
-+ $(CC) $(WARN_FLAGS) $(CFLAGS) -c -o $@ $<
-
- src/libxenstat.so.$(MAJOR): $(LIB)
- $(MAKE_LINK) $(<F) $@
diff --git a/sysutils/xentools41/patches/patch-xenstat_xentop_Makefile b/sysutils/xentools41/patches/patch-xenstat_xentop_Makefile
deleted file mode 100644
index 0ccceeb4f21..00000000000
--- a/sysutils/xentools41/patches/patch-xenstat_xentop_Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-$NetBSD: patch-xenstat_xentop_Makefile,v 1.1 2014/05/14 20:22:41 bouyer Exp $
-
---- xenstat/xentop/Makefile.orig 2014-05-14 15:15:54.000000000 +0200
-+++ xenstat/xentop/Makefile 2014-05-14 15:15:56.000000000 +0200
-@@ -19,8 +19,8 @@
- else
-
- CFLAGS += -DGCC_PRINTF -Wall -Werror -I$(XEN_LIBXENSTAT)
--LDFLAGS += -L$(XEN_LIBXENSTAT)
--LDLIBS += -lxenstat $(CURSES_LIBS) $(SOCKET_LIBS)
-+LDFLAGS += -L$(XEN_LIBXENSTAT) -L$(XEN_XENSTORE) -L$(XEN_LIBXC)
-+LDLIBS += -lxenstat -lxenstore -lxenctrl $(CURSES_LIBS) $(SOCKET_LIBS)
- CFLAGS += -DHOST_$(XEN_OS)
-
- .PHONY: all
diff --git a/sysutils/xentools41/patches/patch-xenstore_Makefile b/sysutils/xentools41/patches/patch-xenstore_Makefile
deleted file mode 100644
index bd579027ac1..00000000000
--- a/sysutils/xentools41/patches/patch-xenstore_Makefile
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD: patch-xenstore_Makefile,v 1.1 2011/10/03 16:58:57 sborrill Exp $
-
-Adds a target to install just the useful bits for the xenstore tools.
-
-Used by sysutils/xenstoretools only, but patch maintained here in xentools41 as
-xenstoretools shares the same distinfo.
-
---- xenstore/Makefile.orig 2011-06-14 17:03:45.000000000 +0100
-+++ xenstore/Makefile 2011-10-03 13:16:43.000000000 +0100
-@@ -111,6 +111,19 @@
- $(INSTALL_DATA) xs.h $(DESTDIR)$(INCLUDEDIR)
- $(INSTALL_DATA) xs_lib.h $(DESTDIR)$(INCLUDEDIR)
-
-+.PHONY: install
-+installclients: clients
-+ $(INSTALL_DIR) $(DESTDIR)$(BINDIR)
-+ $(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
-+ $(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
-+ set -e ; for c in $(CLIENTS) ; do \
-+ ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
-+ done
-+ $(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-+ $(INSTALL_PROG) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
-+ ln -sf libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstore.so.$(MAJOR)
-+ ln -sf libxenstore.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstore.so
-+
- -include $(DEPS)
-
- # never delete any intermediate files.
diff --git a/sysutils/xentools41/version.mk b/sysutils/xentools41/version.mk
deleted file mode 100644
index 5e6d08ad9f6..00000000000
--- a/sysutils/xentools41/version.mk
+++ /dev/null
@@ -1,6 +0,0 @@
-# $NetBSD: version.mk,v 1.7 2013/09/11 18:00:33 drochner Exp $
-
-# Version number is used by xentools41 and xenstoretools
-
-VERSION= 4.1.6.1
-VERSION_IPXE= 1.0.0