Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 329798
b: refs/heads/master
c: 86fde74
h: refs/heads/master
v: v3
  • Loading branch information
Xiao Guangrong authored and Marcelo Tosatti committed Jul 20, 2012
1 parent 49ca164 commit 3e024db
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9d3c92af47d853d4e31ee971dba7bc086275b7b3
refs/heads/master: 86fde74cf5b829627b37ca86322acfdd99b524b8
8 changes: 8 additions & 0 deletions trunk/arch/x86/kvm/mmu.c
Original file line number Diff line number Diff line change
Expand Up @@ -556,6 +556,14 @@ static int mmu_spte_clear_track_bits(u64 *sptep)
return 0;

pfn = spte_to_pfn(old_spte);

/*
* KVM does not hold the refcount of the page used by
* kvm mmu, before reclaiming the page, we should
* unmap it from mmu first.
*/
WARN_ON(!kvm_is_mmio_pfn(pfn) && !page_count(pfn_to_page(pfn)));

if (!shadow_accessed_mask || old_spte & shadow_accessed_mask)
kvm_set_pfn_accessed(pfn);
if (!shadow_dirty_mask || (old_spte & shadow_dirty_mask))
Expand Down

0 comments on commit 3e024db

Please sign in to comment.