[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [xen-unstable] merge with xen-unstable.hg
# HG changeset patch # User awilliam@xxxxxxxxxxx # Node ID 1a0b58e7b5de8c666b19d3063658d9a3c25e9bea # Parent 77f554ef74840b380687f225fa3ae308d116bf4f # Parent 0dc4ae151be2399fd31c0cea2d4fbb49e1bf6692 merge with xen-unstable.hg --- linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c | 1 linux-2.6-xen-sparse/drivers/xen/netback/interface.c | 27 ++++++++++++++---- linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c | 22 +++++++++----- tools/firmware/hvmloader/smbios.c | 2 - tools/ioemu/vl.c | 2 - tools/libxc/xc_ptrace.c | 9 ++---- tools/python/xen/xend/image.py | 4 ++ xen/common/shutdown.c | 3 -- xen/include/asm-x86/debugger.h | 3 +- xen/include/public/io/ring.h | 2 - 10 files changed, 48 insertions(+), 27 deletions(-) diff -r 77f554ef7484 -r 1a0b58e7b5de linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c Wed Oct 04 22:14:24 2006 -0600 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/process-xen.c Thu Oct 05 12:25:53 2006 -0600 @@ -350,7 +350,6 @@ static inline void set_32bit_tls(struct struct user_desc ud = { .base_addr = addr, .limit = 0xfffff, - .contents = (3 << 3), /* user */ .seg_32bit = 1, .limit_in_pages = 1, .useable = 1, diff -r 77f554ef7484 -r 1a0b58e7b5de linux-2.6-xen-sparse/drivers/xen/netback/interface.c --- a/linux-2.6-xen-sparse/drivers/xen/netback/interface.c Wed Oct 04 22:14:24 2006 -0600 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/interface.c Thu Oct 05 12:25:53 2006 -0600 @@ -34,6 +34,24 @@ #include <linux/ethtool.h> #include <linux/rtnetlink.h> +/* + * Module parameter 'queue_length': + * + * Enables queuing in the network stack when a client has run out of receive + * descriptors. Although this feature can improve receive bandwidth by avoiding + * packet loss, it can also result in packets sitting in the 'tx_queue' for + * unbounded time. This is bad if those packets hold onto foreign resources. + * For example, consider a packet that holds onto resources belonging to the + * guest for which it is queued (e.g., packet received on vif1.0, destined for + * vif1.1 which is not activated in the guest): in this situation the guest + * will never be destroyed, unless vif1.1 is taken down (which flushes the + * 'tx_queue'). + * + * Only set this parameter to non-zero value if you know what you are doing! + */ +static unsigned long netbk_queue_length = 0; +module_param_named(queue_length, netbk_queue_length, ulong, 0); + static void __netif_up(netif_t *netif) { enable_irq(netif->irq); @@ -144,11 +162,10 @@ netif_t *netif_alloc(domid_t domid, unsi SET_ETHTOOL_OPS(dev, &network_ethtool_ops); - /* - * Reduce default TX queuelen so that each guest interface only - * allows it to eat around 6.4MB of host memory. - */ - dev->tx_queue_len = 100; + dev->tx_queue_len = netbk_queue_length; + if (dev->tx_queue_len != 0) + printk(KERN_WARNING "netbk: WARNING: device '%s' has non-zero " + "queue length (%lu)!\n", dev->name, dev->tx_queue_len); for (i = 0; i < ETH_ALEN; i++) if (be_mac[i] != 0) diff -r 77f554ef7484 -r 1a0b58e7b5de linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c --- a/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Wed Oct 04 22:14:24 2006 -0600 +++ b/linux-2.6-xen-sparse/drivers/xen/netback/xenbus.c Thu Oct 05 12:25:53 2006 -0600 @@ -366,6 +366,10 @@ static void connect(struct backend_info be->netif->remaining_credit = be->netif->credit_bytes; xenbus_switch_state(dev, XenbusStateConnected); + + /* May not get a kick from the frontend, so start the tx_queue now. */ + if (!netbk_can_queue(be->netif->dev)) + netif_start_queue(be->netif->dev); } @@ -403,14 +407,16 @@ static int connect_rings(struct backend_ } be->netif->copying_receiver = !!rx_copy; - if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-rx-notify", "%d", - &val) < 0) - val = 0; - if (val) - be->netif->can_queue = 1; - else - /* Must be non-zero for pfifo_fast to work. */ - be->netif->dev->tx_queue_len = 1; + if (be->netif->dev->tx_queue_len != 0) { + if (xenbus_scanf(XBT_NIL, dev->otherend, + "feature-rx-notify", "%d", &val) < 0) + val = 0; + if (val) + be->netif->can_queue = 1; + else + /* Must be non-zero for pfifo_fast to work. */ + be->netif->dev->tx_queue_len = 1; + } if (xenbus_scanf(XBT_NIL, dev->otherend, "feature-sg", "%d", &val) < 0) val = 0; diff -r 77f554ef7484 -r 1a0b58e7b5de tools/firmware/hvmloader/smbios.c --- a/tools/firmware/hvmloader/smbios.c Wed Oct 04 22:14:24 2006 -0600 +++ b/tools/firmware/hvmloader/smbios.c Thu Oct 05 12:25:53 2006 -0600 @@ -434,7 +434,7 @@ smbios_type_4_init(void *start, unsigned start += strlen(buf) + 1; strcpy((char *)start, cpu_manufacturer); - start += strlen(buf) + 1; + start += strlen(cpu_manufacturer) + 1; *((uint8_t *)start) = 0; return start+1; diff -r 77f554ef7484 -r 1a0b58e7b5de tools/ioemu/vl.c --- a/tools/ioemu/vl.c Wed Oct 04 22:14:24 2006 -0600 +++ b/tools/ioemu/vl.c Thu Oct 05 12:25:53 2006 -0600 @@ -6310,7 +6310,7 @@ int main(int argc, char **argv) case QEMU_OPTION_vncunused: vncunused++; if (vnc_display == -1) - vnc_display = -2; + vnc_display = 0; break; } } diff -r 77f554ef7484 -r 1a0b58e7b5de tools/libxc/xc_ptrace.c --- a/tools/libxc/xc_ptrace.c Wed Oct 04 22:14:24 2006 -0600 +++ b/tools/libxc/xc_ptrace.c Thu Oct 05 12:25:53 2006 -0600 @@ -251,7 +251,7 @@ map_domain_va_pae( if ( !(l2e & _PAGE_PRESENT) ) return NULL; l1p = to_ma(cpu, l2e); - l1 = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, perm, l1p >> PAGE_SHIFT); + l1 = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, PROT_READ, l1p >> PAGE_SHIFT); if ( l1 == NULL ) return NULL; @@ -281,7 +281,6 @@ map_domain_va_64( uint64_t *l4, *l3, *l2, *l1; static void *v[MAX_VIRT_CPUS]; - if ((ctxt[cpu].ctrlreg[4] & 0x20) == 0 ) /* legacy ia32 mode */ return map_domain_va_32(xc_handle, cpu, guest_va, perm); @@ -309,7 +308,6 @@ map_domain_va_64( if ( l2 == NULL ) return NULL; - l1 = NULL; l2e = l2[l2_table_offset(va)]; munmap(l2, PAGE_SIZE); if ( !(l2e & _PAGE_PRESENT) ) @@ -318,11 +316,12 @@ map_domain_va_64( if (l2e & 0x80) { /* 2M pages */ p = to_ma(cpu, (l1p + l1_table_offset(va)) << PAGE_SHIFT); } else { /* 4K pages */ - l1 = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, perm, l1p >> PAGE_SHIFT); + l1 = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, PROT_READ, l1p >> PAGE_SHIFT); if ( l1 == NULL ) return NULL; l1e = l1[l1_table_offset(va)]; + munmap(l1, PAGE_SIZE); if ( !(l1e & _PAGE_PRESENT) ) return NULL; p = to_ma(cpu, l1e); @@ -330,8 +329,6 @@ map_domain_va_64( if ( v[cpu] != NULL ) munmap(v[cpu], PAGE_SIZE); v[cpu] = xc_map_foreign_range(xc_handle, current_domid, PAGE_SIZE, perm, p >> PAGE_SHIFT); - if (l1) - munmap(l1, PAGE_SIZE); if ( v[cpu] == NULL ) return NULL; diff -r 77f554ef7484 -r 1a0b58e7b5de tools/python/xen/xend/image.py --- a/tools/python/xen/xend/image.py Wed Oct 04 22:14:24 2006 -0600 +++ b/tools/python/xen/xend/image.py Thu Oct 05 12:25:53 2006 -0600 @@ -355,10 +355,12 @@ class HVMImageHandler(ImageHandler): if vnc: vncdisplay = sxp.child_value(config, 'vncdisplay', int(self.vm.getDomid())) - ret = ret + ['-vnc', '%d' % vncdisplay, '-k', 'en-us'] vncunused = sxp.child_value(config, 'vncunused') if vncunused: ret += ['-vncunused'] + else: + ret += ['-vnc', '%d' % vncdisplay] + ret += ['-k', 'en-us'] return ret def createDeviceModel(self): diff -r 77f554ef7484 -r 1a0b58e7b5de xen/common/shutdown.c --- a/xen/common/shutdown.c Wed Oct 04 22:14:24 2006 -0600 +++ b/xen/common/shutdown.c Thu Oct 05 12:25:53 2006 -0600 @@ -30,8 +30,6 @@ static void maybe_reboot(void) void dom0_shutdown(u8 reason) { - debugger_trap_immediate(); - switch ( reason ) { case SHUTDOWN_poweroff: @@ -43,6 +41,7 @@ void dom0_shutdown(u8 reason) case SHUTDOWN_crash: { + debugger_trap_immediate(); printk("Domain 0 crashed: "); maybe_reboot(); break; /* not reached */ diff -r 77f554ef7484 -r 1a0b58e7b5de xen/include/asm-x86/debugger.h --- a/xen/include/asm-x86/debugger.h Wed Oct 04 22:14:24 2006 -0600 +++ b/xen/include/asm-x86/debugger.h Thu Oct 05 12:25:53 2006 -0600 @@ -46,7 +46,8 @@ static inline int debugger_trap_fatal( static inline int debugger_trap_fatal( unsigned int vector, struct cpu_user_regs *regs) { - return (__trap_to_gdb(regs, vector) == 0); + int rc = __trap_to_gdb(regs, vector); + return ((rc == 0) || (vector == TRAP_int3)); } /* Int3 is a trivial way to gather cpu_user_regs context. */ diff -r 77f554ef7484 -r 1a0b58e7b5de xen/include/public/io/ring.h --- a/xen/include/public/io/ring.h Wed Oct 04 22:14:24 2006 -0600 +++ b/xen/include/public/io/ring.h Thu Oct 05 12:25:53 2006 -0600 @@ -25,7 +25,7 @@ typedef unsigned int RING_IDX; * power of two (so we can mask with (size-1) to loop around). */ #define __RING_SIZE(_s, _sz) \ - (__RD32(((_sz) - (long)&(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0]))) + (__RD32(((_sz) - (long)(_s)->ring + (long)(_s)) / sizeof((_s)->ring[0]))) /* * Macros to make the correct C datatypes for a new kind of ring. _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |