ia64/xen-unstable
changeset 3782:0cd8803a1553
bitkeeper revision 1.1174 (420ba3bb5kHKomeIcBm8uzF2u-A5dg)
Merge douglas.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk
into douglas.cl.cam.ac.uk:/local/scratch/sos22/xendbng/foo.bk
Merge douglas.cl.cam.ac.uk:/auto/groups/xeno-xenod/BK/xeno.bk
into douglas.cl.cam.ac.uk:/local/scratch/sos22/xendbng/foo.bk
author | sos22@douglas.cl.cam.ac.uk |
---|---|
date | Thu Feb 10 18:11:07 2005 +0000 (2005-02-10) |
parents | dd0558f4a5e9 1d13ed9582e0 |
children | 0069a2f1f55d |
files | xen/Makefile xen/Rules.mk xen/arch/x86/Makefile xen/arch/x86/traps.c xen/arch/x86/x86_32/traps.c xen/arch/x86/x86_64/asm-offsets.c xen/arch/x86/x86_64/entry.S xen/arch/x86/x86_64/traps.c xen/include/asm-x86/domain.h |
line diff
1.1 --- a/xen/Makefile Thu Feb 10 18:05:33 2005 +0000 1.2 +++ b/xen/Makefile Thu Feb 10 18:11:07 2005 +0000 1.3 @@ -85,7 +85,7 @@ include/xen/banner.h: tools/figlet/figle 1.4 tools/figlet/figlet -d tools/figlet Xen $(XEN_VERSION).$(XEN_SUBVERSION)$(XEN_EXTRAVERSION) > $@.new 1.5 @mv -f $@.new $@ 1.6 1.7 -include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s $(HDRS) 1.8 +include/asm-$(TARGET_ARCH)/asm-offsets.h: arch/$(TARGET_ARCH)/asm-offsets.s 1.9 @(set -e; \ 1.10 echo "/*"; \ 1.11 echo " * DO NOT MODIFY."; \
2.1 --- a/xen/Rules.mk Thu Feb 10 18:05:33 2005 +0000 2.2 +++ b/xen/Rules.mk Thu Feb 10 18:11:07 2005 +0000 2.3 @@ -18,7 +18,6 @@ override TARGET_ARCH := $(patsubst x 2.4 2.5 TARGET := $(BASEDIR)/xen 2.6 HDRS := $(wildcard $(BASEDIR)/include/xen/*.h) 2.7 -HDRS += $(wildcard $(BASEDIR)/include/scsi/*.h) 2.8 HDRS += $(wildcard $(BASEDIR)/include/public/*.h) 2.9 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/*.h) 2.10 HDRS += $(wildcard $(BASEDIR)/include/asm-$(TARGET_ARCH)/$(TARGET_SUBARCH)/*.h)
3.1 --- a/xen/arch/x86/Makefile Thu Feb 10 18:05:33 2005 +0000 3.2 +++ b/xen/arch/x86/Makefile Thu Feb 10 18:11:07 2005 +0000 3.3 @@ -28,7 +28,7 @@ default: $(TARGET) 3.4 $(LD) $(LDFLAGS) -T $(TARGET_SUBARCH)/xen.lds -N \ 3.5 boot/$(TARGET_SUBARCH).o $(ALL_OBJS) -o $@ 3.6 3.7 -asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c 3.8 +asm-offsets.s: $(TARGET_SUBARCH)/asm-offsets.c $(HDRS) 3.9 $(CC) $(CFLAGS) -S -o $@ $< 3.10 3.11 boot/mkelf32: boot/mkelf32.c
4.1 --- a/xen/arch/x86/traps.c Thu Feb 10 18:05:33 2005 +0000 4.2 +++ b/xen/arch/x86/traps.c Thu Feb 10 18:11:07 2005 +0000 4.3 @@ -810,25 +810,6 @@ long do_set_trap_table(trap_info_t *trap 4.4 } 4.5 4.6 4.7 -long do_set_callbacks(unsigned long event_selector, 4.8 - unsigned long event_address, 4.9 - unsigned long failsafe_selector, 4.10 - unsigned long failsafe_address) 4.11 -{ 4.12 - struct exec_domain *d = current; 4.13 - 4.14 - if ( !VALID_CODESEL(event_selector) || !VALID_CODESEL(failsafe_selector) ) 4.15 - return -EPERM; 4.16 - 4.17 - d->arch.event_selector = event_selector; 4.18 - d->arch.event_address = event_address; 4.19 - d->arch.failsafe_selector = failsafe_selector; 4.20 - d->arch.failsafe_address = failsafe_address; 4.21 - 4.22 - return 0; 4.23 -} 4.24 - 4.25 - 4.26 long do_fpu_taskswitch(void) 4.27 { 4.28 set_bit(EDF_GUEST_STTS, ¤t->ed_flags);
5.1 --- a/xen/arch/x86/x86_32/traps.c Thu Feb 10 18:05:33 2005 +0000 5.2 +++ b/xen/arch/x86/x86_32/traps.c Thu Feb 10 18:11:07 2005 +0000 5.3 @@ -274,3 +274,21 @@ long do_set_fast_trap(int idx) 5.4 { 5.5 return set_fast_trap(current, idx); 5.6 } 5.7 + 5.8 +long do_set_callbacks(unsigned long event_selector, 5.9 + unsigned long event_address, 5.10 + unsigned long failsafe_selector, 5.11 + unsigned long failsafe_address) 5.12 +{ 5.13 + struct exec_domain *d = current; 5.14 + 5.15 + if ( !VALID_CODESEL(event_selector) || !VALID_CODESEL(failsafe_selector) ) 5.16 + return -EPERM; 5.17 + 5.18 + d->arch.event_selector = event_selector; 5.19 + d->arch.event_address = event_address; 5.20 + d->arch.failsafe_selector = failsafe_selector; 5.21 + d->arch.failsafe_address = failsafe_address; 5.22 + 5.23 + return 0; 5.24 +}
6.1 --- a/xen/arch/x86/x86_64/asm-offsets.c Thu Feb 10 18:05:33 2005 +0000 6.2 +++ b/xen/arch/x86/x86_64/asm-offsets.c Thu Feb 10 18:11:07 2005 +0000 6.3 @@ -43,10 +43,9 @@ void __dummy__(void) 6.4 6.5 OFFSET(EDOMAIN_processor, struct exec_domain, processor); 6.6 OFFSET(EDOMAIN_vcpu_info, struct exec_domain, vcpu_info); 6.7 - OFFSET(EDOMAIN_event_sel, struct exec_domain, arch.event_selector); 6.8 OFFSET(EDOMAIN_event_addr, struct exec_domain, arch.event_address); 6.9 - OFFSET(EDOMAIN_failsafe_sel, struct exec_domain, arch.failsafe_selector); 6.10 OFFSET(EDOMAIN_failsafe_addr, struct exec_domain, arch.failsafe_address); 6.11 + OFFSET(EDOMAIN_syscall_addr, struct exec_domain, arch.syscall_address); 6.12 OFFSET(EDOMAIN_trap_bounce, struct exec_domain, arch.trap_bounce); 6.13 OFFSET(EDOMAIN_thread_flags, struct exec_domain, arch.flags); 6.14 OFFSET(EDOMAIN_kernel_sp, struct exec_domain, arch.kernel_sp);
7.1 --- a/xen/arch/x86/x86_64/entry.S Thu Feb 10 18:05:33 2005 +0000 7.2 +++ b/xen/arch/x86/x86_64/entry.S Thu Feb 10 18:11:07 2005 +0000 7.3 @@ -104,12 +104,15 @@ ENTRY(syscall_enter) 7.4 movl $TRAP_syscall,4(%rsp) 7.5 SAVE_ALL 7.6 GET_CURRENT(%rbx) 7.7 - bts $_TF_kernel_mode,EDOMAIN_thread_flags(%rbx) 7.8 - jc hypercall 7.9 - swapgs 7.10 - movq %rbx,%rdi 7.11 - call SYMBOL_NAME(write_ptbase) 7.12 - jmp restore_all_guest 7.13 + testb $TF_kernel_mode,EDOMAIN_thread_flags(%rbx) 7.14 + jnz hypercall 7.15 + 7.16 + leaq EDOMAIN_trap_bounce(%rbx),%rdx 7.17 + movq EDOMAIN_syscall_addr(%rbx),%rax 7.18 + movq %rax,TRAPBOUNCE_eip(%rdx) 7.19 + movw $0,TRAPBOUNCE_flags(%rdx) 7.20 + pushq restore_all_guest(%rip) 7.21 + jmp create_bounce_frame 7.22 7.23 hypercall: 7.24 sti
8.1 --- a/xen/arch/x86/x86_64/traps.c Thu Feb 10 18:05:33 2005 +0000 8.2 +++ b/xen/arch/x86/x86_64/traps.c Thu Feb 10 18:11:07 2005 +0000 8.3 @@ -256,3 +256,16 @@ void *decode_reg(struct xen_regs *regs, 8.4 8.5 return NULL; 8.6 } 8.7 + 8.8 +long do_set_callbacks(unsigned long event_address, 8.9 + unsigned long failsafe_address, 8.10 + unsigned long syscall_address) 8.11 +{ 8.12 + struct exec_domain *d = current; 8.13 + 8.14 + d->arch.event_address = event_address; 8.15 + d->arch.failsafe_address = failsafe_address; 8.16 + d->arch.syscall_address = syscall_address; 8.17 + 8.18 + return 0; 8.19 +}
9.1 --- a/xen/include/asm-x86/domain.h Thu Feb 10 18:05:33 2005 +0000 9.2 +++ b/xen/include/asm-x86/domain.h Thu Feb 10 18:11:07 2005 +0000 9.3 @@ -68,12 +68,15 @@ struct arch_exec_domain 9.4 * for segment registers %ds, %es, %fs and %gs: 9.5 * %ds, %es, %fs, %gs, %eip, %cs, %eflags [, %oldesp, %oldss] 9.6 */ 9.7 - unsigned long event_selector; /* entry CS */ 9.8 + 9.9 + unsigned long event_selector; /* entry CS (x86/32 only) */ 9.10 unsigned long event_address; /* entry EIP */ 9.11 9.12 - unsigned long failsafe_selector; /* entry CS */ 9.13 + unsigned long failsafe_selector; /* entry CS (x86/32 only) */ 9.14 unsigned long failsafe_address; /* entry EIP */ 9.15 9.16 + unsigned long syscall_address; /* entry EIP (x86/64 only) */ 9.17 + 9.18 /* Bounce information for propagating an exception to guest OS. */ 9.19 struct trap_bounce trap_bounce; 9.20