Re: [discuss] Re: [Bug 350] New: i386 context switch very slow compared to 2.4 due to wrmsr (performance)

Andi Kleen
2003-02-14T01:19:40Z

> I have a need to run v86 code from ring 0, so I'm not keen to slip other
...

[for the unsuspecting readers - Peter is talking about non Linux here]

> people's code in there. This would mean I'd need to write a v86 emulator from
> scratch which I think is more time than writing the warping code that I've
> suggested.

Have you taken a look at valgrind? (http://developer.kde.org/~sewardj/)

It is a free software x86 JIT. I don't think it supports 16bit code currently,
but it probably wouldn't be too difficult to add. It wasn't primarily designed
for speed - its main application is to instrument programs - but its slowdown
compared to running on the real CPU is moderate and its certainly fast enough
for anything designed to run on DoS.

-Andi