Messages in this thread | | | From | Arnd Bergmann <> | Subject | Re: [KVM timekeeping 30/35] IOCTL for setting TSC rate | Date | Sat, 21 Aug 2010 18:11:50 +0200 |
| |
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
| |