>This is pretty much every code page. What exactly was your
>intent for a 'clean' page?
Hu, just realise that's a bad in our current environment. The idea was as follows:
Assume, in a huge monolitic kernel is a relatively small number of instructions
we have to take care, because they don't trap as they should (such as sgdt, verr,...).
I don't focus on branches yet, see later. If the code path ran through the
whole page, all instructions of this page were marked. If in this page is no
"dangerous" instruction (without branches), we could mark this page as "good".
BUT now, we map all code pages except the one, into which the current EIP points,
as RW into guest address space. Therefore we _have_
to take care about branches right. If my idea could work, the pages should not
mapped into guests address space - in my alacrity I forgot this fact :(
We map the code pages into guests address space for the case, the guest could
read or write from/into its code (SMC, SEC), right? With some measurements we
can find out, if that's reasonable or not. If a guest doesn't touch its own
code for a long while, we needn't to map the pages in and can catch branches
to other pages with page faults. Saves a lot of emulating...
jens