Messages in this thread Patch in this message | | | Date | Thu, 08 Mar 2012 12:45:54 +0100 | From | Davidlohr Bueso <> | Subject | [PATCH v2] KVM: x86: add paging gcc optimization |
| |
From: Davidlohr Bueso <dave@gnu.org>
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> --- 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) -- 1.7.8.3
| |