ia64/xen-unstable

view tools/Makefile @ 19647:1c627434605e

blktap2: a completely rewritten blktap implementation

Benefits to blktap2 over the old version of blktap:

* Isolation from xenstore - Blktap devices are now created directly on
the linux dom0 command line, rather than being spawned in response
to XenStore events. This is handy for debugging, makes blktap
generally easier to work with, and is a step toward a generic
user-level block device implementation that is not Xen-specific.

* Improved tapdisk infrastructure: simpler request forwarding, new
request scheduler, request merging, more efficient use of AIO.

* Improved tapdisk error handling and memory management. No
allocations on the block data path, IO retry logic to protect
guests
transient block device failures. This has been tested and is known
to work on weird environments such as NFS soft mounts.

* Pause and snapshot of live virtual disks (see xmsnap script).

* VHD support. The VHD code in this release has been rigorously
tested, and represents a very mature implementation of the VHD
image
format.

* No more duplication of mechanism with blkback. The blktap kernel
module has changed dramatically from the original blktap. Blkback
is now always used to talk to Xen guests, blktap just presents a
Linux gendisk that blkback can export. This is done while
preserving the zero-copy data path from domU to physical device.

These patches deprecate the old blktap code, which can hopefully be
removed from the tree completely at some point in the future.

Signed-off-by: Jake Wires <jake.wires@citrix.com>
Signed-off-by: Dutch Meyer <dmeyer@cs.ubc.ca>
author Keir Fraser <keir.fraser@citrix.com>
date Tue May 26 11:52:31 2009 +0100 (2009-05-26)
parents 23f9857f642f
children b7f73a7f3078
line source
1 XEN_ROOT = ../
2 include $(XEN_ROOT)/tools/Rules.mk
4 SUBDIRS-y :=
5 SUBDIRS-y += check
6 SUBDIRS-y += include
7 SUBDIRS-y += libxc
8 SUBDIRS-y += flask
9 SUBDIRS-$(CONFIG_OCAML_XENSTORED) += ocaml-xenstored
10 SUBDIRS-y += xenstore
11 SUBDIRS-y += misc
12 SUBDIRS-y += examples
13 SUBDIRS-y += hotplug
14 SUBDIRS-y += xentrace
15 SUBDIRS-$(CONFIG_XCUTILS) += xcutils
16 SUBDIRS-$(CONFIG_X86) += firmware
17 SUBDIRS-$(ACM_SECURITY) += security
18 SUBDIRS-y += console
19 SUBDIRS-y += xenmon
20 SUBDIRS-$(VTPM_TOOLS) += vtpm_manager
21 SUBDIRS-$(VTPM_TOOLS) += vtpm
22 SUBDIRS-y += xenstat
23 SUBDIRS-$(CONFIG_Linux) += libaio
24 SUBDIRS-$(CONFIG_Linux) += blktap
25 SUBDIRS-$(CONFIG_Linux) += blktap2
26 SUBDIRS-y += libfsimage
27 SUBDIRS-$(LIBXENAPI_BINDINGS) += libxen
28 SUBDIRS-$(CONFIG_Linux) += fs-back
29 SUBDIRS-$(CONFIG_IOEMU) += ioemu-dir
30 SUBDIRS-y += xenpmd
32 # These don't cross-compile
33 ifeq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
34 SUBDIRS-$(PYTHON_TOOLS) += python
35 SUBDIRS-$(PYTHON_TOOLS) += pygrub
36 endif
38 # For the sake of linking, set the sys-root
39 ifneq ($(CROSS_COMPILE),)
40 CROSS_BIN_PATH ?= /usr/$(CROSS_COMPILE:-=)/bin
41 CROSS_SYS_ROOT ?= /usr/$(CROSS_COMPILE:-=)/sys-root
42 export CROSS_SYS_ROOT # exported for check/funcs.sh
43 export CROSS_BIN_PATH # exported for cross-install.sh
44 endif
46 .PHONY: all
47 all: subdirs-all
49 .PHONY: install
50 install: subdirs-install
51 $(INSTALL_DIR) $(DESTDIR)/var/xen/dump
52 $(INSTALL_DIR) $(DESTDIR)/var/log/xen
53 $(INSTALL_DIR) $(DESTDIR)/var/lib/xen
54 $(INSTALL_DIR) $(DESTDIR)/var/lock/subsys
56 .PHONY: clean distclean
57 clean distclean: subdirs-clean
59 ifneq ($(XEN_COMPILE_ARCH),$(XEN_TARGET_ARCH))
60 IOEMU_CONFIGURE_CROSS ?= --cpu=$(XEN_TARGET_ARCH) \
61 --cross-prefix=$(CROSS_COMPILE) \
62 --interp-prefix=$(CROSS_SYS_ROOT)
63 endif
65 ioemu/config-host.mak:
66 cd ioemu && XEN_TARGET_ARCH=$(XEN_TARGET_ARCH) sh configure \
67 --prefix=$(PREFIX) $(IOEMU_CONFIGURE_CROSS)
69 subdir-all-ioemu subdir-install-ioemu: ioemu/config-host.mak
71 subdir-clean-ioemu:
72 $(MAKE) -C ioemu distclean
74 ioemu-dir-find:
75 set -ex; \
76 if test -d $(CONFIG_QEMU); then \
77 rm -f ioemu-dir; \
78 ln -sf $(CONFIG_QEMU) ioemu-dir; \
79 else \
80 if [ ! -d ioemu-remote ]; then \
81 rm -rf ioemu-remote ioemu-remote.tmp; \
82 mkdir ioemu-remote.tmp; rmdir ioemu-remote.tmp; \
83 $(GIT) clone $(CONFIG_QEMU) ioemu-remote.tmp; \
84 if [ "$(QEMU_TAG)" ]; then \
85 cd ioemu-remote.tmp; \
86 $(GIT) branch -D dummy >/dev/null 2>&1 ||:; \
87 $(GIT) checkout -b dummy $(QEMU_TAG); \
88 cd ..; \
89 fi; \
90 mv ioemu-remote.tmp ioemu-remote; \
91 fi; \
92 rm -f ioemu-dir; \
93 ln -sf ioemu-remote ioemu-dir; \
94 fi
95 set -e; \
96 $(absolutify_xen_root); \
97 PREFIX=$(PREFIX); \
98 XEN_SCRIPT_DIR=$(XEN_SCRIPT_DIR); \
99 export PREFIX; \
100 export XEN_SCRIPT_DIR; \
101 cd ioemu-dir; \
102 ./xen-setup $(IOEMU_CONFIGURE_CROSS)
104 subdir-all-ioemu-dir subdir-install-ioemu-dir: ioemu-dir-find
106 subdir-clean-ioemu-dir:
107 set -e; if test -d ioemu-dir/.; then \
108 $(absolutify_xen_root); \
109 $(MAKE) -C ioemu-dir clean; \
110 fi
112 ocaml-xenstored:
113 set -ex; \
114 rm -rf ocaml-xenstored.tmp; \
115 hg clone $(OCAML_XENSTORED_REPO) ocaml-xenstored.tmp; \
116 if [ "$(OCAML_XENSTORED_TAG)" ]; then \
117 hg -R ocaml-xenstored.tmp update -r $(OCAML_XENSTORED_TAG) ;\
118 hg -R ocaml-xenstored.tmp branch mybranch ;\
119 fi; \
120 mv ocaml-xenstored.tmp ocaml-xenstored; \
122 subdir-all-ocaml-xenstored subdir-install-ocaml-xenstored: ocaml-xenstored
123 $(absolutify_xen_root); \
124 $(MAKE) -C ocaml-xenstored $(patsubst subdir-%-ocaml-xenstored,%,$@);
126 subdir-clean-ocaml-xenstored:
127 set -e; if test -d ocaml-xenstored; then \
128 $(MAKE) -C ocaml-xenstored clean; \
129 fi