From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754178AbcGEBX3 (ORCPT ); Mon, 4 Jul 2016 21:23:29 -0400 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 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.26,577,1459839600"; d="scan'208";a="1010935245" Subject: Re: [PATCH 0/2] KVM: MMU: support VMAs that got remap_pfn_range-ed To: Neo Jia 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> Cc: Paolo Bonzini , linux-kernel@vger.kernel.org, kvm@vger.kernel.org, Kirti Wankhede , Andrea Arcangeli , =?UTF-8?B?UmFkaW0gS3LEjW3DocWZ?= From: Xiao Guangrong Message-ID: <577B0B2C.8010300@linux.intel.com> Date: Tue, 5 Jul 2016 09:19:40 +0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.8.0 MIME-Version: 1.0 In-Reply-To: <20160704153303.GA18357@nvidia.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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()?