From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 08/50] KVM: PPC: Add support for explicit HIOR setting Date: Thu, 5 Jan 2012 11:16:15 -0600 Message-ID: <4F05DADF.4010403@freescale.com> References: <1325639448-9494-1-git-send-email-agraf@suse.de> <1325639448-9494-9-git-send-email-agraf@suse.de> <4F04B2AD.9060404@freescale.com> <8CF5DEF6-1200-41A4-B6C5-8C7AE68B2615@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7bit Cc: , kvm list , Avi Kivity , Marcelo Tosatti To: Alexander Graf Return-path: In-Reply-To: <8CF5DEF6-1200-41A4-B6C5-8C7AE68B2615@suse.de> Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 01/04/2012 08:36 PM, Alexander Graf wrote: > > On 04.01.2012, at 21:12, Scott Wood wrote: > >> On 01/03/2012 07:10 PM, Alexander Graf wrote: >>> diff --git a/arch/powerpc/include/asm/kvm.h b/arch/powerpc/include/asm/kvm.h >>> index 25964ee..fb3fddc 100644 >>> --- a/arch/powerpc/include/asm/kvm.h >>> +++ b/arch/powerpc/include/asm/kvm.h >>> @@ -327,4 +327,6 @@ struct kvm_book3e_206_tlb_params { >>> __u32 reserved[8]; >>> }; >>> >>> +#define KVM_ONE_REG_PPC_HIOR KVM_ONE_REG_PPC | 0x100 >> >> Where does 0x100 come from? > > I quite frankly don't remember :). This could just as well be 0 or 1. > >> There should probaly be some structure to the register space, with a >> subarch field distinguishing between "common SPR", "book3s SPR", "book3e >> SPR", along with others for non-SPR registers, KVM inventions, etc. > > Not sure we really need this. I would very much prefer to just always > use the textual representation. What would we do if something book3s > specific suddenly becomes generic (like Altivec for example, or > FPU)? Good point... A plain enumeration should be fine. 0x100 was strange enough that it left me wondering what the value should be for the next register to be added -- I didn't want it to turn into something like the booke regs->trap mess, where some exceptions re-use the classic offsets, and other exceptions have numbers that seem to be pulled from out of nowhere. -Scott