diff mbox series

[2/3] KVM: uapi: Remove KVM_DEV_TYPE_ARM_PV_TIME in kvm_device_type

Message ID 20200817033729.10848-3-zhukeqian1@huawei.com (mailing list archive)
State New, archived
Headers show
Series KVM: arm64: Some fixes and code adjustments for pvtime ST | expand

Commit Message

zhukeqian Aug. 17, 2020, 3:37 a.m. UTC
ARM64 PV-time ST is configured by userspace through vCPU attribute,
and KVM_DEV_TYPE_ARM_PV_TIME is unused.

Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
---
 include/uapi/linux/kvm.h       | 2 --
 tools/include/uapi/linux/kvm.h | 2 --
 2 files changed, 4 deletions(-)

Comments

Marc Zyngier Aug. 17, 2020, 7:39 a.m. UTC | #1
On 2020-08-17 04:37, Keqian Zhu wrote:
> ARM64 PV-time ST is configured by userspace through vCPU attribute,
> and KVM_DEV_TYPE_ARM_PV_TIME is unused.
> 
> Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
> ---
>  include/uapi/linux/kvm.h       | 2 --
>  tools/include/uapi/linux/kvm.h | 2 --
>  2 files changed, 4 deletions(-)
> 
> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
> index 4fdf303..9a6b97e 100644
> --- a/include/uapi/linux/kvm.h
> +++ b/include/uapi/linux/kvm.h
> @@ -1258,8 +1258,6 @@ enum kvm_device_type {
>  #define KVM_DEV_TYPE_ARM_VGIC_ITS	KVM_DEV_TYPE_ARM_VGIC_ITS
>  	KVM_DEV_TYPE_XIVE,
>  #define KVM_DEV_TYPE_XIVE		KVM_DEV_TYPE_XIVE
> -	KVM_DEV_TYPE_ARM_PV_TIME,
> -#define KVM_DEV_TYPE_ARM_PV_TIME	KVM_DEV_TYPE_ARM_PV_TIME
>  	KVM_DEV_TYPE_MAX,
>  };
> 
> diff --git a/tools/include/uapi/linux/kvm.h 
> b/tools/include/uapi/linux/kvm.h
> index 4fdf303..9a6b97e 100644
> --- a/tools/include/uapi/linux/kvm.h
> +++ b/tools/include/uapi/linux/kvm.h
> @@ -1258,8 +1258,6 @@ enum kvm_device_type {
>  #define KVM_DEV_TYPE_ARM_VGIC_ITS	KVM_DEV_TYPE_ARM_VGIC_ITS
>  	KVM_DEV_TYPE_XIVE,
>  #define KVM_DEV_TYPE_XIVE		KVM_DEV_TYPE_XIVE
> -	KVM_DEV_TYPE_ARM_PV_TIME,
> -#define KVM_DEV_TYPE_ARM_PV_TIME	KVM_DEV_TYPE_ARM_PV_TIME
>  	KVM_DEV_TYPE_MAX,
>  };

No. You can't drop anything from UAPI, used or not. Doing so will
break the compilation of any userspace that, for any reason, references
this value. We cannot reuse this value in the future either, as it would
create a we wouldn't know which device to create.

It is pretty unfortunate that PV time has turned into such a train 
wreck,
but that's what we have now, and it has to stay.

         M.
zhukeqian Aug. 17, 2020, 8:43 a.m. UTC | #2
Hi Marc,

On 2020/8/17 15:39, Marc Zyngier wrote:
> On 2020-08-17 04:37, Keqian Zhu wrote:
>> ARM64 PV-time ST is configured by userspace through vCPU attribute,
>> and KVM_DEV_TYPE_ARM_PV_TIME is unused.
>>
>> Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
>> ---
>>  include/uapi/linux/kvm.h       | 2 --
>>  tools/include/uapi/linux/kvm.h | 2 --
>>  2 files changed, 4 deletions(-)
>>
>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
>> index 4fdf303..9a6b97e 100644
>> --- a/include/uapi/linux/kvm.h
>> +++ b/include/uapi/linux/kvm.h
>> @@ -1258,8 +1258,6 @@ enum kvm_device_type {
>>  #define KVM_DEV_TYPE_ARM_VGIC_ITS    KVM_DEV_TYPE_ARM_VGIC_ITS
>>      KVM_DEV_TYPE_XIVE,
>>  #define KVM_DEV_TYPE_XIVE        KVM_DEV_TYPE_XIVE
>> -    KVM_DEV_TYPE_ARM_PV_TIME,
>> -#define KVM_DEV_TYPE_ARM_PV_TIME    KVM_DEV_TYPE_ARM_PV_TIME
>>      KVM_DEV_TYPE_MAX,
>>  };
>>
>> diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
>> index 4fdf303..9a6b97e 100644
>> --- a/tools/include/uapi/linux/kvm.h
>> +++ b/tools/include/uapi/linux/kvm.h
>> @@ -1258,8 +1258,6 @@ enum kvm_device_type {
>>  #define KVM_DEV_TYPE_ARM_VGIC_ITS    KVM_DEV_TYPE_ARM_VGIC_ITS
>>      KVM_DEV_TYPE_XIVE,
>>  #define KVM_DEV_TYPE_XIVE        KVM_DEV_TYPE_XIVE
>> -    KVM_DEV_TYPE_ARM_PV_TIME,
>> -#define KVM_DEV_TYPE_ARM_PV_TIME    KVM_DEV_TYPE_ARM_PV_TIME
>>      KVM_DEV_TYPE_MAX,
>>  };
> 
> No. You can't drop anything from UAPI, used or not. Doing so will
> break the compilation of any userspace that, for any reason, references
> this value. We cannot reuse this value in the future either, as it would
> create a we wouldn't know which device to create.
> 
> It is pretty unfortunate that PV time has turned into such a train wreck,
> but that's what we have now, and it has to stay.
Well, I see. It is a sad thing indeed.

Thanks,
Keqian
Steven Price Aug. 17, 2020, 9:49 a.m. UTC | #3
On 17/08/2020 09:43, zhukeqian wrote:
> Hi Marc,
> 
> On 2020/8/17 15:39, Marc Zyngier wrote:
>> On 2020-08-17 04:37, Keqian Zhu wrote:
>>> ARM64 PV-time ST is configured by userspace through vCPU attribute,
>>> and KVM_DEV_TYPE_ARM_PV_TIME is unused.
>>>
>>> Signed-off-by: Keqian Zhu <zhukeqian1@huawei.com>
>>> ---
>>>   include/uapi/linux/kvm.h       | 2 --
>>>   tools/include/uapi/linux/kvm.h | 2 --
>>>   2 files changed, 4 deletions(-)
>>>
>>> diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
>>> index 4fdf303..9a6b97e 100644
>>> --- a/include/uapi/linux/kvm.h
>>> +++ b/include/uapi/linux/kvm.h
>>> @@ -1258,8 +1258,6 @@ enum kvm_device_type {
>>>   #define KVM_DEV_TYPE_ARM_VGIC_ITS    KVM_DEV_TYPE_ARM_VGIC_ITS
>>>       KVM_DEV_TYPE_XIVE,
>>>   #define KVM_DEV_TYPE_XIVE        KVM_DEV_TYPE_XIVE
>>> -    KVM_DEV_TYPE_ARM_PV_TIME,
>>> -#define KVM_DEV_TYPE_ARM_PV_TIME    KVM_DEV_TYPE_ARM_PV_TIME
>>>       KVM_DEV_TYPE_MAX,
>>>   };
>>>
>>> diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
>>> index 4fdf303..9a6b97e 100644
>>> --- a/tools/include/uapi/linux/kvm.h
>>> +++ b/tools/include/uapi/linux/kvm.h
>>> @@ -1258,8 +1258,6 @@ enum kvm_device_type {
>>>   #define KVM_DEV_TYPE_ARM_VGIC_ITS    KVM_DEV_TYPE_ARM_VGIC_ITS
>>>       KVM_DEV_TYPE_XIVE,
>>>   #define KVM_DEV_TYPE_XIVE        KVM_DEV_TYPE_XIVE
>>> -    KVM_DEV_TYPE_ARM_PV_TIME,
>>> -#define KVM_DEV_TYPE_ARM_PV_TIME    KVM_DEV_TYPE_ARM_PV_TIME
>>>       KVM_DEV_TYPE_MAX,
>>>   };
>>
>> No. You can't drop anything from UAPI, used or not. Doing so will
>> break the compilation of any userspace that, for any reason, references
>> this value. We cannot reuse this value in the future either, as it would
>> create a we wouldn't know which device to create.
>>
>> It is pretty unfortunate that PV time has turned into such a train wreck,
>> but that's what we have now, and it has to stay.
> Well, I see. It is a sad thing indeed.

Sorry about that, this got refactored so many times I guess I lost track 
of what was actually needed and this hunk remained when it should have 
been removed.

I would hope that I'm the only one who has any userspace code which uses 
this, but I guess we should still be cautious since this has been in 
several releases now.

Steve
zhukeqian Aug. 17, 2020, 10:56 a.m. UTC | #4
Hi Steven,

On 2020/8/17 17:49, Steven Price wrote:
> On 17/08/2020 09:43, zhukeqian wrote:
>> Hi Marc,
>>
[...]
>>>
>>> It is pretty unfortunate that PV time has turned into such a train wreck,
>>> but that's what we have now, and it has to stay.
>> Well, I see. It is a sad thing indeed.
> 
> Sorry about that, this got refactored so many times I guess I lost track of what was actually needed and this hunk remained when it should have been removed.
> 
It's fine :-) , not a serious problem.
> I would hope that I'm the only one who has any userspace code which uses this, but I guess we should still be cautious since this has been in several releases now.
> 
OK. For insurance purposes, we ought to ignore this patch to avoid breaking any user-space program.
> Steve
> .
Thanks,
Keqian
>
diff mbox series

Patch

diff --git a/include/uapi/linux/kvm.h b/include/uapi/linux/kvm.h
index 4fdf303..9a6b97e 100644
--- a/include/uapi/linux/kvm.h
+++ b/include/uapi/linux/kvm.h
@@ -1258,8 +1258,6 @@  enum kvm_device_type {
 #define KVM_DEV_TYPE_ARM_VGIC_ITS	KVM_DEV_TYPE_ARM_VGIC_ITS
 	KVM_DEV_TYPE_XIVE,
 #define KVM_DEV_TYPE_XIVE		KVM_DEV_TYPE_XIVE
-	KVM_DEV_TYPE_ARM_PV_TIME,
-#define KVM_DEV_TYPE_ARM_PV_TIME	KVM_DEV_TYPE_ARM_PV_TIME
 	KVM_DEV_TYPE_MAX,
 };
 
diff --git a/tools/include/uapi/linux/kvm.h b/tools/include/uapi/linux/kvm.h
index 4fdf303..9a6b97e 100644
--- a/tools/include/uapi/linux/kvm.h
+++ b/tools/include/uapi/linux/kvm.h
@@ -1258,8 +1258,6 @@  enum kvm_device_type {
 #define KVM_DEV_TYPE_ARM_VGIC_ITS	KVM_DEV_TYPE_ARM_VGIC_ITS
 	KVM_DEV_TYPE_XIVE,
 #define KVM_DEV_TYPE_XIVE		KVM_DEV_TYPE_XIVE
-	KVM_DEV_TYPE_ARM_PV_TIME,
-#define KVM_DEV_TYPE_ARM_PV_TIME	KVM_DEV_TYPE_ARM_PV_TIME
 	KVM_DEV_TYPE_MAX,
 };