[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Merge.



# HG changeset patch
# User smh22@xxxxxxxxxxxxxxxxxxxx
# Node ID c5e80cb40c466e0758b76579ae535c597b08862e
# Parent  71f938468929edcad67797b6ba7ad13c9b031f94
# Parent  8c27368b12ad74529ee06d96b8eb6fcc52bc02ff
Merge.

diff -r 71f938468929 -r c5e80cb40c46 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h    Thu Apr 
 6 16:34:54 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/asm/hypercall.h    Thu Apr 
 6 16:47:37 2006
@@ -331,8 +331,7 @@
 
 static inline int
 HYPERVISOR_callback_op(
-       int cmd,
-       void *arg)
+       int cmd, void *arg)
 {
        return _hypercall2(int, callback_op, cmd, arg);
 }
diff -r 71f938468929 -r c5e80cb40c46 
linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h
--- a/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h  Thu Apr 
 6 16:34:54 2006
+++ b/linux-2.6-xen-sparse/include/asm-i386/mach-xen/setup_arch_post.h  Thu Apr 
 6 16:47:37 2006
@@ -25,11 +25,11 @@
 static void __init machine_specific_arch_setup(void)
 {
        struct xen_platform_parameters pp;
-       callback_register_t event = {
+       struct callback_register event = {
                .type = CALLBACKTYPE_event,
                .address = { __KERNEL_CS, (unsigned long)hypervisor_callback },
        };
-       callback_register_t failsafe = {
+       struct callback_register failsafe = {
                .type = CALLBACKTYPE_failsafe,
                .address = { __KERNEL_CS, (unsigned long)failsafe_callback },
        };
diff -r 71f938468929 -r c5e80cb40c46 
linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h
--- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h        
Thu Apr  6 16:34:54 2006
+++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/setup_arch_post.h        
Thu Apr  6 16:47:37 2006
@@ -14,15 +14,15 @@
 
 static void __init machine_specific_arch_setup(void)
 {
-       callback_register_t event = {
+       struct callback_register event = {
                .type = CALLBACKTYPE_event,
                .address = (unsigned long) hypervisor_callback,
        };
-       callback_register_t failsafe = {
+       struct callback_register failsafe = {
                .type = CALLBACKTYPE_failsafe,
                .address = (unsigned long)failsafe_callback,
        };
-       callback_register_t syscall = {
+       struct callback_register syscall = {
                .type = CALLBACKTYPE_syscall,
                .address = (unsigned long)system_call,
        };
diff -r 71f938468929 -r c5e80cb40c46 xen/arch/x86/shutdown.c
--- a/xen/arch/x86/shutdown.c   Thu Apr  6 16:34:54 2006
+++ b/xen/arch/x86/shutdown.c   Thu Apr  6 16:47:37 2006
@@ -44,7 +44,7 @@
 void __attribute__((noreturn)) __machine_halt(void *unused)
 {
     for ( ; ; )
-        safe_halt();
+        __asm__ __volatile__ ( "hlt" );
 }
 
 void machine_halt(void)
diff -r 71f938468929 -r c5e80cb40c46 xen/arch/x86/traps.c
--- a/xen/arch/x86/traps.c      Thu Apr  6 16:34:54 2006
+++ b/xen/arch/x86/traps.c      Thu Apr  6 16:47:37 2006
@@ -32,6 +32,7 @@
 #include <xen/errno.h>
 #include <xen/mm.h>
 #include <xen/console.h>
+#include <xen/reboot.h>
 #include <asm/regs.h>
 #include <xen/delay.h>
 #include <xen/event.h>
@@ -318,8 +319,7 @@
     console_force_lock();
 
     /* Wait for manual reset. */
-    for ( ; ; )
-        __asm__ __volatile__ ( "hlt" );
+    machine_halt();
 }
 
 static inline int do_trap(int trapnr, char *str,
diff -r 71f938468929 -r c5e80cb40c46 xen/arch/x86/x86_32/entry.S
--- a/xen/arch/x86/x86_32/entry.S       Thu Apr  6 16:34:54 2006
+++ b/xen/arch/x86/x86_32/entry.S       Thu Apr  6 16:47:37 2006
@@ -119,7 +119,7 @@
         movl  $DBLFLT1,%eax
         pushl %eax                     # EIP
         pushl %esi                     # error_code/entry_vector
-        jmp   error_code
+        jmp   handle_exception
 DBLFLT1:GET_CURRENT(%ebx)
         jmp   test_all_events
 failsafe_callback:
@@ -381,14 +381,6 @@
         jmp   __domain_crash_synchronous
 
         ALIGN
-process_guest_exception_and_events:
-        leal VCPU_trap_bounce(%ebx),%edx
-        testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%edx)
-        jz   test_all_events
-        call create_bounce_frame
-        jmp  test_all_events
-
-        ALIGN
 ENTRY(ret_from_intr)
         GET_CURRENT(%ebx)
         movl  UREGS_eflags(%esp),%eax
@@ -400,7 +392,7 @@
 ENTRY(divide_error)
        pushl $TRAP_divide_error<<16
        ALIGN
-error_code:
+handle_exception:
         FIXUP_RING0_GUEST_STACK
         SAVE_ALL_NOSEGREGS(a)
         SET_XEN_SEGMENTS(a)
@@ -419,7 +411,11 @@
         movb  UREGS_cs(%esp),%al
         testl $(3|X86_EFLAGS_VM),%eax
        jz    restore_all_xen
-        jmp   process_guest_exception_and_events
+        leal  VCPU_trap_bounce(%ebx),%edx
+        testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%edx)
+        jz    test_all_events
+        call  create_bounce_frame
+        jmp   test_all_events
 
 exception_with_ints_disabled:
         movl  UREGS_eflags(%esp),%eax
@@ -452,71 +448,71 @@
                                         
 ENTRY(coprocessor_error)
        pushl $TRAP_copro_error<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(simd_coprocessor_error)
        pushl $TRAP_simd_error<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(device_not_available)
        pushl $TRAP_no_device<<16
-        jmp   error_code
+        jmp   handle_exception
 
 ENTRY(debug)
        pushl $TRAP_debug<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(int3)
        pushl $TRAP_int3<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(overflow)
        pushl $TRAP_overflow<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(bounds)
        pushl $TRAP_bounds<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(invalid_op)
        pushl $TRAP_invalid_op<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(coprocessor_segment_overrun)
        pushl $TRAP_copro_seg<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(invalid_TSS)
-        movw $TRAP_invalid_tss,2(%esp)
-       jmp error_code
+        movw  $TRAP_invalid_tss,2(%esp)
+       jmp   handle_exception
 
 ENTRY(segment_not_present)
-        movw $TRAP_no_segment,2(%esp)
-       jmp error_code
+        movw  $TRAP_no_segment,2(%esp)
+       jmp   handle_exception
 
 ENTRY(stack_segment)
-        movw $TRAP_stack_error,2(%esp)
-       jmp error_code
+        movw  $TRAP_stack_error,2(%esp)
+       jmp   handle_exception
 
 ENTRY(general_protection)
-        movw $TRAP_gp_fault,2(%esp)
-       jmp error_code
+        movw  $TRAP_gp_fault,2(%esp)
+       jmp   handle_exception
 
 ENTRY(alignment_check)
-        movw $TRAP_alignment_check,2(%esp)
-       jmp error_code
+        movw  $TRAP_alignment_check,2(%esp)
+       jmp   handle_exception
 
 ENTRY(page_fault)
-        movw $TRAP_page_fault,2(%esp)
-       jmp error_code
+        movw  $TRAP_page_fault,2(%esp)
+       jmp   handle_exception
 
 ENTRY(machine_check)
         pushl $TRAP_machine_check<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(spurious_interrupt_bug)
         pushl $TRAP_spurious_int<<16
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(nmi)
 #ifdef CONFIG_X86_SUPERVISOR_MODE_KERNEL
diff -r 71f938468929 -r c5e80cb40c46 xen/arch/x86/x86_32/traps.c
--- a/xen/arch/x86/x86_32/traps.c       Thu Apr  6 16:34:54 2006
+++ b/xen/arch/x86/x86_32/traps.c       Thu Apr  6 16:47:37 2006
@@ -9,6 +9,7 @@
 #include <xen/mm.h>
 #include <xen/irq.h>
 #include <xen/symbols.h>
+#include <xen/reboot.h>
 #include <asm/current.h>
 #include <asm/flushtlb.h>
 #include <asm/hvm/hvm.h>
@@ -180,8 +181,7 @@
     console_force_lock();
 
     /* Wait for manual reset. */
-    for ( ; ; )
-        __asm__ __volatile__ ( "hlt" );
+    machine_halt();
 }
 
 unsigned long do_iret(void)
@@ -322,8 +322,7 @@
     long ret = 0;
     struct vcpu *v = current;
 
-    if ( reg->address.cs )
-        fixup_guest_code_selector(reg->address.cs);
+    fixup_guest_code_selector(reg->address.cs);
 
     switch ( reg->type )
     {
@@ -355,6 +354,7 @@
         ret = -EINVAL;
         break;
     }
+
     return ret;
 }
 
@@ -370,7 +370,7 @@
         struct callback_register reg;
 
         ret = -EFAULT;
-        if ( copy_from_guest( &reg, arg, 1 ) )
+        if ( copy_from_guest(&reg, arg, 1) )
             break;
 
         ret = register_guest_callback(&reg);
@@ -382,7 +382,7 @@
         struct callback_unregister unreg;
 
         ret = -EFAULT;
-        if ( copy_from_guest( &unreg, arg, 1 ) )
+        if ( copy_from_guest(&unreg, arg, 1) )
             break;
 
         ret = unregister_guest_callback(&unreg);
diff -r 71f938468929 -r c5e80cb40c46 xen/arch/x86/x86_64/entry.S
--- a/xen/arch/x86/x86_64/entry.S       Thu Apr  6 16:34:54 2006
+++ b/xen/arch/x86/x86_64/entry.S       Thu Apr  6 16:47:37 2006
@@ -68,7 +68,7 @@
         leaq  DBLFLT1(%rip),%rax
         pushq %rax                     # RIP
         pushq %rsi                     # error_code/entry_vector
-        jmp   error_code
+        jmp   handle_exception
 DBLFLT1:GET_CURRENT(%rbx)
         jmp   test_all_events
 failsafe_callback:
@@ -320,15 +320,6 @@
         jmp  __domain_crash_synchronous
 
         ALIGN
-/* %rbx: struct vcpu */
-process_guest_exception_and_events:
-        leaq  VCPU_trap_bounce(%rbx),%rdx
-        testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
-        jz    test_all_events
-        call  create_bounce_frame
-        jmp   test_all_events
-
-        ALIGN
 /* No special register assumptions. */
 ENTRY(ret_from_intr)
         GET_CURRENT(%rbx)
@@ -338,7 +329,7 @@
 
         ALIGN
 /* No special register assumptions. */
-error_code:
+handle_exception:
         SAVE_ALL
         testb $X86_EFLAGS_IF>>8,UREGS_eflags+1(%rsp)
         jz    exception_with_ints_disabled
@@ -351,7 +342,11 @@
         callq *(%rdx,%rax,8)
         testb $3,UREGS_cs(%rsp)
         jz    restore_all_xen
-        jmp   process_guest_exception_and_events
+        leaq  VCPU_trap_bounce(%rbx),%rdx
+        testb $TBF_EXCEPTION,TRAPBOUNCE_flags(%rdx)
+        jz    test_all_events
+        call  create_bounce_frame
+        jmp   test_all_events
 
 /* No special register assumptions. */
 exception_with_ints_disabled:
@@ -384,90 +379,90 @@
 ENTRY(divide_error)
         pushq $0
         movl  $TRAP_divide_error,4(%rsp)
-        jmp   error_code
+        jmp   handle_exception
 
 ENTRY(coprocessor_error)
         pushq $0
         movl  $TRAP_copro_error,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(simd_coprocessor_error)
         pushq $0
         movl  $TRAP_simd_error,4(%rsp)
-       jmp error_code
+       jmp   handle_exception
 
 ENTRY(device_not_available)
         pushq $0
         movl  $TRAP_no_device,4(%rsp)
-        jmp   error_code
+        jmp   handle_exception
 
 ENTRY(debug)
         pushq $0
         movl  $TRAP_debug,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(int3)
         pushq $0
        movl  $TRAP_int3,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(overflow)
         pushq $0
        movl  $TRAP_overflow,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(bounds)
         pushq $0
        movl  $TRAP_bounds,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(invalid_op)
         pushq $0
        movl  $TRAP_invalid_op,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(coprocessor_segment_overrun)
         pushq $0
        movl  $TRAP_copro_seg,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(invalid_TSS)
         movl  $TRAP_invalid_tss,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(segment_not_present)
         movl  $TRAP_no_segment,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(stack_segment)
         movl  $TRAP_stack_error,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(general_protection)
         movl  $TRAP_gp_fault,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(alignment_check)
         movl  $TRAP_alignment_check,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(page_fault)
         movl  $TRAP_page_fault,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(machine_check)
         pushq $0
         movl  $TRAP_machine_check,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(spurious_interrupt_bug)
         pushq $0
         movl  $TRAP_spurious_int,4(%rsp)
-       jmp   error_code
+       jmp   handle_exception
 
 ENTRY(double_fault)
         movl  $TRAP_double_fault,4(%rsp)
-        jmp   error_code
+        jmp   handle_exception
 
 ENTRY(nmi)
         pushq $0
diff -r 71f938468929 -r c5e80cb40c46 xen/arch/x86/x86_64/traps.c
--- a/xen/arch/x86/x86_64/traps.c       Thu Apr  6 16:34:54 2006
+++ b/xen/arch/x86/x86_64/traps.c       Thu Apr  6 16:47:37 2006
@@ -10,6 +10,7 @@
 #include <xen/symbols.h>
 #include <xen/console.h>
 #include <xen/sched.h>
+#include <xen/reboot.h>
 #include <asm/current.h>
 #include <asm/flushtlb.h>
 #include <asm/msr.h>
@@ -166,8 +167,7 @@
     console_force_lock();
 
     /* Wait for manual reset. */
-    for ( ; ; )
-        __asm__ __volatile__ ( "hlt" );
+    machine_halt();
 }
 
 void toggle_guest_mode(struct vcpu *v)
@@ -357,6 +357,7 @@
         ret = -EINVAL;
         break;
     }
+
     return ret;
 }
 
@@ -372,7 +373,7 @@
         struct callback_register reg;
 
         ret = -EFAULT;
-        if ( copy_from_guest( &reg, arg, 1 ) )
+        if ( copy_from_guest(&reg, arg, 1) )
             break;
 
         ret = register_guest_callback(&reg);
@@ -384,7 +385,7 @@
         struct callback_unregister unreg;
 
         ret = -EFAULT;
-        if ( copy_from_guest( &unreg, arg, 1 ) )
+        if ( copy_from_guest(&unreg, arg, 1) )
             break;
 
         ret = unregister_guest_callback(&unreg);
@@ -403,15 +404,15 @@
                       unsigned long failsafe_address,
                       unsigned long syscall_address)
 {
-    callback_register_t event = {
+    struct callback_register event = {
         .type = CALLBACKTYPE_event,
         .address = event_address,
     };
-    callback_register_t failsafe = {
+    struct callback_register failsafe = {
         .type = CALLBACKTYPE_failsafe,
         .address = failsafe_address,
     };
-    callback_register_t syscall = {
+    struct callback_register syscall = {
         .type = CALLBACKTYPE_syscall,
         .address = syscall_address,
     };
diff -r 71f938468929 -r c5e80cb40c46 xen/drivers/char/console.c
--- a/xen/drivers/char/console.c        Thu Apr  6 16:34:54 2006
+++ b/xen/drivers/char/console.c        Thu Apr  6 16:47:37 2006
@@ -520,6 +520,7 @@
 {
     console_lock = SPIN_LOCK_UNLOCKED;
     serial_force_unlock(sercon_handle);
+    console_start_sync();
 }
 
 void console_force_lock(void)

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.