diff options
author | Davidlohr Bueso <dave@gnu.org> | 2012-03-08 06:45:54 -0500 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2012-04-08 07:03:13 -0400 |
commit | c36fc04ef558c95cff46a8c89d2f804f217335f5 (patch) | |
tree | 98f5fcb78a62fd2c1a33f89a8dea0c9f5074aaef /arch/x86 | |
parent | e9bda3b3d0ce775afe15eaf71922d342cc74991c (diff) |
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')
-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) | |||
64 | 64 | ||
65 | static inline int is_paging(struct kvm_vcpu *vcpu) | 65 | static inline int is_paging(struct kvm_vcpu *vcpu) |
66 | { | 66 | { |
67 | return kvm_read_cr0_bits(vcpu, X86_CR0_PG); | 67 | return likely(kvm_read_cr0_bits(vcpu, X86_CR0_PG)); |
68 | } | 68 | } |
69 | 69 | ||
70 | static inline u32 bit(int bitno) | 70 | static inline u32 bit(int bitno) |