On 04.09.2012, at 07:48, Avi Kivity <avi@xxxxxxxxxx> wrote: > On 09/03/2012 03:33 PM, Rusty Russell wrote: >> Avi Kivity <avi@xxxxxxxxxx> writes: >>> On 09/01/2012 03:35 PM, Rusty Russell wrote: >>>> Passing an address in a struct is pretty bad, since it involves >>>> compatibility wrappers. >>> >>> Right, some s390 thing. >> >> Err, no, i386 on x86-64, or ppc32 on ppc64, or arm on arm64.... >> >> Any time you put a pointer in a structure which is exposed to userspace, >> you have to deal with this. > > 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. > >>>> 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... Alex -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html