[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] Merge.
# HG changeset patch # User sos22@xxxxxxxxxxxxxxxxxxxx # Node ID 707fcf42a5ae8698c9ed1584f3be61bb3138dd14 # Parent f3f8452978219763b9e5dde244d932cf6a49d9c0 # Parent 1a7383f849896e60f8be631c96fa2b461f502615 Merge. diff -r f3f845297821 -r 707fcf42a5ae xen/common/event_channel.c --- a/xen/common/event_channel.c Thu Jul 7 09:27:25 2005 +++ b/xen/common/event_channel.c Fri Jul 8 12:22:18 2005 @@ -583,6 +583,29 @@ return rc; } +static long evtchn_rebind(evtchn_rebind_t *bind) +{ + struct domain *d = current->domain; + int port = bind->port; + int vcpu = bind->vcpu; + struct evtchn *chn; + long rc = 0; + + spin_lock(&d->evtchn_lock); + + if ( !port_is_valid(d, port) ) + { + rc = -EINVAL; + goto out; + } + + chn = evtchn_from_port(d, port); + chn->notify_vcpu_id = vcpu; + + out: + spin_unlock(&d->evtchn_lock); + return rc; +} long do_event_channel_op(evtchn_op_t *uop) { @@ -637,6 +660,12 @@ case EVTCHNOP_status: rc = evtchn_status(&op.u.status); + if ( (rc == 0) && (copy_to_user(uop, &op, sizeof(op)) != 0) ) + rc = -EFAULT; + break; + + case EVTCHNOP_rebind: + rc = evtchn_rebind(&op.u.rebind); if ( (rc == 0) && (copy_to_user(uop, &op, sizeof(op)) != 0) ) rc = -EFAULT; break; diff -r f3f845297821 -r 707fcf42a5ae linux-2.6.11-xen-sparse/arch/xen/i386/kernel/irq.c --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/irq.c Thu Jul 7 09:27:25 2005 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/irq.c Fri Jul 8 12:22:18 2005 @@ -274,7 +274,7 @@ } if (irq_desc[irq].handler->set_affinity) irq_desc[irq].handler->set_affinity(irq, mask); - else if (irq_desc[irq].action && !(warned++)) + else if (irq_desc[irq].action) printk("Cannot set affinity for irq %i\n", irq); } diff -r f3f845297821 -r 707fcf42a5ae linux-2.6.11-xen-sparse/arch/xen/kernel/evtchn.c --- a/linux-2.6.11-xen-sparse/arch/xen/kernel/evtchn.c Thu Jul 7 09:27:25 2005 +++ b/linux-2.6.11-xen-sparse/arch/xen/kernel/evtchn.c Fri Jul 8 12:22:18 2005 @@ -271,6 +271,38 @@ return irq; } +void rebind_evtchn_from_ipi(int cpu, int newcpu, int ipi) +{ + evtchn_op_t op; + int evtchn = per_cpu(ipi_to_evtchn, cpu)[ipi]; + + spin_lock(&irq_mapping_update_lock); + + op.cmd = EVTCHNOP_rebind; + op.u.rebind.port = evtchn; + op.u.rebind.vcpu = newcpu; + if ( HYPERVISOR_event_channel_op(&op) != 0 ) + printk(KERN_INFO "Failed to rebind IPI%d to CPU%d\n",ipi,newcpu); + + spin_unlock(&irq_mapping_update_lock); +} + +void rebind_evtchn_from_irq(int cpu, int newcpu, int irq) +{ + evtchn_op_t op; + int evtchn = irq_to_evtchn[irq]; + + spin_lock(&irq_mapping_update_lock); + + op.cmd = EVTCHNOP_rebind; + op.u.rebind.port = evtchn; + op.u.rebind.vcpu = newcpu; + if ( HYPERVISOR_event_channel_op(&op) != 0 ) + printk(KERN_INFO "Failed to rebind IRQ%d to CPU%d\n",irq,newcpu); + + spin_unlock(&irq_mapping_update_lock); +} + void unbind_ipi_on_cpu_from_irq(int cpu, int ipi) { evtchn_op_t op; diff -r f3f845297821 -r 707fcf42a5ae xen/common/schedule.c --- a/xen/common/schedule.c Thu Jul 7 09:27:25 2005 +++ b/xen/common/schedule.c Fri Jul 8 12:22:18 2005 @@ -38,8 +38,8 @@ #include <xen/mm.h> #include <public/sched_ctl.h> -/* opt_sched: scheduler - default to Borrowed Virtual Time */ -static char opt_sched[10] = "bvt"; +/* opt_sched: scheduler - default to SEDF */ +static char opt_sched[10] = "sedf"; string_param("sched", opt_sched); #if defined(WAKE_HISTO) diff -r f3f845297821 -r 707fcf42a5ae tools/misc/cpuperf/Makefile --- a/tools/misc/cpuperf/Makefile Thu Jul 7 09:27:25 2005 +++ b/tools/misc/cpuperf/Makefile Fri Jul 8 12:22:18 2005 @@ -17,8 +17,7 @@ XEN_ROOT=../../.. include $(XEN_ROOT)/tools/Rules.mk -CC = gcc -CFLAGS = -Wall -O3 +CFLAGS += -Wall -O3 HDRS = $(wildcard *.h) SRCS = $(wildcard *.c) diff -r f3f845297821 -r 707fcf42a5ae tools/firmware/vmxassist/Makefile --- a/tools/firmware/vmxassist/Makefile Thu Jul 7 09:27:25 2005 +++ b/tools/firmware/vmxassist/Makefile Fri Jul 8 12:22:18 2005 @@ -29,16 +29,13 @@ #DEFINES=-DDEBUG -DTEST -DTEXTADDR=${TEXTADDR} #XENINC=-I/home/leendert/xen/xeno-unstable.bk/xen/include -LD=ld -CC=gcc -CPP=cpp -P -OBJCOPY=objcopy -p -O binary -R .note -R .comment -R .bss -S --gap-fill=0 -CFLAGS=${DEFINES} -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float - -ifeq ($(XEN_COMPILE_ARCH),x86_64) +LD = ld +CC = gcc +CPP = cpp -P +OBJCOPY = objcopy -p -O binary -R .note -R .comment -R .bss -S --gap-fill=0 +CFLAGS = ${DEFINES} -I. $(XENINC) -Wall -fno-builtin -O2 -msoft-float CFLAGS += -m32 -march=i686 -LDFLAGS += -m elf_i386 -endif +LDFLAGS = -m elf_i386 OBJECTS = head.o trap.o vm86.o setup.o util.o diff -r f3f845297821 -r 707fcf42a5ae tools/xenstore/Makefile --- a/tools/xenstore/Makefile Thu Jul 7 09:27:25 2005 +++ b/tools/xenstore/Makefile Fri Jul 8 12:22:18 2005 @@ -19,11 +19,11 @@ BASECFLAGS+= -I$(XEN_ROOT)/xen/include/public BASECFLAGS+= -I. -CFLAGS += $(BASECFLAGS) -LDFLAGS=$(PROFILE) -L$(XEN_LIBXC) -TESTDIR=`pwd`/testsuite/tmp -TESTFLAGS=-DTESTING -TESTENV=XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR) +CFLAGS += $(BASECFLAGS) +LDFLAGS += $(PROFILE) -L$(XEN_LIBXC) +TESTDIR = `pwd`/testsuite/tmp +TESTFLAGS= -DTESTING +TESTENV = XENSTORED_ROOTDIR=$(TESTDIR) XENSTORED_RUNDIR=$(TESTDIR) all: xen xenstored libxenstore.a libxenstore-pic.a diff -r f3f845297821 -r 707fcf42a5ae tools/Rules.mk --- a/tools/Rules.mk Thu Jul 7 09:27:25 2005 +++ b/tools/Rules.mk Fri Jul 8 12:22:18 2005 @@ -7,12 +7,12 @@ ifeq ($(XEN_TARGET_ARCH),x86_32) CFLAGS += -m32 -march=i686 -LDFLAGS += -m elf_i386 +LDFLAGS += -m32 endif ifeq ($(XEN_TARGET_ARCH),x86_64) CFLAGS += -m64 -LDFLAGS += -m elf_x86_64 +LDFLAGS += -m64 endif X11_LDPATH = -L/usr/X11R6/$(LIBDIR) diff -r f3f845297821 -r 707fcf42a5ae tools/python/xen/xend/XendDomainInfo.py --- a/tools/python/xen/xend/XendDomainInfo.py Thu Jul 7 09:27:25 2005 +++ b/tools/python/xen/xend/XendDomainInfo.py Fri Jul 8 12:22:18 2005 @@ -423,8 +423,10 @@ sxpr.append(['cpu_time', self.info['cpu_time']/1e9]) sxpr.append(['vcpus', self.info['vcpus']]) sxpr.append(['cpumap', self.info['cpumap']]) - sxpr.append(['vcpu_to_cpu', ''.join(map(lambda x: str(x), - self.info['vcpu_to_cpu'][0:self.info['vcpus']]))]) + # build a string, using '|' to seperate items, show only up + # to number of vcpus in domain, and trim the trailing '|' + sxpr.append(['vcpu_to_cpu', ''.join(map(lambda x: str(x)+'|', + self.info['vcpu_to_cpu'][0:self.info['vcpus']]))[:-1]]) if self.start_time: up_time = time.time() - self.start_time diff -r f3f845297821 -r 707fcf42a5ae xen/include/public/event_channel.h --- a/xen/include/public/event_channel.h Thu Jul 7 09:27:25 2005 +++ b/xen/include/public/event_channel.h Fri Jul 8 12:22:18 2005 @@ -158,6 +158,13 @@ } u; } evtchn_status_t; +#define EVTCHNOP_rebind 8 +typedef struct { + /* IN parameters. */ + u32 port; /* 0 */ + u32 vcpu; /* 4 */ +} evtchn_rebind_t; /* 8 bytes */ + typedef struct evtchn_op { u32 cmd; /* EVTCHNOP_* */ union { @@ -169,6 +176,7 @@ evtchn_close_t close; evtchn_send_t send; evtchn_status_t status; + evtchn_rebind_t rebind; } u; } evtchn_op_t; diff -r f3f845297821 -r 707fcf42a5ae docs/misc/hg-cheatsheet.txt --- a/docs/misc/hg-cheatsheet.txt Thu Jul 7 09:27:25 2005 +++ b/docs/misc/hg-cheatsheet.txt Fri Jul 8 12:22:18 2005 @@ -95,6 +95,8 @@ repository from: http://www.cl.cam.ac.uk/Research/SRG/netos/xen/downloads/xen-unstable.hg.tar.gz + + (or copy from /usr/groups/netos/html/xen/downloads/xen-unstable.hg.tar.gz) Untar the repository on your disk, cd into it, and then pull the most recent changes: @@ -430,4 +432,7 @@ you have two parents. Otherwise, the single parent is the changeset which you most recently checked out. - +Show the revision history for a single file + + hg [-v] log <filename> + diff -r f3f845297821 -r 707fcf42a5ae linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c --- a/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c Thu Jul 7 09:27:25 2005 +++ b/linux-2.6.11-xen-sparse/arch/xen/i386/kernel/smpboot.c Fri Jul 8 12:22:18 2005 @@ -103,6 +103,11 @@ DEFINE_PER_CPU(int, cpu_state) = { 0 }; #endif +static DEFINE_PER_CPU(int, resched_irq); +static DEFINE_PER_CPU(int, callfunc_irq); +static char resched_name[NR_CPUS][15]; +static char callfunc_name[NR_CPUS][15]; + #if 0 /* * Currently trivial. Write the real->protected mode @@ -1328,6 +1333,10 @@ while (!cpu_online(cpu)) cpu_relax(); + /* re-route bound IRQs 0 to cpu */ + rebind_evtchn_from_irq(0, cpu, per_cpu(resched_irq, cpu)); + rebind_evtchn_from_irq(0, cpu, per_cpu(callfunc_irq, cpu)); + fixup_irqs(cpu_online_map); /* counter the disable in fixup_irqs() */ local_irq_enable(); @@ -1357,6 +1366,11 @@ cpu_clear(cpu, map); fixup_irqs(map); + + /* re-route IRQs from dead vcpu to another */ + rebind_evtchn_from_irq(cpu, 0, per_cpu(resched_irq, cpu)); + rebind_evtchn_from_irq(cpu, 0, per_cpu(callfunc_irq, cpu)); + /* It's now safe to remove this processor from the online map */ cpu_clear(cpu, cpu_online_map); @@ -1514,11 +1528,6 @@ extern irqreturn_t smp_reschedule_interrupt(int, void *, struct pt_regs *); extern irqreturn_t smp_call_function_interrupt(int, void *, struct pt_regs *); -static DEFINE_PER_CPU(int, resched_irq); -static DEFINE_PER_CPU(int, callfunc_irq); -static char resched_name[NR_CPUS][15]; -static char callfunc_name[NR_CPUS][15]; - void __init smp_intr_init(void) { int cpu = smp_processor_id(); diff -r f3f845297821 -r 707fcf42a5ae linux-2.6.11-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 --- a/linux-2.6.11-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 Thu Jul 7 09:27:25 2005 +++ b/linux-2.6.11-xen-sparse/arch/xen/configs/xenU_defconfig_x86_32 Fri Jul 8 12:22:18 2005 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.11.12-xenU -# Wed Jul 6 17:44:54 2005 +# Wed Jul 6 22:40:19 2005 # CONFIG_XEN=y CONFIG_ARCH_XEN=y @@ -28,7 +28,6 @@ # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y -CONFIG_BROKEN_ON_SMP=y CONFIG_LOCK_KERNEL=y # @@ -69,6 +68,7 @@ # CONFIG_MODVERSIONS is not set # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y +CONFIG_STOP_MACHINE=y # # X86 Processor Configuration @@ -114,7 +114,10 @@ CONFIG_X86_USE_PPRO_CHECKSUM=y # CONFIG_HPET_TIMER is not set # CONFIG_HPET_EMULATE_RTC is not set -# CONFIG_SMP is not set +CONFIG_SMP=y +CONFIG_SMP_ALTERNATIVES=y +CONFIG_NR_CPUS=8 +# CONFIG_SCHED_SMT is not set CONFIG_PREEMPT=y CONFIG_PREEMPT_BKL=y CONFIG_X86_CPUID=y @@ -128,6 +131,7 @@ CONFIG_HIGHMEM=y CONFIG_HAVE_DEC_LOCK=y # CONFIG_REGPARM is not set +CONFIG_HOTPLUG_CPU=y # # Kernel hacking @@ -153,7 +157,9 @@ # CONFIG_4KSTACKS is not set CONFIG_GENERIC_HARDIRQS=y CONFIG_GENERIC_IRQ_PROBE=y +CONFIG_X86_SMP=y CONFIG_X86_BIOS_REBOOT=y +CONFIG_X86_TRAMPOLINE=y CONFIG_PC=y # diff -r f3f845297821 -r 707fcf42a5ae tools/python/xen/xm/main.py --- a/tools/python/xen/xm/main.py Thu Jul 7 09:27:25 2005 +++ b/tools/python/xen/xm/main.py Fri Jul 8 12:22:18 2005 @@ -410,8 +410,7 @@ print 'Name Id VCPU CPU CPUMAP' for dom in doms: info = server.xend_domain(dom) - # XXX this is quite broken for cpu's > 9 - vcpu_to_cpu = sxp.child_value(info, 'vcpu_to_cpu', '?').replace('-1','#') + vcpu_to_cpu = sxp.child_value(info, 'vcpu_to_cpu', '-1').split('|') cpumap = sxp.child_value(info, 'cpumap', []) mask = ((int(sxp.child_value(info, 'vcpus', '0')))**2) - 1 count = 0 @@ -420,10 +419,7 @@ d['name'] = sxp.child_value(info, 'name', '??') d['dom'] = int(sxp.child_value(info, 'id', '-1')) d['vcpu'] = int(count) - if cpu == "#": - d['cpu'] = int("-1") - else: - d['cpu'] = int(cpu) + d['cpu'] = int(cpu) d['cpumap'] = int(cpumap[count])&mask count = count + 1 print ("%(name)-16s %(dom)3d %(vcpu)4d %(cpu)3d 0x%(cpumap)x" % d) @@ -593,15 +589,7 @@ state = int(args[3]) dom = server.xend_domain(name) id = sxp.child_value(dom, 'id') - vcpu_to_cpu = sxp.child_value(dom, 'vcpu_to_cpu', '-1') - # only send state change if states differ - try: - # (down going up) or (up going down) - if (vcpu_to_cpu[vcpu] == "-1" and state == 1) or \ - (vcpu_to_cpu[vcpu] != "-1" and state == 0): - server.xend_domain_vcpu_hotplug(id, vcpu, state) - except IndexError: - print "Invalid VCPU(%d)"%(vcpu) + server.xend_domain_vcpu_hotplug(id, vcpu, state) xm.prog(ProgVcpuhotplug) _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |