On Tue, Aug 17, 2021 at 6:00 AM Paolo Bonzini <pbonzini@xxxxxxxxxx> wrote: > > On 13/08/21 22:35, David Matlack wrote: > > - if (is_writable_pte(new_spte) && !is_writable_pte(old_spte)) { > > - /* > > - * The gfn of direct spte is stable since it is > > - * calculated by sp->gfn. > > - */ > > - gfn = kvm_mmu_page_get_gfn(sp, sptep - sp->spt); > > - kvm_vcpu_mark_page_dirty(vcpu, gfn); > > - } > > + if (is_writable_pte(new_spte) && !is_writable_pte(old_spte)) > > + mark_page_dirty_in_slot(vcpu->kvm, fault->slot, fault->gfn); > > Oops, this actually needs kvm_vcpu_mark_page_dirty to receive the slot. What do you mean? kvm_vcpu_mark_page_dirty ultimately just calls mark_page_dirty_in_slot. > > Paolo >