projects
/
GitHub
/
LineageOS
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e9bda3b
)
KVM: x86: add paging gcc optimization
author
Davidlohr Bueso
<dave@gnu.org>
Thu, 8 Mar 2012 11:45:54 +0000
(12:45 +0100)
committer
Avi Kivity
<avi@redhat.com>
Sun, 8 Apr 2012 11:03:13 +0000
(14:03 +0300)
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>
arch/x86/kvm/x86.h
patch
|
blob
|
blame
|
history
diff --git
a/arch/x86/kvm/x86.h
b/arch/x86/kvm/x86.h
index cb80c293cdd8ea1b26dbbaa050c1c5c43b1fd1ab..3d1134ddb885622af79bdb0fefb589c8f7b4d5b6 100644
(file)
--- 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)