On Tue, Jan 03, 2023 at 09:19:01PM +0000, Sean Christopherson wrote: > On Wed, Dec 28, 2022, Yan Zhao wrote: > > On Fri, Dec 23, 2022 at 12:57:38AM +0000, Sean Christopherson wrote: > > > +bool kvm_page_track_is_valid_gfn(struct kvm *kvm, gfn_t gfn) > > > +{ > > > + bool ret; > > > + int idx; > > > + > > > + idx = srcu_read_lock(&kvm->srcu); > > > + ret = kvm_is_visible_gfn(kvm, gfn); > > > + srcu_read_unlock(&kvm->srcu, idx); > > > + > > > + return ret; > > > +} > > > +EXPORT_SYMBOL_GPL(kvm_page_track_is_valid_gfn); > > This implementation is only to check whether a GFN is within a visible > > kvm memslot. So, why this helper function is named kvm_page_track_xxx()? > > Don't think it's anything related to page track, and not all of its callers > > in KVMGT are for page tracking. > > KVMGT is the only user of kvm_page_track_is_valid_gfn(). kvm_is_visible_gfn() > has other users, just not in x86. And long term, my goal is to allow building > KVM x86 without any exports. Killing off KVM's "internal" (for vendor > modules) > exports for select Kconfigs is easy enough, add adding a dedicated page-track > API > solves the KVMGT angle. Understand! But personally, I don't like merging this API into page-track API as it obviously has nothing to do with page-track stuffs, and KVMGT also calls it for non-page-track purpuse.
- Re: [Intel-gfx] [PATCH 19/27] KVM: x86/mmu: Use p... Yan Zhao
- Re: [Intel-gfx] [PATCH 19/27] KVM: x86/mmu: U... Sean Christopherson
- [Intel-gfx] [PATCH 24/27] KVM: x86/mmu: Drop @slot par... Sean Christopherson
- [Intel-gfx] [PATCH 23/27] KVM: x86/mmu: Bug the VM if ... Sean Christopherson
- [Intel-gfx] [PATCH 17/27] KVM: x86: Remove the unused ... Sean Christopherson
- [Intel-gfx] [PATCH 22/27] KVM: x86/mmu: Assert that co... Sean Christopherson
- [Intel-gfx] [PATCH 25/27] KVM: x86/mmu: Handle KVM boo... Sean Christopherson
- [Intel-gfx] [PATCH 26/27] KVM: x86/mmu: Add page-track... Sean Christopherson
- Re: [Intel-gfx] [PATCH 26/27] KVM: x86/mmu: Add p... Yan Zhao
- Re: [Intel-gfx] [PATCH 26/27] KVM: x86/mmu: A... Sean Christopherson
- Re: [Intel-gfx] [PATCH 26/27] KVM: x86/mm... Yan Zhao
- Re: [Intel-gfx] [PATCH 26/27] KVM: x8... Sean Christopherson
- [Intel-gfx] [PATCH 14/27] drm/i915/gvt: Don't bother r... Sean Christopherson
- [Intel-gfx] [PATCH 27/27] drm/i915/gvt: Drop final dep... Sean Christopherson
- [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: K... Patchwork
- Re: [Intel-gfx] [PATCH 00/27] drm/i915/gvt: KVM: KVMGT... Yan Zhao
- Re: [Intel-gfx] [PATCH 00/27] drm/i915/gvt: KVM: ... Sean Christopherson
- [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: K... Patchwork
- [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: K... Patchwork
- [Intel-gfx] ✗ Fi.CI.BUILD: failure for drm/i915/gvt: K... Patchwork