diff options
author | Davidlohr Bueso <dave@gnu.org> | 2012-03-08 11:45:54 (GMT) |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-08 11:03:13 (GMT) |
commit | c36fc04ef558c95cff46a8c89d2f804f217335f5 (patch) | |
tree | 98f5fcb78a62fd2c1a33f89a8dea0c9f5074aaef /arch/x86/kvm | |
parent | e9bda3b3d0ce775afe15eaf71922d342cc74991c (diff) | |
download | linux-c36fc04ef558c95cff46a8c89d2f804f217335f5.tar.xz |
KVM: x86: add paging gcc optimization
Since most guests will have paging enabled for memory management, add likely() optimization
around CR0.PG checks.
Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r-- | arch/x86/kvm/x86.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/kvm/x86.h b/arch/x86/kvm/x86.h index cb80c29..3d1134d 100644 --- a/arch/x86/kvm/x86.h +++ b/arch/x86/kvm/x86.h @@ -64,7 +64,7 @@ static inline int is_pse(struct kvm_vcpu *vcpu) static inline int is_paging(struct kvm_vcpu *vcpu) { - return kvm_read_cr0_bits(vcpu, X86_CR0_PG); + return likely(kvm_read_cr0_bits(vcpu, X86_CR0_PG)); } static inline u32 bit(int bitno) |