From mboxrd@z Thu Jan 1 00:00:00 1970 From: Avi Kivity Subject: Re: [RFC 0/5] Making KVM_GET_ONE_REG/KVM_SET_ONE_REG generic. Date: Thu, 06 Sep 2012 17:44:45 +0300 Message-ID: <5048B6DD.1020108@redhat.com> References: <877gsia8rm.fsf@rustcorp.com.au> <87mx1dsfuc.fsf@rustcorp.com.au> <5041D3AE.6090804@redhat.com> <873931539z.fsf@rustcorp.com.au> <5044765A.30702@redhat.com> <87wr0b2smh.fsf@rustcorp.com.au> <5045EA77.5060407@redhat.com> <5FAB9986-A743-451A-AE04-CA049E776F1D@suse.de> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Rusty Russell , Rusty Russell , Peter Maydell , Christoffer Dall , "kvmarm@lists.cs.columbia.edu" , kvm-devel To: Alexander Graf Return-path: Received: from mx1.redhat.com ([209.132.183.28]:33232 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756169Ab2IFOpF (ORCPT ); Thu, 6 Sep 2012 10:45:05 -0400 In-Reply-To: <5FAB9986-A743-451A-AE04-CA049E776F1D@suse.de> Sender: kvm-owner@vger.kernel.org List-ID: On 09/04/2012 04:59 PM, Alexander Graf wrote: >> >> Not is you pack the pointer in a __u64, which is what we do to preserve >> padding. Then it is only s390 which needs extra love. > > I doubt that anyone wants to run 31-bit user space on an s390x system. In fact, I wouldn't be surprised if exactly that case is broken already. Arnd sent patches to fix it long ago. Of course, something else may be broken. > >> >>>>> I don't think that is what makes the API hard >>>>> to use. >>>> >>>> What is it then? I forgot what the original complaints/complainers were. >>> >>> I have no idea, since I didn't hear the complaints. But any non-fixed >>> size array has issues in C; there's not much we can do about it. >>> >>> x86 manages this fine for msrs, and I didn't have a problem using it for >>> my test programs. That's the limit of my experience, however. >> >> Another option is to use the size parameter from the ioctl. It just >> sits there doing nothing. > > It would require quite a bunch of changes throughout the stack. Even in user space, like strace... I'm sure strace could cope. I once had a proposal for extensible ioctl using the size parameter. You want to extend an ioctl, the kernel zero-extends the input struct for you, and truncates it on the way back. -- error compiling committee.c: too many arguments to function