On 08/29/2011 02:03 PM, Jan Kiszka wrote:
>
>  Just reading the first byte requires a guest page table walk.  This is
>  probably the highest cost in emulation (which also requires a walk for
>  the data access).

And what about caching the result of the first walk? Usually, a "sane
guest" won't have many code pages that issue the EIO.


There's no way to know when to invalidate the cache.

We could go a bit further, and cache the the whole thing. On the first exit, do the entire emulation, and remember %rip. On the second exit, if %rip matches, skip directly to kvm_lapic_eoi().

But I don't think it's worth it. This also has failure modes, and really, no guest will ever write to EOI with stosl.

--
error compiling committee.c: too many arguments to function

--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to