Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 356824
b: refs/heads/master
c: 908e7d7
h: refs/heads/master
v: v3
  • Loading branch information
Gleb Natapov authored and Marcelo Tosatti committed Jan 7, 2013
1 parent 627e441 commit 47663eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 11 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: ee04e0cea8b170ae9c8542162091c716de36666b
refs/heads/master: 908e7d7999bcce70ac52e7f390a8f5cbc55948de
16 changes: 6 additions & 10 deletions trunk/arch/x86/kvm/paging_tmpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,16 +249,12 @@ static int FNAME(walk_addr_generic)(struct guest_walker *walker,

if (!write_fault)
protect_clean_gpte(&pte_access, pte);

/*
* On a write fault, fold the dirty bit into accessed_dirty by shifting it one
* place right.
*
* On a read fault, do nothing.
*/
shift = write_fault >> ilog2(PFERR_WRITE_MASK);
shift *= PT_DIRTY_SHIFT - PT_ACCESSED_SHIFT;
accessed_dirty &= pte >> shift;
else
/*
* On a write fault, fold the dirty bit into accessed_dirty by
* shifting it one place right.
*/
accessed_dirty &= pte >> (PT_DIRTY_SHIFT - PT_ACCESSED_SHIFT);

if (unlikely(!accessed_dirty)) {
ret = FNAME(update_accessed_dirty_bits)(vcpu, mmu, walker, write_fault);
Expand Down

0 comments on commit 47663eb

Please sign in to comment.