From e5077a0d082b61c78f166072d8e9106f2ab09dfc Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Thu, 11 Oct 2007 15:30:21 +0200 Subject: [PATCH] --- yaml --- r: 80658 b: refs/heads/master c: c4fcc2724628c6548748ec80a90b548fc300e81f h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/kvm/paging_tmpl.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index f88050656c8c..dcf6a5c78e7d 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 5df34a86f917024b67f9e7c850153390973cdfe3 +refs/heads/master: c4fcc2724628c6548748ec80a90b548fc300e81f diff --git a/trunk/drivers/kvm/paging_tmpl.h b/trunk/drivers/kvm/paging_tmpl.h index a0f84a5379a4..a9e687b5c1e9 100644 --- a/trunk/drivers/kvm/paging_tmpl.h +++ b/trunk/drivers/kvm/paging_tmpl.h @@ -74,9 +74,14 @@ static void FNAME(update_dirty_bit)(struct kvm_vcpu *vcpu, pt_element_t *ptep, gfn_t table_gfn) { + gpa_t pte_gpa; + if (write_fault && !is_dirty_pte(*ptep)) { mark_page_dirty(vcpu->kvm, table_gfn); *ptep |= PT_DIRTY_MASK; + pte_gpa = ((gpa_t)table_gfn << PAGE_SHIFT); + pte_gpa += offset_in_page(ptep); + kvm_mmu_pte_write(vcpu, pte_gpa, (u8 *)ptep, sizeof(*ptep)); } }