Friday, May 19, 2006

Some interesting stats on sensitive instruction usage

One surprising thing about x86 virtualization is that while there is a small number of instructions that require special effort (around 17 depending on what you count), there are an even smaller number that make 95% of all the calls to these instructions.

These four instructions are cli, sti, pushf, popf (which probably isn't all that surprising). An interesting result of this is that you only really have to focus on making these instructions fast. This is an important conclusion when discussing the performance trade-offs of supporting a transparently paravirtualizable kernel.

Rusty Russell posted some stats that confirm this here.