xen: cache cr0 value to avoid trap'n'emulate for read_cr0
authorJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 24 Apr 2009 07:26:50 +0000 (00:26 -0700)
committerJeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>
Fri, 8 May 2009 22:55:24 +0000 (15:55 -0700)
stts() is implemented in terms of read_cr0/write_cr0 to update the
state of the TS bit.  This happens during context switch, and so
is fairly performance critical.  Rather than falling back to
a trap-and-emulate native read_cr0, implement our own by caching
the last-written value from write_cr0 (the TS bit is the only one
we really care about).

Impact: optimise Xen context switches
Signed-off-by: Jeremy Fitzhardinge <jeremy.fitzhardinge@citrix.com>

No differences found