# HG changeset patch
# User Alex Williamson <alex.williamson@xxxxxx>
# Date 1183390731 21600
# Node ID 2a5b463f2e8dcb5b132062547f2ea76780d80aae
# Parent 88ab11d8fd1c1052f0e0f1aa5b029c353d03b067
[IA64] Fix NVRAM data cannot be saved when guest execute "reboot"
Also fix "xm reboot" instruction in Xend.
Signed-off-by: Zhang Xin <xing.z.zhang@xxxxxxxxx>
---
tools/ioemu/target-i386-dm/helper2.c | 1 +
tools/ioemu/vl.h | 9 +++++++++
tools/python/xen/xend/XendDomainInfo.py | 1 +
3 files changed, 11 insertions(+)
diff -r 88ab11d8fd1c -r 2a5b463f2e8d tools/ioemu/target-i386-dm/helper2.c
--- a/tools/ioemu/target-i386-dm/helper2.c Mon Jul 02 09:29:08 2007 -0600
+++ b/tools/ioemu/target-i386-dm/helper2.c Mon Jul 02 09:38:51 2007 -0600
@@ -140,6 +140,7 @@ void cpu_reset(CPUX86State *env)
if (xcHandle < 0)
fprintf(logfile, "Cannot acquire xenctrl handle\n");
else {
+ xc_domain_shutdown_hook(xcHandle, domid);
sts = xc_domain_shutdown(xcHandle, domid, SHUTDOWN_reboot);
if (sts != 0)
fprintf(logfile,
diff -r 88ab11d8fd1c -r 2a5b463f2e8d tools/ioemu/vl.h
--- a/tools/ioemu/vl.h Mon Jul 02 09:29:08 2007 -0600
+++ b/tools/ioemu/vl.h Mon Jul 02 09:38:51 2007 -0600
@@ -1498,4 +1498,13 @@ void destroy_hvm_domain(void);
/* VNC Authentication */
#define AUTHCHALLENGESIZE 16
+#ifdef __ia64__
+static inline void xc_domain_shutdown_hook(int xc_handle, uint32_t domid)
+{
+ xc_ia64_save_to_nvram(xc_handle, domid);
+}
+#else
+#define xc_domain_shutdown_hook(xc_handle. domid) do {} while (0)
+#endif
+
#endif /* VL_H */
diff -r 88ab11d8fd1c -r 2a5b463f2e8d tools/python/xen/xend/XendDomainInfo.py
--- a/tools/python/xen/xend/XendDomainInfo.py Mon Jul 02 09:29:08 2007 -0600
+++ b/tools/python/xen/xend/XendDomainInfo.py Mon Jul 02 09:38:51 2007 -0600
@@ -459,6 +459,7 @@ class XendDomainInfo:
hvm_pvdrv = xc.hvm_get_param(self.domid, HVM_PARAM_CALLBACK_IRQ)
if not hvm_pvdrv:
code = REVERSE_DOMAIN_SHUTDOWN_REASONS[reason]
+ xc.domain_destroy_hook(self.domid)
log.info("HVM save:remote shutdown dom %d!", self.domid)
xc.domain_shutdown(self.domid, code)
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|