lkml.org 
[lkml]   [2013]   [Dec]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
SubjectRe: ia32 emulation on Pentium I
Date
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


\
 
 \ /
  Last update: 2013-12-17 23:41    [W:0.039 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site