On Mon, Oct 21, 2024 at 11:08:49AM -0700, Sean Christopherson wrote: > On Mon, Oct 21, 2024, Yan Zhao wrote: > > On Thu, Oct 10, 2024 at 11:23:21AM -0700, Sean Christopherson wrote: > > > --- a/virt/kvm/pfncache.c > > > +++ b/virt/kvm/pfncache.c > > > @@ -159,6 +159,12 @@ static kvm_pfn_t hva_to_pfn_retry(struct > > > gfn_to_pfn_cache *gpc) > > > kvm_pfn_t new_pfn = KVM_PFN_ERR_FAULT; > > > void *new_khva = NULL; > > > unsigned long mmu_seq; > > > + struct kvm_follow_pfn kfp = { > > > + .slot = gpc->memslot, > > > + .gfn = gpa_to_gfn(gpc->gpa), > > > + .flags = FOLL_WRITE, > > > + .hva = gpc->uhva, > > > + }; > > Is .map_writable uninitialized? > > Nope, per C99, "subobjects without explicit initializers are initialized to > zero", > i.e. map_writable is initialized to "false". Ah, thanks, good to know that!
- [PATCH v13 12/85] KVM: Drop @atomic param from gfn=>... Sean Christopherson
- [PATCH v13 13/85] KVM: Annotate that all paths in hva_... Sean Christopherson
- [PATCH v13 14/85] KVM: Return ERR_SIGPENDING from hva_... Sean Christopherson
- [PATCH v13 15/85] KVM: Drop extra GUP (via check_user_... Sean Christopherson
- [PATCH v13 16/85] KVM: Replace "async" point... Sean Christopherson
- [PATCH v13 17/85] KVM: x86/mmu: Drop kvm_page_fault.hv... Sean Christopherson
- [PATCH v13 18/85] KVM: Drop unused "hva" poi... Sean Christopherson
- [PATCH v13 19/85] KVM: Introduce kvm_follow_pfn() to e... Sean Christopherson
- Re: [PATCH v13 19/85] KVM: Introduce kvm_follow_p... Yan Zhao
- Re: [PATCH v13 19/85] KVM: Introduce kvm_foll... Sean Christopherson
- Re: [PATCH v13 19/85] KVM: Introduce kvm_... Yan Zhao
- [PATCH v13 20/85] KVM: Remove pointless sanity check o... Sean Christopherson
- [PATCH v13 21/85] KVM: Explicitly initialize all field... Sean Christopherson
- [PATCH v13 22/85] KVM: Use NULL for struct page pointe... Sean Christopherson
- [PATCH v13 23/85] KVM: nVMX: Rely on kvm_vcpu_unmap() ... Sean Christopherson
- [PATCH v13 24/85] KVM: nVMX: Drop pointless msr_bitmap... Sean Christopherson
- [PATCH v13 25/85] KVM: nVMX: Add helper to put (unmap)... Sean Christopherson
- [PATCH v13 26/85] KVM: Use plain "struct page&quo... Sean Christopherson
- [PATCH v13 27/85] KVM: Provide refcounted page as outp... Sean Christopherson
- [PATCH v13 28/85] KVM: Move kvm_{set,release}_page_{cl... Sean Christopherson
- [PATCH v13 29/85] KVM: pfncache: Precisely track refco... Sean Christopherson