ia64/xen-unstable

changeset 11739:1a0b58e7b5de

merge with xen-unstable.hg
author awilliam@xenbuild.aw
date Thu Oct 05 12:25:53 2006 -0600 (2006-10-05)
parents 77f554ef7484 0dc4ae151be2
children 70d5d92066e5
files
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c	Wed Oct 04 22:14:24 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c	Thu Oct 05 12:25:53 2006 -0600
     1.3 @@ -350,7 +350,6 @@ static inline void set_32bit_tls(struct 
     1.4  	struct user_desc ud = { 
     1.5  		.base_addr = addr,
     1.6  		.limit = 0xfffff,
     1.7 -		.contents = (3 << 3), /* user */
     1.8  		.seg_32bit = 1,
     1.9  		.limit_in_pages = 1,
    1.10  		.useable = 1,
     2.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/interface.c	Wed Oct 04 22:14:24 2006 -0600
     2.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/interface.c	Thu Oct 05 12:25:53 2006 -0600
     2.3 @@ -34,6 +34,24 @@
     2.4  #include <linux/ethtool.h>
     2.5  #include <linux/rtnetlink.h>
     2.6  
     2.7 +/*
     2.8 + * Module parameter 'queue_length':
     2.9 + * 
    2.10 + * Enables queuing in the network stack when a client has run out of receive
    2.11 + * descriptors. Although this feature can improve receive bandwidth by avoiding
    2.12 + * packet loss, it can also result in packets sitting in the 'tx_queue' for
    2.13 + * unbounded time. This is bad if those packets hold onto foreign resources.
    2.14 + * For example, consider a packet that holds onto resources belonging to the
    2.15 + * guest for which it is queued (e.g., packet received on vif1.0, destined for
    2.16 + * vif1.1 which is not activated in the guest): in this situation the guest
    2.17 + * will never be destroyed, unless vif1.1 is taken down (which flushes the
    2.18 + * 'tx_queue').
    2.19 + * 
    2.20 + * Only set this parameter to non-zero value if you know what you are doing!
    2.21 + */
    2.22 +static unsigned long netbk_queue_length = 0;
    2.23 +module_param_named(queue_length, netbk_queue_length, ulong, 0);
    2.24 +
    2.25  static void __netif_up(netif_t *netif)
    2.26  {
    2.27  	enable_irq(netif->irq);
    2.28 @@ -144,11 +162,10 @@ netif_t *netif_alloc(domid_t domid, unsi
    2.29  
    2.30  	SET_ETHTOOL_OPS(dev, &network_ethtool_ops);
    2.31  
    2.32 -	/*
    2.33 -	 * Reduce default TX queuelen so that each guest interface only
    2.34 -	 * allows it to eat around 6.4MB of host memory.
    2.35 -	 */
    2.36 -	dev->tx_queue_len = 100;
    2.37 +	dev->tx_queue_len = netbk_queue_length;
    2.38 +	if (dev->tx_queue_len != 0)
    2.39 +		printk(KERN_WARNING "netbk: WARNING: device '%s' has non-zero "
    2.40 +		       "queue length (%lu)!\n", dev->name, dev->tx_queue_len);
    2.41  
    2.42  	for (i = 0; i < ETH_ALEN; i++)
    2.43  		if (be_mac[i] != 0)
     3.1 --- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c	Wed Oct 04 22:14:24 2006 -0600
     3.2 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c	Thu Oct 05 12:25:53 2006 -0600
     3.3 @@ -366,6 +366,10 @@ static void connect(struct backend_info 
     3.4  	be->netif->remaining_credit = be->netif->credit_bytes;
     3.5  
     3.6  	xenbus_switch_state(dev, XenbusStateConnected);
     3.7 +
     3.8 +	/* May not get a kick from the frontend, so start the tx_queue now. */
     3.9 +	if (!netbk_can_queue(be->netif->dev))
    3.10 +		netif_start_queue(be->netif->dev);
    3.11  }
    3.12  
    3.13  
    3.14 @@ -403,14 +407,16 @@ static int connect_rings(struct backend_
    3.15  	}
    3.16  	be->netif->copying_receiver = !!rx_copy;
    3.17  
    3.18 -	if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-rx-notify", "%d",
    3.19 -			 &val) < 0)
    3.20 -		val = 0;
    3.21 -	if (val)
    3.22 -		be->netif->can_queue = 1;
    3.23 -	else
    3.24 -		/* Must be non-zero for pfifo_fast to work. */
    3.25 -		be->netif->dev->tx_queue_len = 1;
    3.26 +	if (be->netif->dev->tx_queue_len != 0) {
    3.27 +		if (xenbus_scanf(XBT_NIL, dev->otherend,
    3.28 +				 "feature-rx-notify", "%d", &val) < 0)
    3.29 +			val = 0;
    3.30 +		if (val)
    3.31 +			be->netif->can_queue = 1;
    3.32 +		else
    3.33 +			/* Must be non-zero for pfifo_fast to work. */
    3.34 +			be->netif->dev->tx_queue_len = 1;
    3.35 +	}
    3.36  
    3.37  	if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-sg", "%d", &val) < 0)
    3.38  		val = 0;
     4.1 --- a/tools/firmware/hvmloader/smbios.c	Wed Oct 04 22:14:24 2006 -0600
     4.2 +++ b/tools/firmware/hvmloader/smbios.c	Thu Oct 05 12:25:53 2006 -0600
     4.3 @@ -434,7 +434,7 @@ smbios_type_4_init(void *start, unsigned
     4.4  	start += strlen(buf) + 1;
     4.5  
     4.6  	strcpy((char *)start, cpu_manufacturer);
     4.7 -	start += strlen(buf) + 1;
     4.8 +	start += strlen(cpu_manufacturer) + 1;
     4.9  
    4.10  	*((uint8_t *)start) = 0;
    4.11  	return start+1;
     5.1 --- a/tools/ioemu/vl.c	Wed Oct 04 22:14:24 2006 -0600
     5.2 +++ b/tools/ioemu/vl.c	Thu Oct 05 12:25:53 2006 -0600
     5.3 @@ -6310,7 +6310,7 @@ int main(int argc, char **argv)
     5.4              case QEMU_OPTION_vncunused:
     5.5                  vncunused++;
     5.6                  if (vnc_display == -1)
     5.7 -                    vnc_display = -2;
     5.8 +                    vnc_display = 0;
     5.9                  break;
    5.10              }
    5.11          }
     6.1 --- a/tools/libxc/xc_ptrace.c	Wed Oct 04 22:14:24 2006 -0600
     6.2 +++ b/tools/libxc/xc_ptrace.c	Thu Oct 05 12:25:53 2006 -0600
     6.3 @@ -251,7 +251,7 @@ map_domain_va_pae(
     6.4      if ( !(l2e & _PAGE_PRESENT) )
     6.5          return NULL;
     6.6      l1p = to_ma(cpu, l2e);
     6.7 -    l1 = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, perm, l1p >> PAGE_SHIFT);
     6.8 +    l1 = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, PROT_READ, l1p >> PAGE_SHIFT);
     6.9      if ( l1 == NULL )
    6.10          return NULL;
    6.11  
    6.12 @@ -281,7 +281,6 @@ map_domain_va_64(
    6.13      uint64_t *l4, *l3, *l2, *l1;
    6.14      static void *v[MAX_VIRT_CPUS];
    6.15  
    6.16 -
    6.17      if ((ctxt[cpu].ctrlreg[4] & 0x20) == 0 ) /* legacy ia32 mode */
    6.18          return map_domain_va_32(xc_handle, cpu, guest_va, perm);
    6.19  
    6.20 @@ -309,7 +308,6 @@ map_domain_va_64(
    6.21      if ( l2 == NULL )
    6.22          return NULL;
    6.23  
    6.24 -    l1 = NULL;
    6.25      l2e = l2[l2_table_offset(va)];
    6.26      munmap(l2, PAGE_SIZE);
    6.27      if ( !(l2e & _PAGE_PRESENT) )
    6.28 @@ -318,11 +316,12 @@ map_domain_va_64(
    6.29      if (l2e & 0x80)  { /* 2M pages */
    6.30          p = to_ma(cpu, (l1p + l1_table_offset(va)) << PAGE_SHIFT);
    6.31      } else { /* 4K pages */
    6.32 -        l1 = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, perm, l1p >> PAGE_SHIFT);
    6.33 +        l1 = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, PROT_READ, l1p >> PAGE_SHIFT);
    6.34          if ( l1 == NULL )
    6.35              return NULL;
    6.36  
    6.37          l1e = l1[l1_table_offset(va)];
    6.38 +        munmap(l1, PAGE_SIZE);
    6.39          if ( !(l1e & _PAGE_PRESENT) )
    6.40              return NULL;
    6.41          p = to_ma(cpu, l1e);
    6.42 @@ -330,8 +329,6 @@ map_domain_va_64(
    6.43      if ( v[cpu] != NULL )
    6.44          munmap(v[cpu], PAGE_SIZE);
    6.45      v[cpu] = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, perm, p >> PAGE_SHIFT);
    6.46 -    if (l1)
    6.47 -        munmap(l1, PAGE_SIZE);
    6.48      if ( v[cpu] == NULL )
    6.49          return NULL;
    6.50  
     7.1 --- a/tools/python/xen/xend/image.py	Wed Oct 04 22:14:24 2006 -0600
     7.2 +++ b/tools/python/xen/xend/image.py	Thu Oct 05 12:25:53 2006 -0600
     7.3 @@ -355,10 +355,12 @@ class HVMImageHandler(ImageHandler):
     7.4          if vnc:
     7.5              vncdisplay = sxp.child_value(config, 'vncdisplay',
     7.6                                           int(self.vm.getDomid()))
     7.7 -            ret = ret + ['-vnc', '%d' % vncdisplay, '-k', 'en-us']
     7.8              vncunused = sxp.child_value(config, 'vncunused')
     7.9              if vncunused:
    7.10                  ret += ['-vncunused']
    7.11 +            else:
    7.12 +                ret += ['-vnc', '%d' % vncdisplay]
    7.13 +            ret += ['-k', 'en-us']
    7.14          return ret
    7.15  
    7.16      def createDeviceModel(self):
     8.1 --- a/xen/common/shutdown.c	Wed Oct 04 22:14:24 2006 -0600
     8.2 +++ b/xen/common/shutdown.c	Thu Oct 05 12:25:53 2006 -0600
     8.3 @@ -30,8 +30,6 @@ static void maybe_reboot(void)
     8.4  
     8.5  void dom0_shutdown(u8 reason)
     8.6  {
     8.7 -    debugger_trap_immediate();
     8.8 -
     8.9      switch ( reason )
    8.10      {
    8.11      case SHUTDOWN_poweroff:
    8.12 @@ -43,6 +41,7 @@ void dom0_shutdown(u8 reason)
    8.13  
    8.14      case SHUTDOWN_crash:
    8.15      {
    8.16 +        debugger_trap_immediate();
    8.17          printk("Domain 0 crashed: ");
    8.18          maybe_reboot();
    8.19          break; /* not reached */
     9.1 --- a/xen/include/asm-x86/debugger.h	Wed Oct 04 22:14:24 2006 -0600
     9.2 +++ b/xen/include/asm-x86/debugger.h	Thu Oct 05 12:25:53 2006 -0600
     9.3 @@ -46,7 +46,8 @@
     9.4  static inline int debugger_trap_fatal(
     9.5      unsigned int vector, struct cpu_user_regs *regs)
     9.6  {
     9.7 -    return (__trap_to_gdb(regs, vector) == 0);
     9.8 +    int rc = __trap_to_gdb(regs, vector);
     9.9 +    return ((rc == 0) || (vector == TRAP_int3));
    9.10  }
    9.11  
    9.12  /* Int3 is a trivial way to gather cpu_user_regs context. */
    10.1 --- a/xen/include/public/io/ring.h	Wed Oct 04 22:14:24 2006 -0600
    10.2 +++ b/xen/include/public/io/ring.h	Thu Oct 05 12:25:53 2006 -0600
    10.3 @@ -25,7 +25,7 @@ typedef unsigned int RING_IDX;
    10.4   * power of two (so we can mask with (size-1) to loop around).
    10.5   */
    10.6  #define __RING_SIZE(_s, _sz) \
    10.7 -    (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
    10.8 +    (__RD32(((_sz) - (long)(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0])))
    10.9  
   10.10  /*
   10.11   * Macros to make the correct C datatypes for a new kind of ring.