ia64/xen-unstable

changeset 8685:edf1fab86618

Merge.

Signed-off-by: Steven Smith, sos22@cam.ac.uk
author sos22@douglas.cl.cam.ac.uk
date Thu Jan 26 18:02:21 2006 +0100 (2006-01-26)
parents f658587fdaac 5fcc346d6fe0
children c0a0f4db5ab1
files tools/libxc/xc_linux_build.c xen/arch/x86/mm.c
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c	Thu Jan 26 18:00:40 2006 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/gnttab.c	Thu Jan 26 18:02:21 2006 +0100
     1.3 @@ -14,7 +14,6 @@
     1.4  #include <asm-xen/xen-public/xen.h>
     1.5  #include <asm/fixmap.h>
     1.6  #include <asm/uaccess.h>
     1.7 -#include <asm-xen/xen_proc.h>
     1.8  #include <asm-xen/linux-public/privcmd.h>
     1.9  #include <asm-xen/gnttab.h>
    1.10  #include <asm/synch_bitops.h>
    1.11 @@ -340,81 +339,6 @@ gnttab_request_free_callback(struct gntt
    1.12  	spin_unlock_irqrestore(&gnttab_list_lock, flags);
    1.13  }
    1.14  
    1.15 -/*
    1.16 - * ProcFS operations
    1.17 - */
    1.18 -
    1.19 -#ifdef CONFIG_PROC_FS
    1.20 -
    1.21 -static struct proc_dir_entry *grant_pde;
    1.22 -static struct file_operations grant_file_ops;
    1.23 -
    1.24 -static int
    1.25 -grant_read(char *page, char **start, off_t off, int count, int *eof,
    1.26 -	   void *data)
    1.27 -{
    1.28 -	int             len;
    1.29 -	unsigned int    i;
    1.30 -	grant_entry_t  *gt;
    1.31 -
    1.32 -	gt = (grant_entry_t *)shared;
    1.33 -	len = 0;
    1.34 -
    1.35 -	for (i = 0; i < NR_GRANT_ENTRIES; i++) {
    1.36 -		if (len > (PAGE_SIZE - 200)) {
    1.37 -			len += sprintf( page + len, "Truncated.\n");
    1.38 -			break;
    1.39 -		}
    1.40 -	}
    1.41 -
    1.42 -	if (gt[i].flags) {
    1.43 -		len += sprintf(page + len,
    1.44 -			       "Grant: ref (0x%x) flags (0x%hx) "
    1.45 -			       "dom (0x%hx) frame (0x%x)\n", 
    1.46 -			       i,
    1.47 -			       gt[i].flags,
    1.48 -			       gt[i].domid,
    1.49 -			       gt[i].frame );
    1.50 -	}
    1.51 -
    1.52 -	*eof = 1;
    1.53 -	return len;
    1.54 -}
    1.55 -
    1.56 -static int
    1.57 -grant_write(struct file *file, const char __user *buffer, unsigned long count,
    1.58 -	    void *data)
    1.59 -{
    1.60 -	/* TODO: implement this */
    1.61 -	return -ENOSYS;
    1.62 -}
    1.63 -
    1.64 -static int __init
    1.65 -gnttab_proc_init(void)
    1.66 -{
    1.67 -	/*
    1.68 -	 *  /proc/xen/grant : used by libxc to access grant tables
    1.69 -	 */
    1.70 -	if ((grant_pde = create_xen_proc_entry("grant", 0600)) == NULL) {
    1.71 -		WPRINTK("Unable to create grant xen proc entry\n");
    1.72 -		return -1;
    1.73 -	}
    1.74 -
    1.75 -	grant_file_ops.read   = grant_pde->proc_fops->read;
    1.76 -	grant_file_ops.write  = grant_pde->proc_fops->write;
    1.77 -
    1.78 -	grant_pde->proc_fops  = &grant_file_ops;
    1.79 -
    1.80 -	grant_pde->read_proc  = &grant_read;
    1.81 -	grant_pde->write_proc = &grant_write;
    1.82 -
    1.83 -	return 0;
    1.84 -}
    1.85 -
    1.86 -device_initcall(gnttab_proc_init);
    1.87 -
    1.88 -#endif /* CONFIG_PROC_FS */
    1.89 -
    1.90  int
    1.91  gnttab_resume(void)
    1.92  {
     2.1 --- a/tools/libxc/Makefile	Thu Jan 26 18:00:40 2006 +0100
     2.2 +++ b/tools/libxc/Makefile	Thu Jan 26 18:02:21 2006 +0100
     2.3 @@ -17,7 +17,6 @@ SRCS       += xc_bvtsched.c
     2.4  SRCS       += xc_core.c
     2.5  SRCS       += xc_domain.c
     2.6  SRCS       += xc_evtchn.c
     2.7 -SRCS       += xc_gnttab.c
     2.8  SRCS       += xc_misc.c
     2.9  SRCS       += xc_physdev.c
    2.10  SRCS       += xc_private.c
     3.1 --- a/tools/libxc/xc_gnttab.c	Thu Jan 26 18:00:40 2006 +0100
     3.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.3 @@ -1,142 +0,0 @@
     3.4 -/******************************************************************************
     3.5 - * xc_gnttab.c
     3.6 - * 
     3.7 - * API for manipulating and accessing grant tables
     3.8 - * 
     3.9 - * Copyright (c) 2005 Christopher Clark
    3.10 - * based on xc_evtchn.c Copyright (c) 2004, K A Fraser.
    3.11 - */
    3.12 -
    3.13 -#include "xc_private.h"
    3.14 -#include "xen/grant_table.h"
    3.15 -
    3.16 -static int
    3.17 -do_gnttab_op(int xc_handle,
    3.18 -             unsigned long cmd,
    3.19 -             void *op,
    3.20 -             unsigned long count)
    3.21 -{
    3.22 -    int ret = -1;
    3.23 -    DECLARE_HYPERCALL;
    3.24 -
    3.25 -    hypercall.op     = __HYPERVISOR_grant_table_op;
    3.26 -    hypercall.arg[0] = cmd;
    3.27 -    hypercall.arg[1] = (unsigned long)op;
    3.28 -    hypercall.arg[2] = count;
    3.29 -
    3.30 -    if ( mlock(op, 64) )
    3.31 -    {
    3.32 -        PERROR("do_gnttab_op: op mlock failed");
    3.33 -        goto out;
    3.34 -    }
    3.35 -
    3.36 -    if ( (ret = do_xen_hypercall(xc_handle, &hypercall)) < 0 )
    3.37 -        ERROR("do_gnttab_op: HYPERVISOR_grant_table_op failed: %d", ret);
    3.38 -
    3.39 -    safe_munlock(op, 64);
    3.40 - out:
    3.41 -    return ret;
    3.42 -}
    3.43 -
    3.44 -
    3.45 -int xc_gnttab_map_grant_ref(int         xc_handle,
    3.46 -                            uint64_t    host_virt_addr,
    3.47 -                            uint32_t    dom,
    3.48 -                            grant_ref_t ref,
    3.49 -                            uint16_t    flags,
    3.50 -                            int16_t    *status,
    3.51 -                            grant_handle_t *handle,
    3.52 -                            uint64_t   *dev_bus_addr)
    3.53 -{
    3.54 -    struct gnttab_map_grant_ref op;
    3.55 -    int rc;
    3.56 -
    3.57 -    op.host_addr      = host_virt_addr;
    3.58 -    op.dom            = (domid_t)dom;
    3.59 -    op.ref            = ref;
    3.60 -    op.flags          = flags;
    3.61 - 
    3.62 -    if ( (rc = do_gnttab_op(xc_handle, GNTTABOP_map_grant_ref,
    3.63 -                            &op, 1)) == 0 )
    3.64 -    {
    3.65 -        *status         = op.status;
    3.66 -        *handle         = op.handle;
    3.67 -        *dev_bus_addr   = op.dev_bus_addr;
    3.68 -    }
    3.69 -
    3.70 -    return rc;
    3.71 -}
    3.72 -
    3.73 -
    3.74 -int xc_gnttab_unmap_grant_ref(int       xc_handle,
    3.75 -                              uint64_t  host_virt_addr,
    3.76 -                              uint64_t  dev_bus_addr,
    3.77 -                              grant_handle_t handle,
    3.78 -                              int16_t  *status)
    3.79 -{
    3.80 -    struct gnttab_unmap_grant_ref op;
    3.81 -    int rc;
    3.82 -
    3.83 -    op.host_addr      = host_virt_addr;
    3.84 -    op.dev_bus_addr   = dev_bus_addr;
    3.85 -    op.handle         = handle;
    3.86 - 
    3.87 -    if ( (rc = do_gnttab_op(xc_handle, GNTTABOP_unmap_grant_ref,
    3.88 -                            &op, 1)) == 0 )
    3.89 -    {
    3.90 -        *status = op.status;
    3.91 -    }
    3.92 -
    3.93 -    return rc;
    3.94 -}
    3.95 -
    3.96 -int xc_gnttab_setup_table(int        xc_handle,
    3.97 -                          uint32_t   dom,
    3.98 -                          uint16_t   nr_frames,
    3.99 -                          int16_t   *status,
   3.100 -                          unsigned long **frame_list)
   3.101 -{
   3.102 -    struct gnttab_setup_table op;
   3.103 -    int rc, i;
   3.104 -
   3.105 -    op.dom       = (domid_t)dom;
   3.106 -    op.nr_frames = nr_frames;
   3.107 - 
   3.108 -    if ( (rc = do_gnttab_op(xc_handle, GNTTABOP_setup_table, &op, 1)) == 0 )
   3.109 -    {
   3.110 -        *status = op.status;
   3.111 -        for ( i = 0; i < nr_frames; i++ )
   3.112 -            (*frame_list)[i] = op.frame_list[i];
   3.113 -    }
   3.114 -
   3.115 -    return rc;
   3.116 -}
   3.117 -
   3.118 -int xc_gnttab_dump_table(int        xc_handle,
   3.119 -                         uint32_t   dom,
   3.120 -                         int16_t   *status)
   3.121 -{
   3.122 -    struct gnttab_dump_table op;
   3.123 -    int rc;
   3.124 -
   3.125 -    op.dom = (domid_t)dom;
   3.126 -
   3.127 -    if ( (rc = do_gnttab_op(xc_handle, GNTTABOP_dump_table, &op, 1)) == 0 )
   3.128 -        *status = op.status;
   3.129 -
   3.130 -    return rc;
   3.131 -}
   3.132 -
   3.133 -int xc_grant_interface_open(void)
   3.134 -{
   3.135 -    int fd = open("/proc/xen/grant", O_RDWR);
   3.136 -    if ( fd == -1 )
   3.137 -        PERROR("Could not obtain handle on grant command interface");
   3.138 -    return fd;
   3.139 -
   3.140 -}
   3.141 -
   3.142 -int xc_grant_interface_close(int xc_grant_handle)
   3.143 -{
   3.144 -    return close(xc_grant_handle);
   3.145 -}
     4.1 --- a/tools/libxc/xc_linux_build.c	Thu Jan 26 18:00:40 2006 +0100
     4.2 +++ b/tools/libxc/xc_linux_build.c	Thu Jan 26 18:02:21 2006 +0100
     4.3 @@ -241,16 +241,16 @@ static int setup_pg_tables_64(int xc_han
     4.4      l2_pgentry_t *vl2tab=NULL, *vl2e=NULL;
     4.5      l3_pgentry_t *vl3tab=NULL, *vl3e=NULL;
     4.6      l4_pgentry_t *vl4tab=NULL, *vl4e=NULL;
     4.7 -    unsigned long l2tab = 0;
     4.8 -    unsigned long l1tab = 0;
     4.9 -    unsigned long l3tab = 0;
    4.10 -    unsigned long l4tab = 0;
    4.11 +    unsigned long l2tab = 0, pl2tab;
    4.12 +    unsigned long l1tab = 0, pl1tab;
    4.13 +    unsigned long l3tab = 0, pl3tab;
    4.14 +    unsigned long l4tab = 0, pl4tab;
    4.15      unsigned long ppt_alloc;
    4.16      unsigned long count;
    4.17  
    4.18      /* First allocate page for page dir. */
    4.19      ppt_alloc = (vpt_start - dsi_v_start) >> PAGE_SHIFT;
    4.20 -    alloc_pt(l4tab, vl4tab);
    4.21 +    alloc_pt(l4tab, vl4tab, pl4tab);
    4.22      vl4e = &vl4tab[l4_table_offset(dsi_v_start)];
    4.23      if (shadow_mode_enabled)
    4.24          ctxt->ctrlreg[3] = pl4tab;
    4.25 @@ -261,28 +261,37 @@ static int setup_pg_tables_64(int xc_han
    4.26      {
    4.27          if ( !((unsigned long)vl1e & (PAGE_SIZE-1)) )
    4.28          {
    4.29 -            alloc_pt(l1tab, vl1tab);
    4.30 +            alloc_pt(l1tab, vl1tab, pl1tab);
    4.31              
    4.32              if ( !((unsigned long)vl2e & (PAGE_SIZE-1)) )
    4.33              {
    4.34 -                alloc_pt(l2tab, vl2tab);
    4.35 +                alloc_pt(l2tab, vl2tab, pl2tab);
    4.36                  if ( !((unsigned long)vl3e & (PAGE_SIZE-1)) )
    4.37                  {
    4.38 -                    alloc_pt(l3tab, vl3tab);
    4.39 +                    alloc_pt(l3tab, vl3tab, pl3tab);
    4.40                      vl3e = &vl3tab[l3_table_offset(dsi_v_start + (count<<PAGE_SHIFT))];
    4.41 -                    *vl4e = l3tab | L4_PROT;
    4.42 +                    if (shadow_mode_enabled)
    4.43 +                        *vl4e = pl3tab | L4_PROT;
    4.44 +                    else
    4.45 +                        *vl4e = l3tab | L4_PROT;
    4.46                      vl4e++;
    4.47                  }
    4.48                  vl2e = &vl2tab[l2_table_offset(dsi_v_start + (count<<PAGE_SHIFT))];
    4.49 -                *vl3e = l2tab | L3_PROT;
    4.50 +                if (shadow_mode_enabled)
    4.51 +                    *vl3e = pl2tab | L3_PROT;
    4.52 +                else
    4.53 +                    *vl3e = l2tab | L3_PROT;
    4.54                  vl3e++;
    4.55              }
    4.56              vl1e = &vl1tab[l1_table_offset(dsi_v_start + (count<<PAGE_SHIFT))];
    4.57 -            *vl2e = l1tab | L2_PROT;
    4.58 +            if (shadow_mode_enabled)
    4.59 +                *vl2e = pl1tab | L2_PROT;
    4.60 +            else
    4.61 +                *vl2e = l1tab | L2_PROT;
    4.62              vl2e++;
    4.63          }
    4.64          
    4.65 -        if (shadow_mode_enable) {
    4.66 +        if (shadow_mode_enabled) {
    4.67              *vl1e = (count << PAGE_SHIFT) | L1_PROT;
    4.68          } else {
    4.69              *vl1e = (page_array[count] << PAGE_SHIFT) | L1_PROT;
     5.1 --- a/tools/libxc/xenctrl.h	Thu Jan 26 18:00:40 2006 +0100
     5.2 +++ b/tools/libxc/xenctrl.h	Thu Jan 26 18:02:21 2006 +0100
     5.3 @@ -13,7 +13,6 @@
     5.4  #include <sys/ptrace.h>
     5.5  #include <xen/xen.h>
     5.6  #include <xen/dom0_ops.h>
     5.7 -#include <xen/grant_table.h>
     5.8  #include <xen/version.h>
     5.9  #include <xen/event_channel.h>
    5.10  #include <xen/sched.h>
    5.11 @@ -467,63 +466,6 @@ int xc_get_pfn_type_batch(int xc_handle,
    5.12                            int num, unsigned long *arr);
    5.13  
    5.14  
    5.15 -/*\
    5.16 - *  GRANT TABLE FUNCTIONS
    5.17 -\*/ 
    5.18 -
    5.19 -/**
    5.20 - * This function opens a handle to the more restricted grant table hypervisor
    5.21 - * interface. This may be used where the standard interface is not
    5.22 - * available because the domain is not privileged.
    5.23 - * This function can  be called multiple times within a single process.
    5.24 - * Multiple processes can have an open hypervisor interface at the same time.
    5.25 - *
    5.26 - * Each call to this function should have a corresponding call to
    5.27 - * xc_grant_interface_close().
    5.28 - *
    5.29 - * This function can fail if a Xen-enabled kernel is not currently running.
    5.30 - *
    5.31 - * @return a handle to the hypervisor grant table interface or -1 on failure
    5.32 - */
    5.33 -int xc_grant_interface_open(void);
    5.34 -
    5.35 -/**
    5.36 - * This function closes an open grant table hypervisor interface.
    5.37 - *
    5.38 - * This function can fail if the handle does not represent an open interface or
    5.39 - * if there were problems closing the interface.
    5.40 - *
    5.41 - * @parm xc_handle a handle to an open grant table hypervisor interface
    5.42 - * @return 0 on success, -1 otherwise.
    5.43 - */
    5.44 -int xc_grant_interface_close(int xc_handle);
    5.45 -
    5.46 -int xc_gnttab_map_grant_ref(int      xc_handle,
    5.47 -                            uint64_t host_virt_addr,
    5.48 -                            uint32_t dom,
    5.49 -                            grant_ref_t ref,
    5.50 -                            uint16_t flags,
    5.51 -                            int16_t *status,
    5.52 -                            grant_handle_t *handle,
    5.53 -                            uint64_t *dev_bus_addr);
    5.54 -
    5.55 -int xc_gnttab_unmap_grant_ref(int  xc_handle,
    5.56 -                              uint64_t  host_virt_addr,
    5.57 -                              uint64_t  dev_bus_addr,
    5.58 -                              grant_handle_t handle,
    5.59 -                              int16_t *status);
    5.60 -
    5.61 -int xc_gnttab_setup_table(int        xc_handle,
    5.62 -                          uint32_t   dom,
    5.63 -                          uint16_t   nr_frames,
    5.64 -                          int16_t   *status,
    5.65 -                          unsigned long **frame_list);
    5.66 -
    5.67 -/* Grant debug builds only: */
    5.68 -int xc_gnttab_dump_table(int        xc_handle,
    5.69 -                         uint32_t   dom,
    5.70 -                         int16_t   *status);
    5.71 -
    5.72  /* Get current total pages allocated to a domain. */
    5.73  long xc_get_tot_pages(int xc_handle, uint32_t domid);
    5.74  
     6.1 --- a/tools/python/xen/xm/create.py	Thu Jan 26 18:00:40 2006 +0100
     6.2 +++ b/tools/python/xen/xm/create.py	Thu Jan 26 18:02:21 2006 +0100
     6.3 @@ -396,6 +396,13 @@ gopts.var('xauthority', val='XAUTHORITY'
     6.4            fn=set_value, default=None,
     6.5            use="X11 Authority to use")
     6.6  
     6.7 +gopts.var('uuid', val='',
     6.8 +          fn=set_value, default=None,
     6.9 +          use="""xenstore UUID (universally unique identifier) to use.  One 
    6.10 +          will be randomly generated if this option is not set, just like MAC 
    6.11 +          addresses for virtual network interfaces.  This must be a unique 
    6.12 +          value across the entire cluster.""")
    6.13 +
    6.14  
    6.15  def err(msg):
    6.16      """Print an error to stderr and exit.
    6.17 @@ -566,6 +573,8 @@ def make_config(vals):
    6.18      map(add_conf, ['name', 'memory', 'ssidref', 'maxmem', 'restart',
    6.19                     'on_poweroff', 'on_reboot', 'on_crash', 'vcpus'])
    6.20      
    6.21 +    if vals.uuid is not None:
    6.22 +        config.append(['uuid', vals.uuid])
    6.23      if vals.cpu is not None:
    6.24          config.append(['cpu', vals.cpu])
    6.25      if vals.cpus is not None:
     7.1 --- a/tools/xm-test/README	Thu Jan 26 18:00:40 2006 +0100
     7.2 +++ b/tools/xm-test/README	Thu Jan 26 18:02:21 2006 +0100
     7.3 @@ -70,10 +70,19 @@ used to install the bootloader on the di
     7.4  If HVM / VMX support is enabled, the ramdisk/bin/create_disk_image script
     7.5  will be run to create a full virt disk.img in the ramdisk directory. The
     7.6  script, by default, will look in /boot for the first non-Xen kernel it
     7.7 -runs across. If you wish to use a different kernel or the script fails
     7.8 -to find a kernel, please run the script manually to make a disk.img 
     7.9 -using the -k option. Xm-test will look for disk.img in the ramdisk
    7.10 -directory when run by default.
    7.11 +runs across. If you'd like to set xm-test to use a specific kernel,
    7.12 +rather than the first one it finds in /boot, you can configure it in
    7.13 +with the "--with-vmx-kernel=KERNEL" option:
    7.14 +
    7.15 +# ./autogen
    7.16 +# ./configure --enable-vmx-support --with-vmx-kernel=KERNEL
    7.17 +# make
    7.18 +
    7.19 +Otherwise, you can always rerun the create script using the -k option
    7.20 +to use a specific kernel. 
    7.21 +
    7.22 +Xm-test will look for disk.img in the ramdisk directory when run by 
    7.23 +default.
    7.24  
    7.25  
    7.26  Running
     8.1 --- a/tools/xm-test/configure.ac	Thu Jan 26 18:00:40 2006 +0100
     8.2 +++ b/tools/xm-test/configure.ac	Thu Jan 26 18:02:21 2006 +0100
     8.3 @@ -38,6 +38,14 @@ fi
     8.4  AM_CONDITIONAL(VMX, test x$ENABLE_VMX = xTrue)
     8.5  AC_SUBST(ENABLE_VMX)
     8.6  
     8.7 +AC_ARG_WITH(vmx-kernel,
     8.8 +	[[  --with-vmx-kernel=kernel       Use this kernel for vmx disk.img testing]],
     8.9 +	VMXKERNEL=$withval,
    8.10 +	VMXKERNEL="no")
    8.11 +
    8.12 +dnl substitute @VMXKERNEL@ in all Makefiles
    8.13 +AC_SUBST(VMXKERNEL)
    8.14 +
    8.15  AC_SUBST(TENV)
    8.16  AC_SUBST(PACKAGE_VERSION)
    8.17  
     9.1 --- a/tools/xm-test/ramdisk/Makefile.am	Thu Jan 26 18:00:40 2006 +0100
     9.2 +++ b/tools/xm-test/ramdisk/Makefile.am	Thu Jan 26 18:02:21 2006 +0100
     9.3 @@ -45,7 +45,11 @@ initrd.img: $(XMTEST_VER_IMG)
     9.4  
     9.5  disk.img: $(XMTEST_VER_IMG)
     9.6  	chmod a+x $(VMX_SCRIPT)
     9.7 -	$(VMX_SCRIPT) -r $(XMTEST_VER_IMG)
     9.8 +	@if test "$(VMXKERNEL)" = "no" ; then \
     9.9 +		$(VMX_SCRIPT) -r $(XMTEST_VER_IMG); \
    9.10 +	else \
    9.11 +		$(VMX_SCRIPT) -r $(XMTEST_VER_IMG) -k $(VMXKERNEL); \
    9.12 +	fi
    9.13  
    9.14  existing:
    9.15  	@[ -f $(XMTEST_VER_IMG) ] && ln -sf $(XMTEST_VER_IMG) initrd.img || \
    10.1 --- a/xen/arch/x86/mm.c	Thu Jan 26 18:00:40 2006 +0100
    10.2 +++ b/xen/arch/x86/mm.c	Thu Jan 26 18:02:21 2006 +0100
    10.3 @@ -1826,8 +1826,7 @@ int do_mmuext_op(
    10.4              break;
    10.5  
    10.6          case MMUEXT_NEW_BASEPTR:
    10.7 -            if (shadow_mode_translate(current->domain))
    10.8 -                mfn = __gpfn_to_mfn(current->domain, mfn);
    10.9 +            mfn = __gpfn_to_mfn(current->domain, mfn);
   10.10              okay = new_guest_cr3(mfn);
   10.11              percpu_info[cpu].deferred_ops &= ~DOP_FLUSH_TLB;
   10.12              break;
   10.13 @@ -2664,7 +2663,7 @@ long set_gdt(struct vcpu *v,
   10.14  
   10.15  long do_set_gdt(unsigned long *frame_list, unsigned int entries)
   10.16  {
   10.17 -    int nr_pages = (entries + 511) / 512;
   10.18 +    int i, nr_pages = (entries + 511) / 512;
   10.19      unsigned long frames[16];
   10.20      long ret;
   10.21  
    11.1 --- a/xen/arch/x86/x86_32/entry.S	Thu Jan 26 18:00:40 2006 +0100
    11.2 +++ b/xen/arch/x86/x86_32/entry.S	Thu Jan 26 18:02:21 2006 +0100
    11.3 @@ -478,13 +478,13 @@ nvm86_3:/* Rewrite our stack frame and r
    11.4  .previous
    11.5  
    11.6  domain_crash_synchronous_string:
    11.7 -	.asciz "domain_crash_sync from entry.S %lx\n"
    11.8 -	
    11.9 +        .asciz "domain_crash_sync called from entry.S (%lx)\n"
   11.10 +
   11.11  domain_crash_synchronous:
   11.12 -	pushl $domain_crash_synchronous_string
   11.13 -	call printf
   11.14 -	jmp __domain_crash_synchronous
   11.15 -	
   11.16 +        pushl $domain_crash_synchronous_string
   11.17 +        call  printf
   11.18 +        jmp   __domain_crash_synchronous
   11.19 +
   11.20          ALIGN
   11.21  process_guest_exception_and_events:
   11.22          leal VCPU_trap_bounce(%ebx),%edx
    12.1 --- a/xen/arch/x86/x86_64/entry.S	Thu Jan 26 18:00:40 2006 +0100
    12.2 +++ b/xen/arch/x86/x86_64/entry.S	Thu Jan 26 18:02:21 2006 +0100
    12.3 @@ -436,6 +436,14 @@ FLT13:  movq  %rax,(%rsi)               
    12.4          .quad FLT12,domain_crash_synchronous , FLT13,domain_crash_synchronous
    12.5  .previous
    12.6  
    12.7 +domain_crash_synchronous_string:
    12.8 +        .asciz "domain_crash_sync called from entry.S\n"
    12.9 +
   12.10 +domain_crash_synchronous:
   12.11 +        leaq domain_crash_synchronous_string(%rip),%rdi
   12.12 +        call printf
   12.13 +        jmp  __domain_crash_synchronous
   12.14 +
   12.15          ALIGN
   12.16  /* %rbx: struct vcpu */
   12.17  process_guest_exception_and_events:
    13.1 --- a/xen/common/domain.c	Thu Jan 26 18:00:40 2006 +0100
    13.2 +++ b/xen/common/domain.c	Thu Jan 26 18:02:21 2006 +0100
    13.3 @@ -130,8 +130,8 @@ void domain_kill(struct domain *d)
    13.4      {
    13.5          for_each_vcpu(d, v)
    13.6              sched_rem_domain(v);
    13.7 +        gnttab_release_mappings(d);
    13.8          domain_relinquish_resources(d);
    13.9 -        gnttab_release_mappings(d);
   13.10          put_domain(d);
   13.11  
   13.12          send_guest_virq(dom0->vcpu[0], VIRQ_DOM_EXC);
    14.1 --- a/xen/include/xen/sched.h	Thu Jan 26 18:00:40 2006 +0100
    14.2 +++ b/xen/include/xen/sched.h	Thu Jan 26 18:02:21 2006 +0100
    14.3 @@ -240,7 +240,7 @@ extern void domain_pause_for_debugger(vo
    14.4   */
    14.5  extern void __domain_crash(struct domain *d);
    14.6  #define domain_crash(d) do {                                              \
    14.7 -    printf("domain_crash called from %s:%d\n", __FILE__, __LINE__);       \
    14.8 +    printk("domain_crash called from %s:%d\n", __FILE__, __LINE__);       \
    14.9      __domain_crash(d);                                                    \
   14.10  } while (0)
   14.11  
   14.12 @@ -250,7 +250,7 @@ extern void __domain_crash(struct domain
   14.13   */
   14.14  extern void __domain_crash_synchronous(void) __attribute__((noreturn));
   14.15  #define domain_crash_synchronous() do {                                   \
   14.16 -    printf("domain_crash_sync called from %s:%d\n", __FILE__, __LINE__);  \
   14.17 +    printk("domain_crash_sync called from %s:%d\n", __FILE__, __LINE__);  \
   14.18      __domain_crash_synchronous();                                         \
   14.19  } while (0)
   14.20