[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-changelog] [linux-2.6.18-xen] x86: fix placement of ecrit labels
# HG changeset patch # User Jan Beulich <jbeulich@xxxxxxxx> # Date 1433254422 -7200 # Node ID 8f6b99f4c45fbee6c5911fbd0835353b9de1fdeb # Parent a429985613f2ad6739ddbd44eb296954678b78ce x86: fix placement of ecrit labels On the 32-bit side, they must go ahead of TRACE_IRQS_OFF. On the 64-bit side it was placed way too late (but isn't being used, so this was only a latent issue). Also rename the labels to be local ones. Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx> --- diff -r a429985613f2 -r 8f6b99f4c45f arch/i386/kernel/entry-xen.S --- a/arch/i386/kernel/entry-xen.S Tue Jun 02 16:10:19 2015 +0200 +++ b/arch/i386/kernel/entry-xen.S Tue Jun 02 16:13:42 2015 +0200 @@ -362,14 +362,14 @@ 1: movl (%ebp),%ebp #ifdef CONFIG_XEN TRACE_IRQS_ON __ENABLE_INTERRUPTS -sysexit_scrit: /**** START OF SYSEXIT CRITICAL REGION ****/ +.Lsysexit_scrit: /**** START OF SYSEXIT CRITICAL REGION ****/ __TEST_PENDING jnz 14f # process more events if necessary... movl ESI(%esp), %esi sysexit 14: __DISABLE_INTERRUPTS +.Lsysexit_ecrit: /**** END OF SYSEXIT CRITICAL REGION ****/ TRACE_IRQS_OFF -sysexit_ecrit: /**** END OF SYSEXIT CRITICAL REGION ****/ push %esp call evtchn_do_upcall add $4,%esp @@ -518,7 +518,7 @@ 1: iret restore_all_enable_events: TRACE_IRQS_ON __ENABLE_INTERRUPTS -scrit: /**** START OF CRITICAL REGION ****/ +.Lscrit: /**** START OF CRITICAL REGION ****/ __TEST_PENDING jnz 14f # process more events if necessary... RESTORE_REGS @@ -530,8 +530,8 @@ 1: iret .long 1b,iret_exc .previous 14: __DISABLE_INTERRUPTS +.Lecrit: /**** END OF CRITICAL REGION ****/ TRACE_IRQS_OFF -ecrit: /**** END OF CRITICAL REGION ****/ jmp .Ldo_upcall CFI_RESTORE_STATE @@ -793,15 +793,15 @@ ENTRY(hypervisor_callback) testb $2,CS(%esp) movl EIP(%esp),%eax jnz .Ldo_upcall - cmpl $scrit,%eax + cmpl $.Lscrit,%eax jb 0f - cmpl $ecrit,%eax + cmpl $.Lecrit,%eax jb critical_region_fixup 0: #ifdef CONFIG_XEN_SUPERVISOR_MODE_KERNEL - cmpl $sysexit_scrit,%eax + cmpl $.Lsysexit_scrit,%eax jb .Ldo_upcall - cmpl $sysexit_ecrit,%eax + cmpl $.Lsysexit_ecrit,%eax ja .Ldo_upcall addl $OLDESP,%esp # Remove eflags...ebx from stack frame. #endif @@ -822,7 +822,7 @@ 0: # provides the number of bytes which have already been popped from the # interrupted stack frame. critical_region_fixup: - movsbl critical_fixup_table-scrit(%eax),%ecx # %ecx contains num slots popped + movsbl critical_fixup_table-.Lscrit(%eax),%ecx # %ecx contains num slots popped testl %ecx,%ecx leal (%esp,%ecx,4),%esi # %esi points at end of src region leal OLDESP(%esp),%edi # %edi points at end of dst region diff -r a429985613f2 -r 8f6b99f4c45f arch/x86_64/kernel/entry-xen.S --- a/arch/x86_64/kernel/entry-xen.S Tue Jun 02 16:10:19 2015 +0200 +++ b/arch/x86_64/kernel/entry-xen.S Tue Jun 02 16:13:42 2015 +0200 @@ -945,7 +945,7 @@ restore_all_enable_events: TRACE_IRQS_ON XEN_UNBLOCK_EVENTS(%rsi) # %rsi is already set up... -scrit: /**** START OF CRITICAL REGION ****/ +.Lscrit: /**** START OF CRITICAL REGION ****/ XEN_TEST_PENDING(%rsi) CFI_REMEMBER_STATE jnz 14f # process more events if necessary... @@ -955,12 +955,12 @@ scrit: /**** START OF CRITICAL REGION ** CFI_RESTORE_STATE 14: XEN_LOCKED_BLOCK_EVENTS(%rsi) +.Lecrit: /**** END OF CRITICAL REGION ****/ XEN_PUT_VCPU_INFO(%rsi) SAVE_REST movq %rsp,%rdi # set the argument again jmp 11b CFI_ENDPROC -ecrit: /**** END OF CRITICAL REGION ****/ # At this point, unlike on x86-32, we don't do the fixup to simplify the # code and the stack frame is more complex on x86-64. # When the kernel is interrupted in the critical section, the kernel _______________________________________________ Xen-changelog mailing list Xen-changelog@xxxxxxxxxxxxx http://lists.xensource.com/xen-changelog
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |