aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/kvm
diff options
context:
space:
mode:
authorXiao Guangrong <xiaoguangrong@cn.fujitsu.com>2010-06-11 09:29:42 -0400
committerAvi Kivity <avi@redhat.com>2010-08-01 03:46:39 -0400
commitcb83cad2e7e1cdedb2abb9cef2ac076defa679d4 (patch)
treeafe15ea99043092d91cf83e750ad88fda522fb14 /arch/x86/kvm
parentac3cd03cca91d481b41e8236aaa41a7f9fafa62f (diff)
KVM: MMU: cleanup for dirty page judgment
Using wrap function to cleanup page dirty judgment Signed-off-by: Xiao Guangrong <xiaoguangrong@cn.fujitsu.com> Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>
Diffstat (limited to 'arch/x86/kvm')
-rw-r--r--arch/x86/kvm/paging_tmpl.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/x86/kvm/paging_tmpl.h b/arch/x86/kvm/paging_tmpl.h
index e461f2393d85..efba353369e7 100644
--- a/arch/x86/kvm/paging_tmpl.h
+++ b/arch/x86/kvm/paging_tmpl.h
@@ -287,7 +287,7 @@ static void FNAME(update_pte)(struct kvm_vcpu *vcpu, struct kvm_mmu_page *sp,
287 * vcpu->arch.update_pte.pfn was fetched from get_user_pages(write = 1). 287 * vcpu->arch.update_pte.pfn was fetched from get_user_pages(write = 1).
288 */ 288 */
289 mmu_set_spte(vcpu, spte, sp->role.access, pte_access, 0, 0, 289 mmu_set_spte(vcpu, spte, sp->role.access, pte_access, 0, 0,
290 gpte & PT_DIRTY_MASK, NULL, PT_PAGE_TABLE_LEVEL, 290 is_dirty_gpte(gpte), NULL, PT_PAGE_TABLE_LEVEL,
291 gpte_to_gfn(gpte), pfn, true, true); 291 gpte_to_gfn(gpte), pfn, true, true);
292} 292}
293 293
@@ -319,7 +319,7 @@ static u64 *FNAME(fetch)(struct kvm_vcpu *vcpu, gva_t addr,
319 mmu_set_spte(vcpu, sptep, access, 319 mmu_set_spte(vcpu, sptep, access,
320 gw->pte_access & access, 320 gw->pte_access & access,
321 user_fault, write_fault, 321 user_fault, write_fault,
322 gw->ptes[gw->level-1] & PT_DIRTY_MASK, 322 is_dirty_gpte(gw->ptes[gw->level-1]),
323 ptwrite, level, 323 ptwrite, level,
324 gw->gfn, pfn, false, true); 324 gw->gfn, pfn, false, true);
325 break; 325 break;