ia64/xen-unstable

changeset 15417:2a5b463f2e8d

[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@intel.com>
author Alex Williamson <alex.williamson@hp.com>
date Mon Jul 02 09:38:51 2007 -0600 (2007-07-02)
parents 88ab11d8fd1c
children c7e16caf4e63
files tools/ioemu/target-i386-dm/helper2.c tools/ioemu/vl.h tools/python/xen/xend/XendDomainInfo.py
line diff
     1.1 --- a/tools/ioemu/target-i386-dm/helper2.c	Mon Jul 02 09:29:08 2007 -0600
     1.2 +++ b/tools/ioemu/target-i386-dm/helper2.c	Mon Jul 02 09:38:51 2007 -0600
     1.3 @@ -140,6 +140,7 @@ void cpu_reset(CPUX86State *env)
     1.4      if (xcHandle < 0)
     1.5          fprintf(logfile, "Cannot acquire xenctrl handle\n");
     1.6      else {
     1.7 +        xc_domain_shutdown_hook(xcHandle, domid);
     1.8          sts = xc_domain_shutdown(xcHandle, domid, SHUTDOWN_reboot);
     1.9          if (sts != 0)
    1.10              fprintf(logfile,
     2.1 --- a/tools/ioemu/vl.h	Mon Jul 02 09:29:08 2007 -0600
     2.2 +++ b/tools/ioemu/vl.h	Mon Jul 02 09:38:51 2007 -0600
     2.3 @@ -1498,4 +1498,13 @@ void destroy_hvm_domain(void);
     2.4  /* VNC Authentication */
     2.5  #define AUTHCHALLENGESIZE 16
     2.6  
     2.7 +#ifdef __ia64__
     2.8 +static inline void xc_domain_shutdown_hook(int xc_handle, uint32_t domid)
     2.9 +{
    2.10 +	xc_ia64_save_to_nvram(xc_handle, domid);
    2.11 +}
    2.12 +#else
    2.13 +#define xc_domain_shutdown_hook(xc_handle. domid)	do {} while (0)
    2.14 +#endif
    2.15 +
    2.16  #endif /* VL_H */
     3.1 --- a/tools/python/xen/xend/XendDomainInfo.py	Mon Jul 02 09:29:08 2007 -0600
     3.2 +++ b/tools/python/xen/xend/XendDomainInfo.py	Mon Jul 02 09:38:51 2007 -0600
     3.3 @@ -459,6 +459,7 @@ class XendDomainInfo:
     3.4              hvm_pvdrv = xc.hvm_get_param(self.domid, HVM_PARAM_CALLBACK_IRQ)
     3.5              if not hvm_pvdrv:
     3.6                  code = REVERSE_DOMAIN_SHUTDOWN_REASONS[reason]
     3.7 +                xc.domain_destroy_hook(self.domid)
     3.8                  log.info("HVM save:remote shutdown dom %d!", self.domid)
     3.9                  xc.domain_shutdown(self.domid, code)
    3.10