Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 202423
b: refs/heads/master
c: 9ed5520
h: refs/heads/master
i:
  202421: d3732e9
  202419: 9fb2104
  202415: 14c62e1
v: v3
  • Loading branch information
Xiao Guangrong authored and Avi Kivity committed Aug 2, 2010
1 parent fe9a375 commit 3cee444
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: daa3db693ce925a14b7e17ab6f306dc0e6a5342c
refs/heads/master: 9ed5520dd3c9cb79c25f95fce9c57b87637d0fb7
10 changes: 3 additions & 7 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -1985,6 +1985,8 @@ static int set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
mark_page_dirty(vcpu->kvm, gfn);

set_pte:
if (is_writable_pte(*sptep) && !is_writable_pte(spte))
kvm_set_pfn_dirty(pfn);
update_spte(sptep, spte);
done:
return ret;
Expand All @@ -1998,7 +2000,6 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
bool reset_host_protection)
{
int was_rmapped = 0;
int was_writable = is_writable_pte(*sptep);
int rmap_count;

pgprintk("%s: spte %llx access %x write_fault %d"
Expand Down Expand Up @@ -2048,15 +2049,10 @@ static void mmu_set_spte(struct kvm_vcpu *vcpu, u64 *sptep,
page_header_update_slot(vcpu->kvm, sptep, gfn);
if (!was_rmapped) {
rmap_count = rmap_add(vcpu, sptep, gfn);
kvm_release_pfn_clean(pfn);
if (rmap_count > RMAP_RECYCLE_THRESHOLD)
rmap_recycle(vcpu, sptep, gfn);
} else {
if (was_writable)
kvm_release_pfn_dirty(pfn);
else
kvm_release_pfn_clean(pfn);
}
kvm_release_pfn_clean(pfn);
if (speculative) {
vcpu->arch.last_pte_updated = sptep;
vcpu->arch.last_pte_gfn = gfn;
Expand Down

0 comments on commit 3cee444

Please sign in to comment.