From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [PATCH v3 4/8] ARM: KVM: Memory virtualization setup Date: Sun, 05 Jun 2011 18:14:47 +0300 Message-ID: <4DEB9D67.1070301@redhat.com> References: <20110603150318.17011.82777.stgit@ubuntu> <20110603150346.17011.70545.stgit@ubuntu> <4DEB7995.1040604@redhat.com> <4DEB9858.7060905@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: catalin.marinas@arm.com, android-virt@lists.cs.columbia.edu, s.raho@virtualopensystems.com, a.motakis@virtualopensystems.com, kvm@vger.kernel.org, a.costa@virtualopensystems.com To: Christoffer Dall Return-path: Received: from mx1.redhat.com ([209.132.183.28]:17562 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752166Ab1FEPPJ (ORCPT ); Sun, 5 Jun 2011 11:15:09 -0400 In-Reply-To: <4DEB9858.7060905@redhat.com> Sender: kvm-owner@vger.kernel.org List-ID: On 06/05/2011 05:53 PM, Avi Kivity wrote: > On 06/05/2011 05:50 PM, Christoffer Dall wrote: >> On Sun, Jun 5, 2011 at 2:41 PM, Avi Kivity wrote: >> > On 06/03/2011 06:03 PM, Christoffer Dall wrote: >> >> >> >> Initializes a blank level-1 translation table for the second stage >> >> translation and handles freeing it as well. >> >> >> >> + start = (unsigned long)kvm, >> >> + end = start + sizeof(struct kvm); >> >> + ret = create_hyp_mappings(kvm_hyp_pgd, start, end); >> > >> > Why not map all GFP_KERNEL memory? >> > >> I wanted to only map things I was sure would be there and stay there >> so no assumptions were made about existing pages which could have been >> removed, since I don't handle aborts taken in the hypervisor itself. >> But, if it would be as safe to map all GFP_KERNEL memory and that also >> maps the necessary code segments, then we could do that. Do you feel >> it would me simpler/faster/easier? > > I think so - you wouldn't have to worry about dereferencing pointers > within the vcpu structure. Also, you could use huge pages for the mapping, yes? that should improve switching performance a bit. Can you run the host kernel in hypervisor mode? That may reduce switching time even further. -- error compiling committee.c: too many arguments to function