From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xiao Guangrong Subject: Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed Date: Tue, 5 Jul 2016 09:19:40 +0800 Message-ID: <577B0B2C.8010300@linux.intel.com> References: <1467291711-3230-1-git-send-email-pbonzini@redhat.com> <577A049A.4000402@linux.intel.com> <20160704070314.GA13291@nvidia.com> <577A123F.1060909@linux.intel.com> <20160704075302.GA13470@nvidia.com> <577A1C08.1020509@linux.intel.com> <20160704084127.GA14638@nvidia.com> <577A2211.2030906@linux.intel.com> <20160704091609.GA14913@nvidia.com> <577A378E.3030103@linux.intel.com> <20160704153303.GA18357@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Kirti Wankhede , Andrea Arcangeli , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= To: Neo Jia Return-path: Received: from mga04.intel.com ([192.55.52.120]:51663 "EHLO mga04.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753476AbcGEBXZ (ORCPT ); Mon, 4 Jul 2016 21:23:25 -0400 In-Reply-To: <20160704153303.GA18357@nvidia.com> Sender: kvm-owner@vger.kernel.org List-ID: On 07/04/2016 11:33 PM, Neo Jia wrote: >>> >>> Sorry, I think I misread the "allocation" as "mapping". We only delay the >>> cpu mapping, not the allocation. >> >> So how to understand your statement: >> "at that moment nobody has any knowledge about how the physical mmio gets virtualized" >> >> The resource, physical MMIO region, has been allocated, why we do not know the physical >> address mapped to the VM? >> > >>>From a device driver point of view, the physical mmio region never gets allocated until > the corresponding resource is requested by clients and granted by the mediated device driver. Hmm... but you told me that you did not delay the allocation. :( So it returns to my original question: why not allocate the physical mmio region in mmap()?