ia64/xen-unstable

view buildconfigs/mk.linux-2.6-xen0 @ 7072:f9296342d9b2

Detangle the restart/reboot/halt/save/restore code. There is now one point
for management of shutdown state, XendDomainInfo.refreshShutdown, which is
able to cope whatever the current state of the domain. This fixes bug #124:
running reboot within a domU doesn't bring the domain back up after shutdown,
and bug #256: "xm reboot" could not make domU reboot.

Fix the refreshing inside XendDomain to ensure that the values returned by xm
list reflect reality correctly. We were removing XendDomainInfo instances,
but not creating them on start-up, so if xend were restarted, domain
information was being lost.

Merge XendDomain.dom0_unknown and initial_refresh into
XendDomainInfo.recreate.

Catch exceptions inside callInfo, and reraise them as XendErrors.

Remove unused XendDomain.close.

Further improvements are needed to XendDomainInfo to ensure that it avoids all
race conditions on shutdown, and can cope correctly with xend restarting
during a shutdown.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@ewan
date Tue Sep 27 13:53:06 2005 +0100 (2005-09-27)
parents 06d84bf87159
children 303d51d0d578
line source
2 OS = linux
4 LINUX_SERIES = 2.6
5 LINUX_VER = 2.6.12
7 EXTRAVERSION = xen0
9 LINUX_DIR = $(OS)-$(LINUX_VER)-$(EXTRAVERSION)
11 include buildconfigs/Rules.mk
13 .PHONY: build clean delete
15 # The real action starts here!
16 build: $(LINUX_DIR)/include/linux/autoconf.h
17 if grep "^CONFIG_MODULES=" $(LINUX_DIR)/.config ; then \
18 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) modules ; \
19 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_MOD_PATH=$(DESTDIR) modules_install ; \
20 fi
21 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) INSTALL_PATH=$(DESTDIR) install
23 $(LINUX_DIR)/include/linux/autoconf.h: ref-$(OS)-$(LINUX_VER)/.valid-ref
24 rm -rf $(LINUX_DIR)
25 cp -al $(<D) $(LINUX_DIR)
26 # Apply arch-xen patches
27 ( cd linux-$(LINUX_SERIES)-xen-sparse ; \
28 LINUX_ARCH=$(LINUX_ARCH) ./mkbuildtree ../$(LINUX_DIR) )
29 # Re-use config from install dir if one exits else use default config
30 CONFIG_VERSION=$$(sed -ne 's/^EXTRAVERSION = //p' $(LINUX_DIR)/Makefile); \
31 [ -r $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) ] && \
32 cp $(DESTDIR)/boot/config-$(LINUX_VER)$$CONFIG_VERSION-$(EXTRAVERSION) $(LINUX_DIR)/.config \
33 || cp $(LINUX_DIR)/arch/xen/configs/$(EXTRAVERSION)_defconfig_$(XEN_TARGET_ARCH) \
34 $(LINUX_DIR)/.config
35 # See if we need to munge config to enable PAE
36 $(MAKE) CONFIG_FILE=$(LINUX_DIR)/.config -f buildconfigs/Rules.mk config-update-pae
37 # Patch kernel Makefile to set EXTRAVERSION
38 ( cd $(LINUX_DIR) ; \
39 sed -e 's/^EXTRAVERSION.*/&$$(XENGUEST)\nXENGUEST = -$(EXTRAVERSION)/' Makefile >Mk.tmp ; \
40 rm -f Makefile ; mv Mk.tmp Makefile )
41 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) oldconfig
43 config: CONFIGMODE = menuconfig
44 config: $(LINUX_DIR)/include/linux/autoconf.h
45 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) $(CONFIGMODE)
47 clean::
48 $(MAKE) -C $(LINUX_DIR) ARCH=$(LINUX_ARCH) clean
50 delete:
51 rm -rf tmp-$(OS)-$(LINUX_VER) $(LINUX_DIR)