ia64/xen-unstable

changeset 351:56fce5176629

bitkeeper revision 1.162 (3e93fd7fB28toOVdYf8wyq2YRFEEnA)

Merge cairnwell.research:/home/jws/projects/xen/fixmem/xeno.bk
into cairnwell.research:/home/jws/projects/xen/megaraid/xeno.bk
author jws@cairnwell.research
date Wed Apr 09 11:01:19 2003 +0000 (2003-04-09)
parents e28ef71fed4d 4fd13119bcc6
children b2897c7b8bbf
files xen/arch/i386/ioremap.c xen/common/domain.c xen/common/kernel.c xen/common/memory.c xen/common/page_alloc.c xen/drivers/block/xen_block.c xen/drivers/pci/pci.c xen/include/xeno/config.h xen/include/xeno/mm.h xen/include/xeno/multiboot.h xen/include/xeno/sched.h xen/net/dev.c
line diff
     1.1 --- a/xen/arch/i386/ioremap.c	Mon Mar 31 11:34:23 2003 +0000
     1.2 +++ b/xen/arch/i386/ioremap.c	Wed Apr 09 11:01:19 2003 +0000
     1.3 @@ -50,6 +50,10 @@ void * __ioremap(unsigned long phys_addr
     1.4      if (phys_addr >= 0xA0000 && last_addr < 0x100000)
     1.5          return phys_to_virt(phys_addr);
     1.6  
     1.7 +    if(remap_base + size > IOREMAP_VIRT_END) {
     1.8 +      printk("ioremap: going past end of reserved space!\n");
     1.9 +      return NULL;
    1.10 +    }
    1.11  #if 0
    1.12      /*
    1.13       * Don't allow anybody to remap normal RAM that we're using..
     2.1 --- a/xen/common/domain.c	Mon Mar 31 11:34:23 2003 +0000
     2.2 +++ b/xen/common/domain.c	Wed Apr 09 11:01:19 2003 +0000
     2.3 @@ -14,16 +14,11 @@
     2.4  #include <asm/domain_page.h>
     2.5  #include <asm/flushtlb.h>
     2.6  #include <asm/msr.h>
     2.7 -#include <xeno/multiboot.h>
     2.8  #include <xeno/blkdev.h>
     2.9  
    2.10  #define L1_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_USER|_PAGE_ACCESSED)
    2.11  #define L2_PROT (_PAGE_PRESENT|_PAGE_RW|_PAGE_USER|_PAGE_ACCESSED|_PAGE_DIRTY)
    2.12  
    2.13 -extern int nr_mods;
    2.14 -extern module_t *mod;
    2.15 -extern unsigned char *cmdline;
    2.16 -
    2.17  rwlock_t tasklist_lock __cacheline_aligned = RW_LOCK_UNLOCKED;
    2.18  
    2.19  /*
    2.20 @@ -173,7 +168,7 @@ unsigned int alloc_new_dom_mem(struct ta
    2.21      for ( alloc_pfns = 0; alloc_pfns < req_pages; alloc_pfns++ )
    2.22      {
    2.23          pf = list_entry(temp, struct pfn_info, list);
    2.24 -        pf->flags |= p->domain;
    2.25 +        pf->flags = p->domain;
    2.26          pf->type_count = pf->tot_count = 0;
    2.27          temp = temp->next;
    2.28          list_del(&pf->list);
    2.29 @@ -366,9 +361,9 @@ static unsigned long alloc_page_from_dom
    2.30  /* setup_guestos is used for building dom0 solely. other domains are built in
    2.31   * userspace dom0 and final setup is being done by final_setup_guestos.
    2.32   */
    2.33 -int setup_guestos(struct task_struct *p, dom0_newdomain_t *params)
    2.34 +int setup_guestos(struct task_struct *p, dom0_newdomain_t *params, 
    2.35 +                  char *data_start, unsigned long data_len, char *cmdline)
    2.36  {
    2.37 -
    2.38      struct list_head *list_ent;
    2.39      char *src, *dst;
    2.40      int i, dom = p->domain;
    2.41 @@ -387,13 +382,13 @@ int setup_guestos(struct task_struct *p,
    2.42      /* Sanity! */
    2.43      if ( p->domain != 0 ) BUG();
    2.44  
    2.45 -    if ( strncmp(__va(mod[0].mod_start), "XenoGues", 8) )
    2.46 +    if ( strncmp(data_start, "XenoGues", 8) )
    2.47      {
    2.48          printk("DOM%d: Invalid guest OS image\n", dom);
    2.49          return -1;
    2.50      }
    2.51  
    2.52 -    virt_load_address = *(unsigned long *)__va(mod[0].mod_start + 8);
    2.53 +    virt_load_address = *(unsigned long *)(data_start + 8);
    2.54      if ( (virt_load_address & (PAGE_SIZE-1)) )
    2.55      {
    2.56          printk("DOM%d: Guest OS load address not page-aligned (%08lx)\n",
    2.57 @@ -407,13 +402,12 @@ int setup_guestos(struct task_struct *p,
    2.58      alloc_address <<= PAGE_SHIFT;
    2.59      alloc_index = p->tot_pages;
    2.60  
    2.61 -    if ( (mod[nr_mods-1].mod_end-mod[0].mod_start) > 
    2.62 -         (params->memory_kb << 9) )
    2.63 +    if ( data_len > (params->memory_kb << 9) )
    2.64      {
    2.65          printk("DOM%d: Guest OS image is too large\n"
    2.66                 "       (%luMB is greater than %uMB limit for a\n"
    2.67                 "        %uMB address space)\n",
    2.68 -               dom, (mod[nr_mods-1].mod_end-mod[0].mod_start)>>20,
    2.69 +               dom, data_len>>20,
    2.70                 (params->memory_kb)>>11,
    2.71                 (params->memory_kb)>>10);
    2.72          free_all_dom_mem(p);
    2.73 @@ -539,9 +533,9 @@ int setup_guestos(struct task_struct *p,
    2.74      __write_cr3_counted(pagetable_val(p->mm.pagetable));
    2.75  
    2.76      /* Copy the guest OS image. */
    2.77 -    src = (char *)__va(mod[0].mod_start + 12);
    2.78 +    src = (char *)(data_start + 12);
    2.79      dst = (char *)virt_load_address;
    2.80 -    while ( src < (char *)__va(mod[nr_mods-1].mod_end) ) *dst++ = *src++;
    2.81 +    while ( src < (data_start+data_len) ) *dst++ = *src++;
    2.82  
    2.83      /* Set up start info area. */
    2.84      memset(virt_startinfo_address, 0, sizeof(*virt_startinfo_address));
    2.85 @@ -568,23 +562,13 @@ int setup_guestos(struct task_struct *p,
    2.86      /* Add block io interface */
    2.87      virt_startinfo_address->blk_ring = virt_to_phys(p->blk_ring_base); 
    2.88  
    2.89 -    /* We tell OS about any modules we were given. */
    2.90 -    if ( nr_mods > 1 )
    2.91 +    dst = virt_startinfo_address->cmd_line;
    2.92 +    if ( cmdline != NULL )
    2.93      {
    2.94 -        virt_startinfo_address->mod_start = 
    2.95 -            (mod[1].mod_start-mod[0].mod_start-12) + virt_load_address;
    2.96 -        virt_startinfo_address->mod_len = 
    2.97 -            mod[nr_mods-1].mod_end - mod[1].mod_start;
    2.98 -    }
    2.99 -
   2.100 -    dst = virt_startinfo_address->cmd_line;
   2.101 -    if ( mod[0].string )
   2.102 -    {
   2.103 -        char *modline = (char *)__va(mod[0].string);
   2.104          for ( i = 0; i < 255; i++ )
   2.105          {
   2.106 -            if ( modline[i] == '\0' ) break;
   2.107 -            *dst++ = modline[i];
   2.108 +            if ( cmdline[i] == '\0' ) break;
   2.109 +            *dst++ = cmdline[i];
   2.110          }
   2.111      }
   2.112      *dst = '\0';
     3.1 --- a/xen/common/kernel.c	Mon Mar 31 11:34:23 2003 +0000
     3.2 +++ b/xen/common/kernel.c	Wed Apr 09 11:01:19 2003 +0000
     3.3 @@ -1,8 +1,8 @@
     3.4  #include <stdarg.h>
     3.5  #include <xeno/lib.h>
     3.6  #include <xeno/errno.h>
     3.7 +#include <xeno/spinlock.h>
     3.8  #include <xeno/multiboot.h>
     3.9 -#include <xeno/spinlock.h>
    3.10  #include <xeno/sched.h>
    3.11  #include <xeno/mm.h>
    3.12  #include <xeno/delay.h>
    3.13 @@ -27,10 +27,6 @@ struct e820entry {
    3.14      unsigned long type;                    /* type of memory segment */
    3.15  };
    3.16  
    3.17 -/* Used by domain.c:setup_guestos */
    3.18 -int nr_mods;
    3.19 -module_t *mod;
    3.20 -
    3.21  void init_vga(void);
    3.22  void init_serial(void);
    3.23  void start_of_day(void);
    3.24 @@ -65,6 +61,7 @@ void cmain (unsigned long magic, multibo
    3.25      dom0_newdomain_t dom0_params;
    3.26      unsigned long max_page;
    3.27      unsigned char *cmdline;
    3.28 +    module_t *mod;
    3.29      int i;
    3.30  
    3.31      /*
    3.32 @@ -119,8 +116,7 @@ void cmain (unsigned long magic, multibo
    3.33      }
    3.34  #endif
    3.35  
    3.36 -    nr_mods = mbi->mods_count;
    3.37 -    mod     = (module_t *)__va(mbi->mods_addr);
    3.38 +    mod = (module_t *)__va(mbi->mods_addr);
    3.39  
    3.40      /* Parse the command line. */
    3.41      cmdline = (unsigned char *)(mbi->cmdline ? __va(mbi->cmdline) : NULL);
    3.42 @@ -174,7 +170,7 @@ void cmain (unsigned long magic, multibo
    3.43      printk("Initialised all memory on a %luMB machine\n",
    3.44             max_page >> (20-PAGE_SHIFT));
    3.45  
    3.46 -    init_page_allocator(mod[nr_mods-1].mod_end, MAX_MONITOR_ADDRESS);
    3.47 +    init_page_allocator(mod[0].mod_end, MAX_MONITOR_ADDRESS);
    3.48   
    3.49      /* These things will get done by do_newdomain() for all other tasks. */
    3.50      current->shared_info = (void *)get_free_page(GFP_KERNEL);
    3.51 @@ -195,11 +191,16 @@ void cmain (unsigned long magic, multibo
    3.52  
    3.53      new_dom = do_newdomain(0, 0);
    3.54      if ( new_dom == NULL ) panic("Error creating domain 0\n");
    3.55 -    if ( setup_guestos(new_dom, &dom0_params) != 0 )
    3.56 -    {
    3.57 -        panic("Could not set up DOM0 guest OS\n");
    3.58 -    }
    3.59 -	update_dom_time(new_dom->shared_info);
    3.60 +    if ( setup_guestos(new_dom, 
    3.61 +                       &dom0_params, 
    3.62 +                       __va(mod[0].mod_start), 
    3.63 +                       mod[0].mod_end - mod[0].mod_start, 
    3.64 +                       __va(mod[0].string))
    3.65 +         != 0 ) panic("Could not set up DOM0 guest OS\n");
    3.66 +
    3.67 +    release_bytes_to_allocator(__pa(&_end), mod[0].mod_end);
    3.68 +
    3.69 +    update_dom_time(new_dom->shared_info);
    3.70      wake_up(new_dom);
    3.71  
    3.72      cpu_idle();
     4.1 --- a/xen/common/memory.c	Mon Mar 31 11:34:23 2003 +0000
     4.2 +++ b/xen/common/memory.c	Wed Apr 09 11:01:19 2003 +0000
     4.3 @@ -275,6 +275,7 @@ static int inc_page_refcnt(unsigned long
     4.4              return -1;
     4.5          }
     4.6  
     4.7 +        page->flags &= ~PG_type_mask;
     4.8          page->flags |= type;
     4.9      }
    4.10  
    4.11 @@ -286,7 +287,6 @@ static int inc_page_refcnt(unsigned long
    4.12  static int dec_page_refcnt(unsigned long page_nr, unsigned int type)
    4.13  {
    4.14      struct pfn_info *page;
    4.15 -    int ret;
    4.16  
    4.17      if ( page_nr >= max_page )
    4.18      {
    4.19 @@ -303,9 +303,8 @@ static int dec_page_refcnt(unsigned long
    4.20          return -1;
    4.21      }
    4.22      ASSERT(page_type_count(page) != 0);
    4.23 -    if ( (ret = put_page_type(page)) == 0 ) page->flags &= ~PG_type_mask;
    4.24      put_page_tot(page);
    4.25 -    return ret;
    4.26 +    return put_page_type(page);
    4.27  }
    4.28  
    4.29  
    4.30 @@ -439,8 +438,10 @@ static int get_page(unsigned long page_n
    4.31                          page_type_count(page));
    4.32                  return(-1);
    4.33              }
    4.34 +            page->flags &= ~PG_type_mask;
    4.35              page->flags |= PGT_writeable_page;
    4.36          }
    4.37 +        page->flags |= PG_need_flush;
    4.38          get_page_type(page);
    4.39      }
    4.40  
    4.41 @@ -499,11 +500,12 @@ static void put_page(unsigned long page_
    4.42      ASSERT(DOMAIN_OKAY(page->flags));
    4.43      ASSERT((!writeable) || 
    4.44             ((page_type_count(page) != 0) && 
    4.45 -            ((page->flags & PG_type_mask) == PGT_writeable_page)));
    4.46 +            ((page->flags & PG_type_mask) == PGT_writeable_page) &&
    4.47 +            ((page->flags & PG_need_flush) == PG_need_flush)));
    4.48      if ( writeable && (put_page_type(page) == 0) )
    4.49      {
    4.50          tlb_flush[smp_processor_id()] = 1;
    4.51 -        page->flags &= ~PG_type_mask;
    4.52 +        page->flags &= ~PG_need_flush;
    4.53      }
    4.54      put_page_tot(page);
    4.55  }
     5.1 --- a/xen/common/page_alloc.c	Mon Mar 31 11:34:23 2003 +0000
     5.2 +++ b/xen/common/page_alloc.c	Wed Apr 09 11:01:19 2003 +0000
     5.3 @@ -110,7 +110,10 @@ static chunk_head_t  free_tail[FREELIST_
     5.4  #define round_pgup(_p)    (((_p)+(PAGE_SIZE-1))&PAGE_MASK)
     5.5  
     5.6  
     5.7 -/* Initialise allocator, placing addresses [@min,@max] in free pool. */
     5.8 +/*
     5.9 + * Initialise allocator, placing addresses [@min,@max] in free pool.
    5.10 + * @min and @max are PHYSICAL addresses.
    5.11 + */
    5.12  void __init init_page_allocator(unsigned long min, unsigned long max)
    5.13  {
    5.14      int i;
    5.15 @@ -168,7 +171,21 @@ void __init init_page_allocator(unsigned
    5.16  }
    5.17  
    5.18  
    5.19 -/* Allocate 2^@order contiguous pages. */
    5.20 +/* Release a PHYSICAL address range to the allocator. */
    5.21 +void release_bytes_to_allocator(unsigned long min, unsigned long max)
    5.22 +{
    5.23 +    min = round_pgup  (min) + PAGE_OFFSET;
    5.24 +    max = round_pgdown(max) + PAGE_OFFSET;
    5.25 +
    5.26 +    while ( min < max )
    5.27 +    {
    5.28 +        __free_pages(min, 0);
    5.29 +        min += PAGE_SIZE;
    5.30 +    }
    5.31 +}
    5.32 +
    5.33 +
    5.34 +/* Allocate 2^@order contiguous pages. Returns a VIRTUAL address. */
    5.35  unsigned long __get_free_pages(int mask, int order)
    5.36  {
    5.37      int i, attempts = 0;
    5.38 @@ -233,7 +250,7 @@ retry:
    5.39  }
    5.40  
    5.41  
    5.42 -/* Free 2^@order pages at location @p. */
    5.43 +/* Free 2^@order pages at VIRTUAL address @p. */
    5.44  void __free_pages(unsigned long p, int order)
    5.45  {
    5.46      unsigned long size = 1 << (order + PAGE_SHIFT);
     6.1 --- a/xen/drivers/block/xen_block.c	Mon Mar 31 11:34:23 2003 +0000
     6.2 +++ b/xen/drivers/block/xen_block.c	Wed Apr 09 11:01:19 2003 +0000
     6.3 @@ -277,7 +277,8 @@ static int __buffer_is_valid(struct task
     6.4  
     6.5          /* If reading into the frame, the frame must be writeable. */
     6.6          if ( writeable_buffer &&
     6.7 -             ((page->flags & PG_type_mask) != PGT_writeable_page) )
     6.8 +             ((page->flags & PG_type_mask) != PGT_writeable_page) &&
     6.9 +             (page->type_count != 0) )
    6.10          {
    6.11              DPRINTK("non-writeable page passed for block read\n");
    6.12              goto out;
    6.13 @@ -301,7 +302,16 @@ static void __lock_buffer(unsigned long 
    6.14            pfn++ )
    6.15      {
    6.16          page = frame_table + pfn;
    6.17 -        if ( writeable_buffer ) get_page_type(page);
    6.18 +        if ( writeable_buffer )
    6.19 +        {
    6.20 +            if ( page->type_count == 0 )
    6.21 +            {
    6.22 +                page->flags &= ~(PG_type_mask | PG_need_flush);
    6.23 +                /* NB. This ref alone won't cause a TLB flush. */
    6.24 +                page->flags |= PGT_writeable_page;
    6.25 +            }
    6.26 +            get_page_type(page);
    6.27 +        }
    6.28          get_page_tot(page);
    6.29      }
    6.30  }
    6.31 @@ -320,8 +330,13 @@ static void unlock_buffer(struct task_st
    6.32            pfn++ )
    6.33      {
    6.34          page = frame_table + pfn;
    6.35 -        if ( writeable_buffer && (put_page_type(page) == 0) )
    6.36 -            page->flags &= ~PG_type_mask;
    6.37 +        if ( writeable_buffer &&
    6.38 +             (put_page_type(page) == 0) &&
    6.39 +             (page->flags & PG_need_flush) )
    6.40 +        {
    6.41 +            __flush_tlb();
    6.42 +            page->flags &= ~PG_need_flush;
    6.43 +        }
    6.44          put_page_tot(page);
    6.45      }
    6.46      spin_unlock_irqrestore(&p->page_lock, flags);
     7.1 --- a/xen/drivers/pci/pci.c	Mon Mar 31 11:34:23 2003 +0000
     7.2 +++ b/xen/drivers/pci/pci.c	Wed Apr 09 11:01:19 2003 +0000
     7.3 @@ -1505,21 +1505,26 @@ unsigned int __devinit pci_do_scan_bus(s
     7.4  {
     7.5  	unsigned int devfn, max, pass;
     7.6  	struct list_head *ln;
     7.7 -	struct pci_dev *dev, dev0;
     7.8 +	struct pci_dev *dev, *dev0;
     7.9  
    7.10  	DBG("Scanning bus %02x\n", bus->number);
    7.11  	max = bus->secondary;
    7.12  
    7.13  	/* Create a device template */
    7.14 -	memset(&dev0, 0, sizeof(dev0));
    7.15 -	dev0.bus = bus;
    7.16 -	dev0.sysdata = bus->sysdata;
    7.17 +	dev0 = kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
    7.18 +	if(!dev0) {
    7.19 +	  panic("Out of memory scanning PCI bus!\n");
    7.20 +	}
    7.21 +	memset(dev0, 0, sizeof(struct pci_dev));
    7.22 +	dev0->bus = bus;
    7.23 +	dev0->sysdata = bus->sysdata;
    7.24  
    7.25  	/* Go find them, Rover! */
    7.26  	for (devfn = 0; devfn < 0x100; devfn += 8) {
    7.27 -		dev0.devfn = devfn;
    7.28 -		pci_scan_slot(&dev0);
    7.29 +		dev0->devfn = devfn;
    7.30 +		pci_scan_slot(dev0);
    7.31  	}
    7.32 +	kfree(dev0);
    7.33  
    7.34  	/*
    7.35  	 * After performing arch-dependent fixup of the bus, look behind
     8.1 --- a/xen/include/xeno/config.h	Mon Mar 31 11:34:23 2003 +0000
     8.2 +++ b/xen/include/xeno/config.h	Wed Apr 09 11:01:19 2003 +0000
     8.3 @@ -141,6 +141,7 @@
     8.4  #define capable(_c) 0
     8.5  
     8.6  #ifndef __ASSEMBLY__
     8.7 +extern unsigned long _end; /* standard ELF symbol */
     8.8  extern void __out_of_line_bug(int line) __attribute__((noreturn));
     8.9  #define out_of_line_bug() __out_of_line_bug(__LINE__)
    8.10  #endif
     9.1 --- a/xen/include/xeno/mm.h	Mon Mar 31 11:34:23 2003 +0000
     9.2 +++ b/xen/include/xeno/mm.h	Wed Apr 09 11:01:19 2003 +0000
     9.3 @@ -35,6 +35,7 @@
     9.4   */
     9.5  
     9.6  void init_page_allocator(unsigned long min, unsigned long max);
     9.7 +void release_bytes_to_allocator(unsigned long min, unsigned long max);
     9.8  unsigned long __get_free_pages(int mask, int order);
     9.9  void __free_pages(unsigned long p, int order);
    9.10  #define get_free_page(_m) (__get_free_pages((_m),0))
    9.11 @@ -51,10 +52,6 @@ void __free_pages(unsigned long p, int o
    9.12   * with struct pfn_info and frame_table respectively. Boris Dragovic
    9.13   */
    9.14  
    9.15 -/*
    9.16 - * This is still fatter than I'd like. Do we need the count?
    9.17 - * Do we need the flags? The list at least seems req'd by slab.c.
    9.18 - */
    9.19  typedef struct pfn_info {
    9.20      struct list_head list;      /* ->mapping has some page lists. */
    9.21      unsigned long flags;        /* atomic flags. */
    9.22 @@ -100,6 +97,19 @@ typedef struct pfn_info {
    9.23  #define PGT_writeable_page  (7<<24) /* has writable mappings of this page? */
    9.24  #define PGT_net_rx_buf      (8<<24) /* this page has been pirated by the net code. */
    9.25  
    9.26 +/*
    9.27 + * This bit indicates that the TLB must be flushed when the type count of this
    9.28 + * frame drops to zero. This is needed on current x86 processors only for
    9.29 + * frames which have guestos-accessible writeable mappings. In this case we must 
    9.30 + * prevent stale TLB entries allowing the frame to be written if it used for a
    9.31 + * page table, for example.
    9.32 + * 
    9.33 + * We have this bit because the writeable type is actually also used to pin a page
    9.34 + * when it is used as a disk read buffer. This doesn't require a TLB flush because
    9.35 + * the frame never has a mapping in the TLB.
    9.36 + */
    9.37 +#define PG_need_flush       (1<<28)
    9.38 +
    9.39  #define PageSlab(page)		test_bit(PG_slab, &(page)->flags)
    9.40  #define PageSetSlab(page)	set_bit(PG_slab, &(page)->flags)
    9.41  #define PageClearSlab(page)	clear_bit(PG_slab, &(page)->flags)
    10.1 --- a/xen/include/xeno/multiboot.h	Mon Mar 31 11:34:23 2003 +0000
    10.2 +++ b/xen/include/xeno/multiboot.h	Wed Apr 09 11:01:19 2003 +0000
    10.3 @@ -15,6 +15,9 @@
    10.4     along with this program; if not, write to the Free Software
    10.5     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
    10.6  
    10.7 +#ifndef __MULTIBOOT_H__
    10.8 +#define __MULTIBOOT_H__
    10.9 +
   10.10  #ifndef __ELF__
   10.11  #error "Build on a 32-bit ELF system"
   10.12  #endif
   10.13 @@ -79,3 +82,5 @@ typedef struct memory_map
   10.14    unsigned long length_high;
   10.15    unsigned long type;
   10.16  } memory_map_t;
   10.17 +
   10.18 +#endif /* __MULTIBOOT_H__ */
    11.1 --- a/xen/include/xeno/sched.h	Mon Mar 31 11:34:23 2003 +0000
    11.2 +++ b/xen/include/xeno/sched.h	Wed Apr 09 11:01:19 2003 +0000
    11.3 @@ -200,7 +200,9 @@ extern union task_union idle0_task_union
    11.4  extern struct task_struct first_task_struct;
    11.5  
    11.6  extern struct task_struct *do_newdomain(unsigned int dom_id, unsigned int cpu);
    11.7 -extern int setup_guestos(struct task_struct *p, dom0_newdomain_t *params);
    11.8 +extern int setup_guestos(
    11.9 +    struct task_struct *p, dom0_newdomain_t *params,
   11.10 +    char *data_start, unsigned long data_len, char *cmdline);
   11.11  extern int final_setup_guestos(struct task_struct *p, dom_meminfo_t *);
   11.12  
   11.13  struct task_struct *find_domain_by_id(unsigned int dom);
    12.1 --- a/xen/net/dev.c	Mon Mar 31 11:34:23 2003 +0000
    12.2 +++ b/xen/net/dev.c	Wed Apr 09 11:01:19 2003 +0000
    12.3 @@ -519,7 +519,7 @@ void deliver_packet(struct sk_buff *skb,
    12.4          
    12.5      h_pfn->tot_count = h_pfn->type_count = 1;
    12.6      g_pfn->tot_count = g_pfn->type_count = 0;
    12.7 -    h_pfn->flags = g_pfn->flags & (~PG_type_mask);
    12.8 +    h_pfn->flags = g_pfn->flags & ~PG_type_mask;
    12.9          
   12.10      if (*g_pte & _PAGE_RW) h_pfn->flags |= PGT_writeable_page;
   12.11      g_pfn->flags = 0;