Re: [PATCH 5/5] HPET interaction with in-kernel PIT (v6)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Avi Kivity wrote:
> Jan Kiszka wrote:
>>>>  
>>>>  struct kvm_pit_state {
>>>>      struct kvm_pit_channel_state channels[3];
>>>> +    u8 hpet_legacy_mode;
>>>>  };
>>>>         
>>> This changes the ABI, breaking older binaries running on newer kernels,
>>> or newer binaries running on older kernels.
>>>     
>>
>> As we have KVM_CREATE_PIT2 now, which includes struct kvm_pit_config
>> with a lot of unused flags, it should be straightforward to negotiate
>> the kvm_pit_state format between kernel and user space: kernel
>> advertises support for the new one via capability, user space requests
>> it via a bit in kvm_pit_state.flags.
>>   
> 
> We still need a new ioctl.  The structure size is embedded in the ioctl
> number, so any additions automatically cause version mismatches.
> 
> I sent patches some time ago to have the kernel automatically adjust for
> this, but they weren't well received.

Unfortunate. But on the one hand, nothing technically prevents defining
the IOCTL base on existing kvm_pit_state, but passing down extended
kvm_pit_state2 if that negotiation took place. On the other hand, we are
not yet running out of IOCTL numbers...

However, I guess kvm_pit_state2 will also need some flags field and a
bit tail room for potential future extensions.

Jan

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux