From mboxrd@z Thu Jan 1 00:00:00 1970 From: Paolo Bonzini Subject: Re: [PATCH v3 07/11] KVM: page track: add notifier support Date: Tue, 23 Feb 2016 15:16:25 +0100 Message-ID: <56CC69B9.3050005@redhat.com> References: <1455449503-20993-1-git-send-email-guangrong.xiao@linux.intel.com> <1455449503-20993-8-git-send-email-guangrong.xiao@linux.intel.com> <56C701DC.40904@redhat.com> <56CBE14C.1060305@linux.intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: gleb@kernel.org, mtosatti@redhat.com, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, kai.huang@linux.intel.com, jike.song@intel.com To: Xiao Guangrong Return-path: In-Reply-To: <56CBE14C.1060305@linux.intel.com> Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 23/02/2016 05:34, Xiao Guangrong wrote: >> >> A kvm_vcpu_mark_page_dirty is missing here, isn't it? I can take care >> of it, but it would be great if you double-checked this. If so, that >> should be fixed in stable kernels too. > > No. It's already been handled in emulator_write_phys() -> > kvm_vcpu_write_guest() > -> kvm_vcpu_write_guest_page() -> __kvm_write_guest_page(). You're right... >> >> Can you add a kvm_vcpu_note_page_write(vcpu, gpa, val, bytes) function >> that takes care of calling kvm_vcpu_mark_page_dirty, kvm_mmu_pte_write >> and kvm_page_track-write? >> > > After this patchset, kvm_mmu_pte_write is only a static notifier > callback called > by kvm_page_track_write(). > > And the dirty tracking in emulator_write_phys() is handled in a public > API (as my > explanation above), in emulator_cmpxchg_emulated is handled by itself. > So i think > it is better to leaving dirty tracking to the separate paths, no? :) ... and here it is indeed better to leave things as they are in v3. Thanks, Paolo