]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Optimize kvm_read_cr[04]_bits()
authorAvi Kivity <avi@redhat.com>
Thu, 21 Jan 2010 13:31:51 +0000 (15:31 +0200)
committerMarcelo Tosatti <mtosatti@redhat.com>
Mon, 1 Mar 2010 15:36:05 +0000 (12:36 -0300)
commit42fbc4d7a4073f86f89f5fd113c54dbe3c48ce6b
tree2485d31b421b83edac00161fb32b5ee049655254
parent84e4a7f7b885de40fc16d48c4f315dada9c7fbd9
KVM: Optimize kvm_read_cr[04]_bits()

'mask' is always a constant, so we can check whether it includes a bit that
might be owned by the guest very cheaply, and avoid the decache call.  Saves
a few hundred bytes of module text.

Signed-off-by: Avi Kivity <avi@redhat.com>
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
arch/x86/kvm/kvm_cache_regs.h