From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rusty Russell Subject: Re: [PATCH v6 04/12] ARM: KVM: Hypervisor inititalization Date: Fri, 24 Feb 2012 14:30:38 +1030 Message-ID: <878vjs5195.fsf@rustcorp.com.au> References: <20120223073159.3266.45217.stgit@ubuntu> <20120223073239.3266.35994.stgit@ubuntu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: tech@virtualopensystems.com To: Christoffer Dall , android-virt@lists.cs.columbia.edu, kvm@vger.kernel.org Return-path: Received: from ozlabs.org ([203.10.76.45]:46687 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754817Ab2BXEIF (ORCPT ); Thu, 23 Feb 2012 23:08:05 -0500 In-Reply-To: <20120223073239.3266.35994.stgit@ubuntu> Sender: kvm-owner@vger.kernel.org List-ID: On Thu, 23 Feb 2012 02:32:39 -0500, Christoffer Dall wrote: > + /* > + * Allocate stack pages for Hypervisor-mode > + */ > + for_each_possible_cpu(cpu) > + per_cpu(kvm_arm_hyp_stack_page, cpu) = NULL; This is weird; we can't call this init function multiple times without reloading the module. > + for_each_possible_cpu(cpu) { > + void *stack_page; > + > + stack_page = (void *)__get_free_page(GFP_KERNEL); Actually, if you change kvm_arm_hyp_stack_page to an unsigned long, and your mapping functions to take unsigned long too, you can avoid many casts. Cheers, Rusty.