From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Tosatti Subject: Re: [PATCH v8 09/15] ARM: KVM: Memory virtualization setup Date: Thu, 28 Jun 2012 19:34:33 -0300 Message-ID: <20120628223433.GC7767@amt.cnet> References: <20120615190553.24590.18391.stgit@ubuntu> <20120615190822.24590.25657.stgit@ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: android-virt@lists.cs.columbia.edu, kvm@vger.kernel.org To: Christoffer Dall Return-path: Received: from mx1.redhat.com ([209.132.183.28]:50173 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755708Ab2F1Wkm (ORCPT ); Thu, 28 Jun 2012 18:40:42 -0400 Content-Disposition: inline In-Reply-To: <20120615190822.24590.25657.stgit@ubuntu> Sender: kvm-owner@vger.kernel.org List-ID: On Fri, Jun 15, 2012 at 03:08:22PM -0400, Christoffer Dall wrote: > From: Christoffer Dall > > This commit introduces the framework for guest memory management > through the use of 2nd stage translation. Each VM has a pointer > to a level-1 table (the pgd field in struct kvm_arch) which is > used for the 2nd stage translations. Entries are added when handling > guest faults (later patch) and the table itself can be allocated and > freed through the following functions implemented in > arch/arm/kvm/arm_mmu.c: > - kvm_alloc_stage2_pgd(struct kvm *kvm); > - kvm_free_stage2_pgd(struct kvm *kvm); > > Further, each entry in TLBs and caches are tagged with a VMID > identifier in addition to ASIDs. The VMIDs are assigned consecutively > to VMs in the order that VMs are executed, and caches and tlbs are > invalidated when the VMID space has been used to allow for more than > 255 simultaenously running guests. > > The 2nd stage pgd is allocated in kvm_arch_init_vm(). The table is > freed in kvm_arch_destroy_vm(). Both functions are called from the main > KVM code. > > Signed-off-by: Christoffer Dall Can you explain on a high level how the IPA -> PA mappings work?