From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marc Zyngier Subject: Re: [PATCH 06/15] KVM: ARM: Initial skeleton to compile KVM support Date: Thu, 27 Sep 2012 15:39:10 +0100 Message-ID: <5064650E.2090009@arm.com> References: <20120915153359.21241.86002.stgit@ubuntu> <20120915153508.21241.47712.stgit@ubuntu> <20120925152055.GC28728@mudshark.cambridge.arm.com> <50625DB2.4000700@virtualopensystems.com> <20120927141314.GK25916@mudshark.cambridge.arm.com> Mime-Version: 1.0 Content-Type: text/plain; charset=WINDOWS-1252 Content-Transfer-Encoding: 8BIT Cc: Christoffer Dall , "kvm@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "kvmarm@lists.cs.columbia.edu" , "rusty.russell@linaro.org" , "avi@redhat.com" To: Will Deacon Return-path: Received: from service87.mimecast.com ([91.220.42.44]:41357 "EHLO service87.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751347Ab2I0OjO convert rfc822-to-8bit (ORCPT ); Thu, 27 Sep 2012 10:39:14 -0400 In-Reply-To: <20120927141314.GK25916@mudshark.cambridge.arm.com> Sender: kvm-owner@vger.kernel.org List-ID: On 27/09/12 15:13, Will Deacon wrote: > On Wed, Sep 26, 2012 at 02:43:14AM +0100, Christoffer Dall wrote: >> On 09/25/2012 11:20 AM, Will Deacon wrote: >>> >>>> +static inline u32 *vcpu_pc(struct kvm_vcpu *vcpu) >>>> +{ >>>> + return vcpu_reg(vcpu, 15); >>>> +} >>> >>> If you stick a struct pt_regs into struct kvm_regs, you could reuse ARM_pc >>> here etc. >>> >> >> I prefer not to, because we'd have those registers presumably for usr >> mode and then we only define the others explicit. I think it's much >> clearer to look at kvm_regs today. > > I disagree and think that you should reuse as much of the arch/arm/ code as > possible. Not only does it make it easier to read by people who are familiar > with that code (and in turn get you more reviewers) but it also means that > we limit the amount of duplication that we have. > > I think Marc (CC'd) had a go at this with some success. Yup, I have it converted already. It requires a number of changes, but I took this opportunity to do some other cleanup (world switch save/restore code, mostly). Patches are at the top of mu kvm-cleanup branch. M. -- Jazz is not dead. It just smells funny...