From mboxrd@z Thu Jan 1 00:00:00 1970 From: Scott Wood Subject: Re: [PATCH 07/50] KVM: PPC: Add generic single register ioctls Date: Thu, 5 Jan 2012 14:53:34 -0600 Message-ID: <4F060DCE.8070802@freescale.com> References: <1325639448-9494-1-git-send-email-agraf@suse.de> <1325639448-9494-8-git-send-email-agraf@suse.de> <4F04B1C9.6000907@freescale.com> <5EB44EDD-B037-46E1-AFF4-677DE3C27822@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: Sender: kvm-ppc-owner@vger.kernel.org List-Id: kvm.vger.kernel.org On 01/04/2012 10:07 PM, Alexander Graf wrote: > Ok here's another idea on how to handle this. What if we encode the > register size in the constant? That way, if the register grows later, > we can still be backwards compatible, but give user space exactly the > size it asks for. > > We could then just take a void* from user space and merely c_t_u and c_f_u the value in exactly the size defined by the constant. > Later, for MANY_REGS we could then just take a list of registers and write a bytestream of results to a user pointer. > > That should be a lot easier and efficient than an interface that treats everything as u64. OK. > Alex > >> >> Btw, any reason you're only bringing up these really great ideas on my 2nd pull request after these patches were uncommented on the ML for quite a while? :) Sorry about that -- I was trying to focus on getting e500mc patches out before vacation (and various other distractions), and missed looking at the patch itself the first time around. -Scott