From: Andi Kleen <andi@firstfloor.org>
To: Dmitry Mikushin <dmitry@kernelgen.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: ia32 emulation on Pentium I
Date: Tue, 17 Dec 2013 14:19:38 -0800 [thread overview]
Message-ID: <871u1bxgqt.fsf@tassilo.jf.intel.com> (raw)
In-Reply-To: <52AB522F.8000703@kernelgen.org> (Dmitry Mikushin's message of "Fri, 13 Dec 2013 19:30:07 +0100")
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
prev parent reply other threads:[~2013-12-17 22:19 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-13 18:30 ia32 emulation on Pentium I Dmitry Mikushin
2013-12-17 22:19 ` Andi Kleen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=871u1bxgqt.fsf@tassilo.jf.intel.com \
--to=andi@firstfloor.org \
--cc=dmitry@kernelgen.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox