[Pkg-xen-changes] [xen] 29/30: merge patched-develop into develop

Bastian Blank waldi at moszumanska.debian.org
Sun Nov 1 20:19:18 UTC 2015


This is an automated email from the git hooks/post-receive script.

waldi pushed a commit to branch develop
in repository xen.

commit 5fcb964ddfc5a1b99200e3094fb6948a2de87abb
Merge: abc7df7 b00b02f
Author: Bastian Blank <waldi at debian.org>
Date:   Sun Nov 1 20:53:37 2015 +0100

    merge patched-develop into develop

 .gitignore                                         |    24 +-
 .hgignore                                          |     5 -
 COPYING                                            |     3 +-
 Config.mk                                          |    40 +-
 INSTALL                                            |    22 +-
 MAINTAINERS                                        |    62 +-
 Makefile                                           |    92 +-
 README                                             |    50 +-
 config/Paths.mk.in                                 |    11 +-
 config/StdGNU.mk                                   |     3 +
 config/SunOS.mk                                    |     2 +
 config/Tools.mk.in                                 |     5 +-
 config/arm32.mk                                    |     2 +
 config/arm64.mk                                    |     3 +
 configure                                          |    38 +-
 debian/.git-dpm                                    |     6 +-
 debian/patches/config-prefix.diff                  |    24 +-
 debian/patches/series                              |     2 -
 debian/patches/tools-blktap2-prefix.diff           |    32 +-
 debian/patches/tools-console-prefix.diff           |    10 +-
 debian/patches/tools-hotplug-udevrules.diff        |    28 -
 debian/patches/tools-include-install.diff          |    22 +-
 debian/patches/tools-libfsimage-abiname.diff       |    22 +-
 debian/patches/tools-libfsimage-prefix.diff        |    20 +-
 debian/patches/tools-libxc-abiname.diff            |    52 +-
 debian/patches/tools-libxl-abiname.diff            |    47 +-
 debian/patches/tools-libxl-prefix.diff             |    21 +-
 debian/patches/tools-misc-prefix.diff              |    27 +-
 debian/patches/tools-pygrub-prefix.diff            |    18 +-
 .../tools-pygrub-remove-static-solaris-support     |    10 +-
 debian/patches/tools-python-prefix.diff            |     4 +-
 debian/patches/tools-rpath.diff                    |     4 +-
 debian/patches/tools-xcutils-rpath.diff            |     4 +-
 debian/patches/tools-xenmon-install.diff           |    17 +-
 debian/patches/tools-xenmon-prefix.diff            |    16 +-
 debian/patches/tools-xenpaging-prefix.diff         |     4 +-
 debian/patches/tools-xenpmd-prefix.diff            |     8 +-
 debian/patches/tools-xenstat-abiname.diff          |    25 +-
 debian/patches/tools-xenstat-prefix.diff           |    44 +-
 debian/patches/tools-xenstore-compatibility.diff   |    14 +-
 debian/patches/tools-xenstore-prefix.diff          |    38 +-
 debian/patches/tools-xentrace-prefix.diff          |    36 +-
 debian/patches/version.diff                        |    27 +-
 .../patches/xl-coredumps-to-var-lib-xen-dump.diff  |    57 -
 docs/INDEX                                         |     6 +-
 docs/Makefile                                      |   197 +-
 docs/configure                                     |    18 +-
 docs/features/migration.pandoc                     |   123 +
 docs/features/template.pandoc                      |    75 +
 docs/man/xentop.pod.1                              |   111 +
 .../xentrace/xentrace.8 => docs/man/xentrace.pod.8 |   138 +-
 .../man/xentrace_format.pod.1                      |    46 +-
 docs/man/xl.cfg.pod.5                              |   314 +-
 docs/man/xl.pod.1                                  |   185 +-
 docs/man/xlcpupool.cfg.pod.5                       |    26 +-
 docs/misc/arm/device-tree/passthrough.txt          |     9 +
 docs/misc/arm/early-printk.txt                     |    51 +-
 docs/misc/arm/passthrough.txt                      |    62 +
 docs/misc/efi.markdown                             |     8 +-
 docs/misc/grant-tables.txt                         |    55 +-
 docs/misc/qemu-upstream_howto_use_it.markdown      |    12 -
 docs/misc/sedf_scheduler_mini-HOWTO.txt            |    44 -
 stubdom/README => docs/misc/stubdom.txt            |     0
 docs/misc/vbd-interface.txt                        |     6 +-
 docs/misc/vtd.txt                                  |    24 +
 docs/misc/vtpmmgr.txt                              |   155 +-
 docs/misc/xen-command-line.markdown                |   144 +-
 tools/xenmon/README => docs/misc/xenmon.txt        |     0
 docs/misc/xl-psr.markdown                          |   133 +
 docs/misc/xsm-flask.txt                            |    70 +-
 docs/specs/libxc-migration-stream.pandoc           |   696 ++
 docs/specs/libxl-migration-stream.pandoc           |   264 +
 extras/mini-os/COPYING                             |    36 -
 extras/mini-os/Config.mk                           |    57 -
 extras/mini-os/Makefile                            |   226 -
 extras/mini-os/README                              |    46 -
 extras/mini-os/app.lds                             |    11 -
 extras/mini-os/arch/arm/arm32.S                    |   233 -
 extras/mini-os/arch/arm/events.c                   |    31 -
 extras/mini-os/arch/arm/hypercalls32.S             |    64 -
 extras/mini-os/arch/arm/minios-arm32.lds           |    83 -
 extras/mini-os/arch/arm/mm.c                       |   139 -
 extras/mini-os/arch/arm/sched.c                    |    47 -
 extras/mini-os/arch/arm/setup.c                    |   119 -
 extras/mini-os/arch/x86/Makefile                   |    31 -
 extras/mini-os/arch/x86/arch.mk                    |    22 -
 extras/mini-os/arch/x86/events.c                   |    35 -
 extras/mini-os/arch/x86/ioremap.c                  |    75 -
 extras/mini-os/arch/x86/iorw.c                     |    35 -
 extras/mini-os/arch/x86/minios-x86_32.lds          |    74 -
 extras/mini-os/arch/x86/minios-x86_64.lds          |    74 -
 extras/mini-os/arch/x86/mm.c                       |   957 --
 extras/mini-os/arch/x86/sched.c                    |   139 -
 extras/mini-os/arch/x86/setup.c                    |   168 -
 extras/mini-os/arch/x86/time.c                     |   238 -
 extras/mini-os/arch/x86/traps.c                    |   333 -
 extras/mini-os/arch/x86/x86_32.S                   |   305 -
 extras/mini-os/arch/x86/x86_64.S                   |   386 -
 extras/mini-os/blkfront.c                          |   736 --
 extras/mini-os/console/console.c                   |   164 -
 extras/mini-os/console/console.h                   |     2 -
 extras/mini-os/console/xenbus.c                    |   195 -
 extras/mini-os/console/xencons_ring.c              |   195 -
 extras/mini-os/daytime.c                           |    67 -
 extras/mini-os/domain_config                       |    19 -
 extras/mini-os/events.c                            |   269 -
 extras/mini-os/fbfront.c                           |   710 --
 extras/mini-os/gntmap.c                            |   250 -
 extras/mini-os/gnttab.c                            |   196 -
 extras/mini-os/hypervisor.c                        |   132 -
 extras/mini-os/include/arch/cc.h                   |    87 -
 extras/mini-os/include/arch/perf.h                 |    15 -
 extras/mini-os/include/arch/sys_arch.h             |    35 -
 extras/mini-os/include/arm/arch_endian.h           |     7 -
 extras/mini-os/include/arm/arch_limits.h           |     9 -
 extras/mini-os/include/arm/arch_mm.h               |    38 -
 extras/mini-os/include/arm/arch_sched.h            |    19 -
 extras/mini-os/include/arm/arch_spinlock.h         |    36 -
 extras/mini-os/include/arm/arm32/arch_wordsize.h   |     1 -
 extras/mini-os/include/arm/gic.h                   |     1 -
 extras/mini-os/include/arm/hypercall-arm.h         |    98 -
 extras/mini-os/include/arm/os.h                    |   216 -
 extras/mini-os/include/arm/traps.h                 |    20 -
 extras/mini-os/include/blkfront.h                  |    54 -
 extras/mini-os/include/byteorder.h                 |    36 -
 extras/mini-os/include/byteswap.h                  |    39 -
 extras/mini-os/include/compiler.h                  |    10 -
 extras/mini-os/include/console.h                   |    89 -
 extras/mini-os/include/ctype.h                     |    60 -
 extras/mini-os/include/endian.h                    |    19 -
 extras/mini-os/include/err.h                       |    31 -
 extras/mini-os/include/errno-base.h                |    39 -
 extras/mini-os/include/errno.h                     |   122 -
 extras/mini-os/include/events.h                    |    59 -
 extras/mini-os/include/fbfront.h                   |    46 -
 extras/mini-os/include/fcntl.h                     |    99 -
 extras/mini-os/include/gntmap.h                    |    35 -
 extras/mini-os/include/gnttab.h                    |    17 -
 extras/mini-os/include/hypervisor.h                |    48 -
 extras/mini-os/include/ioremap.h                   |    33 -
 extras/mini-os/include/iorw.h                      |    16 -
 extras/mini-os/include/kernel.h                    |     9 -
 extras/mini-os/include/lib-gpl.h                   |    59 -
 extras/mini-os/include/lib.h                       |   230 -
 extras/mini-os/include/linux/types.h               |     5 -
 extras/mini-os/include/lwipopts.h                  |    23 -
 extras/mini-os/include/mm.h                        |    82 -
 extras/mini-os/include/netfront.h                  |    24 -
 extras/mini-os/include/pcifront.h                  |    29 -
 extras/mini-os/include/posix/arpa/inet.h           |     7 -
 extras/mini-os/include/posix/dirent.h              |    24 -
 extras/mini-os/include/posix/err.h                 |    15 -
 extras/mini-os/include/posix/fcntl.h               |    11 -
 extras/mini-os/include/posix/limits.h              |    48 -
 extras/mini-os/include/posix/net/if.h              |    85 -
 extras/mini-os/include/posix/netdb.h               |     9 -
 extras/mini-os/include/posix/netinet/in.h          |     7 -
 extras/mini-os/include/posix/netinet/tcp.h         |     6 -
 extras/mini-os/include/posix/poll.h                |     1 -
 extras/mini-os/include/posix/pthread.h             |    64 -
 extras/mini-os/include/posix/signal.h              |    10 -
 extras/mini-os/include/posix/stdlib.h              |     8 -
 extras/mini-os/include/posix/strings.h             |    12 -
 extras/mini-os/include/posix/sys/ioctl.h           |    16 -
 extras/mini-os/include/posix/sys/mman.h            |    22 -
 extras/mini-os/include/posix/sys/poll.h            |    79 -
 extras/mini-os/include/posix/sys/select.h          |     7 -
 extras/mini-os/include/posix/sys/socket.h          |    31 -
 extras/mini-os/include/posix/sys/stat.h            |     7 -
 extras/mini-os/include/posix/syslog.h              |    37 -
 extras/mini-os/include/posix/termios.h             |    87 -
 extras/mini-os/include/posix/time.h                |    11 -
 extras/mini-os/include/posix/unistd.h              |    16 -
 extras/mini-os/include/sched.h                     |    55 -
 extras/mini-os/include/semaphore.h                 |   110 -
 extras/mini-os/include/spinlock.h                  |    55 -
 extras/mini-os/include/sys/lock.h                  |    52 -
 extras/mini-os/include/sys/time.h                  |    47 -
 extras/mini-os/include/time.h                      |    63 -
 extras/mini-os/include/tpm_tis.h                   |    60 -
 extras/mini-os/include/tpmback.h                   |   104 -
 extras/mini-os/include/tpmfront.h                  |    97 -
 extras/mini-os/include/types.h                     |    74 -
 extras/mini-os/include/wait.h                      |   105 -
 extras/mini-os/include/waittypes.h                 |    32 -
 extras/mini-os/include/x86/arch_endian.h           |     7 -
 extras/mini-os/include/x86/arch_limits.h           |    20 -
 extras/mini-os/include/x86/arch_mm.h               |   233 -
 extras/mini-os/include/x86/arch_sched.h            |    25 -
 extras/mini-os/include/x86/arch_spinlock.h         |    94 -
 extras/mini-os/include/x86/os.h                    |   572 -
 extras/mini-os/include/x86/traps.h                 |    78 -
 extras/mini-os/include/x86/x86_32/arch_wordsize.h  |     1 -
 .../mini-os/include/x86/x86_32/hypercall-x86_32.h  |   337 -
 extras/mini-os/include/x86/x86_64/arch_wordsize.h  |     2 -
 .../mini-os/include/x86/x86_64/hypercall-x86_64.h  |   344 -
 extras/mini-os/include/xenbus.h                    |   120 -
 extras/mini-os/include/xmalloc.h                   |    44 -
 extras/mini-os/kernel.c                            |   198 -
 extras/mini-os/lib/ctype.c                         |    29 -
 extras/mini-os/lib/math.c                          |   426 -
 extras/mini-os/lib/printf.c                        |   786 --
 extras/mini-os/lib/stack_chk_fail.c                |     8 -
 extras/mini-os/lib/string.c                        |   228 -
 extras/mini-os/lib/sys.c                           |  1550 ---
 extras/mini-os/lib/xmalloc.c                       |   319 -
 extras/mini-os/lib/xs.c                            |   194 -
 extras/mini-os/lock.c                              |   112 -
 extras/mini-os/lwip-arch.c                         |   293 -
 extras/mini-os/lwip-net.c                          |   386 -
 extras/mini-os/main.c                              |   193 -
 extras/mini-os/minios.mk                           |    76 -
 extras/mini-os/mm.c                                |   441 -
 extras/mini-os/netfront.c                          |   677 --
 extras/mini-os/pcifront.c                          |   616 --
 extras/mini-os/sched.c                             |   304 -
 extras/mini-os/test.c                              |   577 -
 extras/mini-os/tpm_tis.c                           |  1367 ---
 extras/mini-os/tpmback.c                           |  1136 --
 extras/mini-os/tpmfront.c                          |   631 --
 extras/mini-os/xenbus/xenbus.c                     |   870 --
 m4/paths.m4                                        |    12 +
 m4/pkg.m4                                          |     3 +-
 m4/python_fortify_noopt.m4                         |    31 +
 m4/systemd.m4                                      |     9 +-
 scripts/git-checkout.sh                            |     2 +-
 stubdom/Makefile                                   |    20 +-
 stubdom/c/Makefile                                 |     2 +
 stubdom/caml/Makefile                              |     2 +
 stubdom/configure                                  |    20 +-
 stubdom/configure.ac                               |     2 +-
 stubdom/grub.patches/10graphics.diff               |    10 +-
 stubdom/grub.patches/61btrfs.diff                  |     6 +-
 stubdom/grub/kexec.c                               |     5 +-
 stubdom/vtpm-deepquote-anyloc.patch                |   127 +
 stubdom/vtpm/vtpm_cmd.c                            |    13 +-
 stubdom/vtpmmgr/Makefile                           |     2 +-
 stubdom/vtpmmgr/common_types.h                     |     9 +
 stubdom/vtpmmgr/disk_read.c                        |    29 +-
 stubdom/vtpmmgr/disk_tpm.c                         |    42 +-
 stubdom/vtpmmgr/disk_tpm.h                         |     4 +
 stubdom/vtpmmgr/disk_write.c                       |    13 +-
 stubdom/vtpmmgr/init.c                             |   279 +
 stubdom/vtpmmgr/marshal.h                          |     1 +
 stubdom/vtpmmgr/mgmt_authority.c                   |    91 +-
 stubdom/vtpmmgr/mgmt_authority.h                   |     2 +-
 stubdom/vtpmmgr/tcg.h                              |     7 +-
 stubdom/vtpmmgr/tpm2.c                             |   455 +
 stubdom/vtpmmgr/tpm2.h                             |   104 +
 stubdom/vtpmmgr/tpm2_marshal.h                     |   673 ++
 stubdom/vtpmmgr/tpm2_types.h                       |   969 ++
 stubdom/vtpmmgr/tpmrsa.c                           |     3 +-
 stubdom/vtpmmgr/tpmrsa.h                           |     3 +-
 stubdom/vtpmmgr/vtpm_cmd_handler.c                 |     7 +-
 stubdom/vtpmmgr/vtpm_manager.h                     |    27 +-
 stubdom/vtpmmgr/vtpmmgr.c                          |    46 +-
 stubdom/vtpmmgr/vtpmmgr.h                          |    29 +
 tools/Makefile                                     |   105 +-
 tools/Rules.mk                                     |    13 +-
 tools/blktap/Makefile                              |    13 -
 tools/blktap/README                                |   122 -
 tools/blktap/drivers/Makefile                      |    73 -
 tools/blktap/drivers/aes.c                         |  1319 ---
 tools/blktap/drivers/aes.h                         |    28 -
 tools/blktap/drivers/blk.h                         |     3 -
 tools/blktap/drivers/blk_linux.c                   |    42 -
 tools/blktap/drivers/blktapctrl.c                  |   937 --
 tools/blktap/drivers/blktapctrl_linux.c            |    89 -
 tools/blktap/drivers/block-aio.c                   |   259 -
 tools/blktap/drivers/block-qcow.c                  |  1434 ---
 tools/blktap/drivers/block-qcow2.c                 |  2098 ----
 tools/blktap/drivers/block-ram.c                   |   295 -
 tools/blktap/drivers/block-sync.c                  |   242 -
 tools/blktap/drivers/block-vmdk.c                  |   428 -
 tools/blktap/drivers/bswap.h                       |   178 -
 tools/blktap/drivers/img2qcow.c                    |   282 -
 tools/blktap/drivers/qcow-create.c                 |   130 -
 tools/blktap/drivers/qcow2raw.c                    |   348 -
 tools/blktap/drivers/tapaio.c                      |   357 -
 tools/blktap/drivers/tapaio.h                      |   108 -
 tools/blktap/drivers/tapdisk.c                     |   872 --
 tools/blktap/drivers/tapdisk.h                     |   259 -
 tools/blktap/lib/Makefile                          |    60 -
 tools/blktap/lib/blkif.c                           |   185 -
 tools/blktap/lib/blktaplib.h                       |   240 -
 tools/blktap/lib/list.h                            |    59 -
 tools/blktap/lib/xenbus.c                          |   617 --
 tools/blktap/lib/xs_api.c                          |   360 -
 tools/blktap/lib/xs_api.h                          |    50 -
 tools/blktap2/Makefile                             |     6 +-
 tools/blktap2/control/Makefile                     |     8 +-
 tools/blktap2/drivers/Makefile                     |     6 +-
 tools/blktap2/drivers/libaio-compat.h              |     4 +-
 tools/blktap2/drivers/tapdisk-vbd.c                |     2 +-
 tools/blktap2/include/Makefile                     |     5 +-
 tools/blktap2/lvm/Makefile                         |     4 +-
 tools/blktap2/vhd/Makefile                         |     6 +-
 tools/blktap2/vhd/lib/Makefile                     |    10 +-
 tools/blktap2/vhd/lib/libvhd.c                     |    27 +-
 tools/blktap2/vhd/vhd-util.c                       |     3 +
 tools/config.h.in                                  |    21 +
 tools/configure                                    |   641 +-
 tools/configure.ac                                 |    95 +-
 tools/console/Makefile                             |     9 +-
 tools/console/client/main.c                        |    81 +-
 tools/console/daemon/io.c                          |     7 +-
 tools/console/daemon/io.h                          |     3 +-
 tools/console/daemon/main.c                        |    41 +-
 tools/console/daemon/utils.c                       |     3 +-
 tools/console/daemon/utils.h                       |     3 +-
 tools/console/testsuite/Makefile                   |     5 +-
 tools/debugger/gdbsx/Makefile                      |     8 +-
 tools/debugger/gdbsx/gx/Makefile                   |     2 +
 tools/debugger/gdbsx/gx/gx.h                       |     4 +-
 tools/debugger/gdbsx/gx/gx_comm.c                  |     8 +-
 tools/debugger/gdbsx/gx/gx_local.c                 |     4 +-
 tools/debugger/gdbsx/gx/gx_main.c                  |     4 +-
 tools/debugger/gdbsx/gx/gx_utils.c                 |     4 +-
 tools/debugger/gdbsx/gx/xg_dummy.c                 |     4 +-
 tools/debugger/gdbsx/xg/Makefile                   |     2 +
 tools/debugger/gdbsx/xg/xg_main.c                  |     4 +-
 tools/debugger/gdbsx/xg/xg_public.h                |     4 +-
 tools/debugger/kdd/Makefile                        |     7 +-
 tools/examples/Makefile                            |     3 +
 tools/examples/README                              |     1 -
 tools/examples/cpupool                             |     2 +-
 tools/firmware/Makefile                            |     4 +-
 .../firmware/etherboot/patches/build-compare.patch |    19 +
 tools/firmware/etherboot/patches/build_fix_4.patch |   225 +
 tools/firmware/etherboot/patches/series            |     2 +
 tools/firmware/hvmloader/32bitbios_support.c       |     3 +-
 tools/firmware/hvmloader/Makefile                  |    16 +-
 tools/firmware/hvmloader/acpi/Makefile             |     9 +-
 tools/firmware/hvmloader/acpi/acpi2_0.h            |    64 +-
 tools/firmware/hvmloader/acpi/build.c              |   109 +-
 tools/firmware/hvmloader/acpi/dsdt.asl             |    27 +-
 tools/firmware/hvmloader/acpi/mk_dsdt.c            |    41 +-
 tools/firmware/hvmloader/acpi/ssdt_pm.asl          |    32 +-
 tools/firmware/hvmloader/acpi/ssdt_s3.asl          |     3 +-
 tools/firmware/hvmloader/acpi/ssdt_s4.asl          |     3 +-
 tools/firmware/hvmloader/acpi/ssdt_tpm.asl         |     3 +-
 tools/firmware/hvmloader/acpi/static_tables.c      |     3 +-
 tools/firmware/hvmloader/cacheattr.c               |     3 +-
 tools/firmware/hvmloader/e820.c                    |   135 +-
 tools/firmware/hvmloader/e820.h                    |     7 +
 tools/firmware/hvmloader/hvmloader.c               |     8 +-
 tools/firmware/hvmloader/mkhex                     |     3 +-
 tools/firmware/hvmloader/mp_tables.c               |     3 +-
 tools/firmware/hvmloader/optionroms.c              |     3 +-
 tools/firmware/hvmloader/ovmf.c                    |     3 +-
 tools/firmware/hvmloader/pci.c                     |    70 +-
 tools/firmware/hvmloader/pir_types.h               |     3 +-
 tools/firmware/hvmloader/rombios.c                 |     3 +-
 tools/firmware/hvmloader/seabios.c                 |     3 +-
 tools/firmware/hvmloader/smbios.c                  |     3 +-
 tools/firmware/hvmloader/smbios_types.h            |     3 +-
 tools/firmware/hvmloader/smp.c                     |     3 +-
 tools/firmware/hvmloader/tests.c                   |     3 +-
 tools/firmware/hvmloader/util.c                    |    32 +-
 tools/firmware/hvmloader/util.h                    |    21 +-
 tools/firmware/hvmloader/vnuma.c                   |    80 +
 .../blktapctrl.h => firmware/hvmloader/vnuma.h}    |    28 +-
 tools/firmware/hvmloader/xenbus.c                  |    48 +-
 tools/firmware/ovmf-makefile                       |     6 +-
 tools/firmware/rombios/32bit/32bitbios.c           |     3 +-
 tools/firmware/rombios/32bit/Makefile              |     3 +
 tools/firmware/rombios/32bit/mkhex                 |     3 +-
 tools/firmware/rombios/32bit/pmm.c                 |     3 +-
 tools/firmware/rombios/32bit/tcgbios/Makefile      |     3 +
 tools/firmware/rombios/32bit/tcgbios/tcgbios.c     |     3 +-
 tools/firmware/rombios/32bit/tcgbios/tpm_drivers.c |     3 +-
 tools/firmware/rombios/32bit/util.c                |     3 +-
 tools/firmware/rombios/32bitgateway.c              |     3 +-
 tools/firmware/rombios/Makefile                    |     3 +
 tools/firmware/rombios/apmbios.S                   |     3 +-
 tools/firmware/rombios/rombios.c                   |     3 +-
 tools/firmware/rombios/rombios.h                   |     3 +-
 tools/firmware/rombios/tcgbios.c                   |     3 +-
 tools/firmware/vgabios/COPYING                     |     3 +-
 tools/firmware/vgabios/Makefile                    |     7 +-
 tools/firmware/vgabios/biossums.c                  |     3 +-
 tools/firmware/vgabios/clext.c                     |     3 +-
 tools/firmware/vgabios/vbe.c                       |     3 +-
 tools/firmware/vgabios/vgabios.c                   |     3 +-
 tools/flask/Makefile                               |     4 +-
 tools/flask/policy/Makefile                        |    29 +-
 tools/flask/policy/policy/device_contexts          |    32 +
 tools/flask/policy/policy/initial_sids             |     4 +
 tools/flask/policy/policy/modules/xen/xen.if       |     8 +-
 tools/flask/policy/policy/modules/xen/xen.te       |    70 +-
 tools/flask/utils/Makefile                         |     7 +-
 tools/hotplug/FreeBSD/Makefile                     |     5 +-
 tools/hotplug/FreeBSD/rc.d/xencommons.in           |    16 +-
 tools/hotplug/FreeBSD/rc.d/xendriverdomain.in      |    48 +
 tools/hotplug/FreeBSD/vif-bridge                   |     4 +-
 tools/hotplug/Linux/Makefile                       |    22 +-
 tools/hotplug/Linux/blktap                         |    94 -
 tools/hotplug/Linux/block                          |    16 +-
 tools/hotplug/Linux/block-common.sh                |     3 +-
 tools/hotplug/Linux/block-drbd-probe               |     3 +-
 tools/hotplug/Linux/block-tap                      |   123 +
 tools/hotplug/Linux/external-device-migrate        |     3 +-
 tools/hotplug/Linux/init.d/sysconfig.xencommons.in |    10 +-
 tools/hotplug/Linux/init.d/xen-watchdog.in         |     2 +-
 tools/hotplug/Linux/init.d/xencommons.in           |    10 +-
 tools/hotplug/Linux/init.d/xendriverdomain.in      |    85 +
 tools/hotplug/Linux/locking.sh                     |     3 +-
 tools/hotplug/Linux/logging.sh                     |     3 +-
 tools/hotplug/Linux/systemd/Makefile               |     3 +
 .../systemd/xen-qemu-dom0-disk-backend.service.in  |     2 +-
 tools/hotplug/Linux/systemd/xenstored.service.in   |     1 +
 tools/hotplug/Linux/vif-common.sh                  |     5 +-
 tools/hotplug/Linux/xen-backend.rules.in           |    10 -
 tools/hotplug/Linux/xen-hotplug-common.sh.in       |    14 +-
 tools/hotplug/Linux/xen-network-common.sh          |     3 +-
 tools/hotplug/Linux/xen-script-common.sh           |     3 +-
 tools/hotplug/Linux/xendomains.in                  |     2 +-
 tools/hotplug/Makefile                             |     4 +-
 tools/hotplug/NetBSD/Makefile                      |     5 +-
 tools/hotplug/NetBSD/block                         |     2 +-
 tools/hotplug/NetBSD/rc.d/xen-watchdog             |     6 +-
 tools/hotplug/NetBSD/rc.d/xencommons.in            |    16 +-
 tools/hotplug/NetBSD/rc.d/xendomains               |     4 +-
 tools/hotplug/NetBSD/rc.d/xendriverdomain.in       |    49 +
 tools/hotplug/NetBSD/vif-bridge                    |     2 +-
 tools/hotplug/NetBSD/vif-ip                        |     2 +-
 tools/hotplug/common/Makefile                      |     3 +
 tools/include/Makefile                             |    57 +-
 tools/include/xen-external/bsd-sys-queue-h-seddery |     2 +
 tools/include/xen-foreign/Makefile                 |     6 +-
 tools/include/xen-foreign/reference.size           |     4 +-
 tools/include/xen-sys/NetBSDRump/evtchn.h          |    86 +
 tools/include/xen-sys/NetBSDRump/privcmd.h         |    81 +-
 tools/libfsimage/common/Makefile                   |     8 +-
 tools/libfsimage/ext2fs-lib/Makefile               |     4 +-
 tools/libfsimage/ext2fs-lib/ext2fs-lib.c           |     3 -
 tools/libfsimage/ext2fs/fsys_ext2fs.c              |     3 +-
 tools/libfsimage/fat/fat.h                         |     3 +-
 tools/libfsimage/fat/fsys_fat.c                    |     3 +-
 tools/libfsimage/iso9660/fsys_iso9660.c            |     3 +-
 tools/libfsimage/iso9660/iso9660.h                 |     3 +-
 tools/libfsimage/reiserfs/fsys_reiserfs.c          |     3 +-
 tools/libfsimage/ufs/fsys_ufs.c                    |     3 +-
 tools/libfsimage/xfs/fsys_xfs.c                    |     3 +-
 tools/libfsimage/xfs/xfs.h                         |     3 +-
 tools/libfsimage/zfs/Makefile                      |     3 +-
 tools/libfsimage/zfs/filesys.h                     |     3 +-
 tools/libfsimage/zfs/fsi_zfs.c                     |     3 +-
 tools/libfsimage/zfs/fsi_zfs.h                     |     3 +-
 tools/libfsimage/zfs/fsys_zfs.c                    |     3 +-
 tools/libfsimage/zfs/fsys_zfs.h                    |     3 +-
 tools/libfsimage/zfs/mb_info.h                     |     3 +-
 tools/libfsimage/zfs/shared.h                      |     3 +-
 tools/libfsimage/zfs/zfs-include/dmu.h             |     3 +-
 tools/libfsimage/zfs/zfs-include/dmu_objset.h      |     3 +-
 tools/libfsimage/zfs/zfs-include/dnode.h           |     3 +-
 tools/libfsimage/zfs/zfs-include/dsl_dataset.h     |     3 +-
 tools/libfsimage/zfs/zfs-include/dsl_dir.h         |     3 +-
 tools/libfsimage/zfs/zfs-include/sa_impl.h         |     3 +-
 tools/libfsimage/zfs/zfs-include/spa.h             |     3 +-
 tools/libfsimage/zfs/zfs-include/uberblock_impl.h  |     3 +-
 tools/libfsimage/zfs/zfs-include/vdev_impl.h       |     3 +-
 tools/libfsimage/zfs/zfs-include/zap_impl.h        |     3 +-
 tools/libfsimage/zfs/zfs-include/zap_leaf.h        |     3 +-
 tools/libfsimage/zfs/zfs-include/zfs.h             |     3 +-
 tools/libfsimage/zfs/zfs-include/zfs_acl.h         |     3 +-
 tools/libfsimage/zfs/zfs-include/zfs_znode.h       |     3 +-
 tools/libfsimage/zfs/zfs-include/zil.h             |     3 +-
 tools/libfsimage/zfs/zfs-include/zio.h             |     3 +-
 tools/libfsimage/zfs/zfs-include/zio_checksum.h    |     3 +-
 tools/libfsimage/zfs/zfs_fletcher.c                |     3 +-
 tools/libfsimage/zfs/zfs_lzjb.c                    |     3 +-
 tools/libfsimage/zfs/zfs_sha256.c                  |     3 +-
 tools/libvchan/Makefile                            |    14 +-
 tools/libvchan/init.c                              |     3 +-
 tools/libvchan/io.c                                |     3 +-
 tools/libvchan/libxenvchan.h                       |     3 +-
 tools/libvchan/node-select.c                       |    17 +-
 tools/libvchan/node.c                              |     3 +-
 tools/libxc/Makefile                               |    44 +-
 tools/libxc/include/xc_dom.h                       |    16 +-
 tools/libxc/include/xenctrl.h                      |   273 +-
 tools/libxc/include/xenctrlosdep.h                 |     3 +-
 tools/libxc/include/xenguest.h                     |    43 +-
 tools/libxc/include/xentoollog.h                   |     3 +-
 tools/libxc/xc_altp2m.c                            |   247 +
 tools/libxc/xc_bitops.h                            |     5 +
 tools/libxc/xc_compression.c                       |     3 +-
 tools/libxc/xc_core.c                              |     3 +-
 tools/libxc/xc_core.h                              |     3 +-
 tools/libxc/xc_core_arm.c                          |    14 +-
 tools/libxc/xc_core_arm.h                          |     3 +-
 tools/libxc/xc_core_x86.c                          |    32 +-
 tools/libxc/xc_core_x86.h                          |     3 +-
 tools/libxc/xc_cpu_hotplug.c                       |     3 +-
 tools/libxc/xc_cpufeature.h                        |     3 +-
 tools/libxc/xc_cpuid_x86.c                         |     6 +-
 tools/libxc/xc_cpupool.c                           |     7 +-
 tools/libxc/xc_csched.c                            |     3 +-
 tools/libxc/xc_csched2.c                           |     3 +-
 tools/libxc/xc_dom_arm.c                           |    14 +-
 tools/libxc/xc_dom_armzimageloader.c               |     3 +-
 tools/libxc/xc_dom_binloader.c                     |     3 +-
 tools/libxc/xc_dom_boot.c                          |     9 +-
 tools/libxc/xc_dom_bzimageloader.c                 |    23 +-
 tools/libxc/xc_dom_compat_linux.c                  |     9 +-
 tools/libxc/xc_dom_core.c                          |    11 +-
 tools/libxc/xc_dom_elfloader.c                     |    36 +-
 tools/libxc/xc_dom_x86.c                           |   180 +-
 tools/libxc/xc_domain.c                            |   394 +-
 tools/libxc/xc_domain_restore.c                    |  2399 -----
 tools/libxc/xc_domain_save.c                       |  2192 ----
 tools/libxc/xc_efi.h                               |     3 +-
 tools/libxc/xc_elf.h                               |     3 +-
 tools/libxc/xc_evtchn.c                            |     3 +-
 tools/libxc/xc_flask.c                             |    15 +-
 tools/libxc/xc_foreign_memory.c                    |     3 +-
 tools/libxc/xc_freebsd.c                           |     3 +-
 tools/libxc/xc_freebsd_osdep.c                     |    10 +-
 tools/libxc/xc_gnttab.c                            |     3 +-
 tools/libxc/xc_hcall_buf.c                         |     9 +-
 tools/libxc/xc_hvm_build_arm.c                     |     3 +-
 tools/libxc/xc_hvm_build_x86.c                     |   341 +-
 tools/libxc/xc_linux.c                             |     3 +-
 tools/libxc/xc_linux_osdep.c                       |     9 +-
 tools/libxc/xc_mem_access.c                        |    59 +-
 tools/libxc/xc_mem_paging.c                        |    83 +-
 tools/libxc/xc_memshr.c                            |    32 +-
 tools/libxc/xc_minios.c                            |     3 +-
 tools/libxc/xc_misc.c                              |   121 +-
 tools/libxc/xc_monitor.c                           |   145 +
 tools/libxc/xc_msr_x86.h                           |     1 +
 tools/libxc/xc_netbsd.c                            |     3 +-
 tools/libxc/xc_nomigrate.c                         |     3 +-
 tools/libxc/xc_offline_page.c                      |   104 +-
 tools/libxc/xc_pagetab.c                           |     3 +-
 tools/libxc/xc_physdev.c                           |    15 +-
 tools/libxc/xc_pm.c                                |    57 +-
 tools/libxc/xc_private.c                           |   125 +-
 tools/libxc/xc_private.h                           |    36 +-
 tools/libxc/xc_psr.c                               |   155 +-
 tools/libxc/xc_resume.c                            |     3 +-
 tools/libxc/xc_rt.c                                |     3 +-
 tools/libxc/xc_sedf.c                              |    78 -
 tools/libxc/xc_solaris.c                           |     3 +-
 tools/libxc/xc_sr_common.c                         |   114 +
 tools/libxc/xc_sr_common.h                         |   375 +
 tools/libxc/xc_sr_common_x86.c                     |    54 +
 tools/libxc/xc_sr_common_x86.h                     |    26 +
 tools/libxc/xc_sr_common_x86_pv.c                  |   210 +
 tools/libxc/xc_sr_common_x86_pv.h                  |   102 +
 tools/libxc/xc_sr_restore.c                        |   802 ++
 tools/libxc/xc_sr_restore_x86_hvm.c                |   233 +
 tools/libxc/xc_sr_restore_x86_pv.c                 |  1165 +++
 tools/libxc/xc_sr_save.c                           |   906 ++
 tools/libxc/xc_sr_save_x86_hvm.c                   |   220 +
 tools/libxc/xc_sr_save_x86_pv.c                    |   894 ++
 tools/libxc/xc_sr_stream_format.h                  |   149 +
 tools/libxc/xc_suspend.c                           |     3 +-
 tools/libxc/xc_tbuf.c                              |    36 +-
 tools/libxc/xc_tmem.c                              |   140 +-
 tools/libxc/{xc_mem_event.c => xc_vm_event.c}      |    62 +-
 tools/libxc/xg_private.c                           |     5 +-
 tools/libxc/xg_private.h                           |     3 +-
 tools/libxc/xg_save_restore.h                      |   253 +-
 tools/libxc/xtl_core.c                             |    12 +-
 tools/libxc/xtl_logger_stdio.c                     |    14 +-
 tools/libxl/CODING_STYLE                           |     1 +
 tools/libxl/Makefile                               |    64 +-
 tools/libxl/gentest.py                             |    64 +-
 tools/libxl/gentypes.py                            |     7 +-
 tools/libxl/libxl.c                                |  1084 +-
 tools/libxl/libxl.h                                |   286 +-
 tools/libxl/libxl_aoutils.c                        |   221 +-
 tools/libxl/libxl_arch.h                           |    35 +
 tools/libxl/libxl_arm.c                            |   328 +-
 tools/libxl/libxl_bootloader.c                     |    33 +-
 tools/libxl/libxl_convert_callout.c                |   173 +
 tools/libxl/libxl_cpuid.c                          |    13 +-
 tools/libxl/libxl_create.c                         |   358 +-
 tools/libxl/libxl_device.c                         |   137 +-
 tools/libxl/libxl_dm.c                             |   530 +-
 tools/libxl/libxl_dom.c                            |  1167 +--
 tools/libxl/libxl_dom_suspend.c                    |   443 +
 tools/libxl/libxl_event.c                          |   513 +-
 tools/libxl/libxl_event.h                          |     2 +-
 tools/libxl/libxl_exec.c                           |    38 +-
 tools/libxl/libxl_flask.c                          |    13 +-
 tools/libxl/libxl_fork.c                           |     8 +-
 tools/libxl/libxl_freebsd.c                        |    12 +
 tools/libxl/libxl_internal.c                       |   105 +-
 tools/libxl/libxl_internal.h                       |   650 +-
 tools/libxl/libxl_json.c                           |    10 +-
 tools/libxl/libxl_libfdt_compat.c                  |    94 +
 tools/libxl/libxl_libfdt_compat.h                  |    90 +
 tools/libxl/libxl_linux.c                          |    88 +-
 tools/libxl/libxl_netbsd.c                         |    19 +-
 tools/libxl/libxl_netbuffer.c                      |    23 +-
 tools/libxl/libxl_no_convert_callout.c             |    35 +
 tools/libxl/libxl_osdeps.h                         |    37 +
 tools/libxl/libxl_pci.c                            |    54 +-
 tools/libxl/libxl_psr.c                            |   217 +-
 tools/libxl/libxl_qmp.c                            |    48 +-
 tools/libxl/libxl_remus_disk_drbd.c                |    14 +-
 tools/libxl/libxl_save_callout.c                   |   145 +-
 tools/libxl/libxl_save_helper.c                    |    93 +-
 tools/libxl/libxl_save_msgs_gen.pl                 |     9 +-
 tools/libxl/libxl_sr_stream_format.h               |    58 +
 tools/libxl/libxl_stream_read.c                    |   829 ++
 tools/libxl/libxl_stream_write.c                   |   625 ++
 tools/libxl/libxl_test_fdevent.c                   |    79 +
 tools/libxl/libxl_test_fdevent.h                   |    12 +
 tools/libxl/libxl_test_timedereg.c                 |    17 +-
 tools/libxl/libxl_types.idl                        |   102 +-
 tools/libxl/libxl_utils.c                          |   151 +
 tools/libxl/libxl_utils.h                          |    19 +-
 tools/libxl/libxl_vnuma.c                          |   325 +
 tools/libxl/libxl_x86.c                            |   245 +-
 tools/libxl/libxlu_cfg.c                           |   210 +-
 tools/libxl/libxlu_cfg_i.h                         |    14 +-
 tools/libxl/libxlu_cfg_y.c                         |    46 +-
 tools/libxl/libxlu_cfg_y.h                         |     2 +-
 tools/libxl/libxlu_cfg_y.y                         |    14 +-
 tools/libxl/libxlu_internal.h                      |    33 +-
 tools/libxl/libxlu_pci.c                           |    98 +-
 tools/libxl/libxlutil.h                            |    17 +
 tools/libxl/test_common.c                          |    44 +-
 tools/libxl/test_common.h                          |    15 +
 tools/libxl/test_fdderegrace.c                     |    56 +
 tools/libxl/xenlight.pc.in.in                      |    11 +
 tools/libxl/xl.c                                   |     2 +-
 tools/libxl/xl.h                                   |     6 +-
 tools/libxl/xl_cmdimpl.c                           |  1863 ++--
 tools/libxl/xl_cmdtable.c                          |    46 +-
 tools/libxl/xlutil.pc.in.in                        |     9 +
 tools/memshr/Makefile                              |     5 +-
 tools/memshr/bidir-daemon.c                        |     3 +-
 tools/memshr/bidir-daemon.h                        |     3 +-
 tools/memshr/bidir-hash.c                          |     3 +-
 tools/memshr/bidir-hash.h                          |     3 +-
 tools/memshr/bidir-namedefs.h                      |     3 +-
 tools/memshr/interface.c                           |     3 +-
 tools/memshr/memshr-priv.h                         |     3 +-
 tools/memshr/memshr.h                              |     3 +-
 tools/memshr/shm.c                                 |     3 +-
 tools/memshr/shm.h                                 |     3 +-
 tools/misc/Makefile                                |    84 +-
 tools/misc/gtracestat.c                            |     4 +-
 tools/misc/gtraceview.c                            |     7 +-
 tools/misc/mkrpm                                   |     4 +-
 tools/misc/mktarball                               |     4 +-
 tools/misc/sbdf2devicepath                         |    82 -
 tools/misc/xen-hptool.c                            |     6 +-
 tools/misc/xen-mfndump.c                           |     9 +-
 tools/misc/xen-ringwatch                           |     4 +-
 tools/misc/xencov.c                                |     3 +-
 tools/misc/xencov_split                            |     3 +-
 tools/misc/xenpm.c                                 |   106 +-
 tools/misc/xenpvnetboot                            |     4 +-
 tools/ocaml/LICENSE                                |     3 +-
 tools/ocaml/Makefile                               |     3 +
 tools/ocaml/Makefile.rules                         |     2 +
 tools/ocaml/libs/Makefile                          |     3 +
 tools/ocaml/libs/xb/op.ml                          |     6 +-
 tools/ocaml/libs/xb/xb.mli                         |     1 +
 tools/ocaml/libs/xb/xs_ring_stubs.c                |     4 +-
 tools/ocaml/libs/xc/xenctrl_stubs.c                |    99 +-
 tools/ocaml/libs/xl/genwrap.py                     |    39 +-
 tools/ocaml/libs/xs/xs.ml                          |     8 +-
 tools/ocaml/xenstored/Makefile                     |     9 +-
 tools/ocaml/xenstored/connection.ml                |     7 +
 tools/ocaml/xenstored/logging.ml                   |     1 +
 tools/ocaml/xenstored/process.ml                   |     6 +
 tools/ocaml/xenstored/systemd.ml                   |     2 +-
 tools/ocaml/xenstored/systemd.mli                  |     4 +-
 tools/ocaml/xenstored/systemd_stubs.c              |     7 +-
 tools/ocaml/xenstored/utils.ml                     |     2 +-
 tools/ocaml/xenstored/xenstored.ml                 |     4 +-
 tools/pygrub/Makefile                              |     9 +-
 tools/pygrub/examples/ubuntu-14.04-lts.grub2       |   234 +
 tools/pygrub/src/ExtLinuxConf.py                   |     3 +-
 tools/pygrub/src/GrubConf.py                       |     3 +-
 tools/pygrub/src/pygrub                            |     3 +-
 tools/python/Makefile                              |    14 +-
 tools/python/scripts/convert-legacy-stream         |   730 ++
 tools/python/scripts/verify-stream-v2              |   174 +
 tools/python/setup.py                              |     1 +
 tools/python/xen/lowlevel/xc/xc.c                  |   205 +-
 tools/python/xen/lowlevel/xl/xl.c                  |     3 +-
 tools/python/xen/lowlevel/xs/xs.c                  |     3 +-
 tools/python/xen/migration/__init__.py             |     0
 tools/python/xen/migration/legacy.py               |   315 +
 tools/python/xen/migration/libxc.py                |   446 +
 tools/python/xen/migration/libxl.py                |   227 +
 tools/python/xen/migration/public.py               |    21 +
 tools/python/xen/migration/tests.py                |    54 +
 tools/python/xen/migration/verify.py               |    37 +
 tools/python/xen/migration/xl.py                   |    12 +
 tools/tests/mce-test/Makefile                      |     5 +-
 tools/tests/mce-test/cases/srao_llc/dom0/cases.sh  |     3 +-
 tools/tests/mce-test/cases/srao_llc/guest/cases.sh |     3 +-
 tools/tests/mce-test/cases/srao_llc/xen/cases.sh   |     3 +-
 tools/tests/mce-test/cases/srao_mem/dom0/cases.sh  |     3 +-
 tools/tests/mce-test/cases/srao_mem/guest/cases.sh |     3 +-
 tools/tests/mce-test/cases/srao_mem/xen/cases.sh   |     3 +-
 tools/tests/mce-test/cases/ucna_llc/dom0/cases.sh  |     3 +-
 tools/tests/mce-test/cases/ucna_llc/guest/cases.sh |     3 +-
 tools/tests/mce-test/cases/ucna_llc/xen/cases.sh   |     3 +-
 tools/tests/mce-test/config/setup.conf             |     3 +-
 tools/tests/mce-test/lib/xen-mceinj-tool.sh        |     3 +-
 tools/tests/mce-test/tools/Makefile                |     5 +-
 tools/tests/mce-test/tools/xen-mceinj.c            |     3 +-
 tools/tests/mem-sharing/Makefile                   |     3 +
 tools/tests/mem-sharing/memshrtool.c               |    12 +-
 tools/tests/regression/Makefile                    |     4 +-
 tools/tests/utests/run_all_tests.py                |     3 +-
 tools/tests/vhpet/Makefile                         |     3 +
 tools/tests/vhpet/emul.h                           |     8 +-
 tools/tests/vhpet/main.c                           |     6 +-
 tools/tests/x86_emulator/Makefile                  |     3 +
 tools/tests/x86_emulator/blowfish.c                |     6 +-
 tools/tests/x86_emulator/test_x86_emulator.c       |    11 +-
 tools/tests/x86_emulator/x86_emulate.c             |     4 +
 tools/tests/xen-access/Makefile                    |     7 +-
 tools/tests/xen-access/xen-access.c                |   461 +-
 tools/xcutils/Makefile                             |     3 +
 tools/xenbackendd/Makefile                         |     7 +-
 tools/xenbackendd/xenbackendd.c                    |     3 +-
 tools/xenmon/COPYING                               |     3 +-
 tools/xenmon/Makefile                              |     7 +-
 tools/xenmon/setmask.c                             |     3 +-
 tools/xenmon/xenbaked.c                            |     3 +-
 tools/xenmon/xenbaked.h                            |     3 +-
 tools/xenmon/xenmon.py                             |     3 +-
 tools/xenpaging/Makefile                           |     4 +-
 tools/xenpaging/file_ops.c                         |     3 +-
 tools/xenpaging/file_ops.h                         |     3 +-
 tools/xenpaging/pagein.c                           |     2 +-
 tools/xenpaging/policy.h                           |     3 +-
 tools/xenpaging/policy_default.c                   |     3 +-
 tools/xenpaging/xenpaging.c                        |   158 +-
 tools/xenpaging/xenpaging.h                        |    11 +-
 tools/xenpmd/Makefile                              |     3 +
 tools/xenpmd/xenpmd.c                              |     3 +-
 tools/xenstat/Makefile                             |     4 +-
 tools/xenstat/libxenstat/COPYING                   |     3 +-
 tools/xenstat/libxenstat/Makefile                  |    14 +-
 tools/xenstat/libxenstat/src/xenstat.c             |    32 +-
 tools/xenstat/libxenstat/src/xenstat_linux.c       |    17 +-
 tools/xenstat/libxenstat/src/xenstat_priv.h        |     2 +
 tools/xenstat/libxenstat/src/xenstat_qmp.c         |   448 +
 tools/xenstat/xentop/Makefile                      |    13 +-
 tools/xenstat/xentop/xentop.1                      |   104 -
 tools/xenstat/xentop/xentop.c                      |     7 +-
 tools/xenstore/COPYING                             |     3 +-
 tools/xenstore/Makefile                            |    44 +-
 tools/xenstore/include/xenstore.h                  |    30 +-
 tools/xenstore/include/xenstore_lib.h              |     3 +-
 tools/xenstore/talloc.c                            |     9 +-
 tools/xenstore/talloc.h                            |     3 +-
 tools/xenstore/tdb.c                               |     3 +-
 tools/xenstore/tdb.h                               |     3 +-
 tools/xenstore/xenstore_client.c                   |     1 +
 tools/xenstore/xenstored_core.c                    |   102 +-
 tools/xenstore/xenstored_core.h                    |     3 +-
 tools/xenstore/xenstored_domain.c                  |     7 +-
 tools/xenstore/xenstored_domain.h                  |     3 +-
 tools/xenstore/xenstored_minios.c                  |     3 +-
 tools/xenstore/xenstored_posix.c                   |     3 +-
 tools/xenstore/xenstored_transaction.c             |     3 +-
 tools/xenstore/xenstored_transaction.h             |     3 +-
 tools/xenstore/xenstored_watch.c                   |     3 +-
 tools/xenstore/xenstored_watch.h                   |     3 +-
 tools/xenstore/xs.c                                |     3 +-
 tools/xenstore/xs_lib.c                            |     5 +-
 tools/xenstore/xs_tdb_dump.c                       |    12 +-
 tools/xentrace/Makefile                            |    24 +-
 tools/xentrace/analyze.h                           |   107 +
 tools/xentrace/formats                             |     8 +-
 tools/xentrace/mread.c                             |   160 +
 tools/xentrace/mread.h                             |    18 +
 tools/xentrace/pv.h                                |    41 +
 tools/xentrace/xenalyze.c                          | 10407 +++++++++++++++++++
 tools/xentrace/xentrace.c                          |   197 +-
 unmodified_drivers/linux-2.6/platform-pci/evtchn.c |     6 +-
 .../linux-2.6/platform-pci/platform-pci.c          |     3 +-
 .../linux-2.6/platform-pci/platform-pci.h          |     3 +-
 .../linux-2.6/platform-pci/xen_support.c           |     3 +-
 xen/COPYING                                        |     3 +-
 xen/Makefile                                       |    19 +-
 xen/Rules.mk                                       |     5 +-
 xen/arch/arm/Makefile                              |     3 +-
 xen/arch/arm/README.LinuxPrimitives                |    28 -
 xen/arch/arm/Rules.mk                              |   103 +-
 xen/arch/arm/arm32/debug-8250.inc                  |     6 +-
 xen/arch/arm/arm32/debug-scif.inc                  |    49 +
 xen/arch/arm/arm32/lib/lib1funcs.S                 |     4 +-
 xen/arch/arm/arm32/lib/lshrdi3.S                   |     4 +-
 xen/arch/arm/arm64/debug-cadence.inc               |    45 +
 xen/arch/arm/arm64/head.S                          |     3 +-
 xen/arch/arm/arm64/smpboot.c                       |     2 +-
 xen/arch/arm/arm64/traps.c                         |    14 +-
 xen/arch/arm/bootfdt.c                             |    14 +-
 xen/arch/arm/decode.c                              |     6 +-
 xen/arch/arm/device.c                              |    31 +-
 xen/arch/arm/domain.c                              |    82 +-
 xen/arch/arm/domain_build.c                        |   393 +-
 xen/arch/arm/domctl.c                              |   103 +-
 xen/arch/arm/efi/efi-boot.h                        |    44 +-
 xen/arch/arm/{gic-v2.c => gic-hip04.c}             |   473 +-
 xen/arch/arm/gic-v2.c                              |   248 +-
 xen/arch/arm/gic-v3.c                              |   345 +-
 xen/arch/arm/gic.c                                 |   118 +-
 xen/arch/arm/guestcopy.c                           |     4 +-
 xen/arch/arm/irq.c                                 |   179 +-
 xen/arch/arm/kernel.c                              |     2 +-
 xen/arch/arm/kernel.h                              |     4 +
 xen/arch/arm/mm.c                                  |    50 +-
 xen/arch/arm/p2m.c                                 |   618 +-
 xen/arch/arm/platform.c                            |    38 +-
 xen/arch/arm/platforms/Makefile                    |     1 +
 xen/arch/arm/platforms/midway.c                    |     3 -
 xen/arch/arm/platforms/omap5.c                     |    18 -
 xen/arch/arm/platforms/rcar2.c                     |    68 +
 xen/arch/arm/platforms/seattle.c                   |     3 -
 xen/arch/arm/platforms/sunxi.c                     |     3 -
 xen/arch/arm/platforms/vexpress.c                  |     2 -
 xen/arch/arm/platforms/xgene-storm.c               |   172 +-
 xen/arch/arm/psci.c                                |     2 +-
 xen/arch/arm/setup.c                               |    26 +-
 xen/arch/arm/shutdown.c                            |     4 +
 xen/arch/arm/smpboot.c                             |    27 +-
 xen/arch/arm/time.c                                |   100 +-
 xen/arch/arm/traps.c                               |   839 +-
 xen/arch/arm/vgic-v2.c                             |   155 +-
 xen/arch/arm/vgic-v3.c                             |   624 +-
 xen/arch/arm/vgic.c                                |   199 +-
 xen/arch/arm/vpsci.c                               |     8 +-
 xen/arch/arm/vtimer.c                              |   140 +-
 xen/arch/arm/vtimer.h                              |     3 +-
 xen/arch/arm/vuart.c                               |     5 +
 xen/arch/x86/Makefile                              |     2 +
 xen/arch/x86/Rules.mk                              |    16 +-
 xen/arch/x86/acpi/boot.c                           |     4 +-
 xen/arch/x86/acpi/cpu_idle.c                       |   168 +-
 xen/arch/x86/acpi/cpufreq/cpufreq.c                |     3 +-
 xen/arch/x86/acpi/cpufreq/powernow.c               |     3 +-
 xen/arch/x86/acpi/cpuidle_menu.c                   |     3 +-
 xen/arch/x86/acpi/lib.c                            |     3 +-
 xen/arch/x86/alternative.c                         |     3 +-
 xen/arch/x86/apic.c                                |    40 +-
 xen/arch/x86/bitops.c                              |     2 +-
 xen/arch/x86/boot/head.S                           |    28 +-
 xen/arch/x86/boot/reloc.c                          |     1 -
 xen/arch/x86/boot/x86_64.S                         |    20 +
 xen/arch/x86/compat.c                              |    25 +-
 xen/arch/x86/cpu/Makefile                          |     1 +
 xen/arch/x86/cpu/amd.c                             |     2 +-
 xen/arch/x86/cpu/centaur.c                         |     2 +-
 xen/arch/x86/cpu/common.c                          |    68 +-
 xen/arch/x86/cpu/cpu.h                             |     2 +-
 xen/arch/x86/cpu/intel.c                           |     2 +-
 xen/arch/x86/cpu/mcheck/amd_nonfatal.c             |     3 +-
 xen/arch/x86/cpu/mcheck/mce-apei.c                 |     3 +-
 xen/arch/x86/cpu/mcheck/mce.c                      |    10 +-
 xen/arch/x86/cpu/mcheck/mce_amd.c                  |     3 +-
 xen/arch/x86/cpu/mcheck/mce_intel.c                |    22 +-
 xen/arch/x86/cpu/mcheck/mce_quirks.h               |     3 +-
 xen/arch/x86/cpu/mcheck/mctelem.c                  |     3 +-
 xen/arch/x86/cpu/mcheck/vmce.c                     |     3 +-
 xen/arch/x86/cpu/mcheck/x86_mca.h                  |     5 +-
 xen/arch/x86/cpu/mtrr/generic.c                    |    12 +
 xen/arch/x86/cpu/mtrr/main.c                       |     4 +-
 xen/arch/x86/cpu/mwait-idle.c                      |    91 +-
 xen/arch/x86/cpu/vpmu.c                            |   817 ++
 xen/arch/x86/{hvm/svm/vpmu.c => cpu/vpmu_amd.c}    |   347 +-
 .../x86/{hvm/vmx/vpmu_core2.c => cpu/vpmu_intel.c} |   888 +-
 xen/arch/x86/crash.c                               |     9 +-
 xen/arch/x86/debug.c                               |    59 +-
 xen/arch/x86/delay.c                               |     4 +-
 xen/arch/x86/dmi_scan.c                            |   344 +-
 xen/arch/x86/domain.c                              |   355 +-
 xen/arch/x86/domain_build.c                        |   282 +-
 xen/arch/x86/domain_page.c                         |    59 +-
 xen/arch/x86/domctl.c                              |   679 +-
 xen/arch/x86/e820.c                                |    47 +-
 xen/arch/x86/efi/efi-boot.h                        |    25 +-
 xen/arch/x86/efi/runtime.h                         |     7 +
 xen/arch/x86/efi/stub.c                            |     5 +-
 xen/arch/x86/gdbstub.c                             |     3 +-
 xen/arch/x86/genapic/x2apic.c                      |     3 +-
 xen/arch/x86/hpet.c                                |     9 +-
 xen/arch/x86/hvm/Makefile                          |     2 +-
 xen/arch/x86/hvm/asid.c                            |     3 +-
 xen/arch/x86/hvm/emulate.c                         |  1011 +-
 xen/arch/x86/hvm/event.c                           |   189 +
 xen/arch/x86/hvm/hpet.c                            |    35 +-
 xen/arch/x86/hvm/hvm.c                             |  1992 ++--
 xen/arch/x86/hvm/i8254.c                           |     8 +-
 xen/arch/x86/hvm/intercept.c                       |   533 +-
 xen/arch/x86/hvm/io.c                              |   286 +-
 xen/arch/x86/hvm/irq.c                             |    11 +-
 xen/arch/x86/hvm/mtrr.c                            |     9 +-
 xen/arch/x86/hvm/nestedhvm.c                       |     3 +-
 xen/arch/x86/hvm/pmtimer.c                         |    17 +-
 xen/arch/x86/hvm/quirks.c                          |     3 +-
 xen/arch/x86/hvm/rtc.c                             |     2 +-
 xen/arch/x86/hvm/save.c                            |     7 +-
 xen/arch/x86/hvm/stdvga.c                          |   217 +-
 xen/arch/x86/hvm/svm/Makefile                      |     1 -
 xen/arch/x86/hvm/svm/asid.c                        |     3 +-
 xen/arch/x86/hvm/svm/emulate.c                     |     5 +-
 xen/arch/x86/hvm/svm/entry.S                       |     3 +-
 xen/arch/x86/hvm/svm/intr.c                        |     3 +-
 xen/arch/x86/hvm/svm/nestedsvm.c                   |    57 +-
 xen/arch/x86/hvm/svm/svm.c                         |    31 +-
 xen/arch/x86/hvm/svm/svmdebug.c                    |     3 +-
 xen/arch/x86/hvm/svm/vmcb.c                        |     5 +-
 xen/arch/x86/hvm/vioapic.c                         |    75 +-
 xen/arch/x86/hvm/viridian.c                        |   115 +-
 xen/arch/x86/hvm/vlapic.c                          |   175 +-
 xen/arch/x86/hvm/vmsi.c                            |   179 +-
 xen/arch/x86/hvm/vmx/Makefile                      |     1 -
 xen/arch/x86/hvm/vmx/entry.S                       |     3 +-
 xen/arch/x86/hvm/vmx/intr.c                        |     3 +-
 xen/arch/x86/hvm/vmx/realmode.c                    |    29 +-
 xen/arch/x86/hvm/vmx/vmcs.c                        |   620 +-
 xen/arch/x86/hvm/vmx/vmx.c                         |   409 +-
 xen/arch/x86/hvm/vmx/vvmx.c                        |   131 +-
 xen/arch/x86/hvm/vpic.c                            |     6 +-
 xen/arch/x86/hvm/vpmu.c                            |   299 -
 xen/arch/x86/hvm/vpt.c                             |     3 +-
 xen/arch/x86/i387.c                                |    10 +-
 xen/arch/x86/io_apic.c                             |    34 +-
 xen/arch/x86/irq.c                                 |    49 +-
 xen/arch/x86/microcode.c                           |     6 +-
 xen/arch/x86/microcode_amd.c                       |    57 +-
 xen/arch/x86/microcode_intel.c                     |    15 +-
 xen/arch/x86/mm.c                                  |   355 +-
 xen/arch/x86/mm/Makefile                           |     1 +
 xen/arch/x86/mm/altp2m.c                           |    76 +
 xen/arch/x86/mm/guest_walk.c                       |     9 +-
 xen/arch/x86/mm/hap/guest_walk.c                   |     9 +-
 xen/arch/x86/mm/hap/hap.c                          |   112 +-
 xen/arch/x86/mm/hap/nested_ept.c                   |     7 +-
 xen/arch/x86/mm/hap/nested_hap.c                   |     7 +-
 xen/arch/x86/mm/hap/private.h                      |     3 +-
 xen/arch/x86/mm/mem_paging.c                       |    64 +-
 xen/arch/x86/mm/mem_sharing.c                      |   187 +-
 xen/arch/x86/mm/mm-locks.h                         |    65 +-
 xen/arch/x86/mm/p2m-ept.c                          |   173 +-
 xen/arch/x86/mm/p2m-pod.c                          |    27 +-
 xen/arch/x86/mm/p2m-pt.c                           |   158 +-
 xen/arch/x86/mm/p2m.c                              |  1079 +-
 xen/arch/x86/mm/paging.c                           |   105 +-
 xen/arch/x86/mm/shadow/Makefile                    |     6 +-
 xen/arch/x86/mm/shadow/common.c                    |   996 +-
 xen/arch/x86/mm/shadow/multi.c                     |  1431 +--
 xen/arch/x86/mm/shadow/multi.h                     |    67 +-
 xen/arch/x86/mm/shadow/none.c                      |    78 +
 xen/arch/x86/mm/shadow/private.h                   |   316 +-
 xen/arch/x86/mm/shadow/types.h                     |    45 +-
 xen/arch/x86/monitor.c                             |   217 +
 xen/arch/x86/mpparse.c                             |    19 +-
 xen/arch/x86/msi.c                                 |   474 +-
 xen/arch/x86/nmi.c                                 |     4 +-
 xen/arch/x86/numa.c                                |    86 +-
 xen/arch/x86/oprofile/op_model_ppro.c              |     8 +-
 xen/arch/x86/pci.c                                 |    25 +
 xen/arch/x86/physdev.c                             |   112 +-
 xen/arch/x86/platform_hypercall.c                  |    92 +-
 xen/arch/x86/psr.c                                 |   494 +-
 xen/arch/x86/setup.c                               |   150 +-
 xen/arch/x86/shutdown.c                            |    18 +-
 xen/arch/x86/smp.c                                 |     2 +-
 xen/arch/x86/smpboot.c                             |   147 +-
 xen/arch/x86/srat.c                                |   194 +-
 xen/arch/x86/string.c                              |     2 +-
 xen/arch/x86/sysctl.c                              |    24 +-
 xen/arch/x86/tboot.c                               |    23 +-
 xen/arch/x86/time.c                                |    71 +-
 xen/arch/x86/trace.c                               |    12 +-
 xen/arch/x86/traps.c                               |   413 +-
 xen/arch/x86/vm_event.c                            |   117 +
 xen/arch/x86/x86_64/acpi_mmcfg.c                   |     3 +-
 xen/arch/x86/x86_64/compat/entry.S                 |    19 +-
 xen/arch/x86/x86_64/compat/mm.c                    |    25 +-
 xen/arch/x86/x86_64/compat/traps.c                 |     4 +-
 xen/arch/x86/x86_64/cpu_idle.c                     |     3 +-
 xen/arch/x86/x86_64/cpufreq.c                      |     3 +-
 xen/arch/x86/x86_64/entry.S                        |    29 +-
 xen/arch/x86/x86_64/gdbstub.c                      |     3 +-
 xen/arch/x86/x86_64/mm.c                           |   107 +-
 xen/arch/x86/x86_64/mmconfig.h                     |     3 +-
 xen/arch/x86/x86_64/mmconfig_64.c                  |    63 +-
 xen/arch/x86/x86_64/traps.c                        |   123 +-
 xen/arch/x86/x86_emulate.c                         |    16 +
 xen/arch/x86/x86_emulate/x86_emulate.c             |   187 +-
 xen/arch/x86/x86_emulate/x86_emulate.h             |    42 +-
 xen/arch/x86/xen.lds.S                             |    11 +-
 xen/common/Makefile                                |    22 +-
 xen/common/compat/domain.c                         |     7 +-
 xen/common/compat/kernel.c                         |     5 +
 xen/common/compat/memory.c                         |    65 +
 xen/common/compat/tmem_xen.c                       |     4 +-
 xen/common/core_parking.c                          |    20 +-
 xen/common/cpu.c                                   |     6 +-
 xen/common/cpupool.c                               |   131 +-
 xen/common/device_tree.c                           |   405 +-
 xen/common/domain.c                                |    78 +-
 xen/common/domctl.c                                |   218 +-
 xen/common/earlycpio.c                             |    39 +-
 xen/common/efi/boot.c                              |   101 +-
 xen/common/efi/runtime.c                           |    11 +-
 xen/common/event_channel.c                         |   247 +-
 xen/common/event_fifo.c                            |     6 +-
 xen/common/gdbstub.c                               |     3 +-
 xen/common/grant_table.c                           |  1181 ++-
 xen/common/guestcopy.c                             |    31 +
 xen/common/hvm/save.c                              |     5 +-
 xen/common/kernel.c                                |    28 +-
 xen/common/kexec.c                                 |    42 +-
 xen/common/keyhandler.c                            |     6 +-
 xen/common/kimage.c                                |    27 +-
 xen/common/lib.c                                   |     4 +
 xen/common/libelf/libelf-dominfo.c                 |     9 +-
 xen/common/libelf/libelf-loader.c                  |     3 +-
 xen/common/libelf/libelf-private.h                 |     7 +-
 xen/common/libelf/libelf-tools.c                   |     3 +-
 xen/common/libfdt/fdt.c                            |     4 +-
 xen/common/libfdt/fdt_empty_tree.c                 |     4 +-
 xen/common/libfdt/fdt_ro.c                         |     4 +-
 xen/common/libfdt/fdt_rw.c                         |     4 +-
 xen/common/libfdt/fdt_strerror.c                   |     4 +-
 xen/common/libfdt/fdt_sw.c                         |     4 +-
 xen/common/libfdt/fdt_wip.c                        |     4 +-
 xen/common/libfdt/libfdt_internal.h                |     4 +-
 xen/common/mem_access.c                            |    62 +-
 xen/common/mem_event.c                             |   742 --
 xen/common/memory.c                                |   200 +-
 xen/common/page_alloc.c                            |    71 +-
 xen/common/pdx.c                                   |     3 +-
 xen/common/perfc.c                                 |     4 +-
 xen/common/preempt.c                               |     3 +-
 xen/common/radix-tree.c                            |     3 +-
 xen/common/random.c                                |    10 +
 xen/common/rangeset.c                              |    16 +-
 xen/common/rbtree.c                                |     3 +-
 xen/common/rcupdate.c                              |     3 +-
 xen/common/sched_arinc653.c                        |     6 +-
 xen/common/sched_credit.c                          |   116 +-
 xen/common/sched_credit2.c                         |   112 +-
 xen/common/sched_rt.c                              |   130 +-
 xen/common/sched_sedf.c                            |  1541 ---
 xen/common/schedule.c                              |   301 +-
 xen/common/shutdown.c                              |    24 +-
 xen/common/softirq.c                               |     6 +-
 xen/common/spinlock.c                              |   144 +-
 xen/common/stop_machine.c                          |     3 +-
 xen/common/symbols.c                               |    56 +-
 xen/common/sysctl.c                                |   212 +-
 xen/common/time.c                                  |     3 +-
 xen/common/tmem.c                                  |   477 +-
 xen/common/tmem_xen.c                              |     6 +-
 xen/common/unlzma.c                                |     3 +-
 xen/common/unlzo.c                                 |     3 +-
 xen/common/vm_event.c                              |   772 ++
 xen/common/vmap.c                                  |    79 +-
 xen/common/vsprintf.c                              |    11 +-
 xen/common/wait.c                                  |     3 +-
 xen/common/xencomm.c                               |   621 --
 xen/common/xenoprof.c                              |     2 +-
 xen/common/xmalloc_tlsf.c                          |     6 +-
 xen/common/xz/dec_lzma2.c                          |     4 +
 xen/drivers/acpi/apei/apei-base.c                  |     3 +-
 xen/drivers/acpi/apei/apei-io.c                    |     3 +-
 xen/drivers/acpi/apei/erst.c                       |     3 +-
 xen/drivers/acpi/apei/hest.c                       |     3 +-
 xen/drivers/acpi/numa.c                            |     3 +-
 xen/drivers/acpi/osl.c                             |     8 +-
 xen/drivers/acpi/pmstat.c                          |     3 +-
 xen/drivers/acpi/tables.c                          |     3 +-
 xen/drivers/char/Makefile                          |     2 +
 xen/drivers/char/cadence-uart.c                    |   224 +
 xen/drivers/char/console.c                         |    15 -
 xen/drivers/char/dt-uart.c                         |    43 +-
 xen/drivers/char/exynos4210-uart.c                 |     8 +-
 xen/drivers/char/ns16550.c                         |    12 +-
 xen/drivers/char/omap-uart.c                       |     8 +-
 xen/drivers/char/pl011.c                           |     8 +-
 xen/drivers/char/scif-uart.c                       |   367 +
 xen/drivers/cpufreq/cpufreq.c                      |     3 +-
 xen/drivers/passthrough/amd/iommu_acpi.c           |     3 +-
 xen/drivers/passthrough/amd/iommu_cmd.c            |     3 +-
 xen/drivers/passthrough/amd/iommu_detect.c         |     3 +-
 xen/drivers/passthrough/amd/iommu_guest.c          |    51 +-
 xen/drivers/passthrough/amd/iommu_init.c           |     7 +-
 xen/drivers/passthrough/amd/iommu_intr.c           |    13 +-
 xen/drivers/passthrough/amd/iommu_map.c            |    35 +-
 xen/drivers/passthrough/amd/pci_amd_iommu.c        |     6 +-
 xen/drivers/passthrough/arm/iommu.c                |     7 +-
 xen/drivers/passthrough/arm/smmu.c                 |  4096 +++++---
 xen/drivers/passthrough/ats.h                      |     3 +-
 xen/drivers/passthrough/device_tree.c              |   138 +-
 xen/drivers/passthrough/io.c                       |   297 +-
 xen/drivers/passthrough/iommu.c                    |    53 +-
 xen/drivers/passthrough/pci.c                      |   148 +-
 xen/drivers/passthrough/vtd/dmar.c                 |    79 +-
 xen/drivers/passthrough/vtd/dmar.h                 |     4 +-
 xen/drivers/passthrough/vtd/extern.h               |     4 +-
 xen/drivers/passthrough/vtd/intremap.c             |     3 +-
 xen/drivers/passthrough/vtd/iommu.c                |   124 +-
 xen/drivers/passthrough/vtd/iommu.h                |    19 +-
 xen/drivers/passthrough/vtd/qinval.c               |     3 +-
 xen/drivers/passthrough/vtd/quirks.c               |    16 +-
 xen/drivers/passthrough/vtd/utils.c                |    10 +-
 xen/drivers/passthrough/vtd/vtd.h                  |     3 +-
 xen/drivers/passthrough/vtd/x86/ats.c              |     3 +-
 xen/drivers/passthrough/vtd/x86/vtd.c              |     5 +-
 xen/drivers/passthrough/x86/ats.c                  |     3 +-
 xen/drivers/passthrough/x86/iommu.c                |    25 +-
 xen/include/Makefile                               |    32 +-
 xen/include/asm-arm/arm32/bitops.h                 |     2 +
 xen/include/asm-arm/arm32/page.h                   |     7 +-
 xen/include/asm-arm/arm32/spinlock.h               |    66 -
 xen/include/asm-arm/arm64/bitops.h                 |    11 +
 xen/include/asm-arm/arm64/page.h                   |     7 +-
 xen/include/asm-arm/arm64/spinlock.h               |    63 -
 xen/include/asm-arm/atomic.h                       |    26 +
 xen/include/asm-arm/bitops.h                       |    38 +-
 xen/include/asm-arm/cadence-uart.h                 |    55 +
 xen/include/asm-arm/config.h                       |     9 +-
 xen/include/asm-arm/cpregs.h                       |    10 +-
 xen/include/asm-arm/device.h                       |    48 +-
 xen/include/asm-arm/domain.h                       |    64 +-
 xen/include/asm-arm/gic.h                          |    48 +-
 xen/include/asm-arm/gic_v3_defs.h                  |    11 +-
 xen/include/asm-arm/grant_table.h                  |     3 +-
 xen/include/asm-arm/hypercall.h                    |     2 +-
 xen/include/asm-arm/iommu.h                        |     3 +-
 xen/include/asm-arm/irq.h                          |    11 +-
 xen/include/asm-arm/mm.h                           |     9 +-
 xen/include/asm-arm/monitor.h                      |    33 +
 xen/include/asm-arm/numa.h                         |     4 +-
 xen/include/asm-arm/p2m.h                          |    61 +-
 xen/include/asm-arm/page.h                         |     9 +-
 xen/include/asm-arm/perfc.h                        |    21 +
 xen/include/asm-arm/perfc_defn.h                   |    83 +
 xen/include/asm-arm/platform.h                     |    18 +-
 xen/include/asm-arm/processor.h                    |    23 +-
 xen/include/asm-arm/scif-uart.h                    |   107 +
 xen/include/asm-arm/setup.h                        |     2 -
 xen/include/asm-arm/spinlock.h                     |    19 +-
 xen/include/asm-arm/sysregs.h                      |    12 +-
 xen/include/asm-arm/system.h                       |     5 +
 xen/include/asm-arm/time.h                         |     8 +
 xen/include/asm-arm/vgic.h                         |    63 +-
 xen/include/asm-arm/vm_event.h                     |    50 +
 xen/include/asm-x86/acpi.h                         |     3 +-
 xen/include/asm-x86/alternative.h                  |    21 +
 xen/include/asm-x86/altp2m.h                       |    37 +
 xen/include/asm-x86/amd-iommu.h                    |     3 +-
 xen/include/asm-x86/apic.h                         |     1 -
 xen/include/asm-x86/asm_defns.h                    |    13 +-
 xen/include/asm-x86/atomic.h                       |    69 +-
 xen/include/asm-x86/bitops.h                       |   126 +-
 xen/include/asm-x86/bug.h                          |    50 +-
 xen/include/asm-x86/config.h                       |    51 +-
 xen/include/asm-x86/cpufeature.h                   |    13 +-
 xen/include/asm-x86/cpuidle.h                      |     2 +
 xen/include/asm-x86/current.h                      |    33 +-
 xen/include/asm-x86/debugger.h                     |     7 +-
 xen/include/asm-x86/debugreg.h                     |     2 +
 xen/include/asm-x86/desc.h                         |    12 +-
 xen/include/asm-x86/device.h                       |    25 +
 xen/include/asm-x86/domain.h                       |   121 +-
 xen/include/asm-x86/fixmap.h                       |     2 +
 xen/include/asm-x86/guest_pt.h                     |    12 +-
 xen/include/asm-x86/hap.h                          |    20 +-
 xen/include/asm-x86/hpet.h                         |     1 +
 xen/include/asm-x86/hvm/asid.h                     |     3 +-
 xen/include/asm-x86/hvm/domain.h                   |    10 +-
 xen/include/asm-x86/hvm/emulate.h                  |    27 +-
 xen/include/asm-x86/hvm/event.h                    |    45 +
 xen/include/asm-x86/hvm/hvm.h                      |   121 +-
 xen/include/asm-x86/hvm/io.h                       |   151 +-
 xen/include/asm-x86/hvm/iommu.h                    |     2 +
 xen/include/asm-x86/hvm/irq.h                      |     3 +-
 xen/include/asm-x86/hvm/nestedhvm.h                |     3 +-
 xen/include/asm-x86/hvm/support.h                  |    12 +-
 xen/include/asm-x86/hvm/svm/amd-iommu-defs.h       |     5 +-
 xen/include/asm-x86/hvm/svm/amd-iommu-proto.h      |     3 +-
 xen/include/asm-x86/hvm/svm/asid.h                 |     3 +-
 xen/include/asm-x86/hvm/svm/emulate.h              |     3 +-
 xen/include/asm-x86/hvm/svm/intr.h                 |     3 +-
 xen/include/asm-x86/hvm/svm/nestedsvm.h            |    14 +-
 xen/include/asm-x86/hvm/svm/svm.h                  |     3 +-
 xen/include/asm-x86/hvm/svm/svmdebug.h             |     3 +-
 xen/include/asm-x86/hvm/svm/vmcb.h                 |     3 +-
 xen/include/asm-x86/hvm/vcpu.h                     |    70 +-
 xen/include/asm-x86/hvm/vioapic.h                  |     6 +-
 xen/include/asm-x86/hvm/viridian.h                 |    25 +
 xen/include/asm-x86/hvm/vlapic.h                   |     5 +-
 xen/include/asm-x86/hvm/vmx/vmcs.h                 |   101 +-
 xen/include/asm-x86/hvm/vmx/vmx.h                  |    26 +-
 xen/include/asm-x86/hvm/vmx/vpmu_core2.h           |    51 -
 xen/include/asm-x86/hvm/vmx/vvmx.h                 |     9 +-
 xen/include/asm-x86/hvm/vpt.h                      |     3 +-
 xen/include/asm-x86/iommu.h                        |     3 +-
 xen/include/asm-x86/irq.h                          |     3 +-
 xen/include/asm-x86/ldt.h                          |     2 +-
 xen/include/asm-x86/mem_paging.h                   |     8 +-
 xen/include/asm-x86/mem_sharing.h                  |     7 +-
 xen/include/asm-x86/microcode.h                    |     9 +-
 xen/include/asm-x86/mm.h                           |    49 +-
 xen/include/asm-x86/monitor.h                      |    31 +
 xen/include/asm-x86/msi.h                          |    22 +-
 xen/include/asm-x86/msr-index.h                    |     2 +
 xen/include/asm-x86/msr.h                          |    15 +-
 xen/include/asm-x86/mtrr.h                         |     3 +-
 xen/include/asm-x86/multicall.h                    |    10 +-
 xen/include/asm-x86/numa.h                         |    26 +-
 xen/include/asm-x86/p2m.h                          |   203 +-
 xen/include/asm-x86/page.h                         |    24 +-
 xen/include/asm-x86/paging.h                       |    14 +-
 xen/include/asm-x86/pci.h                          |    13 +
 xen/include/asm-x86/perfc_defn.h                   |     2 +
 xen/include/asm-x86/processor.h                    |    87 +-
 xen/include/asm-x86/psr.h                          |    13 +-
 xen/include/asm-x86/setup.h                        |     4 +-
 xen/include/asm-x86/shadow.h                       |    54 +-
 xen/include/asm-x86/smp.h                          |    14 +-
 xen/include/asm-x86/softirq.h                      |     3 +-
 xen/include/asm-x86/spinlock.h                     |    31 +-
 xen/include/asm-x86/system.h                       |    73 +-
 xen/include/asm-x86/time.h                         |     4 +-
 xen/include/asm-x86/traps.h                        |     7 +-
 xen/include/asm-x86/vm_event.h                     |    33 +
 xen/include/asm-x86/{hvm => }/vpmu.h               |   105 +-
 xen/include/asm-x86/x86_64/page.h                  |    16 +-
 xen/include/asm-x86/xenoprof.h                     |     3 +-
 xen/include/efi/efidef.h                           |     6 +-
 xen/include/public/arch-arm.h                      |    60 +-
 xen/include/public/arch-x86/cpuid.h                |     5 +-
 xen/include/public/arch-x86/hvm/save.h             |    11 +
 xen/include/public/arch-x86/pmu.h                  |   167 +
 xen/include/public/arch-x86/xen-x86_32.h           |     1 +
 xen/include/public/arch-x86/xen.h                  |    50 +-
 xen/include/public/domctl.h                        |   273 +-
 xen/include/public/errno.h                         |    95 +
 xen/include/public/features.h                      |     3 +
 xen/include/public/grant_table.h                   |    10 +-
 xen/include/public/hvm/e820.h                      |     3 +-
 xen/include/public/hvm/hvm_info_table.h            |     2 +
 xen/include/public/hvm/hvm_op.h                    |   120 +
 xen/include/public/hvm/hvm_xs_strings.h            |     2 +
 xen/include/public/hvm/ioreq.h                     |    13 +-
 xen/include/public/hvm/params.h                    |    25 +-
 xen/include/public/io/blkif.h                      |     6 +
 xen/include/public/io/libxenvchan.h                |     3 +-
 xen/include/public/io/netif.h                      |   160 +-
 xen/include/public/io/protocols.h                  |     2 +
 xen/include/public/io/ring.h                       |     4 +-
 xen/include/public/io/usbif.h                      |   140 +-
 xen/include/public/mem_event.h                     |   134 -
 xen/include/public/memory.h                        |    66 +-
 xen/include/public/physdev.h                       |    12 +-
 xen/include/public/platform.h                      |    89 +-
 xen/include/public/pmu.h                           |   133 +
 xen/include/public/sysctl.h                        |   213 +-
 xen/include/public/tmem.h                          |    58 +-
 xen/include/public/trace.h                         |     2 +-
 xen/include/public/vcpu.h                          |     2 +-
 xen/include/public/vm_event.h                      |   269 +
 xen/include/public/xen-compat.h                    |     2 +-
 xen/include/public/xen.h                           |    44 +-
 xen/include/public/xsm/flask_op.h                  |    11 +
 xen/include/xen/acpi.h                             |     3 +-
 xen/include/xen/bitops.h                           |    40 +-
 xen/include/xen/config.h                           |    18 +-
 xen/include/xen/cper.h                             |     3 +-
 xen/include/xen/cpuidle.h                          |     4 +-
 xen/include/xen/cpumask.h                          |    24 +-
 xen/include/xen/device_tree.h                      |    75 +-
 xen/include/xen/dmi.h                              |     4 +-
 xen/include/xen/domain.h                           |     6 +-
 xen/include/xen/domain_page.h                      |    45 +-
 xen/include/xen/earlycpio.h                        |     1 +
 xen/include/xen/efi.h                              |     3 +-
 xen/include/xen/errno.h                            |   143 +-
 xen/include/xen/event.h                            |    16 +-
 xen/include/xen/gdbstub.h                          |     3 +-
 xen/include/xen/grant_table.h                      |    28 +-
 xen/include/xen/guest_access.h                     |     5 +
 xen/include/xen/hvm/iommu.h                        |     3 +-
 xen/include/xen/hvm/irq.h                          |     7 +-
 xen/include/xen/hvm/save.h                         |     3 +-
 xen/include/xen/hypercall.h                        |    13 +-
 xen/include/xen/inttypes.h                         |     4 +-
 xen/include/xen/iommu.h                            |    41 +-
 xen/include/xen/irq.h                              |     4 +
 xen/include/xen/kexec.h                            |     4 +-
 xen/include/xen/lib.h                              |    38 +-
 xen/include/xen/libfdt/fdt.h                       |     4 +-
 xen/include/xen/libfdt/libfdt.h                    |     4 +-
 xen/include/xen/list.h                             |    60 +
 xen/include/xen/mem_access.h                       |    21 +-
 xen/include/xen/mem_event.h                        |   143 -
 xen/include/xen/mm.h                               |   121 +-
 xen/include/xen/multiboot.h                        |     3 +-
 xen/include/xen/numa.h                             |     3 +-
 xen/include/xen/p2m-common.h                       |    17 +-
 xen/include/xen/paging.h                           |     2 +-
 xen/include/xen/pci.h                              |    16 +-
 xen/include/xen/perfc_defn.h                       |    29 +-
 xen/include/xen/radix-tree.h                       |     3 +-
 xen/include/xen/random.h                           |     3 +
 xen/include/xen/rangeset.h                         |    12 +-
 xen/include/xen/rbtree.h                           |     3 +-
 xen/include/xen/rcupdate.h                         |     3 +-
 xen/include/xen/sched-if.h                         |     1 -
 xen/include/xen/sched.h                            |   106 +-
 xen/include/xen/shared.h                           |     6 +-
 xen/include/xen/spinlock.h                         |    18 +-
 xen/include/xen/symbols.h                          |     3 +
 xen/include/xen/time.h                             |     4 +-
 xen/include/xen/tmem.h                             |     3 +
 xen/include/xen/tmem_xen.h                         |     6 +-
 xen/include/xen/typesafe.h                         |    46 +
 xen/include/xen/vm_event.h                         |    87 +
 xen/include/xen/vmap.h                             |     9 +-
 xen/include/xen/xencomm.h                          |   170 -
 xen/include/xlat.lst                               |    13 +-
 xen/include/xsm/dummy.h                            |   105 +-
 xen/include/xsm/xsm.h                              |   116 +-
 xen/xsm/dummy.c                                    |    27 +-
 xen/xsm/flask/Makefile                             |     2 +-
 xen/xsm/flask/avc.c                                |     5 +-
 xen/xsm/flask/flask_op.c                           |   120 +-
 xen/xsm/flask/hooks.c                              |   283 +-
 xen/xsm/flask/include/avc.h                        |     8 +-
 xen/xsm/flask/include/security.h                   |    29 +-
 xen/xsm/flask/policy/access_vectors                |    43 +-
 xen/xsm/flask/policy/initial_sids                  |     2 +
 xen/xsm/flask/policy/mkaccess_vector.sh            |     6 +-
 xen/xsm/flask/policy/mkflask.sh                    |    11 +-
 xen/xsm/flask/ss/policydb.c                        |   141 +-
 xen/xsm/flask/ss/policydb.h                        |     7 +-
 xen/xsm/flask/ss/services.c                        |   118 +-
 1349 files changed, 70059 insertions(+), 64253 deletions(-)

diff --cc debian/.git-dpm
index 331bcde,0000000..2db5360
mode 100644,000000..100644
--- a/debian/.git-dpm
+++ b/debian/.git-dpm
@@@ -1,8 -1,0 +1,8 @@@
 +# see git-dpm(1) from git-dpm package
- d54d80e8d4668b6f7a0c161f6868eab43c0a0d9b
- d54d80e8d4668b6f7a0c161f6868eab43c0a0d9b
- 9245d82e421a7ce0f7387b7c1b8185088769ddb3
++b00b02f0283fa7536ab44264a21c2dcdaa22d631
++b00b02f0283fa7536ab44264a21c2dcdaa22d631
++9fafe903bcadf774d3eb5fbef4666166aa876d2d
 +9fafe903bcadf774d3eb5fbef4666166aa876d2d
 +xen_4.6.0.orig.tar.xz
 +3a298ab580a62dd4ffbe63567d4114f9c36d570c
 +3525684
diff --cc debian/patches/config-prefix.diff
index 7ce99e7,0000000..eabfe50
mode 100644,000000..100644
--- a/debian/patches/config-prefix.diff
+++ b/debian/patches/config-prefix.diff
@@@ -1,47 -1,0 +1,51 @@@
- From e36cf5d946d4b1422c3f00450089395c8c70fdb5 Mon Sep 17 00:00:00 2001
++From a8f7ae30f31b8332e7a802c3b26f520e2a465ece Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:45 +0200
 +Subject: config-prefix.diff
 +
 +Patch-Name: config-prefix.diff
 +---
 + Config.mk          | 2 +-
-  config/Paths.mk.in | 5 +++--
-  2 files changed, 4 insertions(+), 3 deletions(-)
++ config/Paths.mk.in | 9 +++++++--
++ 2 files changed, 8 insertions(+), 3 deletions(-)
 +
 +diff --git a/Config.mk b/Config.mk
- index b9a89a1..a604aca 100644
++index 54fbb9d..675bc18 100644
 +--- a/Config.mk
 ++++ b/Config.mk
 +@@ -75,7 +75,7 @@ EXTRA_LIB += $(EXTRA_PREFIX)/lib
 + endif
 + 
 + PYTHON      ?= python
- -PYTHON_PREFIX_ARG ?= --prefix="$(PREFIX)"
++-PYTHON_PREFIX_ARG ?= --prefix="$(prefix)"
 ++PYTHON_PREFIX_ARG ?= --home="$(LIBEXEC)"
-  # The above requires that PREFIX contains *no spaces*. This variable is here
++ # The above requires that prefix contains *no spaces*. This variable is here
 + # to permit the user to set PYTHON_PREFIX_ARG to '' to workaround this bug:
 + #  https://bugs.launchpad.net/ubuntu/+bug/362570
 +diff --git a/config/Paths.mk.in b/config/Paths.mk.in
- index fe10f76..c3b9200 100644
++index d36504f..c3b043f 100644
 +--- a/config/Paths.mk.in
 ++++ b/config/Paths.mk.in
 +@@ -13,6 +13,7 @@
 + # http://wiki.xen.org/wiki/Category:Host_Configuration#System_wide_xen_configuration
 + 
 + PACKAGE_TARNAME          := @PACKAGE_TARNAME@
 ++PACKAGE_VERSION          := @PACKAGE_VERSION@
 + prefix                   := @prefix@
 + bindir                   := @bindir@
 + sbindir                  := @sbindir@
- @@ -33,8 +34,8 @@ PREFIX                   := $(prefix)
++@@ -29,8 +30,12 @@ includedir               := @includedir@
++ localstatedir            := @localstatedir@
++ sysconfdir               := @sysconfdir@
 + 
-  SBINDIR                  := $(sbindir)
-  BINDIR                   := $(bindir)
 +-LIBEXEC                  := $(libexecdir)/$(PACKAGE_TARNAME)
 +-LIBEXEC_BIN              := @LIBEXEC_BIN@
+++PREFIX                   := $(prefix)
+++
+++SBINDIR                  := $(sbindir)
+++BINDIR                   := $(bindir)
 ++LIBEXEC                  := $(libexecdir)/$(PACKAGE_TARNAME)-$(PACKAGE_VERSION)
 ++LIBEXEC_BIN              := $(LIBEXEC)/bin
 + LIBEXEC_LIB              := $(LIBEXEC)/lib
 + LIBEXEC_INC              := $(LIBEXEC)/include
 + 
diff --cc debian/patches/series
index 85657a5,0000000..d45d432
mode 100644,000000..100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@@ -1,27 -1,0 +1,25 @@@
 +version.diff
 +config-prefix.diff
 +tools-libfsimage-abiname.diff
 +tools-libxc-abiname.diff
 +tools-libxl-abiname.diff
 +tools-xenstat-abiname.diff
 +tools-rpath.diff
 +tools-blktap2-prefix.diff
 +tools-console-prefix.diff
 +tools-libfsimage-prefix.diff
 +tools-libxl-prefix.diff
 +tools-misc-prefix.diff
 +tools-pygrub-prefix.diff
 +tools-python-prefix.diff
 +tools-xcutils-rpath.diff
 +tools-xenmon-prefix.diff
 +tools-xenpaging-prefix.diff
 +tools-xenpmd-prefix.diff
 +tools-xenstat-prefix.diff
 +tools-xenstore-prefix.diff
 +tools-xentrace-prefix.diff
 +tools-pygrub-remove-static-solaris-support
 +tools-include-install.diff
 +tools-xenmon-install.diff
- tools-hotplug-udevrules.diff
 +tools-xenstore-compatibility.diff
- xl-coredumps-to-var-lib-xen-dump.diff
diff --cc debian/patches/tools-blktap2-prefix.diff
index e967927,0000000..184a48e
mode 100644,000000..100644
--- a/debian/patches/tools-blktap2-prefix.diff
+++ b/debian/patches/tools-blktap2-prefix.diff
@@@ -1,154 -1,0 +1,154 @@@
- From 6c4f6b7cf74c6a5f93b894096e8042c8bb64a64c Mon Sep 17 00:00:00 2001
++From 85fba7aaa37170064971807e1209b119b6b9cf0e Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:53 +0200
 +Subject: tools-blktap2-prefix.diff
 +
 +Patch-Name: tools-blktap2-prefix.diff
 +---
 + tools/blktap2/control/Makefile | 26 ++++++++------------------
 + tools/blktap2/vhd/Makefile     |  1 +
 + tools/blktap2/vhd/lib/Makefile | 29 +++++++++--------------------
 + 3 files changed, 18 insertions(+), 38 deletions(-)
 +
 +diff --git a/tools/blktap2/control/Makefile b/tools/blktap2/control/Makefile
- index a88ff4c..d2615d9 100644
++index 767f52a..c09ed65 100644
 +--- a/tools/blktap2/control/Makefile
 ++++ b/tools/blktap2/control/Makefile
 +@@ -1,10 +1,7 @@
 + XEN_ROOT := $(CURDIR)/../../../
 + include $(XEN_ROOT)/tools/Rules.mk
 + 
 +-MAJOR              = 1.0
 +-MINOR              = 0
 + LIBNAME            = libblktapctl
 +-LIBSONAME          = $(LIBNAME).so.$(MAJOR)
 + 
 + IBIN               = tap-ctl
 + 
 +@@ -38,39 +35,32 @@ OBJS = $(CTL_OBJS) tap-ctl.o
 + PICS = $(CTL_PICS)
 + 
 + LIB_STATIC = $(LIBNAME).a
 +-LIB_SHARED = $(LIBSONAME).$(MINOR)
 ++LIB_SHARED = $(LIBNAME).so
 + IBIN = tap-ctl
 + 
 + all: build
 + 
 + build: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
 + 
 +-$(LIBNAME).so: $(LIBSONAME)
 +-	ln -sf $< $@
 +-
 +-$(LIBSONAME): $(LIB_SHARED)
 +-	ln -sf $< $@
 +-
 + tap-ctl: tap-ctl.o $(LIBNAME).so
 +-	$(CC) $(LDFLAGS) -o $@ $^ $(APPEND_LDFLAGS)
 ++	$(CC) $(LDFLAGS) $(call LDFLAGS_RPATH,../lib) -o $@ $^ $(APPEND_LDFLAGS)
 + 
 + $(LIB_STATIC): $(CTL_OBJS)
 + 	$(AR) r $@ $^
 + 
 + $(LIB_SHARED): $(CTL_PICS)
 +-	$(CC) $(LDFLAGS) -fPIC  -Wl,$(SONAME_LDFLAG) -Wl,$(LIBSONAME) $(SHLIB_LDFLAGS) -rdynamic $^ -o $@  $(APPEND_LDFLAGS)
 ++	$(CC) $(LDFLAGS) -fPIC $(SHLIB_LDFLAGS) -rdynamic $^ -o $@ $(APPEND_LDFLAGS)
 + 
 + install: $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
- -	$(INSTALL_DIR) -p $(DESTDIR)$(SBINDIR)
- -	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(SBINDIR)
- +	$(INSTALL_DIR) -p $(DESTDIR)$(LIBDIR)
++-	$(INSTALL_DIR) -p $(DESTDIR)$(sbindir)
++-	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(sbindir)
+++	$(INSTALL_DIR) -p $(DESTDIR)$(libdir)
 ++	$(INSTALL_DIR) -p $(DESTDIR)$(LIBEXEC_BIN)
 ++	$(INSTALL_DIR) -p $(DESTDIR)$(LIBEXEC_LIB)
 ++	$(INSTALL_PROG) $(IBIN) $(DESTDIR)$(LIBEXEC_BIN)
-  	$(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(LIBDIR)
- -	$(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(LIBDIR)
- -	ln -sf $(LIBSONAME) $(DESTDIR)$(LIBDIR)/$(LIBNAME).so
- -	ln -sf $(LIB_SHARED) $(DESTDIR)$(LIBDIR)/$(LIBSONAME)
++ 	$(INSTALL_DATA) $(LIB_STATIC) $(DESTDIR)$(libdir)
++-	$(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(libdir)
++-	ln -sf $(LIBSONAME) $(DESTDIR)$(libdir)/$(LIBNAME).so
++-	ln -sf $(LIB_SHARED) $(DESTDIR)$(libdir)/$(LIBSONAME)
 ++	$(INSTALL_PROG) $(LIB_SHARED) $(DESTDIR)$(LIBEXEC_LIB)
 + 
 + clean:
 + 	rm -f $(OBJS) $(PICS) $(DEPS) $(IBIN) $(LIB_STATIC) $(LIB_SHARED)
 +-	rm -f $(LIBNAME).so $(LIBSONAME)
 + 	rm -f *~
 + 
-  .PHONY: all build clean install
++ distclean: clean
 +diff --git a/tools/blktap2/vhd/Makefile b/tools/blktap2/vhd/Makefile
- index fef0d36..cf8b639 100644
++index fabd665..9802805 100644
 +--- a/tools/blktap2/vhd/Makefile
 ++++ b/tools/blktap2/vhd/Makefile
 +@@ -12,6 +12,7 @@ CFLAGS            += -Werror
 + CFLAGS            += -Wno-unused
 + CFLAGS            += -I../include
 + CFLAGS            += -D_GNU_SOURCE
 ++CFLAGS  += $(CFLAGS_libxenctrl)
 + 
 + ifeq ($(CONFIG_X86_64),y)
 + CFLAGS            += -fPIC
 +diff --git a/tools/blktap2/vhd/lib/Makefile b/tools/blktap2/vhd/lib/Makefile
- index 99e3cdb..45fac4f 100644
++index ab2d648..bd6501d 100644
 +--- a/tools/blktap2/vhd/lib/Makefile
 ++++ b/tools/blktap2/vhd/lib/Makefile
 +@@ -2,25 +2,19 @@ XEN_ROOT=$(CURDIR)/../../../..
 + BLKTAP_ROOT := ../..
 + include $(XEN_ROOT)/tools/Rules.mk
 + 
 +-LIBVHD-MAJOR     = 1.0
 +-LIBVHD-MINOR     = 0
 +-LIBVHD-SONAME    = libvhd.so.$(LIBVHD-MAJOR)
 +-
 + LVM-UTIL-OBJ    := $(BLKTAP_ROOT)/lvm/lvm-util.o
 + 
 +-LIBVHD-BUILD    := libvhd.a
 +-
- -INST-DIR         = $(LIBDIR)
++-INST-DIR         = $(libdir)
 +-
 + CFLAGS          += -Werror
 + CFLAGS          += -Wno-unused
 + CFLAGS          += -I../../include
 + CFLAGS          += -D_GNU_SOURCE
 + CFLAGS          += -fPIC
 ++CFLAGS		+= $(CFLAGS_libxenctrl)
 + 
 + ifeq ($(CONFIG_Linux),y)
 + LIBS            := -luuid
 + endif
 ++LDFLAGS += $(LDFLAGS_libxenctrl) $(call LDFLAGS_RPATH)
 + 
 + ifeq ($(CONFIG_LIBICONV),y)
 + LIBS            += -liconv
 +@@ -50,27 +44,22 @@ LIB-OBJS        += $(LVM-UTIL-OBJ)
 + 
 + LIB-PICOBJS      = $(patsubst %.o,%.opic,$(LIB-OBJS))
 + 
 +-LIBVHD           = libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR)
 ++LIBVHD           = libvhd.a libvhd.so
 + 
 + all: build
 + 
 +-build: libvhd.a libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR)
 ++build: libvhd.a libvhd.so
 + 
 + libvhd.a: $(LIB-OBJS)
 + 	$(AR) rc $@ $^
 + 
 +-libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR): $(LIB-PICOBJS)
 +-	$(CC) -Wl,$(SONAME_LDFLAG),$(LIBVHD-SONAME) $(SHLIB_LDFLAGS) \
 +-		$(LDFLAGS) -o libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $^ $(LIBS)
 +-	ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) libvhd.so.$(LIBVHD-MAJOR)
 +-	ln -sf libvhd.so.$(LIBVHD-MAJOR) libvhd.so
 ++libvhd.so: $(LIB-PICOBJS)
 ++	$(CC) $(SHLIB_LDFLAGS) $(LDFLAGS) -o libvhd.so $^ $(LIBS)
 + 
 + install: all
 +-	$(INSTALL_DIR) -p $(DESTDIR)$(INST-DIR)
 +-	$(INSTALL_DATA) libvhd.a $(DESTDIR)$(INST-DIR)
 +-	$(INSTALL_PROG) libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)
 +-	ln -sf libvhd.so.$(LIBVHD-MAJOR).$(LIBVHD-MINOR) $(DESTDIR)$(INST-DIR)/libvhd.so.$(LIBVHD-MAJOR)
 +-	ln -sf libvhd.so.$(LIBVHD-MAJOR) $(DESTDIR)$(INST-DIR)/libvhd.so
- +	$(INSTALL_DIR) -p $(DESTDIR)$(LIBDIR)
- +	$(INSTALL_DATA) libvhd.a $(DESTDIR)$(LIBDIR)
- +	$(INSTALL_PROG) libvhd.so $(DESTDIR)$(LIBDIR)
+++	$(INSTALL_DIR) -p $(DESTDIR)$(libdir)
+++	$(INSTALL_DATA) libvhd.a $(DESTDIR)$(libdir)
+++	$(INSTALL_PROG) libvhd.so $(DESTDIR)$(libdir)
 + 
 + clean:
 + 	rm -rf *.a *.so* *.o *.opic *~ $(DEPS) $(LIBVHD)
diff --cc debian/patches/tools-console-prefix.diff
index 7d630f0,0000000..6a82532
mode 100644,000000..100644
--- a/debian/patches/tools-console-prefix.diff
+++ b/debian/patches/tools-console-prefix.diff
@@@ -1,33 -1,0 +1,33 @@@
- From c1f19a09aa4d7abc0331fd15265a3e47a7e5f80c Mon Sep 17 00:00:00 2001
++From e588b204f15e7a88b0cfdd4f34ebfa79aabfff76 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:54 +0200
 +Subject: tools-console-prefix.diff
 +
 +Patch-Name: tools-console-prefix.diff
 +---
 + tools/console/Makefile | 5 ++---
 + 1 file changed, 2 insertions(+), 3 deletions(-)
 +
 +diff --git a/tools/console/Makefile b/tools/console/Makefile
- index 6e55618..3e96550 100644
++index 77e8f29..8ce2987 100644
 +--- a/tools/console/Makefile
 ++++ b/tools/console/Makefile
 +@@ -8,6 +8,7 @@ CFLAGS  += $(CFLAGS_libxenstore)
 + LDLIBS += $(LDLIBS_libxenctrl)
 + LDLIBS += $(LDLIBS_libxenstore)
 + LDLIBS += $(SOCKET_LIBS)
 ++LDFLAGS += $(call LDFLAGS_RPATH,../lib)
 + 
 + LDLIBS_xenconsoled += $(UTIL_LIBS)
 + LDLIBS_xenconsoled += -lrt
- @@ -30,9 +31,7 @@ xenconsole: $(patsubst %.c,%.o,$(wildcard client/*.c))
++@@ -37,9 +38,7 @@ $(eval $(genpath-target))
 + 
 + .PHONY: install
 + install: $(BIN)
- -	$(INSTALL_DIR) $(DESTDIR)/$(SBINDIR)
- -	$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(SBINDIR)
++-	$(INSTALL_DIR) $(DESTDIR)/$(sbindir)
++-	$(INSTALL_PROG) xenconsoled $(DESTDIR)/$(sbindir)
 + 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 +-	$(INSTALL_PROG) xenconsole $(DESTDIR)$(LIBEXEC_BIN)
 ++	$(INSTALL_PROG) xenconsole xenconsoled $(DESTDIR)$(LIBEXEC_BIN)
 + 
 + -include $(DEPS)
diff --cc debian/patches/tools-include-install.diff
index 6a3e735,0000000..d16107e
mode 100644,000000..100644
--- a/debian/patches/tools-include-install.diff
+++ b/debian/patches/tools-include-install.diff
@@@ -1,30 -1,0 +1,30 @@@
- From c828f7babbc35771e43e323b13374aca2d7146bc Mon Sep 17 00:00:00 2001
++From 4dfebbec5ff7d54473b56bd3cef0352802967294 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:30 +0200
 +Subject: tools-include-install.diff
 +
 +Patch-Name: tools-include-install.diff
 +---
 + tools/include/Makefile | 2 --
 + 1 file changed, 2 deletions(-)
 +
 +diff --git a/tools/include/Makefile b/tools/include/Makefile
- index f7a6256..615f5bb 100644
++index dec8b3d..cdc8505 100644
 +--- a/tools/include/Makefile
 ++++ b/tools/include/Makefile
- @@ -11,7 +11,6 @@ xen-foreign:
++@@ -14,7 +14,6 @@ xen-foreign:
 + xen/.dir:
 + 	@rm -rf xen
 + 	mkdir -p xen/libelf
 +-	ln -sf $(XEN_ROOT)/xen/include/public/COPYING xen
 + 	ln -sf $(wildcard $(XEN_ROOT)/xen/include/public/*.h) xen
 + 	ln -sf $(addprefix $(XEN_ROOT)/xen/include/public/,arch-x86 arch-arm hvm io xsm) xen
 + 	ln -sf ../xen-sys/$(XEN_OS) xen/sys
- @@ -30,7 +29,6 @@ install: all
-  	$(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-x86/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86
-  	$(INSTALL_DATA) xen/arch-x86/hvm/*.h $(DESTDIR)$(INCLUDEDIR)/xen/arch-x86/hvm
++@@ -42,7 +41,6 @@ install: all
++ 	$(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-x86/*.h $(DESTDIR)$(includedir)/xen/arch-x86
++ 	$(INSTALL_DATA) xen/arch-x86/hvm/*.h $(DESTDIR)$(includedir)/xen/arch-x86/hvm
diff --cc debian/patches/tools-libfsimage-abiname.diff
index cb97d08,0000000..cc0c87b
mode 100644,000000..100644
--- a/debian/patches/tools-libfsimage-abiname.diff
+++ b/debian/patches/tools-libfsimage-abiname.diff
@@@ -1,60 -1,0 +1,60 @@@
- From 307493934f33b78e88e083874c5c36656852c77e Mon Sep 17 00:00:00 2001
++From 9cd5bad1a3bb72b5448c5767070160249c45c34e Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:47 +0200
 +Subject: tools-libfsimage-abiname.diff
 +
 +Patch-Name: tools-libfsimage-abiname.diff
 +---
 + tools/libfsimage/common/Makefile | 18 ++++--------------
 + 1 file changed, 4 insertions(+), 14 deletions(-)
 +
 +diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile
- index fb306f4..0e6c728 100644
++index 4840bc2..8357b0a 100644
 +--- a/tools/libfsimage/common/Makefile
 ++++ b/tools/libfsimage/common/Makefile
 +@@ -1,9 +1,6 @@
 + XEN_ROOT = $(CURDIR)/../../..
 + include $(XEN_ROOT)/tools/libfsimage/Rules.mk
 + 
 +-MAJOR = 1.0
 +-MINOR = 0
 +-
 + LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
 + LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
 + LDFLAGS = $(LDFLAGS-y)
 +@@ -15,7 +12,7 @@ LIB_SRCS-y = fsimage.c fsimage_plugin.c fsimage_grub.c
 + 
 + PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
 + 
 +-LIB = libfsimage.so libfsimage.so.$(MAJOR) libfsimage.so.$(MAJOR).$(MINOR)
 ++LIB = libfsimage.so
 + 
 + .PHONY: all
 + all: $(LIB)
 +@@ -24,9 +21,7 @@ all: $(LIB)
 + install: all
-  	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-  	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
- -	$(INSTALL_PROG) 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_PROG) libfsimage.so $(DESTDIR)$(LIBDIR)
-  	$(INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR)
-  	$(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR)
-  	$(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR)
++ 	$(INSTALL_DIR) $(DESTDIR)$(libdir)
++ 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
++-	$(INSTALL_PROG) 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_PROG) libfsimage.so $(DESTDIR)$(libdir)
++ 	$(INSTALL_DATA) fsimage.h $(DESTDIR)$(includedir)
++ 	$(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(includedir)
++ 	$(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(includedir)
 +@@ -34,13 +29,8 @@ install: all
 + clean distclean::
 + 	rm -f $(LIB)
 + 
 +-libfsimage.so: libfsimage.so.$(MAJOR)
 +-	ln -sf $< $@
 +-libfsimage.so.$(MAJOR): libfsimage.so.$(MAJOR).$(MINOR)
 +-	ln -sf $< $@
 +-
 +-libfsimage.so.$(MAJOR).$(MINOR): $(PIC_OBJS)
 +-	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libfsimage.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
 ++libfsimage.so: $(PIC_OBJS)
 ++	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $^ $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
 + 
 + -include $(DEPS)
 + 
diff --cc debian/patches/tools-libfsimage-prefix.diff
index 6879ea5,0000000..c1daa1b
mode 100644,000000..100644
--- a/debian/patches/tools-libfsimage-prefix.diff
+++ b/debian/patches/tools-libfsimage-prefix.diff
@@@ -1,53 -1,0 +1,53 @@@
- From 1c31520bc0d397c34468406503e47db42f3e3043 Mon Sep 17 00:00:00 2001
++From 4b86c760c09a8fa291cccfe60811ef53e87b896a Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:55 +0200
 +Subject: tools-libfsimage-prefix.diff
 +
 +Patch-Name: tools-libfsimage-prefix.diff
 +---
 + tools/libfsimage/Rules.mk        | 3 ++-
 + tools/libfsimage/common/Makefile | 6 ++++--
 + 2 files changed, 6 insertions(+), 3 deletions(-)
 +
 +diff --git a/tools/libfsimage/Rules.mk b/tools/libfsimage/Rules.mk
- index 8a23655..3e35fc7 100644
++index a0c6504..3e35fc7 100644
 +--- a/tools/libfsimage/Rules.mk
 ++++ b/tools/libfsimage/Rules.mk
 +@@ -3,10 +3,11 @@ include $(XEN_ROOT)/tools/Rules.mk
 + CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\"
 + CFLAGS += -Werror -D_GNU_SOURCE
 + LDFLAGS += -L../common/
 ++LDFLAGS += $(call LDFLAGS_RPATH,../..)
 + 
 + PIC_OBJS := $(patsubst %.c,%.opic,$(LIB_SRCS-y))
 + 
- -FSDIR = $(LIBDIR)/fs
++-FSDIR = $(libdir)/fs
 ++FSDIR = $(LIBEXEC_LIB)/fs
 + 
 + FSLIB = fsimage.so
 + 
 +diff --git a/tools/libfsimage/common/Makefile b/tools/libfsimage/common/Makefile
- index 0e6c728..4e472f0 100644
++index 8357b0a..2043744 100644
 +--- a/tools/libfsimage/common/Makefile
 ++++ b/tools/libfsimage/common/Makefile
 +@@ -1,6 +1,8 @@
 + XEN_ROOT = $(CURDIR)/../../..
 + include $(XEN_ROOT)/tools/libfsimage/Rules.mk
 + 
 ++CFLAGS += -DFSDIR="\"$(LIBEXEC_LIB)/fs\""
 ++
 + LDFLAGS-$(CONFIG_SunOS) = -Wl,-M -Wl,mapfile-SunOS
 + LDFLAGS-$(CONFIG_Linux) = -Wl,mapfile-GNU
 + LDFLAGS = $(LDFLAGS-y)
 +@@ -19,9 +21,9 @@ all: $(LIB)
 + 
 + .PHONY: install
 + install: all
- -	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
++-	$(INSTALL_DIR) $(DESTDIR)$(libdir)
 ++	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_LIB)
-  	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
- -	$(INSTALL_PROG) libfsimage.so $(DESTDIR)$(LIBDIR)
++ 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
++-	$(INSTALL_PROG) libfsimage.so $(DESTDIR)$(libdir)
 ++	$(INSTALL_PROG) libfsimage.so $(DESTDIR)$(LIBEXEC_LIB)
-  	$(INSTALL_DATA) fsimage.h $(DESTDIR)$(INCLUDEDIR)
-  	$(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(INCLUDEDIR)
-  	$(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(INCLUDEDIR)
++ 	$(INSTALL_DATA) fsimage.h $(DESTDIR)$(includedir)
++ 	$(INSTALL_DATA) fsimage_plugin.h $(DESTDIR)$(includedir)
++ 	$(INSTALL_DATA) fsimage_grub.h $(DESTDIR)$(includedir)
diff --cc debian/patches/tools-libxc-abiname.diff
index 78d9102,0000000..ae8c262
mode 100644,000000..100644
--- a/debian/patches/tools-libxc-abiname.diff
+++ b/debian/patches/tools-libxc-abiname.diff
@@@ -1,99 -1,0 +1,99 @@@
- From 71f52ec87e60da06b4ef216e3e1de227c1f78bb3 Mon Sep 17 00:00:00 2001
++From 973db50d8c62f6fdc9ea25f65fa8bb8634a4771f Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:48 +0200
 +Subject: tools-libxc-abiname.diff
 +
 +Patch-Name: tools-libxc-abiname.diff
 +---
 + tools/libxc/Makefile | 35 +++++++++++++----------------------
 + 1 file changed, 13 insertions(+), 22 deletions(-)
 +
 +diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile
- index bd2ca6c..09a065d 100644
++index a0f899b..8695ebf 100644
 +--- a/tools/libxc/Makefile
 ++++ b/tools/libxc/Makefile
 +@@ -1,9 +1,6 @@
 + XEN_ROOT = $(CURDIR)/../..
 + include $(XEN_ROOT)/tools/Rules.mk
 + 
- -MAJOR    = 4.5
++-MAJOR    = 4.6
 +-MINOR    = 0
 +-
-  CTRL_SRCS-y       :=
-  CTRL_SRCS-y       += xc_core.c
-  CTRL_SRCS-$(CONFIG_X86) += xc_core_x86.c
- @@ -113,12 +110,12 @@ $(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS) $(OSDEP_PIC_OBJS) : CFLAGS += -include $(XEN_
++ ifeq ($(CONFIG_LIBXC_MINIOS),y)
++ # Save/restore of a domain is currently incompatible with a stubdom environment
++ override CONFIG_MIGRATE := n
++@@ -128,12 +125,12 @@ $(CTRL_PIC_OBJS) $(GUEST_PIC_OBJS) $(OSDEP_PIC_OBJS) : CFLAGS += -include $(XEN_
 + 
 + LIB := libxenctrl.a
 + ifneq ($(nosharedlibs),y)
 +-LIB += libxenctrl.so libxenctrl.so.$(MAJOR) libxenctrl.so.$(MAJOR).$(MINOR)
 ++LIB += libxenctrl.so libxenctrl-$(PACKAGE_VERSION).so
 + endif
 + 
 + LIB += libxenguest.a
 + ifneq ($(nosharedlibs),y)
 +-LIB += libxenguest.so libxenguest.so.$(MAJOR) libxenguest.so.$(MAJOR).$(MINOR)
 ++LIB += libxenguest.so libxenguest-$(PACKAGE_VERSION).so
 + endif
 + 
 + ifneq ($(nosharedlibs),y)
- @@ -147,15 +144,13 @@ libs: $(LIB)
++@@ -162,15 +159,13 @@ libs: $(LIB)
 + install: build
-  	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-  	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
- -	$(INSTALL_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
- +	$(INSTALL_SHLIB) libxenctrl-$(PACKAGE_VERSION).so $(DESTDIR)$(LIBDIR)
-  	$(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(LIBDIR)
- -	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so.$(MAJOR)
- -	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenctrl.so
- +	$(SYMLINK_SHLIB) libxenctrl-$(PACKAGE_VERSION).so $(DESTDIR)$(LIBDIR)/libxenctrl.so
-  	$(INSTALL_DATA) include/xenctrl.h include/xenctrlosdep.h include/xentoollog.h $(DESTDIR)$(INCLUDEDIR)
- -	$(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
- +	$(INSTALL_SHLIB) libxenguest-$(PACKAGE_VERSION).so $(DESTDIR)$(LIBDIR)
-  	$(INSTALL_DATA) libxenguest.a $(DESTDIR)$(LIBDIR)
- -	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenguest.so.$(MAJOR)
- -	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenguest.so
- +	$(SYMLINK_SHLIB) libxenguest-$(PACKAGE_VERSION).so $(DESTDIR)$(LIBDIR)/libxenguest.so
-  	$(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(INCLUDEDIR)
++ 	$(INSTALL_DIR) $(DESTDIR)$(libdir)
++ 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
++-	$(INSTALL_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+++	$(INSTALL_SHLIB) libxenctrl-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)
+++	$(SYMLINK_SHLIB) libxenctrl-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libxenctrl.so
++ 	$(INSTALL_DATA) libxenctrl.a $(DESTDIR)$(libdir)
++-	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenctrl.so.$(MAJOR)
++-	$(SYMLINK_SHLIB) libxenctrl.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenctrl.so
++ 	$(INSTALL_DATA) include/xenctrl.h include/xenctrlosdep.h include/xentoollog.h $(DESTDIR)$(includedir)
++-	$(INSTALL_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
+++	$(INSTALL_SHLIB) libxenguest-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)
+++	$(SYMLINK_SHLIB) libxenguest-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libxenguest.so
++ 	$(INSTALL_DATA) libxenguest.a $(DESTDIR)$(libdir)
++-	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenguest.so.$(MAJOR)
++-	$(SYMLINK_SHLIB) libxenguest.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenguest.so
++ 	$(INSTALL_DATA) include/xenguest.h $(DESTDIR)$(includedir)
 + 
 + .PHONY: TAGS
- @@ -185,22 +180,18 @@ rpm: build
++@@ -203,22 +198,18 @@ rpm: build
 + libxenctrl.a: $(CTRL_LIB_OBJS)
 + 	$(AR) rc $@ $^
 + 
 +-libxenctrl.so: libxenctrl.so.$(MAJOR)
 +-	$(SYMLINK_SHLIB) $< $@
 +-libxenctrl.so.$(MAJOR): libxenctrl.so.$(MAJOR).$(MINOR)
 ++libxenctrl.so: libxenctrl-$(PACKAGE_VERSION).so
 + 	$(SYMLINK_SHLIB) $< $@
 + 
 +-libxenctrl.so.$(MAJOR).$(MINOR): $(CTRL_PIC_OBJS)
 +-	$(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenctrl.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(DLOPEN_LIBS) $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
 ++libxenctrl-$(PACKAGE_VERSION).so: $(CTRL_PIC_OBJS)
 ++	$(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $^ $(DLOPEN_LIBS) $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
 + 
 + # libxenguest
 + 
 + libxenguest.a: $(GUEST_LIB_OBJS)
 + 	$(AR) rc $@ $^
 + 
 +-libxenguest.so: libxenguest.so.$(MAJOR)
 +-	$(SYMLINK_SHLIB) $< $@
 +-libxenguest.so.$(MAJOR): libxenguest.so.$(MAJOR).$(MINOR)
 ++libxenguest.so: libxenguest-$(PACKAGE_VERSION).so
 + 	$(SYMLINK_SHLIB) $< $@
 + 
 + ifeq ($(CONFIG_MiniOS),y)
- @@ -212,9 +203,9 @@ endif
++@@ -230,9 +221,9 @@ endif
 + xc_dom_bzimageloader.o: CFLAGS += $(call zlib-options,D)
 + xc_dom_bzimageloader.opic: CFLAGS += $(call zlib-options,D)
 + 
 +-libxenguest.so.$(MAJOR).$(MINOR): COMPRESSION_LIBS = $(call zlib-options,l)
 +-libxenguest.so.$(MAJOR).$(MINOR): $(GUEST_PIC_OBJS) libxenctrl.so
 +-	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenguest.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenctrl) $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
 ++libxenguest-$(PACKAGE_VERSION).so: COMPRESSION_LIBS = $(call zlib-options,l)
 ++libxenguest-$(PACKAGE_VERSION).so: $(GUEST_PIC_OBJS) libxenctrl-$(PACKAGE_VERSION).so
 ++	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $(GUEST_PIC_OBJS) $(COMPRESSION_LIBS) -lz $(LDLIBS_libxenctrl) $(PTHREAD_LIBS) $(APPEND_LDFLAGS)
 + 
 + xenctrl_osdep_ENOSYS.so: $(OSDEP_PIC_OBJS) libxenctrl.so
 + 	$(CC) $(LDFLAGS) $(SHLIB_LDFLAGS) -o $@ $(OSDEP_PIC_OBJS) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
diff --cc debian/patches/tools-libxl-abiname.diff
index 0a3343c,0000000..5203be7
mode 100644,000000..100644
--- a/debian/patches/tools-libxl-abiname.diff
+++ b/debian/patches/tools-libxl-abiname.diff
@@@ -1,81 -1,0 +1,80 @@@
- From 112bfc0a9d087098616b0121140c983c228a27d0 Mon Sep 17 00:00:00 2001
++From 2797781477ae40b32d561fbd318b0f44e722eedb Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:49 +0200
 +Subject: tools-libxl-abiname.diff
 +
 +Patch-Name: tools-libxl-abiname.diff
 +---
-  tools/libxl/Makefile | 34 ++++++++++------------------------
-  1 file changed, 10 insertions(+), 24 deletions(-)
++ tools/libxl/Makefile | 33 ++++++++++-----------------------
++ 1 file changed, 10 insertions(+), 23 deletions(-)
 +
 +diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
- index 6a8575b..6b20c14 100644
++index c5ecec1..08b2b93 100644
 +--- a/tools/libxl/Makefile
 ++++ b/tools/libxl/Makefile
 +@@ -5,12 +5,6 @@
 + XEN_ROOT = $(CURDIR)/../..
 + include $(XEN_ROOT)/tools/Rules.mk
 + 
- -MAJOR = 4.5
++-MAJOR = 4.6
 +-MINOR = 0
 +-
- -XLUMAJOR = 4.3
++-XLUMAJOR = 4.6
 +-XLUMINOR = 0
 +-
 + CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \
 + 	-Wno-declaration-after-statement -Wformat-nonliteral
 + CFLAGS += -I. -fPIC
- @@ -206,14 +200,11 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_
++@@ -225,14 +219,11 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_
 + 	$(call move-if-changed,__libxl_type$*_json.h,_libxl_type$*_json.h)
 + 	$(call move-if-changed,__libxl_type$*.c,_libxl_type$*.c)
 + 
 +-libxenlight.so: libxenlight.so.$(MAJOR)
 ++libxenlight.so: libxenlight-$(PACKAGE_VERSION).so
 + 	$(SYMLINK_SHLIB) $< $@
 + 
 +-libxenlight.so.$(MAJOR): libxenlight.so.$(MAJOR).$(MINOR)
 +-	$(SYMLINK_SHLIB) $< $@
 +-
 +-libxenlight.so.$(MAJOR).$(MINOR): $(LIBXL_OBJS)
 +-	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS)
 ++libxenlight-$(PACKAGE_VERSION).so: $(LIBXL_OBJS)
 ++	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS)
 + 
 + libxenlight_test.so: $(LIBXL_OBJS) $(LIBXL_TEST_OBJS)
 + 	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS)
- @@ -221,14 +212,11 @@ libxenlight_test.so: $(LIBXL_OBJS) $(LIBXL_TEST_OBJS)
++@@ -240,14 +231,11 @@ libxenlight_test.so: $(LIBXL_OBJS) $(LIBXL_TEST_OBJS)
 + libxenlight.a: $(LIBXL_OBJS)
 + 	$(AR) rcs libxenlight.a $^
 + 
 +-libxlutil.so: libxlutil.so.$(XLUMAJOR)
 +-	$(SYMLINK_SHLIB) $< $@
 +-
 +-libxlutil.so.$(XLUMAJOR): libxlutil.so.$(XLUMAJOR).$(XLUMINOR)
 ++libxlutil.so: libxlutil-$(PACKAGE_VERSION).so
 + 	$(SYMLINK_SHLIB) $< $@
 + 
 +-libxlutil.so.$(XLUMAJOR).$(XLUMINOR): $(LIBXLU_OBJS) libxenlight.so
 +-	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxlutil.so.$(XLUMAJOR) $(SHLIB_LDFLAGS) -o $@ $(LIBXLU_OBJS) $(LIBXLU_LIBS) $(APPEND_LDFLAGS)
 ++libxlutil-$(PACKAGE_VERSION).so: $(LIBXLU_OBJS) libxenlight.so
 ++	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $(LIBXLU_OBJS) $(LIBXLU_LIBS) $(APPEND_LDFLAGS)
 + 
 + libxlutil.a: $(LIBXLU_OBJS)
 + 	$(AR) rcs libxlutil.a $^
- @@ -258,13 +246,11 @@ install: all
-  	$(INSTALL_PROG) xl $(DESTDIR)$(SBINDIR)
++@@ -282,12 +270,11 @@ install: all
++ 	$(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
 + 	$(INSTALL_PROG) xen-init-dom0 $(DESTDIR)$(LIBEXEC_BIN)
 + 	$(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN)
- -	$(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
- -	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenlight.so.$(MAJOR)
- -	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenlight.so
- +	$(INSTALL_SHLIB) libxenlight-$(PACKAGE_VERSION).so $(DESTDIR)$(LIBDIR)
- +	$(SYMLINK_SHLIB) libxenlight-$(PACKAGE_VERSION).so $(DESTDIR)$(LIBDIR)/libxenlight.so
-  	$(INSTALL_DATA) libxenlight.a $(DESTDIR)$(LIBDIR)
- -	$(INSTALL_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(LIBDIR)
- -	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(LIBDIR)/libxlutil.so.$(XLUMAJOR)
- -	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(LIBDIR)/libxlutil.so
- +	$(INSTALL_SHLIB) libxlutil-$(PACKAGE_VERSION).so $(DESTDIR)$(LIBDIR)
- +	$(SYMLINK_SHLIB) libxlutil-$(PACKAGE_VERSION).so $(DESTDIR)$(LIBDIR)/libxlutil.so
-  	$(INSTALL_DATA) libxlutil.a $(DESTDIR)$(LIBDIR)
-  	$(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(INCLUDEDIR)
-  	$(INSTALL_DATA) bash-completion $(DESTDIR)$(BASH_COMPLETION_DIR)/xl.sh
++-	$(INSTALL_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
++-	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenlight.so.$(MAJOR)
++-	$(SYMLINK_SHLIB) libxenlight.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenlight.so
+++	$(INSTALL_SHLIB) libxenlight-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)
+++	$(SYMLINK_SHLIB) libxenlight-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libxenlight.so
++ 	$(INSTALL_DATA) libxenlight.a $(DESTDIR)$(libdir)
++-	$(INSTALL_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(libdir)
++-	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR).$(XLUMINOR) $(DESTDIR)$(libdir)/libxlutil.so.$(XLUMAJOR)
+++	$(INSTALL_SHLIB) libxlutil-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)
+++	$(SYMLINK_SHLIB) libxlutil-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)/libxlutil.so
++ 	$(SYMLINK_SHLIB) libxlutil.so.$(XLUMAJOR) $(DESTDIR)$(libdir)/libxlutil.so
++ 	$(INSTALL_DATA) libxlutil.a $(DESTDIR)$(libdir)
++ 	$(INSTALL_DATA) libxl.h libxl_event.h libxl_json.h _libxl_types.h _libxl_types_json.h _libxl_list.h libxl_utils.h libxl_uuid.h libxlutil.h $(DESTDIR)$(includedir)
diff --cc debian/patches/tools-libxl-prefix.diff
index 66aa4cb,0000000..cd8e9f5
mode 100644,000000..100644
--- a/debian/patches/tools-libxl-prefix.diff
+++ b/debian/patches/tools-libxl-prefix.diff
@@@ -1,55 -1,0 +1,56 @@@
- From 052023923523f1120329278313cc41210e9676ec Mon Sep 17 00:00:00 2001
++From ca4a2ee9008f68c00fa2726a11e4c8c8bdff43b2 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:57 +0200
 +Subject: tools-libxl-prefix.diff
 +
 +Patch-Name: tools-libxl-prefix.diff
 +---
 + tools/libxl/Makefile | 9 +++++----
 + 1 file changed, 5 insertions(+), 4 deletions(-)
 +
 +diff --git a/tools/libxl/Makefile b/tools/libxl/Makefile
- index 6b20c14..0c0cb3b 100644
++index 08b2b93..e756946 100644
 +--- a/tools/libxl/Makefile
 ++++ b/tools/libxl/Makefile
 +@@ -12,6 +12,8 @@ CFLAGS += -I. -fPIC
 + ifeq ($(CONFIG_Linux),y)
 + LIBUUID_LIBS += -luuid
 + endif
 ++LDFLAGS_XL = $(call LDFLAGS_RPATH,../lib)
 ++LDFLAGS_LIBXL = $(call LDFLAGS_RPATH)
 + 
 + LIBXL_LIBS =
 + LIBXL_LIBS = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(LDLIBS_libblktapctl) $(PTYFUNCS_LIBS) $(LIBUUID_LIBS)
- @@ -204,7 +206,7 @@ libxenlight.so: libxenlight-$(PACKAGE_VERSION).so
++@@ -223,7 +225,7 @@ libxenlight.so: libxenlight-$(PACKAGE_VERSION).so
 + 	$(SYMLINK_SHLIB) $< $@
 + 
 + libxenlight-$(PACKAGE_VERSION).so: $(LIBXL_OBJS)
 +-	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS)
 ++	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG),$@ $(LDFLAGS_LIBXL) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS)
 + 
 + libxenlight_test.so: $(LIBXL_OBJS) $(LIBXL_TEST_OBJS)
 + 	$(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LIBXL_LIBS) $(APPEND_LDFLAGS)
- @@ -222,7 +224,7 @@ libxlutil.a: $(LIBXLU_OBJS)
++@@ -241,7 +243,7 @@ libxlutil.a: $(LIBXLU_OBJS)
 + 	$(AR) rcs libxlutil.a $^
 + 
 + xl: $(XL_OBJS) libxlutil.so libxenlight.so
 +-	$(CC) $(LDFLAGS) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) -lyajl $(APPEND_LDFLAGS)
 ++	$(CC) $(LDFLAGS) $(LDFLAGS_XL) -o $@ $(XL_OBJS) libxlutil.so $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) -lyajl $(APPEND_LDFLAGS)
 + 
 + xen-init-dom0: $(XEN_INIT_DOM0_OBJS) libxenlight.so
 + 	$(CC) $(LDFLAGS) -o $@ $(XEN_INIT_DOM0_OBJS) $(LDLIBS_libxenstore) $(LDLIBS_libxenlight) $(LDLIBS_libxenctrl) $(APPEND_LDFLAGS)
- @@ -238,12 +240,11 @@ testidl: testidl.o libxlutil.so libxenlight.so
++@@ -261,13 +263,12 @@ $(PKG_CONFIG): % : %.in Makefile
 + 
 + .PHONY: install
 + install: all
- -	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-  	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-  	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
++-	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
++ 	$(INSTALL_DIR) $(DESTDIR)$(libdir)
++ 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
 + 	$(INSTALL_DIR) $(DESTDIR)$(BASH_COMPLETION_DIR)
 + 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
- -	$(INSTALL_PROG) xl $(DESTDIR)$(SBINDIR)
++ 	$(INSTALL_DIR) $(DESTDIR)$(SHAREDIR)/pkgconfig
++-	$(INSTALL_PROG) xl $(DESTDIR)$(sbindir)
 ++	$(INSTALL_PROG) xl $(DESTDIR)$(LIBEXEC_BIN)
 + 	$(INSTALL_PROG) xen-init-dom0 $(DESTDIR)$(LIBEXEC_BIN)
 + 	$(INSTALL_PROG) libxl-save-helper $(DESTDIR)$(LIBEXEC_BIN)
-  	$(INSTALL_SHLIB) libxenlight-$(PACKAGE_VERSION).so $(DESTDIR)$(LIBDIR)
++ 	$(INSTALL_SHLIB) libxenlight-$(PACKAGE_VERSION).so $(DESTDIR)$(libdir)
diff --cc debian/patches/tools-misc-prefix.diff
index 848bab9,0000000..151e4d1
mode 100644,000000..100644
--- a/debian/patches/tools-misc-prefix.diff
+++ b/debian/patches/tools-misc-prefix.diff
@@@ -1,37 -1,0 +1,28 @@@
- From 7794958e0bb87edd677037dee751257d1baba6c2 Mon Sep 17 00:00:00 2001
++From 0d261587a649543c5fc05013817e09bfd96a16df Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:59 +0200
 +Subject: tools-misc-prefix.diff
 +
 +Patch-Name: tools-misc-prefix.diff
 +---
-  tools/misc/Makefile | 8 +++-----
-  1 file changed, 3 insertions(+), 5 deletions(-)
++ tools/misc/Makefile | 6 +-----
++ 1 file changed, 1 insertion(+), 5 deletions(-)
 +
 +diff --git a/tools/misc/Makefile b/tools/misc/Makefile
- index 7a2bfd2..98627f9 100644
++index c4490f3..650a150 100644
 +--- a/tools/misc/Makefile
 ++++ b/tools/misc/Makefile
- @@ -32,6 +32,8 @@ INSTALL_PRIVBIN := $(INSTALL_PRIVBIN-y)
-  # Include configure output (config.h) to headers search path
-  CFLAGS += -I$(XEN_ROOT)/tools
-  
- +APPEND_LDFLAGS += $(call LDFLAGS_RPATH,../lib)
- +
-  .PHONY: all
-  all: build
-  
- @@ -40,12 +42,8 @@ build: $(TARGETS)
++@@ -53,12 +53,8 @@ all build: $(TARGETS_BUILD)
 + 
 + .PHONY: install
 + install: build
- -	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
- -	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
++-	$(INSTALL_DIR) $(DESTDIR)$(bindir)
++-	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 + 	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
- -	$(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(BINDIR)
- -	$(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(SBINDIR)
++-	$(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(DESTDIR)$(bindir)
++-	$(INSTALL_PYTHON_PROG) $(INSTALL_SBIN) $(DESTDIR)$(sbindir)
 +-	$(INSTALL_PYTHON_PROG) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN)
 ++	$(INSTALL_PYTHON_PROG) $(INSTALL_BIN) $(INSTALL_SBIN) $(INSTALL_PRIVBIN) $(DESTDIR)$(LIBEXEC_BIN)
 + 
 + .PHONY: clean
 + clean:
diff --cc debian/patches/tools-pygrub-prefix.diff
index a90b182,0000000..a2b873a
mode 100644,000000..100644
--- a/debian/patches/tools-pygrub-prefix.diff
+++ b/debian/patches/tools-pygrub-prefix.diff
@@@ -1,59 -1,0 +1,59 @@@
- From bf8e9b6c1469a4c25f4ba1910b269fae50be84a0 Mon Sep 17 00:00:00 2001
++From d31889e05bb4483c52b51a54886fe1d5672fc72e Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:01 +0200
 +Subject: tools-pygrub-prefix.diff
 +
 +Patch-Name: tools-pygrub-prefix.diff
 +---
 + tools/pygrub/Makefile   | 5 -----
 + tools/pygrub/setup.py   | 2 ++
 + tools/pygrub/src/pygrub | 2 ++
 + 3 files changed, 4 insertions(+), 5 deletions(-)
 +
 +diff --git a/tools/pygrub/Makefile b/tools/pygrub/Makefile
- index 3dff608..5fe4a80 100644
++index fe8e03b..5d83907 100644
 +--- a/tools/pygrub/Makefile
 ++++ b/tools/pygrub/Makefile
- @@ -13,11 +13,6 @@ install: all
-  	CC="$(CC)" CFLAGS="$(CFLAGS) $(APPEND_LDFLAGS)" $(PYTHON) setup.py install \
++@@ -15,11 +15,6 @@ install: all
++ 	CC="$(CC)" CFLAGS="$(PY_CFLAGS)" $(PYTHON) setup.py install \
 + 		$(PYTHON_PREFIX_ARG) --root="$(DESTDIR)" \
 + 		--install-scripts=$(LIBEXEC_BIN) --force
- -	set -e; if [ $(BINDIR) != $(LIBEXEC_BIN) -a \
- -	             "`readlink -f $(DESTDIR)/$(BINDIR)`" != \
++-	set -e; if [ $(bindir) != $(LIBEXEC_BIN) -a \
++-	             "`readlink -f $(DESTDIR)/$(bindir)`" != \
 +-	             "`readlink -f $(LIBEXEC_BIN)`" ]; then \
- -	    ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(BINDIR); \
++-	    ln -sf $(LIBEXEC_BIN)/pygrub $(DESTDIR)/$(bindir); \
 +-	fi
 + 
 + .PHONY: clean
 + clean:
 +diff --git a/tools/pygrub/setup.py b/tools/pygrub/setup.py
 +index 52dcf57..8a1be9a 100644
 +--- a/tools/pygrub/setup.py
 ++++ b/tools/pygrub/setup.py
 +@@ -4,11 +4,13 @@ import os
 + import sys
 + 
 + extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
 ++extra_link_args = [ "-Wl,-rpath,${ORIGIN}/.." ]
 + 
 + XEN_ROOT = "../.."
 + 
 + fsimage = Extension("fsimage",
 +     extra_compile_args = extra_compile_args,
 ++    extra_link_args = extra_link_args,
 +     include_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
 +     library_dirs = [ XEN_ROOT + "/tools/libfsimage/common/" ],
 +     libraries = ["fsimage"],
 +diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
- index 3ec52fd..ed5b5d6 100755
++index e4aedda..a50ed79 100755
 +--- a/tools/pygrub/src/pygrub
 ++++ b/tools/pygrub/src/pygrub
- @@ -22,6 +22,8 @@ import xen.lowlevel.xc
++@@ -21,6 +21,8 @@ import xen.lowlevel.xc
 + import curses, _curses, curses.wrapper, curses.textpad, curses.ascii
 + import getopt
 + 
 ++sys.path.insert(1, sys.path[0] + '/../lib/python')
 ++
 + import fsimage
 + import grub.GrubConf
 + import grub.LiloConf
diff --cc debian/patches/tools-pygrub-remove-static-solaris-support
index e20aed1,0000000..d040231
mode 100644,000000..100644
--- a/debian/patches/tools-pygrub-remove-static-solaris-support
+++ b/debian/patches/tools-pygrub-remove-static-solaris-support
@@@ -1,86 -1,0 +1,86 @@@
- From 79df6783a7445a237888a157267f9133e825e78b Mon Sep 17 00:00:00 2001
++From e730f60f8001fb57e4018d961df07549615a9621 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:29 +0200
 +Subject: Remove static solaris support from pygrub
 +
 +Patch-Name: tools-pygrub-remove-static-solaris-support
 +---
 + tools/pygrub/src/pygrub | 51 +------------------------------------------------
 + 1 file changed, 1 insertion(+), 50 deletions(-)
 +
 +diff --git a/tools/pygrub/src/pygrub b/tools/pygrub/src/pygrub
- index ed5b5d6..5c38360 100755
++index a50ed79..6204812 100755
 +--- a/tools/pygrub/src/pygrub
 ++++ b/tools/pygrub/src/pygrub
- @@ -17,7 +17,6 @@ import os, sys, string, struct, tempfile, re, traceback, stat, errno
++@@ -16,7 +16,6 @@ import os, sys, string, struct, tempfile, re, traceback, stat, errno
 + import copy
 + import logging
 + import platform
 +-import xen.lowlevel.xc
 + 
 + import curses, _curses, curses.wrapper, curses.textpad, curses.ascii
 + import getopt
- @@ -664,51 +663,6 @@ def run_grub(file, entry, fs, cfg_args):
++@@ -663,51 +662,6 @@ def run_grub(file, entry, fs, cfg_args):
 + 
 +     return grubcfg
 + 
 +-def supports64bitPVguest():
 +-    xc = xen.lowlevel.xc.xc()
 +-    caps = xc.xeninfo()['xen_caps'].split(" ")
 +-    for cap in caps:
 +-        if cap == "xen-3.0-x86_64":
 +-            return True
 +-    return False
 +-
 +-# If nothing has been specified, look for a Solaris domU. If found, perform the
 +-# necessary tweaks.
 +-def sniff_solaris(fs, cfg):
 +-    if not fs.file_exists("/platform/i86xpv/kernel/unix") and \
 +-       not fs.file_exists("/platform/i86xpv/kernel/amd64/unix"):
 +-        return cfg
 +-
 +-    if not cfg["kernel"]:
 +-        if supports64bitPVguest() and \
 +-          fs.file_exists("/platform/i86xpv/kernel/amd64/unix"):
 +-            cfg["kernel"] = "/platform/i86xpv/kernel/amd64/unix"
 +-            cfg["ramdisk"] = "/platform/i86pc/amd64/boot_archive"
 +-        elif fs.file_exists("/platform/i86xpv/kernel/unix"):
 +-            cfg["kernel"] = "/platform/i86xpv/kernel/unix"
 +-            cfg["ramdisk"] = "/platform/i86pc/boot_archive"
 +-        else:
 +-            return cfg
 +-
 +-    # Unpleasant. Typically we'll have 'root=foo -k' or 'root=foo /kernel -k',
 +-    # and we need to maintain Xen properties (root= and ip=) and the kernel
 +-    # before any user args.
 +-    
 +-    xenargs = ""
 +-    userargs = ""
 +-    
 +-    if not cfg["args"]:
 +-        cfg["args"] = cfg["kernel"]
 +-    else:
 +-        for arg in cfg["args"].split():
 +-            if re.match("^root=", arg) or re.match("^ip=", arg):
 +-                xenargs += arg + " "
 +-            elif arg != cfg["kernel"]:
 +-                userargs += arg + " "
 +-        cfg["args"] = xenargs + " " + cfg["kernel"] + " " + userargs
 +-
 +-    return cfg
 +- 
 + def sniff_netware(fs, cfg):
 +     if not fs.file_exists("/nwserver/xnloader.sys"):
 +         return cfg
- @@ -894,10 +848,7 @@ if __name__ == "__main__":
++@@ -893,10 +847,7 @@ if __name__ == "__main__":
 +         try:
 +             fs = fsimage.open(file, offset, bootfsoptions)
 + 
 +-            chosencfg = sniff_solaris(fs, incfg)
 +-
 +-            if not chosencfg["kernel"]:
 +-                chosencfg = sniff_netware(fs, incfg)
 ++            chosencfg = sniff_netware(fs, incfg)
 + 
 +             if not chosencfg["kernel"]:
 +                 chosencfg = run_grub(file, entry, fs, incfg["args"])
diff --cc debian/patches/tools-python-prefix.diff
index b80e6ae,0000000..7e3dda6
mode 100644,000000..100644
--- a/debian/patches/tools-python-prefix.diff
+++ b/debian/patches/tools-python-prefix.diff
@@@ -1,46 -1,0 +1,46 @@@
- From df9f1c2c05a08348650cc2231557109b412c6c5c Mon Sep 17 00:00:00 2001
++From b18c27e57939f8a7d1b59234640d5fc0436811c5 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:02 +0200
 +Subject: tools-python-prefix.diff
 +
 +Patch-Name: tools-python-prefix.diff
 +---
 + tools/python/setup.py | 4 ++++
 + 1 file changed, 4 insertions(+)
 +
 +diff --git a/tools/python/setup.py b/tools/python/setup.py
- index 439c429..7e3684f 100644
++index 5bf81be..3439066 100644
 +--- a/tools/python/setup.py
 ++++ b/tools/python/setup.py
 +@@ -5,6 +5,7 @@ import os, sys
 + XEN_ROOT = "../.."
 + 
 + extra_compile_args  = [ "-fno-strict-aliasing", "-Werror" ]
 ++extra_link_args = [ "-Wl,-rpath,${ORIGIN}/../../.." ]
 + 
 + PATH_XEN      = XEN_ROOT + "/tools/include"
 + PATH_LIBXC    = XEN_ROOT + "/tools/libxc"
 +@@ -13,6 +14,7 @@ PATH_XENSTORE = XEN_ROOT + "/tools/xenstore"
 + 
 + xc = Extension("xc",
 +                extra_compile_args = extra_compile_args,
 ++               extra_link_args    = extra_link_args,
 +                include_dirs       = [ PATH_XEN, PATH_LIBXC + "/include", "xen/lowlevel/xc" ],
 +                library_dirs       = [ PATH_LIBXC ],
 +                libraries          = [ "xenctrl", "xenguest" ],
 +@@ -21,6 +23,7 @@ xc = Extension("xc",
 + 
 + xs = Extension("xs",
 +                extra_compile_args = extra_compile_args,
 ++               extra_link_args    = extra_link_args,
 +                include_dirs       = [ PATH_XEN, PATH_XENSTORE + "/include", "xen/lowlevel/xs" ],
 +                library_dirs       = [ PATH_XENSTORE ],
 +                libraries          = [ "xenstore" ],
 +@@ -29,6 +32,7 @@ xs = Extension("xs",
 + 
 + xl = Extension("xl",
 +                extra_compile_args = extra_compile_args,
 ++               extra_link_args    = extra_link_args,
 +                include_dirs       = [ PATH_XEN, PATH_LIBXL, PATH_LIBXC + "/include", "xen/lowlevel/xl" ],
 +                library_dirs       = [ PATH_LIBXL ],
 +                libraries          = [ "xenlight" ],
diff --cc debian/patches/tools-rpath.diff
index e5708f9,0000000..2d617b4
mode 100644,000000..100644
--- a/debian/patches/tools-rpath.diff
+++ b/debian/patches/tools-rpath.diff
@@@ -1,23 -1,0 +1,23 @@@
- From 46795c9616501539a896420e201eed3b9cc5da45 Mon Sep 17 00:00:00 2001
++From cdfa126024ef926d0e22d1ed5966917b863c972d Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:51 +0200
 +Subject: tools-rpath.diff
 +
 +Patch-Name: tools-rpath.diff
 +---
 + tools/Rules.mk | 2 ++
 + 1 file changed, 2 insertions(+)
 +
 +diff --git a/tools/Rules.mk b/tools/Rules.mk
- index 87a56dc..6b3a62a 100644
++index 2c422bd..8ea20a3 100644
 +--- a/tools/Rules.mk
 ++++ b/tools/Rules.mk
 +@@ -9,6 +9,8 @@ include $(XEN_ROOT)/Config.mk
 + export _INSTALL := $(INSTALL)
 + INSTALL = $(XEN_ROOT)/tools/cross-install
 + 
 ++LDFLAGS_RPATH = -Wl,-rpath,'$${ORIGIN}$(if $(1),/$(1))'
 ++
 + XEN_INCLUDE        = $(XEN_ROOT)/tools/include
 + XEN_LIBXC          = $(XEN_ROOT)/tools/libxc
 + XEN_XENLIGHT       = $(XEN_ROOT)/tools/libxl
diff --cc debian/patches/tools-xcutils-rpath.diff
index e0a0ca2,0000000..e1282e5
mode 100644,000000..100644
--- a/debian/patches/tools-xcutils-rpath.diff
+++ b/debian/patches/tools-xcutils-rpath.diff
@@@ -1,23 -1,0 +1,23 @@@
- From afbcfac4ca655a752d1e92534311571d2833dbdd Mon Sep 17 00:00:00 2001
++From 49c46e9c43c267676a9dc70d664316d48df05851 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:05 +0200
 +Subject: tools-xcutils-rpath.diff
 +
 +Patch-Name: tools-xcutils-rpath.diff
 +---
 + tools/xcutils/Makefile | 2 ++
 + 1 file changed, 2 insertions(+)
 +
 +diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile
- index 1c5237c..298981b 100644
++index fff519d..fb813b0 100644
 +--- a/tools/xcutils/Makefile
 ++++ b/tools/xcutils/Makefile
 +@@ -19,6 +19,8 @@ CFLAGS += -Werror
 + CFLAGS_readnotes.o  := $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) -I$(XEN_ROOT)/tools/libxc
 + CFLAGS_lsevtchn.o   := $(CFLAGS_libxenctrl)
 + 
 ++APPEND_LDFLAGS += $(call LDFLAGS_RPATH,../lib)
 ++
 + .PHONY: all
 + all: build
 + 
diff --cc debian/patches/tools-xenmon-install.diff
index b42145d,0000000..4b68414
mode 100644,000000..100644
--- a/debian/patches/tools-xenmon-install.diff
+++ b/debian/patches/tools-xenmon-install.diff
@@@ -1,34 -1,0 +1,25 @@@
- From 269f0a106470d5596d32290525445a10f9b42802 Mon Sep 17 00:00:00 2001
++From f85560a654ad09dc421d4d5092df06634dca9e0c Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:31 +0200
 +Subject: tools-xenmon-install.diff
 +
 +Patch-Name: tools-xenmon-install.diff
 +---
-  tools/xenmon/Makefile | 6 +++++-
-  1 file changed, 5 insertions(+), 1 deletion(-)
++ tools/xenmon/Makefile | 4 ++++
++ 1 file changed, 4 insertions(+)
 +
 +diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile
- index eb10389..f79c327 100644
++index cb6d7f8..3eb4fc9 100644
 +--- a/tools/xenmon/Makefile
 ++++ b/tools/xenmon/Makefile
 +@@ -13,6 +13,10 @@
 + XEN_ROOT=$(CURDIR)/../..
 + include $(XEN_ROOT)/tools/Rules.mk
 + 
 ++DEFAULT_PYTHON_PATH := $(shell $(XEN_ROOT)/tools/python/get-path)
 ++PYTHON_PATH ?= $(DEFAULT_PYTHON_PATH)
 ++INSTALL_PYTHON_PROG = $(XEN_ROOT)/tools/python/install-wrap "$(PYTHON_PATH)" $(INSTALL_PROG)
 ++
 + CFLAGS  += -Werror
 + CFLAGS  += $(CFLAGS_libxenctrl)
 + LDLIBS  += $(LDLIBS_libxenctrl)
- @@ -31,7 +35,7 @@ install: build
-  	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
-  	$(INSTALL_PROG) xenbaked $(DESTDIR)$(LIBEXEC_BIN)/xenbaked
-  	$(INSTALL_PROG) xentrace_setmask  $(DESTDIR)$(LIBEXEC_BIN)/xentrace_setmask
- -	$(INSTALL_PROG) xenmon.py  $(DESTDIR)$(LIBEXEC_BIN)/xenmon.py
- +	$(INSTALL_PROG) xenmon.py  $(DESTDIR)$(LIBEXEC_BIN)/xenmon
-  	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
-  	$(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.xenmon
-  
diff --cc debian/patches/tools-xenmon-prefix.diff
index 16ff8a2,0000000..364b96f
mode 100644,000000..100644
--- a/debian/patches/tools-xenmon-prefix.diff
+++ b/debian/patches/tools-xenmon-prefix.diff
@@@ -1,37 -1,0 +1,37 @@@
- From 028888280b9f88d38e444f2456381a07587eff73 Mon Sep 17 00:00:00 2001
++From 45980ee259b429b29906f4737a6d809c64454500 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:06 +0200
 +Subject: tools-xenmon-prefix.diff
 +
 +Patch-Name: tools-xenmon-prefix.diff
 +---
 + tools/xenmon/Makefile | 9 +++++----
 + 1 file changed, 5 insertions(+), 4 deletions(-)
 +
 +diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile
- index 3fe87ba..eb10389 100644
++index 20ea100..cb6d7f8 100644
 +--- a/tools/xenmon/Makefile
 ++++ b/tools/xenmon/Makefile
 +@@ -16,6 +16,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 + CFLAGS  += -Werror
 + CFLAGS  += $(CFLAGS_libxenctrl)
 + LDLIBS  += $(LDLIBS_libxenctrl)
 ++LDFLAGS += $(call LDFLAGS_RPATH,../lib)
 + 
 + SCRIPTS = xenmon.py
 + 
 +@@ -27,10 +28,10 @@ build: xentrace_setmask xenbaked
 + 
 + .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)$(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)$(LIBEXEC_BIN)
 ++	$(INSTALL_PROG) xenbaked $(DESTDIR)$(LIBEXEC_BIN)/xenbaked
 ++	$(INSTALL_PROG) xentrace_setmask  $(DESTDIR)$(LIBEXEC_BIN)/xentrace_setmask
 ++	$(INSTALL_PROG) xenmon.py  $(DESTDIR)$(LIBEXEC_BIN)/xenmon.py
-  	$(INSTALL_DIR) $(DESTDIR)$(DOCDIR)
-  	$(INSTALL_DATA) README $(DESTDIR)$(DOCDIR)/README.xenmon
 + 
++ .PHONY: clean
++ clean:
diff --cc debian/patches/tools-xenpaging-prefix.diff
index 0e6f7c9,0000000..ca3d366
mode 100644,000000..100644
--- a/debian/patches/tools-xenpaging-prefix.diff
+++ b/debian/patches/tools-xenpaging-prefix.diff
@@@ -1,23 -1,0 +1,23 @@@
- From 78a248bfa98c3f18aea03fd284d0aeec6e65c136 Mon Sep 17 00:00:00 2001
++From 96a45c8ccb73dc6763aca3f1233a79ab97fb0c88 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:08 +0200
 +Subject: tools-xenpaging-prefix.diff
 +
 +Patch-Name: tools-xenpaging-prefix.diff
 +---
 + tools/xenpaging/Makefile | 2 +-
 + 1 file changed, 1 insertion(+), 1 deletion(-)
 +
 +diff --git a/tools/xenpaging/Makefile b/tools/xenpaging/Makefile
- index c742e62..ffdc29b 100644
++index 2407a30..f3747b3 100644
 +--- a/tools/xenpaging/Makefile
 ++++ b/tools/xenpaging/Makefile
 +@@ -4,7 +4,7 @@ include $(XEN_ROOT)/tools/Rules.mk
 + # xenpaging.c and file_ops.c incorrectly use libxc internals
 + CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(PTHREAD_CFLAGS) -I$(XEN_ROOT)/tools/libxc
 + LDLIBS += $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore) $(PTHREAD_LIBS)
 +-LDFLAGS += $(PTHREAD_LDFLAGS)
 ++LDFLAGS += $(PTHREAD_LDFLAGS) $(call LDFLAGS_RPATH,../lib)
 + 
 + POLICY    = default
 + 
diff --cc debian/patches/tools-xenpmd-prefix.diff
index 14455ab,0000000..24e2af4
mode 100644,000000..100644
--- a/debian/patches/tools-xenpmd-prefix.diff
+++ b/debian/patches/tools-xenpmd-prefix.diff
@@@ -1,25 -1,0 +1,25 @@@
- From 5ee4b71d8a82fd58ae3b7b4e7fdc731288fc33b5 Mon Sep 17 00:00:00 2001
++From 1eb37137da67120b35218a9ad52c246afb109508 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 13 Dec 2014 19:37:02 +0100
 +Subject: tools-xenpmd-prefix.diff
 +
 +Patch-Name: tools-xenpmd-prefix.diff
 +---
 + tools/xenpmd/Makefile | 4 ++--
 + 1 file changed, 2 insertions(+), 2 deletions(-)
 +
 +diff --git a/tools/xenpmd/Makefile b/tools/xenpmd/Makefile
- index 2d925df..d7c0b6c 100644
++index 55e8fc5..470e963 100644
 +--- a/tools/xenpmd/Makefile
 ++++ b/tools/xenpmd/Makefile
 +@@ -11,8 +11,8 @@ all: xenpmd
 + 
 + .PHONY: install
 + install: all
- -	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
- -	$(INSTALL_PROG) xenpmd $(DESTDIR)$(SBINDIR)
++-	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
++-	$(INSTALL_PROG) xenpmd $(DESTDIR)$(sbindir)
 ++	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 ++	$(INSTALL_PROG) xenpmd $(DESTDIR)$(LIBEXEC_BIN)
 + 
 + .PHONY: clean
 + clean:
diff --cc debian/patches/tools-xenstat-abiname.diff
index 259aa8c,0000000..2f149ac
mode 100644,000000..100644
--- a/debian/patches/tools-xenstat-abiname.diff
+++ b/debian/patches/tools-xenstat-abiname.diff
@@@ -1,65 -1,0 +1,66 @@@
- From 7d2a49d05d5a1bae20e4073734090658245678fb Mon Sep 17 00:00:00 2001
++From 6d0ff0f7897f89ce62bb17e3bb7148d824ce2155 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:50 +0200
 +Subject: tools-xenstat-abiname.diff
 +
 +Patch-Name: tools-xenstat-abiname.diff
 +---
-  tools/xenstat/libxenstat/Makefile | 20 ++++----------------
-  1 file changed, 4 insertions(+), 16 deletions(-)
++ tools/xenstat/libxenstat/Makefile | 22 +++++-----------------
++ 1 file changed, 5 insertions(+), 17 deletions(-)
 +
 +diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile
- index 86068cb..3469385 100644
++index 850d24a..7c13c06 100644
 +--- a/tools/xenstat/libxenstat/Makefile
 ++++ b/tools/xenstat/libxenstat/Makefile
 +@@ -18,18 +18,14 @@ include $(XEN_ROOT)/tools/Rules.mk
 + LDCONFIG=ldconfig
 + MAKE_LINK=ln -sf
 + 
 +-MAJOR=0
 +-MINOR=0
 +-
 + LIB=src/libxenstat.a
 +-SHLIB=src/libxenstat.so.$(MAJOR).$(MINOR)
 +-SHLIB_LINKS=src/libxenstat.so.$(MAJOR) src/libxenstat.so
++-OBJECTS-y=src/xenstat.o src/xenstat_qmp.o
 ++SHLIB=src/libxenstat.so
-  OBJECTS-y=src/xenstat.o
+++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
 + OBJECTS-$(CONFIG_FreeBSD) += src/xenstat_freebsd.o
 +-SONAME_FLAGS=-Wl,$(SONAME_LDFLAG) -Wl,libxenstat.so.$(MAJOR)
 ++SONAME_FLAGS=-Wl,$(SONAME_LDFLAG),libxenstat.so
 + 
 + CFLAGS+=-fPIC
-  CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude)
++ CFLAGS+=-Isrc $(CFLAGS_libxenctrl) $(CFLAGS_libxenstore) $(CFLAGS_xeninclude) -include $(XEN_ROOT)/tools/config.h
 +@@ -38,7 +34,7 @@ LDLIBS-y = $(LDLIBS_libxenstore) $(LDLIBS_libxenctrl)
 + LDLIBS-$(CONFIG_SunOS) += -lkstat
 + 
 + .PHONY: all
 +-all: $(LIB) $(SHLIB) $(SHLIB_LINKS)
 ++all: $(LIB) $(SHLIB)
 + 
 + $(LIB): $(OBJECTS-y)
 + 	$(AR) rc $@ $^
 +@@ -48,19 +44,11 @@ $(SHLIB): $(OBJECTS-y)
 + 	$(CC) $(LDFLAGS) $(SONAME_FLAGS) $(SHLIB_LDFLAGS) -o $@ \
 + 	    $(OBJECTS-y) $(LDLIBS-y) $(APPEND_LDFLAGS)
 + 
 +-src/libxenstat.so.$(MAJOR): $(SHLIB)
 +-	$(MAKE_LINK) $(<F) $@
 +-
 +-src/libxenstat.so: src/libxenstat.so.$(MAJOR)
 +-	$(MAKE_LINK) $(<F) $@
 +-
 + .PHONY: install
 + install: all
-  	$(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(INCLUDEDIR)
-  	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIBDIR)/libxenstat.a
- -	$(INSTALL_PROG) src/libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
- -	ln -sf libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)/libxenstat.so.$(MAJOR)
- -	ln -sf libxenstat.so.$(MAJOR) $(DESTDIR)$(LIBDIR)/libxenstat.so
- +	$(INSTALL_PROG) src/libxenstat.so $(DESTDIR)$(LIBDIR)
++ 	$(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir)
++ 	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(libdir)/libxenstat.a
++-	$(INSTALL_PROG) src/libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)
++-	ln -sf libxenstat.so.$(MAJOR).$(MINOR) $(DESTDIR)$(libdir)/libxenstat.so.$(MAJOR)
++-	ln -sf libxenstat.so.$(MAJOR) $(DESTDIR)$(libdir)/libxenstat.so
+++	$(INSTALL_PROG) src/libxenstat.so $(DESTDIR)$(libdir)
 + 
 + PYLIB=bindings/swig/python/_xenstat.so
 + PYMOD=bindings/swig/python/xenstat.py
diff --cc debian/patches/tools-xenstat-prefix.diff
index f069804,0000000..adab1fb
mode 100644,000000..100644
--- a/debian/patches/tools-xenstat-prefix.diff
+++ b/debian/patches/tools-xenstat-prefix.diff
@@@ -1,52 -1,0 +1,62 @@@
- From 1c52a39aa878db11da7fbef9c573f39fcaaa5d37 Mon Sep 17 00:00:00 2001
++From fa1d487e1c8245cb886d6b69e27bf35319cc5c9c Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:09 +0200
 +Subject: tools-xenstat-prefix.diff
 +
 +Patch-Name: tools-xenstat-prefix.diff
 +---
-  tools/xenstat/libxenstat/Makefile | 3 ++-
++ tools/xenstat/libxenstat/Makefile | 6 ++++--
 + tools/xenstat/xentop/Makefile     | 6 ++++--
-  2 files changed, 6 insertions(+), 3 deletions(-)
++ 2 files changed, 8 insertions(+), 4 deletions(-)
 +
 +diff --git a/tools/xenstat/libxenstat/Makefile b/tools/xenstat/libxenstat/Makefile
- index 3469385..661ab16 100644
++index 7c13c06..75b4b68 100644
 +--- a/tools/xenstat/libxenstat/Makefile
 ++++ b/tools/xenstat/libxenstat/Makefile
- @@ -46,9 +46,10 @@ $(SHLIB): $(OBJECTS-y)
++@@ -20,7 +20,7 @@ MAKE_LINK=ln -sf
++ 
++ LIB=src/libxenstat.a
++ SHLIB=src/libxenstat.so
++-OBJECTS-y=src/xenstat.o
+++OBJECTS-y=src/xenstat.o src/xenstat_qmp.o
++ OBJECTS-$(CONFIG_Linux) += src/xenstat_linux.o
++ OBJECTS-$(CONFIG_SunOS) += src/xenstat_solaris.o
++ OBJECTS-$(CONFIG_NetBSD) += src/xenstat_netbsd.o
++@@ -46,9 +46,11 @@ $(SHLIB): $(OBJECTS-y)
 + 
 + .PHONY: install
 + install: all
- +	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR) $(DESTDIR)$(LIBEXEC_LIB)
-  	$(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(INCLUDEDIR)
-  	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(LIBDIR)/libxenstat.a
- -	$(INSTALL_PROG) src/libxenstat.so $(DESTDIR)$(LIBDIR)
+++	$(INSTALL_DIR) $(DESTDIR)$(includedir)
+++	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_LIB)
++ 	$(INSTALL_DATA) src/xenstat.h $(DESTDIR)$(includedir)
++ 	$(INSTALL_DATA) $(LIB) $(DESTDIR)$(libdir)/libxenstat.a
++-	$(INSTALL_PROG) src/libxenstat.so $(DESTDIR)$(libdir)
 ++	$(INSTALL_PROG) src/libxenstat.so $(DESTDIR)$(LIBEXEC_LIB)
 + 
 + PYLIB=bindings/swig/python/_xenstat.so
 + PYMOD=bindings/swig/python/xenstat.py
 +diff --git a/tools/xenstat/xentop/Makefile b/tools/xenstat/xentop/Makefile
- index 076e44c..33e8740 100644
++index 1cc393f..167e5db 100644
 +--- a/tools/xenstat/xentop/Makefile
 ++++ b/tools/xenstat/xentop/Makefile
 +@@ -19,7 +19,9 @@ all install xentop:
 + else
 + 
 + CFLAGS += -DGCC_PRINTF -Werror $(CFLAGS_libxenstat)
 ++LDFLAGS += $(call LDFLAGS_RPATH,../lib)
-  LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(SOCKET_LIBS) -lm
++ LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(TINFO_LIBS) $(SOCKET_LIBS) -lm -lyajl
 ++LDLIBS += $(LDLIBS_libxenctrl) $(LDLIBS_libxenstore)
 + CFLAGS += -DHOST_$(XEN_OS)
 + 
-  # Include configure output (config.h) to headers search path
++ # Include configure output (config.h)
 +@@ -31,8 +33,8 @@ all: xentop
 + 
 + .PHONY: install
-  install: xentop xentop.1
- -	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
- -	$(INSTALL_PROG) xentop $(DESTDIR)$(SBINDIR)/xentop
++ install: xentop
++-	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
++-	$(INSTALL_PROG) xentop $(DESTDIR)$(sbindir)/xentop
 ++	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
 ++	$(INSTALL_PROG) xentop $(DESTDIR)$(LIBEXEC_BIN)/xentop
-  	$(INSTALL_DIR) $(DESTDIR)$(MAN1DIR)
-  	$(INSTALL_DATA) xentop.1 $(DESTDIR)$(MAN1DIR)/xentop.1
++ 
++ endif
 + 
diff --cc debian/patches/tools-xenstore-compatibility.diff
index b41a03f,0000000..eb48eed
mode 100644,000000..100644
--- a/debian/patches/tools-xenstore-compatibility.diff
+++ b/debian/patches/tools-xenstore-compatibility.diff
@@@ -1,62 -1,0 +1,62 @@@
- From 72b172f063b63df29fc61442fa64d74806b3a247 Mon Sep 17 00:00:00 2001
++From b00b02f0283fa7536ab44264a21c2dcdaa22d631 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:36 +0200
 +Subject: tools-xenstore-compatibility.diff
 +
 +Patch-Name: tools-xenstore-compatibility.diff
 +---
 + tools/xenstore/include/xenstore.h | 1 +
 + tools/xenstore/xenstore_client.c  | 2 +-
 + tools/xenstore/xs.c               | 4 +++-
 + 3 files changed, 5 insertions(+), 2 deletions(-)
 +
 +diff --git a/tools/xenstore/include/xenstore.h b/tools/xenstore/include/xenstore.h
- index b4b113e..be2491b 100644
++index 42c0dc7..8a9c5c2 100644
 +--- a/tools/xenstore/include/xenstore.h
 ++++ b/tools/xenstore/include/xenstore.h
- @@ -26,6 +26,7 @@
++@@ -25,6 +25,7 @@
 + 
 + #define XS_OPEN_READONLY	1UL<<0
 + #define XS_OPEN_SOCKETONLY      1UL<<1
 ++#define XS_OPEN_DOMAINONLY      1UL<<2
 + 
 + /*
 +  * Setting XS_UNWATCH_FILTER arranges that after xs_unwatch, no
 +diff --git a/tools/xenstore/xenstore_client.c b/tools/xenstore/xenstore_client.c
- index 1054f18..e6fa58d 100644
++index 3d14d37..d7ae1ec 100644
 +--- a/tools/xenstore/xenstore_client.c
 ++++ b/tools/xenstore/xenstore_client.c
- @@ -635,7 +635,7 @@ main(int argc, char **argv)
++@@ -636,7 +636,7 @@ main(int argc, char **argv)
 + 	    max_width = ws.ws_col - 2;
 +     }
 + 
 +-    xsh = xs_open(socket ? XS_OPEN_SOCKETONLY : 0);
 ++    xsh = xs_open(socket ? XS_OPEN_SOCKETONLY : XS_OPEN_DOMAINONLY);
 +     if (xsh == NULL) err(1, "xs_open");
 + 
 + again:
 +diff --git a/tools/xenstore/xs.c b/tools/xenstore/xs.c
- index 968141d..738d86f 100644
++index d1e01ba..be82927 100644
 +--- a/tools/xenstore/xs.c
 ++++ b/tools/xenstore/xs.c
- @@ -282,17 +282,19 @@ struct xs_handle *xs_daemon_open_readonly(void)
++@@ -281,17 +281,19 @@ struct xs_handle *xs_daemon_open_readonly(void)
 + 
 + struct xs_handle *xs_domain_open(void)
 + {
 +-	return xs_open(0);
 ++	return xs_open(XS_OPEN_DOMAINONLY);
 + }
 + 
 + struct xs_handle *xs_open(unsigned long flags)
 + {
 + 	struct xs_handle *xsh = NULL;
 + 
 ++	if (!(flags & XS_OPEN_DOMAINONLY)) {
 + 	if (flags & XS_OPEN_READONLY)
 + 		xsh = get_handle(xs_daemon_socket_ro());
 + 	else
 + 		xsh = get_handle(xs_daemon_socket());
 ++	}
 + 
 + 	if (!xsh && !(flags & XS_OPEN_SOCKETONLY))
 + 		xsh = get_handle(xs_domain_dev());
diff --cc debian/patches/tools-xenstore-prefix.diff
index b96ecad,0000000..320f420
mode 100644,000000..100644
--- a/debian/patches/tools-xenstore-prefix.diff
+++ b/debian/patches/tools-xenstore-prefix.diff
@@@ -1,61 -1,0 +1,53 @@@
- From 399dfec999c7fcfbf61913fb0373e2c3d5d8b66a Mon Sep 17 00:00:00 2001
++From 93b026099b1360ad25a4bfb9dc258b848194f307 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:12 +0200
 +Subject: tools-xenstore-prefix.diff
 +
 +Patch-Name: tools-xenstore-prefix.diff
 +---
-  tools/xenstore/Makefile | 18 ++++++++++--------
-  1 file changed, 10 insertions(+), 8 deletions(-)
++ tools/xenstore/Makefile | 12 +++++++-----
++ 1 file changed, 7 insertions(+), 5 deletions(-)
 +
 +diff --git a/tools/xenstore/Makefile b/tools/xenstore/Makefile
- index 11b6a06..183b4d8 100644
++index 1b4a494..f837c6e 100644
 +--- a/tools/xenstore/Makefile
 ++++ b/tools/xenstore/Makefile
- @@ -17,6 +17,8 @@ LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS)
++@@ -18,6 +18,8 @@ LDFLAGS-$(CONFIG_SYSTEMD) += $(SYSTEMD_LIBS)
 + CFLAGS  += $(CFLAGS-y)
 + LDFLAGS += $(LDFLAGS-y)
 + 
 ++LDFLAGS_libxenctrl += $(call LDFLAGS_RPATH,../lib)
 ++
 + CLIENTS := xenstore-exists xenstore-list xenstore-read xenstore-rm xenstore-chmod
 + CLIENTS += xenstore-write xenstore-ls xenstore-watch
 + 
- @@ -74,10 +76,10 @@ endif
++@@ -75,10 +77,10 @@ endif
 + init-xenstore-domain.o: CFLAGS += $(CFLAGS_libxenguest)
 + 
 + init-xenstore-domain: init-xenstore-domain.o $(LIBXENSTORE)
 +-	$(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) -o $@ $(APPEND_LDFLAGS)
 ++	$(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) $(LDLIBS_libxenstore) $(call LDFLAGS_RPATH,../lib) -o $@ $(APPEND_LDFLAGS)
 + 
 + xenstored: $(XENSTORED_OBJS)
 +-	$(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(SOCKET_LIBS) -o $@ $(APPEND_LDFLAGS)
 ++	$(CC) $^ $(LDFLAGS) $(LDLIBS_libxenctrl) $(SOCKET_LIBS) $(call LDFLAGS_RPATH,../lib) -o $@ $(APPEND_LDFLAGS)
 + 
 + xenstored.a: $(XENSTORED_OBJS)
 + 	$(AR) cr $@ $^
- @@ -125,18 +127,18 @@ tarball: clean
-  
-  .PHONY: install
++@@ -131,13 +133,13 @@ tarball: clean
 + install: all
- -	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
++ 	$(INSTALL_DIR) $(DESTDIR)$(bindir)
++ 	$(INSTALL_DIR) $(DESTDIR)$(includedir)
 ++	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
- +	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
-  	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)
-  	$(INSTALL_DIR) $(DESTDIR)$(INCLUDEDIR)/xenstore-compat
++ 	$(INSTALL_DIR) $(DESTDIR)$(includedir)/xenstore-compat
 + ifeq ($(XENSTORE_XENSTORED),y)
- -	$(INSTALL_DIR) $(DESTDIR)$(SBINDIR)
++-	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 + 	$(INSTALL_DIR) $(DESTDIR)$(XEN_LIB_STORED)
- -	$(INSTALL_PROG) xenstored $(DESTDIR)$(SBINDIR)
++-	$(INSTALL_PROG) xenstored $(DESTDIR)$(sbindir)
 ++	$(INSTALL_PROG) xenstored $(DESTDIR)$(LIBEXEC_BIN)
 + endif
- -	$(INSTALL_PROG) xenstore-control $(DESTDIR)$(BINDIR)
- -	$(INSTALL_PROG) xenstore $(DESTDIR)$(BINDIR)
++-	$(INSTALL_PROG) xenstore-control $(DESTDIR)$(bindir)
 ++	$(INSTALL_PROG) xenstore-control $(DESTDIR)$(LIBEXEC_BIN)
- +	$(INSTALL_PROG) xenstore $(DESTDIR)$(SBINDIR)
++ 	$(INSTALL_PROG) xenstore $(DESTDIR)$(bindir)
 + 	set -e ; for c in $(CLIENTS) ; do \
- -		ln -f $(DESTDIR)$(BINDIR)/xenstore $(DESTDIR)$(BINDIR)/$${c} ; \
- +		ln -f $(DESTDIR)$(SBINDIR)/xenstore $(DESTDIR)$(SBINDIR)/$${c} ; \
-  	done
-  	$(INSTALL_DIR) $(DESTDIR)$(LIBDIR)
-  	$(INSTALL_SHLIB) libxenstore.so.$(MAJOR).$(MINOR) $(DESTDIR)$(LIBDIR)
++ 		ln -f $(DESTDIR)$(bindir)/xenstore $(DESTDIR)$(bindir)/$${c} ; \
diff --cc debian/patches/tools-xentrace-prefix.diff
index 5c9e598,0000000..79c894a
mode 100644,000000..100644
--- a/debian/patches/tools-xentrace-prefix.diff
+++ b/debian/patches/tools-xentrace-prefix.diff
@@@ -1,39 -1,0 +1,41 @@@
- From 5ba372a685d180fea38790377bbc3847342a32d4 Mon Sep 17 00:00:00 2001
++From 7912cb831bac7eb34095049a470b5a2dab85cfe4 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:47:14 +0200
 +Subject: tools-xentrace-prefix.diff
 +
 +Patch-Name: tools-xentrace-prefix.diff
 +---
-  tools/xentrace/Makefile | 9 ++++-----
-  1 file changed, 4 insertions(+), 5 deletions(-)
++ tools/xentrace/Makefile | 13 ++++---------
++ 1 file changed, 4 insertions(+), 9 deletions(-)
 +
 +diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile
- index b821952..ffe2f0d 100644
++index 6c13cd1..a436718 100644
 +--- a/tools/xentrace/Makefile
 ++++ b/tools/xentrace/Makefile
 +@@ -5,6 +5,7 @@ CFLAGS += -Werror
 + 
 + CFLAGS += $(CFLAGS_libxenctrl)
-  LDLIBS += $(LDLIBS_libxenctrl)
++ LDLIBS += $(LDLIBS_libxenctrl) $(ARGP_LDFLAGS)
 ++LDFLAGS += $(call LDFLAGS_RPATH,../lib)
 + 
-  BIN      = xentrace xentrace_setsize
-  LIBBIN   = xenctx
- @@ -20,13 +21,11 @@ build: $(BIN) $(LIBBIN)
++ BIN-$(CONFIG_X86) = xenalyze
++ BIN      = $(BIN-y)
++@@ -20,15 +21,9 @@ build: $(BIN) $(SBIN) $(LIBBIN)
 + 
 + .PHONY: install
 + install: build
- -	$(INSTALL_DIR) $(DESTDIR)$(BINDIR)
++-	$(INSTALL_DIR) $(DESTDIR)$(bindir)
++-	$(INSTALL_DIR) $(DESTDIR)$(sbindir)
 +-	[ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
- +	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
-  	$(INSTALL_DIR) $(DESTDIR)$(MAN1DIR)
-  	$(INSTALL_DIR) $(DESTDIR)$(MAN8DIR)
- -	$(INSTALL_PROG) $(BIN) $(DESTDIR)$(BINDIR)
- -	$(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(BINDIR)
++-ifneq ($(BIN),)
++-	$(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir)
++-endif
++-	$(INSTALL_PROG) $(SBIN) $(DESTDIR)$(sbindir)
++-	$(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir)
 +-	[ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN)
- +	$(INSTALL_PROG) $(BIN) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN)
+++	$(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN)
+++	$(INSTALL_PROG) $(BIN) $(SBIN) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN)
 ++	$(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(LIBEXEC_BIN)
-  	$(INSTALL_DATA) $(MAN1) $(DESTDIR)$(MAN1DIR)
-  	$(INSTALL_DATA) $(MAN8) $(DESTDIR)$(MAN8DIR)
 + 
++ .PHONY: clean
++ clean:
diff --cc debian/patches/version.diff
index 3ee4dd2,0000000..5850257
mode 100644,000000..100644
--- a/debian/patches/version.diff
+++ b/debian/patches/version.diff
@@@ -1,170 -1,0 +1,167 @@@
- From bc6195d65e5765928d9ab890b1bff72701e9ff23 Mon Sep 17 00:00:00 2001
++From 200fc5d2a81fd82c09c574bb5fe69060a6ba2554 Mon Sep 17 00:00:00 2001
 +From: Bastian Blank <waldi at debian.org>
 +Date: Sat, 5 Jul 2014 11:46:43 +0200
 +Subject: version
 +
 +Patch-Name: version.diff
 +---
-  xen/Makefile                 | 11 +++++------
++ xen/Makefile                 |  8 +++++---
 + xen/common/kernel.c          |  4 ++--
 + xen/common/version.c         | 21 +++++++++++----------
 + xen/drivers/char/console.c   |  9 +++------
 + xen/include/xen/compile.h.in |  8 ++++----
 + xen/include/xen/version.h    |  8 ++++----
-  6 files changed, 29 insertions(+), 32 deletions(-)
++ 6 files changed, 29 insertions(+), 29 deletions(-)
 +
 +diff --git a/xen/Makefile b/xen/Makefile
- index 5720393..11c7369 100644
++index 4c54e9b..007b1a0 100644
 +--- a/xen/Makefile
 ++++ b/xen/Makefile
- @@ -125,20 +125,19 @@ delete-unfresh-files:
++@@ -129,7 +129,7 @@ delete-unfresh-files:
 + 	@mv -f $@.tmp $@
 + 
 + # compile.h contains dynamic build info. Rebuilt on every 'make' invocation.
 +-include/xen/compile.h: include/xen/compile.h.in .banner
 ++include/xen/compile.h: include/xen/compile.h.in
-  	@sed -e 's/@@date@@/$(shell LC_ALL=C date)/g' \
-  	    -e 's/@@time@@/$(shell LC_ALL=C date +%T)/g' \
- -	    -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
- -	    -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
- -	    -e 's/@@hostname@@/$(shell hostname)/g' \
-  	    -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!g' \
-  	    -e 's/@@version@@/$(XEN_VERSION)/g' \
++ 	@sed -e 's/@@date@@/$(XEN_BUILD_DATE)/g' \
++ 	    -e 's/@@time@@/$(XEN_BUILD_TIME)/g' \
++ 	    -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
++@@ -140,9 +140,11 @@ include/xen/compile.h: include/xen/compile.h.in .banner
 + 	    -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
 + 	    -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \
 + 	    -e 's!@@changeset@@!$(shell tools/scmversion $(XEN_ROOT) || echo "unavailable")!g' \
 ++	    -e 's/@@system_distribution@@/$(shell lsb_release -is)/g' \
 ++	    -e 's/@@system_maintainer_domain@@/$(shell cd ../../../..; dpkg-parsechangelog | sed -ne 's,^Maintainer: .[^<]*<[^@>]*@\([^>]*\)>,\1,p')/g' \
 ++	    -e 's/@@system_maintainer_local@@/$(shell cd ../../../..; dpkg-parsechangelog | sed -ne 's,^Maintainer: .[^<]*<\([^@>]*\)@.*>,\1,p')/g' \
 ++	    -e 's/@@system_version@@/$(shell cd ../../../..; dpkg-parsechangelog | awk '/^Version:/ {print $$2}')/g' \
 + 	    < include/xen/compile.h.in > $@.new
 +-	@cat .banner
 +-	@$(PYTHON) tools/fig-to-oct.py < .banner >> $@.new
 + 	@mv -f $@.new $@
 + 
 + include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s
 +diff --git a/xen/common/kernel.c b/xen/common/kernel.c
- index bafd44f..4a140ad 100644
++index 6a3196a..80c1950 100644
 +--- a/xen/common/kernel.c
 ++++ b/xen/common/kernel.c
- @@ -254,8 +254,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
++@@ -251,8 +251,8 @@ DO(xen_version)(int cmd, XEN_GUEST_HANDLE_PARAM(void) arg)
 + 
 +         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());
 ++        safe_strcpy(info.compile_by,     xen_compile_system_maintainer_local());
 ++        safe_strcpy(info.compile_domain, xen_compile_system_maintainer_domain());
 +         safe_strcpy(info.compile_date,   xen_compile_date());
 +         if ( copy_to_guest(arg, &info, 1) )
 +             return -EFAULT;
 +diff --git a/xen/common/version.c b/xen/common/version.c
 +index b152e27..7b5af55 100644
 +--- a/xen/common/version.c
 ++++ b/xen/common/version.c
 +@@ -11,19 +11,24 @@ const char *xen_compile_time(void)
 +     return XEN_COMPILE_TIME;
 + }
 + 
 +-const char *xen_compile_by(void)
 ++const char *xen_compile_system_distribution(void)
 + {
 +-    return XEN_COMPILE_BY;
 ++    return XEN_COMPILE_SYSTEM_DISTRIBUTION;
 + }
 + 
 +-const char *xen_compile_domain(void)
 ++const char *xen_compile_system_maintainer_local(void)
 + {
 +-    return XEN_COMPILE_DOMAIN;
 ++    return XEN_COMPILE_SYSTEM_MAINTAINER_LOCAL;
 + }
 + 
 +-const char *xen_compile_host(void)
 ++const char *xen_compile_system_maintainer_domain(void)
 + {
 +-    return XEN_COMPILE_HOST;
 ++    return XEN_COMPILE_SYSTEM_MAINTAINER_DOMAIN;
 ++}
 ++
 ++const char *xen_compile_system_version(void)
 ++{
 ++    return XEN_COMPILE_SYSTEM_VERSION;
 + }
 + 
 + const char *xen_compiler(void)
 +@@ -51,7 +56,3 @@ const char *xen_changeset(void)
 +     return XEN_CHANGESET;
 + }
 + 
 +-const char *xen_banner(void)
 +-{
 +-    return XEN_BANNER;
 +-}
 +diff --git a/xen/drivers/char/console.c b/xen/drivers/char/console.c
- index 0b8d3d4..99507df 100644
++index fce4cc8..0bd02ce 100644
 +--- a/xen/drivers/char/console.c
 ++++ b/xen/drivers/char/console.c
 +@@ -727,14 +727,11 @@ void __init console_init_preirq(void)
 +     serial_set_rx_handler(sercon_handle, serial_rx);
 + 
 +     /* HELLO WORLD --- start-of-day banner text. */
 +-    spin_lock(&console_lock);
 +-    __putstr(xen_banner());
 +-    spin_unlock(&console_lock);
 +-    printk("Xen version %d.%d%s (%s@%s) (%s) debug=%c %s\n",
 ++    printk("Xen version %d.%d%s (%s %s) (%s@%s) (%s) debug=%c %s\n",
 +            xen_major_version(), xen_minor_version(), xen_extra_version(),
 +-           xen_compile_by(), xen_compile_domain(),
 ++           xen_compile_system_distribution(), xen_compile_system_version(),
 ++           xen_compile_system_maintainer_local(), xen_compile_system_maintainer_domain(),
 +            xen_compiler(), debug_build() ? 'y' : 'n', xen_compile_date());
 +-    printk("Latest ChangeSet: %s\n", xen_changeset());
 + 
 +     if ( opt_sync_console )
 +     {
 +diff --git a/xen/include/xen/compile.h.in b/xen/include/xen/compile.h.in
 +index 440ecb2..0c3ca58 100644
 +--- a/xen/include/xen/compile.h.in
 ++++ b/xen/include/xen/compile.h.in
 +@@ -1,8 +1,9 @@
 + #define XEN_COMPILE_DATE	"@@date@@"
 + #define XEN_COMPILE_TIME	"@@time@@"
 +-#define XEN_COMPILE_BY		"@@whoami@@"
 +-#define XEN_COMPILE_DOMAIN	"@@domain@@"
 +-#define XEN_COMPILE_HOST	"@@hostname@@"
 ++#define XEN_COMPILE_SYSTEM_DISTRIBUTION		"@@system_distribution@@"
 ++#define XEN_COMPILE_SYSTEM_MAINTAINER_DOMAIN	"@@system_maintainer_domain@@"
 ++#define XEN_COMPILE_SYSTEM_MAINTAINER_LOCAL	"@@system_maintainer_local@@"
 ++#define XEN_COMPILE_SYSTEM_VERSION		"@@system_version@@"
 + #define XEN_COMPILER		"@@compiler@@"
 + 
 + #define XEN_VERSION		@@version@@
 +@@ -10,4 +11,3 @@
 + #define XEN_EXTRAVERSION	"@@extraversion@@"
 + 
 + #define XEN_CHANGESET		"@@changeset@@"
 +-#define XEN_BANNER		\
 +diff --git a/xen/include/xen/version.h b/xen/include/xen/version.h
 +index 81a3c7d..c25937e 100644
 +--- a/xen/include/xen/version.h
 ++++ b/xen/include/xen/version.h
 +@@ -3,14 +3,14 @@
 + 
 + const char *xen_compile_date(void);
 + const char *xen_compile_time(void);
 +-const char *xen_compile_by(void);
 +-const char *xen_compile_domain(void);
 +-const char *xen_compile_host(void);
 ++const char *xen_compile_system_distribution(void);
 ++const char *xen_compile_system_maintainer_domain(void);
 ++const char *xen_compile_system_maintainer_local(void);
 ++const char *xen_compile_system_version(void);
 + const char *xen_compiler(void);
 + unsigned int xen_major_version(void);
 + unsigned int xen_minor_version(void);
 + const char *xen_extra_version(void);
 + const char *xen_changeset(void);
 +-const char *xen_banner(void);
 + 
 + #endif /* __XEN_VERSION_H__ */

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-xen/xen.git



More information about the Pkg-xen-changes mailing list