projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
da8dc75
)
KVM: MMU: set spte accessed bit properly
author
Xiao Guangrong
<
[email protected]
>
Fri, 4 Mar 2011 10:58:02 +0000
(18:58 +0800)
committer
Marcelo Tosatti
<
[email protected]
>
Thu, 17 Mar 2011 16:08:32 +0000
(13:08 -0300)
Set spte accessed bit only if guest_initiated == 1 that means the really
accessed
Signed-off-by: Xiao Guangrong <
[email protected]
>
Signed-off-by: Avi Kivity <
[email protected]
>
arch/x86/kvm/mmu.c
patch
|
blob
|
history
diff --git
a/arch/x86/kvm/mmu.c
b/arch/x86/kvm/mmu.c
index b9bf016d7f0fdc351b4b736c997b6a7cae435463..d5455b1b725fbe144d3097d93e803e20def984c3 100644
(file)
--- a/
arch/x86/kvm/mmu.c
+++ b/
arch/x86/kvm/mmu.c
@@
-3307,11
+3307,11
@@
void kvm_mmu_pte_write(struct kvm_vcpu *vcpu, gpa_t gpa,
spin_lock(&vcpu->kvm->mmu_lock);
if (atomic_read(&vcpu->kvm->arch.invlpg_counter) != invlpg_counter)
gentry = 0;
- kvm_mmu_access_page(vcpu, gfn);
kvm_mmu_free_some_pages(vcpu);
++vcpu->kvm->stat.mmu_pte_write;
trace_kvm_mmu_audit(vcpu, AUDIT_PRE_PTE_WRITE);
if (guest_initiated) {
+ kvm_mmu_access_page(vcpu, gfn);
if (gfn == vcpu->arch.last_pt_write_gfn
&& !last_updated_pte_accessed(vcpu)) {
++vcpu->arch.last_pt_write_count;