ia64/xen-unstable

changeset 7856:50dcb6266990

Merged.
author emellor@leeni.uk.xensource.com
date Wed Nov 16 12:37:29 2005 +0100 (2005-11-16)
parents 725bf42d4713 fb50fba1895c
children 6f1477035134 3867d93d86f7
files
line diff
     1.1 --- a/docs/man/xm.pod.1	Wed Nov 16 12:36:47 2005 +0100
     1.2 +++ b/docs/man/xm.pod.1	Wed Nov 16 12:37:29 2005 +0100
     1.3 @@ -645,10 +645,6 @@ I<[mac=macaddr]> I<[bridge=bridge-name]>
     1.4  
     1.5  =item B<network-detach> I<domain-id> I<devid>
     1.6  
     1.7 -=item B<network-limit> I<domain-id> I<vif> I<credit> I<period>
     1.8 -
     1.9 -Limit the transmission rate of a virtual network interface.
    1.10 -
    1.11  =item B<network-list> I<domain-id>
    1.12  
    1.13  List virtual network interfaces for a domain.  The returned output is
     2.1 --- a/linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c	Wed Nov 16 12:36:47 2005 +0100
     2.2 +++ b/linux-2.6-xen-sparse/arch/xen/i386/kernel/pci-dma.c	Wed Nov 16 12:37:29 2005 +0100
     2.3 @@ -15,6 +15,7 @@
     2.4  #include <asm/io.h>
     2.5  #include <asm-xen/balloon.h>
     2.6  #include <asm/tlbflush.h>
     2.7 +#include <asm/swiotlb.h>
     2.8  
     2.9  struct dma_coherent_mem {
    2.10  	void		*virt_base;
     3.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/devmem.c	Wed Nov 16 12:36:47 2005 +0100
     3.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/devmem.c	Wed Nov 16 12:37:29 2005 +0100
     3.3 @@ -79,7 +79,7 @@ static ssize_t write_mem(struct file * f
     3.4  
     3.5  	if ((v = ioremap(p, count)) == NULL)
     3.6  		return -EFAULT;
     3.7 -	if (copy_to_user(v, buf, count))
     3.8 +	if (copy_from_user(v, buf, count))
     3.9  		goto out;
    3.10  
    3.11  	written = count;
     4.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Wed Nov 16 12:36:47 2005 +0100
     4.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/evtchn.c	Wed Nov 16 12:37:29 2005 +0100
     4.3 @@ -752,7 +752,7 @@ void __init init_IRQ(void)
     4.4  		irq_bindcount[dynirq_to_irq(i)] = 0;
     4.5  
     4.6  		irq_desc[dynirq_to_irq(i)].status  = IRQ_DISABLED;
     4.7 -		irq_desc[dynirq_to_irq(i)].action  = 0;
     4.8 +		irq_desc[dynirq_to_irq(i)].action  = NULL;
     4.9  		irq_desc[dynirq_to_irq(i)].depth   = 1;
    4.10  		irq_desc[dynirq_to_irq(i)].handler = &dynirq_type;
    4.11  	}
    4.12 @@ -770,7 +770,7 @@ void __init init_IRQ(void)
    4.13  #endif
    4.14  
    4.15  		irq_desc[pirq_to_irq(i)].status  = IRQ_DISABLED;
    4.16 -		irq_desc[pirq_to_irq(i)].action  = 0;
    4.17 +		irq_desc[pirq_to_irq(i)].action  = NULL;
    4.18  		irq_desc[pirq_to_irq(i)].depth   = 1;
    4.19  		irq_desc[pirq_to_irq(i)].handler = &pirq_type;
    4.20  	}
     5.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Wed Nov 16 12:36:47 2005 +0100
     5.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/reboot.c	Wed Nov 16 12:37:29 2005 +0100
     5.3 @@ -15,6 +15,7 @@
     5.4  #include <asm-xen/xenbus.h>
     5.5  #include <linux/cpu.h>
     5.6  #include <linux/kthread.h>
     5.7 +#include <asm-xen/xencons.h>
     5.8  
     5.9  #define SHUTDOWN_INVALID  -1
    5.10  #define SHUTDOWN_POWEROFF  0
    5.11 @@ -29,7 +30,6 @@
    5.12  void machine_restart(char * __unused)
    5.13  {
    5.14  	/* We really want to get pending console data out before we die. */
    5.15 -	extern void xencons_force_flush(void);
    5.16  	xencons_force_flush();
    5.17  	HYPERVISOR_sched_op(SCHEDOP_shutdown, SHUTDOWN_reboot);
    5.18  }
    5.19 @@ -42,7 +42,6 @@ void machine_halt(void)
    5.20  void machine_power_off(void)
    5.21  {
    5.22  	/* We really want to get pending console data out before we die. */
    5.23 -	extern void xencons_force_flush(void);
    5.24  	xencons_force_flush();
    5.25  	HYPERVISOR_sched_op(SCHEDOP_shutdown, SHUTDOWN_poweroff);
    5.26  }
    5.27 @@ -85,8 +84,6 @@ static int __do_suspend(void *ignore)
    5.28  	int vcpu_prepare(int vcpu);
    5.29  #endif
    5.30  
    5.31 -	extern void xencons_resume(void);
    5.32 -
    5.33  	int err = 0;
    5.34  
    5.35  	BUG_ON(smp_processor_id() != 0);
     6.1 --- a/linux-2.6-xen-sparse/arch/xen/kernel/xen_proc.c	Wed Nov 16 12:36:47 2005 +0100
     6.2 +++ b/linux-2.6-xen-sparse/arch/xen/kernel/xen_proc.c	Wed Nov 16 12:37:29 2005 +0100
     6.3 @@ -1,6 +1,7 @@
     6.4  
     6.5  #include <linux/config.h>
     6.6  #include <linux/proc_fs.h>
     6.7 +#include <asm-xen/xen_proc.h>
     6.8  
     6.9  static struct proc_dir_entry *xen_base;
    6.10  
     7.1 --- a/linux-2.6-xen-sparse/drivers/acpi/tables.c	Wed Nov 16 12:36:47 2005 +0100
     7.2 +++ b/linux-2.6-xen-sparse/drivers/acpi/tables.c	Wed Nov 16 12:37:29 2005 +0100
     7.3 @@ -565,7 +565,7 @@ acpi_table_get_sdt (
     7.4   * 
     7.5   * result: sdt_entry[] is initialized
     7.6   */
     7.7 -#ifdef CONFIG_XEN_X86
     7.8 +#if defined(CONFIG_XEN_X86) || defined(CONFIG_XEN_X86_64)
     7.9  #define acpi_rsdp_phys_to_va(rsdp_phys) (__fix_to_virt(FIX_ACPI_RSDP_PAGE) + \
    7.10  					   (rsdp_phys & ~PAGE_MASK))
    7.11  #else
     8.1 --- a/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c	Wed Nov 16 12:36:47 2005 +0100
     8.2 +++ b/linux-2.6-xen-sparse/drivers/char/tpm/tpm_xen.c	Wed Nov 16 12:37:29 2005 +0100
     8.3 @@ -438,7 +438,7 @@ static struct attribute* xen_attrs[] = {
     8.4  	&dev_attr_pcrs.attr,
     8.5  	&dev_attr_caps.attr,
     8.6  	&dev_attr_cancel.attr,
     8.7 -	0,
     8.8 +	NULL,
     8.9  };
    8.10  
    8.11  static struct attribute_group xen_attr_grp = { .attrs = xen_attrs };
     9.1 --- a/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Nov 16 12:36:47 2005 +0100
     9.2 +++ b/linux-2.6-xen-sparse/drivers/xen/balloon/balloon.c	Wed Nov 16 12:37:29 2005 +0100
     9.3 @@ -381,9 +381,9 @@ static void watch_target(struct xenbus_w
     9.4      
     9.5  }
     9.6  
     9.7 -int balloon_init_watcher(struct notifier_block *notifier,
     9.8 -                         unsigned long event,
     9.9 -                         void *data)
    9.10 +static int balloon_init_watcher(struct notifier_block *notifier,
    9.11 +                                unsigned long event,
    9.12 +                                void *data)
    9.13  {
    9.14  	int err;
    9.15  
    10.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Wed Nov 16 12:36:47 2005 +0100
    10.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkback/blkback.c	Wed Nov 16 12:37:29 2005 +0100
    10.3 @@ -543,7 +543,7 @@ static int __init blkif_init(void)
    10.4  	spin_lock_init(&blkio_schedule_list_lock);
    10.5  	INIT_LIST_HEAD(&blkio_schedule_list);
    10.6  
    10.7 -	ret = kernel_thread(blkio_schedule, 0, CLONE_FS | CLONE_FILES);
    10.8 +	ret = kernel_thread(blkio_schedule, NULL, CLONE_FS | CLONE_FILES);
    10.9  	BUG_ON(ret < 0);
   10.10  
   10.11  	blkif_xenbus_init();
    11.1 --- a/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Wed Nov 16 12:36:47 2005 +0100
    11.2 +++ b/linux-2.6-xen-sparse/drivers/xen/blkfront/blkfront.c	Wed Nov 16 12:37:29 2005 +0100
    11.3 @@ -679,7 +679,7 @@ static void blkif_recover(struct blkfron
    11.4  	int j;
    11.5  
    11.6  	/* Stage 1: Make a safe copy of the shadow state. */
    11.7 -	copy = (struct blk_shadow *)kmalloc(sizeof(info->shadow), GFP_KERNEL);
    11.8 +	copy = kmalloc(sizeof(info->shadow), GFP_KERNEL);
    11.9  	BUG_ON(copy == NULL);
   11.10  	memcpy(copy, info->shadow, sizeof(info->shadow));
   11.11  
    12.1 --- a/linux-2.6-xen-sparse/drivers/xen/console/console.c	Wed Nov 16 12:36:47 2005 +0100
    12.2 +++ b/linux-2.6-xen-sparse/drivers/xen/console/console.c	Wed Nov 16 12:37:29 2005 +0100
    12.3 @@ -53,6 +53,7 @@
    12.4  #include <asm-xen/xen-public/event_channel.h>
    12.5  #include <asm/hypervisor.h>
    12.6  #include <asm-xen/evtchn.h>
    12.7 +#include <asm-xen/xencons.h>
    12.8  
    12.9  #include "xencons_ring.h"
   12.10  /*
    13.1 --- a/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Wed Nov 16 12:36:47 2005 +0100
    13.2 +++ b/linux-2.6-xen-sparse/drivers/xen/xenbus/xenbus_probe.c	Wed Nov 16 12:37:29 2005 +0100
    13.3 @@ -854,7 +854,7 @@ int register_xenstore_notifier(struct no
    13.4  {
    13.5  	int ret = 0;
    13.6  
    13.7 -        if(xenstored_ready > 0) 
    13.8 +	if (xenstored_ready > 0) 
    13.9  		ret = nb->notifier_call(nb, 0, NULL);
   13.10  	else 
   13.11  		notifier_chain_register(&xenstore_chain, nb);
   13.12 @@ -884,7 +884,7 @@ void xenbus_probe(void *unused)
   13.13  	register_xenbus_watch(&be_watch);
   13.14  
   13.15  	/* Notify others that xenstore is up */
   13.16 -	notifier_call_chain(&xenstore_chain, 0, 0);
   13.17 +	notifier_call_chain(&xenstore_chain, 0, NULL);
   13.18  }
   13.19  
   13.20  
    14.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-i386/io.h	Wed Nov 16 12:36:47 2005 +0100
    14.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-i386/io.h	Wed Nov 16 12:37:29 2005 +0100
    14.3 @@ -228,7 +228,7 @@ static inline void memcpy_toio(volatile 
    14.4   * used as the IO-area pointer (it can be iounmapped as well, so the
    14.5   * analogy with PCI is quite large):
    14.6   */
    14.7 -#define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET))
    14.8 +#define __ISA_IO_base ((char __iomem *)(fix_to_virt(FIX_ISAMAP_BEGIN)))
    14.9  
   14.10  #define isa_readb(a) readb(__ISA_IO_base + (a))
   14.11  #define isa_readw(a) readw(__ISA_IO_base + (a))
    15.1 --- a/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/io.h	Wed Nov 16 12:36:47 2005 +0100
    15.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/asm-x86_64/io.h	Wed Nov 16 12:37:29 2005 +0100
    15.3 @@ -298,7 +298,7 @@ void memset_io(volatile void __iomem *a,
    15.4   * used as the IO-area pointer (it can be iounmapped as well, so the
    15.5   * analogy with PCI is quite large):
    15.6   */
    15.7 -#define __ISA_IO_base ((char __iomem *)(PAGE_OFFSET))
    15.8 +#define __ISA_IO_base ((char __iomem *)(fix_to_virt(FIX_ISAMAP_BEGIN)))
    15.9  
   15.10  #define isa_readb(a) readb(__ISA_IO_base + (a))
   15.11  #define isa_readw(a) readw(__ISA_IO_base + (a))
    16.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    16.2 +++ b/linux-2.6-xen-sparse/include/asm-xen/xencons.h	Wed Nov 16 12:37:29 2005 +0100
    16.3 @@ -0,0 +1,7 @@
    16.4 +#ifndef __ASM_XENCONS_H__
    16.5 +#define __ASM_XENCONS_H__
    16.6 +
    16.7 +void xencons_force_flush(void);
    16.8 +void xencons_resume(void);
    16.9 +
   16.10 +#endif /* __ASM_XENCONS_H__ */
    17.1 --- a/tools/libxc/xc_linux_build.c	Wed Nov 16 12:36:47 2005 +0100
    17.2 +++ b/tools/libxc/xc_linux_build.c	Wed Nov 16 12:37:29 2005 +0100
    17.3 @@ -351,7 +351,7 @@ static int setup_guest(int xc_handle,
    17.4          xc_handle, dom, PAGE_SIZE, PROT_READ|PROT_WRITE, page_array[0]);
    17.5      memset(start_info, 0, sizeof(*start_info));
    17.6      rc = xc_version(xc_handle, XENVER_version, NULL);
    17.7 -    sprintf(start_info->magic, "xen-%i.%i", rc >> 16, rc & (0xFFFF));
    17.8 +    sprintf(start_info->magic, "xen-%i.%i-ia64", rc >> 16, rc & (0xFFFF));
    17.9      start_info->flags        = flags;
   17.10      start_info->store_mfn    = nr_pages - 2;
   17.11      start_info->store_evtchn = store_evtchn;
   17.12 @@ -628,7 +628,9 @@ static int setup_guest(int xc_handle,
   17.13          page_array[(vstartinfo_start-dsi.v_start)>>PAGE_SHIFT]);
   17.14      memset(start_info, 0, sizeof(*start_info));
   17.15      rc = xc_version(xc_handle, XENVER_version, NULL);
   17.16 -    sprintf(start_info->magic, "xen-%i.%i", rc >> 16, rc & (0xFFFF));
   17.17 +    sprintf(start_info->magic, "xen-%i.%i-x86_%d%s",
   17.18 +            rc >> 16, rc & (0xFFFF), sizeof(long)*8,
   17.19 +            dsi.pae_kernel ? "p" : "");
   17.20      start_info->nr_pages     = nr_pages;
   17.21      start_info->shared_info  = shared_info_frame << PAGE_SHIFT;
   17.22      start_info->flags        = flags;
    18.1 --- a/tools/python/xen/xend/XendClient.py	Wed Nov 16 12:36:47 2005 +0100
    18.2 +++ b/tools/python/xen/xend/XendClient.py	Wed Nov 16 12:37:29 2005 +0100
    18.3 @@ -302,13 +302,6 @@ class Xend:
    18.4                              {'op'    : 'set_vcpus',
    18.5                               'vcpus' : vcpus })
    18.6  
    18.7 -    def xend_domain_vif_limit(self, id, vif, credit, period):
    18.8 -        return self.xendPost(self.domainurl(id),
    18.9 -                            { 'op'      : 'vif_limit_set',
   18.10 -                              'vif'     : vif,
   18.11 -                              'credit'  : credit,
   18.12 -                              'period'  : period })
   18.13 -
   18.14      def xend_domain_devices(self, id, type):
   18.15          return self.xendPost(self.domainurl(id),
   18.16                               {'op'      : 'devices',
    19.1 --- a/tools/python/xen/xend/XendDomain.py	Wed Nov 16 12:36:47 2005 +0100
    19.2 +++ b/tools/python/xen/xend/XendDomain.py	Wed Nov 16 12:37:29 2005 +0100
    19.3 @@ -466,17 +466,6 @@ class XendDomain:
    19.4          except Exception, ex:
    19.5              raise XendError(str(ex))
    19.6  
    19.7 -
    19.8 -    def domain_vif_limit_set(self, domid, vif, credit, period):
    19.9 -        """Limit the vif's transmission rate
   19.10 -        """
   19.11 -        dominfo = self.domain_lookup(domid)
   19.12 -        dev = dominfo.getDevice('vif', vif)
   19.13 -        if not dev:
   19.14 -            raise XendError("invalid vif")
   19.15 -        return dev.setCreditLimit(credit, period)
   19.16 -
   19.17 -
   19.18      def domain_maxmem_set(self, domid, mem):
   19.19          """Set the memory limit for a domain.
   19.20  
    20.1 --- a/tools/python/xen/xm/main.py	Wed Nov 16 12:36:47 2005 +0100
    20.2 +++ b/tools/python/xen/xm/main.py	Wed Nov 16 12:37:29 2005 +0100
    20.3 @@ -118,8 +118,6 @@ xm full list of subcommands:
    20.4          Create a new virtual network device 
    20.5      network-detach  <DomId> <DevId>  Destroy a domain's virtual network
    20.6                                       device, where <DevId> is the device ID.
    20.7 -    network-limit   <DomId> <Vif> <Credit> <Period>
    20.8 -        Limit the transmission rate of a virtual network interface
    20.9      network-list    <DomId>        List virtual network interfaces for a domain
   20.10  
   20.11    Vnet commands:
   20.12 @@ -557,13 +555,6 @@ def xm_log(args):
   20.13      from xen.xend.XendClient import server
   20.14      print server.xend_node_log()
   20.15  
   20.16 -def xm_network_limit(args):
   20.17 -    arg_check(args,4,"network-limit")
   20.18 -    dom = args[0]
   20.19 -    v = map(int, args[1:4])
   20.20 -    from xen.xend.XendClient import server
   20.21 -    server.xend_domain_vif_limit(dom, *v)
   20.22 -
   20.23  def xm_network_list(args):
   20.24      arg_check(args,1,"network-list")
   20.25      dom = args[0]
   20.26 @@ -716,7 +707,6 @@ commands = {
   20.27      # network
   20.28      "network-attach": xm_network_attach,
   20.29      "network-detach": xm_network_detach,
   20.30 -    "network-limit": xm_network_limit,
   20.31      "network-list": xm_network_list,
   20.32      # vnet
   20.33      "vnet-list": xm_vnet_list,
   20.34 @@ -739,7 +729,6 @@ for c in subcommands:
   20.35  aliases = {
   20.36      "balloon": "mem-set",
   20.37      "vif-list": "network-list",
   20.38 -    "vif-limit": "network-limit",
   20.39      "vbd-create": "block-create",
   20.40      "vbd-destroy": "block-destroy",
   20.41      "vbd-list": "block-list",
    21.1 --- a/xen/arch/ia64/xen/domain.c	Wed Nov 16 12:36:47 2005 +0100
    21.2 +++ b/xen/arch/ia64/xen/domain.c	Wed Nov 16 12:37:29 2005 +0100
    21.3 @@ -952,7 +952,7 @@ int construct_dom0(struct domain *d,
    21.4  	si = (start_info_t *)alloc_xenheap_page();
    21.5  	memset(si, 0, PAGE_SIZE);
    21.6  	d->shared_info->arch.start_info_pfn = __pa(si) >> PAGE_SHIFT;
    21.7 -	sprintf(si->magic, "Xen-%i.%i", XEN_VERSION, XEN_SUBVERSION);
    21.8 +	sprintf(si->magic, "xen-%i.%i-ia64", XEN_VERSION, XEN_SUBVERSION);
    21.9  
   21.10  #if 0
   21.11  	si->nr_pages     = d->tot_pages;
    22.1 --- a/xen/arch/x86/domain_build.c	Wed Nov 16 12:36:47 2005 +0100
    22.2 +++ b/xen/arch/x86/domain_build.c	Wed Nov 16 12:37:29 2005 +0100
    22.3 @@ -639,7 +639,8 @@ int construct_dom0(struct domain *d,
    22.4      si->pt_base      = vpt_start;
    22.5      si->nr_pt_frames = nr_pt_pages;
    22.6      si->mfn_list     = vphysmap_start;
    22.7 -    sprintf(si->magic, "Xen-%i.%i", XEN_VERSION, XEN_SUBVERSION);
    22.8 +    sprintf(si->magic, "xen-%i.%i-x86_%d%s",
    22.9 +            XEN_VERSION, XEN_SUBVERSION, BITS_PER_LONG, xen_pae ? "p" : "");
   22.10  
   22.11      /* Write the phys->machine and machine->phys table entries. */
   22.12      for ( pfn = 0; pfn < d->tot_pages; pfn++ )
    23.1 --- a/xen/arch/x86/shadow.c	Wed Nov 16 12:36:47 2005 +0100
    23.2 +++ b/xen/arch/x86/shadow.c	Wed Nov 16 12:37:29 2005 +0100
    23.3 @@ -873,7 +873,7 @@ shadow_make_snapshot(
    23.4  }
    23.5  
    23.6  static struct out_of_sync_entry *
    23.7 -mark_mfn_out_of_sync(struct vcpu *v, unsigned long gpfn,
    23.8 +__mark_mfn_out_of_sync(struct vcpu *v, unsigned long gpfn,
    23.9                               unsigned long mfn)
   23.10  {
   23.11      struct domain *d = v->domain;
   23.12 @@ -909,7 +909,6 @@ mark_mfn_out_of_sync(struct vcpu *v, uns
   23.13      entry->v = v;
   23.14      entry->gpfn = gpfn;
   23.15      entry->gmfn = mfn;
   23.16 -    entry->snapshot_mfn = shadow_make_snapshot(d, gpfn, mfn);
   23.17      entry->writable_pl1e = -1;
   23.18  
   23.19  #if 0 // this code has not been updated for 32pae & 64 bit modes
   23.20 @@ -923,20 +922,34 @@ mark_mfn_out_of_sync(struct vcpu *v, uns
   23.21      //
   23.22      get_page(page, d);
   23.23  
   23.24 +    return entry;
   23.25 +}
   23.26 +
   23.27 +static struct out_of_sync_entry *
   23.28 +mark_mfn_out_of_sync(struct vcpu *v, unsigned long gpfn,
   23.29 +                             unsigned long mfn)
   23.30 +{
   23.31 +    struct out_of_sync_entry *entry =
   23.32 +        __mark_mfn_out_of_sync(v, gpfn, mfn);
   23.33 +    struct domain *d = v->domain;
   23.34 +
   23.35 +    entry->snapshot_mfn = shadow_make_snapshot(d, gpfn, mfn);
   23.36      // Add to the out-of-sync list
   23.37      //
   23.38      entry->next = d->arch.out_of_sync;
   23.39      d->arch.out_of_sync = entry;
   23.40  
   23.41      return entry;
   23.42 +
   23.43  }
   23.44  
   23.45  static void shadow_mark_va_out_of_sync(
   23.46      struct vcpu *v, unsigned long gpfn, unsigned long mfn, unsigned long va)
   23.47  {
   23.48      struct out_of_sync_entry *entry =
   23.49 -        shadow_mark_mfn_out_of_sync(v, gpfn, mfn);
   23.50 +        __mark_mfn_out_of_sync(v, gpfn, mfn);
   23.51      l2_pgentry_t sl2e;
   23.52 +    struct domain *d = v->domain;
   23.53  
   23.54  #if CONFIG_PAGING_LEVELS >= 4
   23.55      {
   23.56 @@ -971,6 +984,7 @@ static void shadow_mark_va_out_of_sync(
   23.57      }
   23.58      ASSERT(l2e_get_flags(sl2e) & _PAGE_PRESENT);
   23.59  
   23.60 +    entry->snapshot_mfn = shadow_make_snapshot(d, gpfn, mfn);
   23.61      // NB: this is stored as a machine address.
   23.62      entry->writable_pl1e =
   23.63          l2e_get_paddr(sl2e) | (sizeof(l1_pgentry_t) * l1_table_offset(va));
   23.64 @@ -983,6 +997,11 @@ static void shadow_mark_va_out_of_sync(
   23.65      if ( !get_shadow_ref(l2e_get_pfn(sl2e)) )
   23.66          BUG();
   23.67  
   23.68 +    // Add to the out-of-sync list
   23.69 +    //
   23.70 +    entry->next = d->arch.out_of_sync;
   23.71 +    d->arch.out_of_sync = entry;
   23.72 +
   23.73      FSH_LOG("mark_out_of_sync(va=%lx -> writable_pl1e=%lx)",
   23.74              va, entry->writable_pl1e);
   23.75  }
    24.1 --- a/xen/arch/x86/shadow32.c	Wed Nov 16 12:36:47 2005 +0100
    24.2 +++ b/xen/arch/x86/shadow32.c	Wed Nov 16 12:37:29 2005 +0100
    24.3 @@ -1826,7 +1826,7 @@ shadow_free_snapshot(struct domain *d, s
    24.4  }
    24.5  
    24.6  struct out_of_sync_entry *
    24.7 -shadow_mark_mfn_out_of_sync(struct vcpu *v, unsigned long gpfn,
    24.8 +__shadow_mark_mfn_out_of_sync(struct vcpu *v, unsigned long gpfn,
    24.9                               unsigned long mfn)
   24.10  {
   24.11      struct domain *d = v->domain;
   24.12 @@ -1862,7 +1862,6 @@ shadow_mark_mfn_out_of_sync(struct vcpu 
   24.13      entry->v = v;
   24.14      entry->gpfn = gpfn;
   24.15      entry->gmfn = mfn;
   24.16 -    entry->snapshot_mfn = shadow_make_snapshot(d, gpfn, mfn);
   24.17      entry->writable_pl1e = -1;
   24.18  
   24.19  #if SHADOW_DEBUG
   24.20 @@ -1874,6 +1873,18 @@ shadow_mark_mfn_out_of_sync(struct vcpu 
   24.21      //
   24.22      get_page(page, d);
   24.23  
   24.24 +    return entry;
   24.25 +}
   24.26 +
   24.27 +struct out_of_sync_entry *
   24.28 +shadow_mark_mfn_out_of_sync(struct vcpu *v, unsigned long gpfn,
   24.29 +                             unsigned long mfn)
   24.30 +{
   24.31 +    struct out_of_sync_entry *entry =
   24.32 +      __shadow_mark_mfn_out_of_sync(v, gpfn, mfn);
   24.33 +    struct domain *d = v->domain;
   24.34 +
   24.35 +    entry->snapshot_mfn = shadow_make_snapshot(d, gpfn, mfn);
   24.36      // Add to the out-of-sync list
   24.37      //
   24.38      entry->next = d->arch.out_of_sync;
   24.39 @@ -1886,8 +1897,9 @@ void shadow_mark_va_out_of_sync(
   24.40      struct vcpu *v, unsigned long gpfn, unsigned long mfn, unsigned long va)
   24.41  {
   24.42      struct out_of_sync_entry *entry =
   24.43 -        shadow_mark_mfn_out_of_sync(v, gpfn, mfn);
   24.44 +        __shadow_mark_mfn_out_of_sync(v, gpfn, mfn);
   24.45      l2_pgentry_t sl2e;
   24.46 +    struct domain *d = v->domain;
   24.47  
   24.48      // We need the address of shadow PTE that maps @va.
   24.49      // It might not exist yet.  Make sure it's there.
   24.50 @@ -1902,6 +1914,7 @@ void shadow_mark_va_out_of_sync(
   24.51      }
   24.52      ASSERT(l2e_get_flags(sl2e) & _PAGE_PRESENT);
   24.53  
   24.54 +    entry->snapshot_mfn = shadow_make_snapshot(d, gpfn, mfn);
   24.55      // NB: this is stored as a machine address.
   24.56      entry->writable_pl1e =
   24.57          l2e_get_paddr(sl2e) | (sizeof(l1_pgentry_t) * l1_table_offset(va));
   24.58 @@ -1914,6 +1927,11 @@ void shadow_mark_va_out_of_sync(
   24.59      if ( !get_shadow_ref(l2e_get_pfn(sl2e)) )
   24.60          BUG();
   24.61  
   24.62 +    // Add to the out-of-sync list
   24.63 +    //
   24.64 +    entry->next = d->arch.out_of_sync;
   24.65 +    d->arch.out_of_sync = entry;
   24.66 +
   24.67      FSH_LOG("mark_out_of_sync(va=%lx -> writable_pl1e=%lx)",
   24.68              va, entry->writable_pl1e);
   24.69  }
    25.1 --- a/xen/include/public/xen.h	Wed Nov 16 12:36:47 2005 +0100
    25.2 +++ b/xen/include/public/xen.h	Wed Nov 16 12:37:29 2005 +0100
    25.3 @@ -408,7 +408,7 @@ typedef struct shared_info {
    25.4  #define MAX_GUEST_CMDLINE 1024
    25.5  typedef struct start_info {
    25.6      /* THE FOLLOWING ARE FILLED IN BOTH ON INITIAL BOOT AND ON RESUME.    */
    25.7 -    char magic[32];             /* "Xen-<version>.<subversion>". */
    25.8 +    char magic[32];             /* "xen-<version>-<platform>".            */
    25.9      unsigned long nr_pages;     /* Total pages allocated to this domain.  */
   25.10      unsigned long shared_info;  /* MACHINE address of shared info struct. */
   25.11      uint32_t flags;             /* SIF_xxx flags.                         */