lkml.org 
[lkml]   [2010]   [Aug]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [KVM timekeeping 30/35] IOCTL for setting TSC rate
Date
On Friday 20 August 2010 19:56:20 Glauber Costa wrote:
> > @@ -675,6 +676,9 @@ struct kvm_clock_data {
> > #define KVM_SET_PIT2 _IOW(KVMIO, 0xa0, struct kvm_pit_state2)
> > /* Available with KVM_CAP_PPC_GET_PVINFO */
> > #define KVM_PPC_GET_PVINFO _IOW(KVMIO, 0xa1, struct kvm_ppc_pvinfo)
> > +/* Available with KVM_CAP_SET_TSC_RATE */
> > +#define KVM_X86_GET_TSC_RATE _IOR(KVMIO, 0xa2, __u32)
> > +#define KVM_X86_SET_TSC_RATE _IOW(KVMIO, 0xa3, __u32)
>
> wrap this into a struct?

I don't think that would improve the code. Generally, we try to *avoid* using
structs in ioctl arguments, although KVM does have a precedent of using structs
there.

In fact, the code here could be simplified by using get_user/put_user on the
simple argument, which would not be possibly with a struct.

Arnd


\
 
 \ /
  Last update: 2010-08-21 18:15    [W:0.416 / U:0.068 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site