diff options
author | Davidlohr Bueso <dave@gnu.org> | 2012-03-08 12:45:54 +0100 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-08 14:03:13 +0300 |
commit | c36fc04ef558c95cff46a8c89d2f804f217335f5 (patch) | |
tree | 98f5fcb78a62fd2c1a33f89a8dea0c9f5074aaef /arch/x86/kvm/x86.h | |
parent | e9bda3b3d0ce775afe15eaf71922d342cc74991c (diff) | |
download | linux-c36fc04ef558c95cff46a8c89d2f804f217335f5.tar.bz2 |
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/x86.h')
-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 cb80c293cdd8..3d1134ddb885 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) |