Messages in this thread Patch in this message | | | From | Andi Kleen <> | Subject | Re: ia32 emulation on Pentium I | Date | Tue, 17 Dec 2013 14:19:38 -0800 |
| |
Dmitry Mikushin <dmitry@kernelgen.org> writes: > > So, it seems ia32 emulation assumes Pentium II+. Do you see a quick > way to make it Pentium I -compatible?
The SYSENTER code path should be never executed, so you could either hack the assembler to allow it, or just open code it.
Something like (totally untested):
From: Andi Kleen <ak@linux.intel.com>
use .byte to implement SYSEXIT for k1om assembler
diff --git a/arch/x86/include/asm/irqflags.h b/arch/x86/include/asm/irqflags.h index bba3cf8..1ad2378 100644 --- a/arch/x86/include/asm/irqflags.h +++ b/arch/x86/include/asm/irqflags.h @@ -130,6 +130,8 @@ static inline notrace unsigned long arch_local_irq_save(void) #define PARAVIRT_ADJUST_EXCEPTION_FRAME /* */ #define INTERRUPT_RETURN iretq +#define SYSEXIT .byte 0x0f,0x35 + #define USERGS_SYSRET64 \ swapgs; \ sysretq; @@ -139,7 +141,7 @@ static inline notrace unsigned long arch_local_irq_save(void) #define ENABLE_INTERRUPTS_SYSEXIT32 \ swapgs; \ sti; \ - sysexit + SYSEXIT #else #define INTERRUPT_RETURN iret -- ak@linux.intel.com -- Speaking for myself only
| |