lkml.org 
[lkml]   [2006]   [Mar]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [Xen-devel] Re: [RFC PATCH 11/35] Add support for Xen to entry.S.
Andi Kleen wrote:
>
>> + jnz restore_all_enable_events # != 0 => reenable event delivery
>> +#endif
>> RESTORE_REGS
>> addl $4, %esp
>> 1: iret
>> .section .fixup,"ax"
>> iret_exc:
>> - sti
>> +#ifndef CONFIG_XEN
>> + ENABLE_INTERRUPTS
>> +#endif
>> pushl $0 # no error code
>> pushl $do_iret_error
>> jmp error_code
>> @@ -269,6 +317,7 @@ iret_exc:
>> .long 1b,iret_exc
>> .previous
>>
>> +#ifndef CONFIG_XEN
>> ldt_ss:
>>
>
> So are you sure that problem this ugly piece of code tries to work around
> isn't in Xen kernels too? Or do you just not care? If yes add a comment.
>

This code would otherwise be broken. ENABLE_INTERRUPTS in Xen requires
access to the data segment, and the data segment is not available at
this point. Plus, it corrupts the %esi register. Hint - use %ebp.

The LDT SS code is broken as well because the iret onto a 16-bit stack
is a pretty crippling blow to transparency in this code. Then, you
don't have data or even stack segments that are reliable for calling out
to hypervisor assist code. We never really fixed this code either in
our implementation, although we did consider several approaches.
Leaving it out does break userspace applications.

Zach
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-03-22 18:27    [W:0.088 / U:8.884 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site