ia64/xen-unstable

changeset 627:a74ec9013abb

bitkeeper revision 1.349 (3f132695Orgv2nzuhXag1iNmNOy53Q)

Merge labyrinth.cl.cam.ac.uk:/auto/groups/xeno/BK/xeno.bk
into labyrinth.cl.cam.ac.uk:/auto/anfs/scratch/labyrinth/iap10/xeno-clone/xeno.bk
author iap10@labyrinth.cl.cam.ac.uk
date Mon Jul 14 21:54:29 2003 +0000 (2003-07-14)
parents 1ae1c16c3907 384fbe1ed716
children 4fd1861ec41a
files BitKeeper/etc/ignore tools/internal/xi_vifinit xen/arch/i386/nmi.c xen/arch/i386/setup.c xen/common/kernel.c xen/drivers/block/xen_block.c xen/net/dev.c
line diff
     1.1 --- a/BitKeeper/etc/ignore	Mon Jul 14 16:36:46 2003 +0000
     1.2 +++ b/BitKeeper/etc/ignore	Mon Jul 14 21:54:29 2003 +0000
     1.3 @@ -463,3 +463,8 @@ tools/control/web/pd-l.jsp
     1.4  tools/control/web/pd-r.jsp
     1.5  tools/control/web/pd-rr.jsp
     1.6  tools/control/web/pd.jsp
     1.7 +tools/internal/xi_list
     1.8 +tools/internal/xi_usage
     1.9 +tools/internal/xi_sched_domain
    1.10 +tools/internal/xi_sched_global
    1.11 +xen/arch/i386/nmi.o
     2.1 --- a/tools/internal/xi_vifinit	Mon Jul 14 16:36:46 2003 +0000
     2.2 +++ b/tools/internal/xi_vifinit	Mon Jul 14 21:54:29 2003 +0000
     2.3 @@ -16,7 +16,15 @@ then
     2.4  fi
     2.5  
     2.6  #outbound rule:
     2.7 -echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dst=PHYS proto=any" > /proc/xeno/vfr
     2.8 +echo $3 | grep -q "^169\\.254\\."
     2.9 +if [ $? -eq 0 ];
    2.10 +then
    2.11 +	# If this is a link local address, send to dom0
    2.12 +	echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dstdom=0 dstidx=0 proto=any" > /proc/xeno/vfr
    2.13 +else
    2.14 +	# If this is not, send to wire
    2.15 +	echo "ADD ACCEPT srcaddr=$3 srcaddrmask=255.255.255.255 srcdom=$1 srcidx=$2 dst=PHYS proto=any" > /proc/xeno/vfr
    2.16 +fi
    2.17  
    2.18  #inbound rule:
    2.19  echo "ADD ACCEPT dstaddr=$3 dstaddrmask=255.255.255.255 src=ANY dstdom=$1 dstidx=$2 proto=any" > /proc/xeno/vfr
     3.1 --- a/xen/arch/i386/nmi.c	Mon Jul 14 16:36:46 2003 +0000
     3.2 +++ b/xen/arch/i386/nmi.c	Mon Jul 14 21:54:29 2003 +0000
     3.3 @@ -27,10 +27,7 @@
     3.4  #include <asm/msr.h>
     3.5  #include <asm/mpspec.h>
     3.6  
     3.7 -#undef Dprintk
     3.8 -#define Dprintk(x...) printk(x)
     3.9 -
    3.10 -unsigned int nmi_watchdog = NMI_LOCAL_APIC;
    3.11 +unsigned int nmi_watchdog = NMI_NONE;
    3.12  static unsigned int nmi_hz = HZ;
    3.13  unsigned int nmi_perfctr_msr;	/* the MSR to reset in NMI handler */
    3.14  extern void show_registers(struct pt_regs *regs);
    3.15 @@ -80,6 +77,9 @@ int __init check_nmi_watchdog (void)
    3.16      unsigned int prev_nmi_count[NR_CPUS];
    3.17      int j, cpu;
    3.18      
    3.19 +    if (!nmi_watchdog)
    3.20 +        return 0;
    3.21 +
    3.22      printk("testing NMI watchdog ---\n");
    3.23  
    3.24      for (j = 0; j < smp_num_cpus; j++) {
    3.25 @@ -197,6 +197,9 @@ static int __pminit setup_p4_watchdog(vo
    3.26  
    3.27  void __pminit setup_apic_nmi_watchdog (void)
    3.28  {
    3.29 +    if (!nmi_watchdog)
    3.30 +        return;
    3.31 +
    3.32      switch (boot_cpu_data.x86_vendor) {
    3.33      case X86_VENDOR_AMD:
    3.34          if (boot_cpu_data.x86 != 6 && boot_cpu_data.x86 != 15)
     4.1 --- a/xen/arch/i386/setup.c	Mon Jul 14 16:36:46 2003 +0000
     4.2 +++ b/xen/arch/i386/setup.c	Mon Jul 14 21:54:29 2003 +0000
     4.3 @@ -286,17 +286,20 @@ void __init start_of_day(void)
     4.4      extern void tqueue_bh(void);
     4.5      extern void immediate_bh(void);
     4.6      extern void init_timervecs(void);
     4.7 -	extern void disable_pit(void);
     4.8 -	extern void ac_timer_init(void);
     4.9 +    extern void disable_pit(void);
    4.10 +    extern void ac_timer_init(void);
    4.11      extern int  setup_network_devices(void);
    4.12      extern void net_init(void);
    4.13      extern void initialize_block_io(void);
    4.14      extern void initialize_keytable(); 
    4.15      extern void initialize_serial(void);
    4.16      extern void initialize_keyboard(void);
    4.17 -    extern int opt_nosmp;
    4.18 +    extern int opt_nosmp, opt_watchdog;
    4.19      unsigned long low_mem_size;
    4.20      
    4.21 +    if ( opt_watchdog ) 
    4.22 +        nmi_watchdog = NMI_LOCAL_APIC;
    4.23 +
    4.24      /*
    4.25       * We do this early, but tables are in the lowest 1MB (usually
    4.26       * 0xfe000-0xfffff). Therefore they're unlikely to ever get clobbered.
     5.1 --- a/xen/common/kernel.c	Mon Jul 14 16:36:46 2003 +0000
     5.2 +++ b/xen/common/kernel.c	Mon Jul 14 21:54:29 2003 +0000
     5.3 @@ -41,7 +41,7 @@ unsigned int opt_ser_baud = 9600;  /* de
     5.4  unsigned int opt_dom0_mem = 16000; /* default kbytes for DOM0 */
     5.5  unsigned int opt_ne_base = 0; /* NE2k NICs cannot be probed */
     5.6  unsigned char opt_ifname[10] = "eth0";
     5.7 -int opt_noht=0, opt_noacpi=0, opt_nosmp=0;
     5.8 +int opt_noht=0, opt_noacpi=0, opt_nosmp=0, opt_watchdog=0;
     5.9  enum { OPT_IP, OPT_STR, OPT_UINT, OPT_BOOL };
    5.10  static struct {
    5.11      unsigned char *name;
    5.12 @@ -56,6 +56,7 @@ static struct {
    5.13      { "noht",        OPT_BOOL, &opt_noht },
    5.14      { "noacpi",      OPT_BOOL, &opt_noacpi },
    5.15      { "nosmp",       OPT_BOOL, &opt_nosmp },
    5.16 +    { "watchdog",    OPT_BOOL, &opt_watchdog },
    5.17      { NULL,       0,        NULL     }
    5.18  };
    5.19  
     6.1 --- a/xen/drivers/block/xen_block.c	Mon Jul 14 16:36:46 2003 +0000
     6.2 +++ b/xen/drivers/block/xen_block.c	Mon Jul 14 21:54:29 2003 +0000
     6.3 @@ -704,14 +704,14 @@ static void dispatch_rw_block_io(struct 
     6.4              phys_seg[nr_psegs].nr_sects      = nr_sects;
     6.5  	    if (p->domain != 0 &&
     6.6  		!xen_physdisk_access_okay(&phys_seg[nr_psegs], p, operation)) {
     6.7 -	      DPRINTK("access denied\n");
     6.8 -	      /* XXX not quite right, but close enough. */
     6.9 -	      goto bad_descriptor;
    6.10 +                DPRINTK("access denied: dev=%04x off=%ld nr=%ld\n",
    6.11 +                        req->device, req->sector_number + tot_sects, nr_sects);
    6.12 +                goto bad_descriptor;
    6.13  	    }
    6.14  	    phys_seg[nr_psegs].dev           = xendev_to_physdev(req->device);
    6.15              if ( phys_seg[nr_psegs].dev == 0 ) 
    6.16  	    {
    6.17 -	        DPRINTK("bad device\n");
    6.18 +	        DPRINTK("bad device: %04x\n", req_device);
    6.19  	        goto bad_descriptor;
    6.20  	    }
    6.21              new_segs = 1;
     7.1 --- a/xen/net/dev.c	Mon Jul 14 16:36:46 2003 +0000
     7.2 +++ b/xen/net/dev.c	Mon Jul 14 21:54:29 2003 +0000
     7.3 @@ -1768,7 +1768,7 @@ long do_net_update(void)
     7.4      net_vif_t *vif;
     7.5      net_idx_t *shared_idxs;
     7.6      unsigned int i, j, idx;
     7.7 -    struct sk_buff *skb;
     7.8 +    struct sk_buff *skb, *interdom_skb = NULL;
     7.9      tx_req_entry_t tx;
    7.10      rx_req_entry_t rx;
    7.11      unsigned long pte_pfn, buf_pfn;
    7.12 @@ -1889,7 +1889,11 @@ long do_net_update(void)
    7.13                  skb->len = tx.size - ETH_HLEN;
    7.14                  unmap_domain_mem(skb->head);
    7.15  
    7.16 -                (void)netif_rx(skb);
    7.17 +                /*
    7.18 +                 * We must defer netif_rx until we have released the current
    7.19 +                 * domain's page_lock, or we may deadlock on SMP.
    7.20 +                 */
    7.21 +                interdom_skb = skb;
    7.22  
    7.23                  make_tx_response(vif, tx.id, RING_STATUS_OK);
    7.24              }
    7.25 @@ -1897,6 +1901,11 @@ long do_net_update(void)
    7.26          tx_unmap_and_continue:
    7.27              unmap_domain_mem(g_data);
    7.28              spin_unlock_irq(&current->page_lock);
    7.29 +            if ( interdom_skb != NULL )
    7.30 +            {
    7.31 +                (void)netif_rx(interdom_skb);
    7.32 +                interdom_skb = NULL;
    7.33 +            }
    7.34          }
    7.35  
    7.36          vif->tx_req_cons = i;