Re: [PATCH v13 03/35] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-11-01 Thread Xu Yilun
On Fri, Oct 27, 2023 at 11:21:45AM -0700, Sean Christopherson wrote: > From: Chao Peng > > Currently in mmu_notifier invalidate path, hva range is recorded and > then checked against by mmu_notifier_retry_hva() in the page fault ^ should be mmu_invalidate_retry_hva().

Re: [PATCH v13 03/35] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-10-30 Thread David Matlack
On Mon, Oct 30, 2023 at 10:01 AM Paolo Bonzini wrote: > > On Mon, Oct 30, 2023 at 5:53 PM David Matlack wrote: > > > > On 2023-10-27 11:21 AM, Sean Christopherson wrote: > > > From: Chao Peng > > > > > > Currently in mmu_notifier invalidate path, hva range is recorded and > > > then checked agai

Re: [PATCH v13 03/35] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-10-30 Thread David Matlack
On Mon, Oct 30, 2023 at 9:53 AM David Matlack wrote: > > On 2023-10-27 11:21 AM, Sean Christopherson wrote: > > From: Chao Peng > > > > +void kvm_mmu_invalidate_range_add(struct kvm *kvm, gfn_t start, gfn_t end); > > What is the reason to separate range_add() from begin()? Nevermind, I see how i

Re: [PATCH v13 03/35] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-10-30 Thread Paolo Bonzini
On Mon, Oct 30, 2023 at 5:53 PM David Matlack wrote: > > On 2023-10-27 11:21 AM, Sean Christopherson wrote: > > From: Chao Peng > > > > Currently in mmu_notifier invalidate path, hva range is recorded and > > then checked against by mmu_notifier_retry_hva() in the page fault > > handling path. Ho

Re: [PATCH v13 03/35] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-10-30 Thread David Matlack
On 2023-10-27 11:21 AM, Sean Christopherson wrote: > From: Chao Peng > > Currently in mmu_notifier invalidate path, hva range is recorded and > then checked against by mmu_notifier_retry_hva() in the page fault > handling path. However, for the to be introduced private memory, a page

Re: [PATCH v13 03/35] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-10-30 Thread Paolo Bonzini
On 10/27/23 20:21, Sean Christopherson wrote: From: Chao Peng Currently in mmu_notifier invalidate path, hva range is recorded and then checked against by mmu_notifier_retry_hva() in the page fault handling path. However, for the to be introduced private memory, a page fault may not have a hva

[PATCH v13 03/35] KVM: Use gfn instead of hva for mmu_notifier_retry

2023-10-27 Thread Sean Christopherson
From: Chao Peng Currently in mmu_notifier invalidate path, hva range is recorded and then checked against by mmu_notifier_retry_hva() in the page fault handling path. However, for the to be introduced private memory, a page fault may not have a hva associated, checking gfn(gpa) makes more sense.