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

Re: [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
        addl $4, %esp
 1:     iret
 .section .fixup,"ax"
-       sti
+#ifndef CONFIG_XEN
        pushl $0                        # no error code
        pushl $do_iret_error
        jmp error_code
@@ -269,6 +317,7 @@ iret_exc:
        .long 1b,iret_exc
+#ifndef CONFIG_XEN

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.


Xen-devel mailing list



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