diff --git a/.gitignore b/.gitignore
index 877c2579ab..5c17736c2e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -49,158 +49,6 @@ build-*
 dist/*
 extras/mini-os*
 install/*
-tools/*/build/lib*/*.py
-tools/libs/toolcore/headers.chk
-tools/libs/toollog/headers.chk
-tools/libs/evtchn/headers.chk
-tools/libs/gnttab/headers.chk
-tools/libs/hypfs/headers.chk
-tools/libs/call/headers.chk
-tools/libs/foreignmemory/headers.chk
-tools/libs/devicemodel/headers.chk
-tools/console/xenconsole
-tools/console/xenconsoled
-tools/console/client/_paths.h
-tools/console/daemon/_paths.h
-tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/*
-tools/debugger/gdb/gdb-6.2.1/*
-tools/debugger/gdbsx/gdbsx
-tools/debugger/xenitp/xenitp
-tools/flask/utils/flask-getenforce
-tools/flask/utils/flask-get-bool
-tools/flask/utils/flask-loadpolicy
-tools/flask/utils/flask-setenforce
-tools/flask/utils/flask-set-bool
-tools/flask/utils/flask-label-pci
-tools/fuzz/libelf/afl-libelf-fuzzer
-tools/fuzz/x86_instruction_emulator/asm
-tools/fuzz/x86_instruction_emulator/afl-harness
-tools/fuzz/x86_instruction_emulator/afl-harness-cov
-tools/fuzz/x86_instruction_emulator/wrappers.c
-tools/fuzz/x86_instruction_emulator/x86_emulate
-tools/fuzz/x86_instruction_emulator/x86-emulate.[ch]
-tools/helpers/_paths.h
-tools/helpers/init-xenstore-domain
-tools/helpers/xen-init-dom0
-tools/hotplug/common/hotplugpath.sh
-tools/hotplug/FreeBSD/rc.d/xencommons
-tools/hotplug/FreeBSD/rc.d/xendriverdomain
-tools/hotplug/Linux/init.d/sysconfig.xencommons
-tools/hotplug/Linux/init.d/sysconfig.xendomains
-tools/hotplug/Linux/init.d/xen-watchdog
-tools/hotplug/Linux/init.d/xencommons
-tools/hotplug/Linux/init.d/xendomains
-tools/hotplug/Linux/init.d/xendriverdomain
-tools/hotplug/Linux/launch-xenstore
-tools/hotplug/Linux/systemd/*.conf
-tools/hotplug/Linux/systemd/*.mount
-tools/hotplug/Linux/systemd/*.socket
-tools/hotplug/Linux/systemd/*.service
-tools/hotplug/Linux/vif-setup
-tools/hotplug/Linux/xen-backend.rules
-tools/hotplug/Linux/xen-hotplug-common.sh
-tools/hotplug/Linux/xendomains
-tools/hotplug/NetBSD/rc.d/xencommons
-tools/hotplug/NetBSD/rc.d/xendriverdomain
-tools/include/acpi
-tools/include/xen/*
-tools/include/xen-xsm/*
-tools/include/xen-foreign/*.(c|h|size)
-tools/include/xen-foreign/checker
-tools/libxl/_libxl.api-for-check
-tools/libxl/*.api-ok
-tools/libxl/dsdt*
-tools/libxl/libxlu_cfg_y.output
-tools/libxl/mk_dsdt
-tools/libxl/ssdt*
-tools/libxl/testenum
-tools/libxl/testenum.c
-tools/libxl/tmp.*
-tools/pkg-config/*
-tools/qemu-xen-build
-tools/xentrace/xenalyze
-tools/pygrub/build/*
-tools/python/build/*
-tools/security/secpol_tool
-tools/security/xen/*
-tools/security/xensec_tool
-tools/tests/depriv/depriv-fd-checker
-tools/tests/x86_emulator/32/x86_emulate
-tools/tests/x86_emulator/3dnow*.[ch]
-tools/tests/x86_emulator/asm
-tools/tests/x86_emulator/avx*.[ch]
-tools/tests/x86_emulator/blowfish.h
-tools/tests/x86_emulator/fma*.[ch]
-tools/tests/x86_emulator/*sse*.[ch]
-tools/tests/x86_emulator/test_x86_emulator
-tools/tests/x86_emulator/x86_emulate
-tools/tests/x86_emulator/xop*.[ch]
-tools/tests/xen-access/xen-access
-tools/tests/xenstore/xs-test
-tools/tests/regression/installed/*
-tools/tests/regression/build/*
-tools/tests/regression/downloads/*
-tools/tests/mem-sharing/memshrtool
-tools/tests/mce-test/tools/xen-mceinj
-tools/tests/vpci/list.h
-tools/tests/vpci/vpci.[hc]
-tools/tests/vpci/test_vpci
-tools/xcutils/lsevtchn
-tools/xcutils/readnotes
-tools/xenbackendd/_paths.h
-tools/xenbackendd/xenbackendd
-tools/xenmon/xentrace_setmask
-tools/xenmon/xenbaked
-tools/xenpaging/xenpaging
-tools/xenpmd/xenpmd
-tools/xenstat/libxenstat/src/_paths.h
-tools/xenstat/xentop/xentop
-tools/xenstore/xenstore
-tools/xenstore/xenstore-chmod
-tools/xenstore/xenstore-exists
-tools/xenstore/xenstore-list
-tools/xenstore/xenstore-read
-tools/xenstore/xenstore-rm
-tools/xenstore/xenstore-write
-tools/xenstore/xenstore-control
-tools/xenstore/xenstore-ls
-tools/xenstore/xenstored
-tools/xenstore/xenstored_test
-tools/xenstore/xs_tdb_dump
-tools/xentrace/xentrace_setsize
-tools/xentrace/tbctl
-tools/xentrace/xenctx
-tools/xentrace/xentrace
-tools/flask/policy/policy.conf
-tools/flask/policy/xenpolicy-*
 LibVNCServer*
 
-tools/qemu-xen-dir-remote
-tools/qemu-xen-dir
-
-tools/qemu-xen-traditional-dir-remote
-tools/qemu-xen-traditional-dir
-
-tools/include/xen-foreign/checker.c
-tools/include/xen-foreign/x86_32.h
-tools/include/xen-foreign/x86_64.h
-tools/include/xen-foreign/arm32.h
-tools/include/xen-foreign/arm64.h
-
 .git
-tools/libs/toolcore/include/_*.h
-tools/libxc/_*.[ch]
-tools/libxl/_*.[ch]
-tools/libxl/testidl
-tools/libxl/testidl.c
-tools/libxl/libxl-save-helper
-tools/libxl/test_timedereg
-tools/libxl/test_fdderegrace
-tools/libvchan/vchan-node[12]
-tools/libvchan/vchan-socket-proxy
-tools/debugger/kdd/kdd
-tools/python/xen/lowlevel/xl/_pyxl_types.c
-tools/python/xen/lowlevel/xl/_pyxl_types.h
-tools/xenstore/xenstore-watch
-tools/xl/_paths.h
-tools/xl/xl
diff --git a/tools/.gitignore b/tools/.gitignore
new file mode 100644
index 0000000000..02fb665cf6
--- /dev/null
+++ b/tools/.gitignore
@@ -0,0 +1,144 @@
+/*/build/lib*/*.py
+/libs/*/headers.chk
+/console/xenconsole
+/console/xenconsoled
+/console/client/_paths.h
+/console/daemon/_paths.h
+/debugger/gdb/gdb-6.2.1-linux-i386-xen/
+/debugger/gdb/gdb-6.2.1/
+/debugger/gdbsx/gdbsx
+/debugger/xenitp/xenitp
+/flask/utils/flask-getenforce
+/flask/utils/flask-get-bool
+/flask/utils/flask-loadpolicy
+/flask/utils/flask-setenforce
+/flask/utils/flask-set-bool
+/flask/utils/flask-label-pci
+/fuzz/libelf/afl-libelf-fuzzer
+/fuzz/x86_instruction_emulator/asm
+/fuzz/x86_instruction_emulator/afl-harness
+/fuzz/x86_instruction_emulator/afl-harness-cov
+/fuzz/x86_instruction_emulator/wrappers.c
+/fuzz/x86_instruction_emulator/x86_emulate
+/fuzz/x86_instruction_emulator/x86-emulate.[ch]
+/helpers/_paths.h
+/helpers/init-xenstore-domain
+/helpers/xen-init-dom0
+/hotplug/common/hotplugpath.sh
+/hotplug/FreeBSD/rc.d/xencommons
+/hotplug/FreeBSD/rc.d/xendriverdomain
+/hotplug/Linux/init.d/sysconfig.xencommons
+/hotplug/Linux/init.d/sysconfig.xendomains
+/hotplug/Linux/init.d/xen-watchdog
+/hotplug/Linux/init.d/xencommons
+/hotplug/Linux/init.d/xendomains
+/hotplug/Linux/init.d/xendriverdomain
+/hotplug/Linux/launch-xenstore
+/hotplug/Linux/systemd/*.conf
+/hotplug/Linux/systemd/*.mount
+/hotplug/Linux/systemd/*.socket
+/hotplug/Linux/systemd/*.service
+/hotplug/Linux/vif-setup
+/hotplug/Linux/xen-backend.rules
+/hotplug/Linux/xen-hotplug-common.sh
+/hotplug/Linux/xendomains
+/hotplug/NetBSD/rc.d/xencommons
+/hotplug/NetBSD/rc.d/xendriverdomain
+/include/acpi
+/include/xen/
+/include/xen-xsm/
+/include/xen-foreign/checker
+/libxl/_libxl.api-for-check
+/libxl/*.api-ok
+/libxl/dsdt*
+/libxl/libxlu_cfg_y.output
+/libxl/mk_dsdt
+/libxl/ssdt*
+/libxl/testenum
+/libxl/testenum.c
+/libxl/tmp.*
+/pkg-config/
+/qemu-xen-build
+/xentrace/xenalyze
+/pygrub/build/
+/python/build/
+/security/secpol_tool
+/security/xen/
+/security/xensec_tool
+/tests/depriv/depriv-fd-checker
+/tests/x86_emulator/32/x86_emulate
+/tests/x86_emulator/3dnow*.[ch]
+/tests/x86_emulator/asm
+/tests/x86_emulator/avx*.[ch]
+/tests/x86_emulator/blowfish.h
+/tests/x86_emulator/fma*.[ch]
+/tests/x86_emulator/*sse*.[ch]
+/tests/x86_emulator/test_x86_emulator
+/tests/x86_emulator/x86_emulate
+/tests/x86_emulator/xop*.[ch]
+/tests/xen-access/xen-access
+/tests/xenstore/xs-test
+/tests/regression/installed/
+/tests/regression/build/
+/tests/regression/downloads/
+/tests/mem-sharing/memshrtool
+/tests/mce-test/tools/xen-mceinj
+/tests/vpci/list.h
+/tests/vpci/vpci.[hc]
+/tests/vpci/test_vpci
+/xcutils/lsevtchn
+/xcutils/readnotes
+/xenbackendd/_paths.h
+/xenbackendd/xenbackendd
+/xenmon/xentrace_setmask
+/xenmon/xenbaked
+/xenpaging/xenpaging
+/xenpmd/xenpmd
+/xenstat/libxenstat/src/_paths.h
+/xenstat/xentop/xentop
+/xenstore/xenstore
+/xenstore/xenstore-chmod
+/xenstore/xenstore-exists
+/xenstore/xenstore-list
+/xenstore/xenstore-read
+/xenstore/xenstore-rm
+/xenstore/xenstore-write
+/xenstore/xenstore-control
+/xenstore/xenstore-ls
+/xenstore/xenstored
+/xenstore/xenstored_test
+/xenstore/xs_tdb_dump
+/xentrace/xentrace_setsize
+/xentrace/tbctl
+/xentrace/xenctx
+/xentrace/xentrace
+/flask/policy/policy.conf
+/flask/policy/xenpolicy-*
+
+/qemu-xen-dir-remote
+/qemu-xen-dir
+
+/qemu-xen-traditional-dir-remote
+/qemu-xen-traditional-dir
+
+/include/xen-foreign/checker.c
+/include/xen-foreign/x86_32.h
+/include/xen-foreign/x86_64.h
+/include/xen-foreign/arm32.h
+/include/xen-foreign/arm64.h
+
+/libs/toolcore/include/_*.h
+/libxc/_*.[ch]
+/libxl/_*.[ch]
+/libxl/testidl
+/libxl/testidl.c
+/libxl/libxl-save-helper
+/libxl/test_timedereg
+/libxl/test_fdderegrace
+/libvchan/vchan-node[12]
+/libvchan/vchan-socket-proxy
+/debugger/kdd/kdd
+/python/xen/lowlevel/xl/_pyxl_types.[ch]
+/xenstore/xenstore-watch
+/xl/_paths.h
+/xl/xl
