On Wed, Sep 21, 2022, Michal Luczaj wrote: > diff --git a/include/linux/kvm_host.h b/include/linux/kvm_host.h > index f4519d3689e1..9fd67026d91a 100644 > --- a/include/linux/kvm_host.h > +++ b/include/linux/kvm_host.h > @@ -1241,8 +1241,17 @@ int kvm_vcpu_write_guest(struct kvm_vcpu *vcpu, gpa_t gpa, const void *data, > void kvm_vcpu_mark_page_dirty(struct kvm_vcpu *vcpu, gfn_t gfn); > > /** > - * kvm_gfn_to_pfn_cache_init - prepare a cached kernel mapping and HPA for a > - * given guest physical address. > + * kvm_gpc_init - initialize gfn_to_pfn_cache. > + * > + * @gpc: struct gfn_to_pfn_cache object. > + * > + * This sets up a gfn_to_pfn_cache by initializing locks. I think it makes sense to add a blurb calling out that the cache needs to be zeroed before init, i.e. needs to be zero-allocated. I'll add it in v2.