* ia32 emulation on Pentium I
@ 2013-12-13 18:30 Dmitry Mikushin
2013-12-17 22:19 ` Andi Kleen
0 siblings, 1 reply; 2+ messages in thread
From: Dmitry Mikushin @ 2013-12-13 18:30 UTC (permalink / raw)
To: linux-kernel
Dear all,
I'm trying to enable ia32 emulation in k1om kernel. Linux kernel is
ported for k1om, but with ia32 emulation disabled. With it enabled,
I'm getting the following error:
LD arch/x86/crypto/built-in.o
AS arch/x86/ia32/ia32entry.o
arch/x86/ia32/ia32entry.S: Assembler messages:
arch/x86/ia32/ia32entry.S:192: Error: `sysexit' is not supported on `k1om'
make[2]: *** [arch/x86/ia32/ia32entry.o] Error 1
make[1]: *** [arch/x86/ia32] Error 2
make: *** [arch/x86] Error 2
sysexit is not supported because k1om (Intel MIC) is essentially Pentium
I with AVX512 extensions.
sysexit is used in macro ENABLE_INTERRUPTS_SYSEXIT32, which is in turn
used in ENTRY(ia32_sysenter_target).
So, it seems ia32 emulation assumes Pentium II+. Do you see a quick
way to make it Pentium I -compatible?
Thanks,
- D.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ia32 emulation on Pentium I
2013-12-13 18:30 ia32 emulation on Pentium I Dmitry Mikushin
@ 2013-12-17 22:19 ` Andi Kleen
0 siblings, 0 replies; 2+ messages in thread
From: Andi Kleen @ 2013-12-17 22:19 UTC (permalink / raw)
To: Dmitry Mikushin; +Cc: linux-kernel
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-17 22:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-13 18:30 ia32 emulation on Pentium I Dmitry Mikushin
2013-12-17 22:19 ` Andi Kleen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox