Ramon van Handel wrote:
> Kevin, one question (yes I know, 't is nasty ;)) -- do you have any
> performance measurements ? What kind of impact does scan-before-execute
> (is it ok if we shorten this to s-b-e ? it's such a long word ;)) on the
> performance of ring<3
> code ? This is interesting stuff.
No idea. After things are better integrated, you can
take some measurements. Right now, I just got the basic techniques
working. Things are totally non-optimal. Only 1 page
of SBE cache, and I always execute some TLB setup code before
transitioning using the nexus code for now. Ultimately
things will be more dynamic.
Since I don't have the page exception plugged into the emulation,
I can't measure performance if I wanted to.
When you do measure performance of ring0 code, keep in mind
that it depends quite a bit on the code you execute. The
more intra-page code the better. Out of page transfers
will cause exceptions, thus less performance. The SBE
code is very dynamic, and is capable of recognizing
any static offset intra-page transfer instructions.
As this kind of code executes, it is marked as OK to
execute natively, along with other non-branch instructions.
> I may be stupid here, but *why* ? Nop doesn't trap and isn't harmful, so
> what's the point of virtualising it ? I don't get it.
I had to chose a random instruction to demonstrate that
we could virtualize any x86 instruction. NOP was the
first one to come to mind. Other than than, there is
no point. :^)
I want to make a few other mods first, before making a
page fault handler that integrates into the instruction
emulation.
-Kevin