From: Paolo Bonzini Subject: Re: [PATCH v4 05/14] KVM: Introduce a new guest mapping API Date: Wed, 19 Dec 2018 22:26:02 +0100 Message-ID: <52811828-5c54-6b16-b8ae-e3fc6fea12a3@redhat.com> References: <1543829467-18025-1-git-send-email-karahmed@amazon.de> <1543829467-18025-6-git-send-email-karahmed@amazon.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit To: KarimAllah Ahmed , rkrcmar@redhat.com, linux-kernel@vger.kernel.org, kvm@vger.kernel.org, jmattson@google.com Return-path: In-Reply-To: <1543829467-18025-6-git-send-email-karahmed@amazon.de> Content-Language: en-US Sender: linux-kernel-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 03/12/18 10:30, KarimAllah Ahmed wrote: > +void kvm_vcpu_unmap(struct kvm_host_map *map) This probably needs to come in two versions, dirty and clean. I'll do the adjustment when I queue this for 4.22. Thanks, Paolo > +{ > + if (!map->hva) > + return; > + > + if (map->page) > + kunmap(map->page); > + else > + memunmap(map->hva); > + > + kvm_release_pfn_dirty(map->pfn); > + map->hva = NULL; > +} > +EXPORT_SYMBOL_GPL(kvm_vcpu_unmap); > +