lkml.org 
[lkml]   [2020]   [Feb]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v2] KVM: X86: deprecate obsolete KVM_GET_CPUID2 ioctl
Date
Vitaly Kuznetsov <vkuznets@redhat.com> writes:
>linmiaohe <linmiaohe@huawei.com> writes:
>
>> From: Miaohe Lin <linmiaohe@huawei.com>
>> - if (copy_to_user(cpuid_arg, &cpuid, sizeof(cpuid)))
>> - goto out;
>> - r = 0;
>> + r = -EINVAL;
>> break;
>> }
>
>Braces are not really needed not but all other cases in the switch have it so let's leave them here too.
>

That's what I think too. :)

>>
>> case KVM_GET_MSRS: {
>> +/* KVM_GET_CPUID2 is deprecated, should not be used. */
>
>"should not be used" pre-patch, post-patch we can say "Can only be used as a reliable source of -EINVAL" :-)

That's right.

>
> #define KVM_GET_CPUID2 _IOWR(KVMIO, 0x91, struct kvm_cpuid2)
> /* Available with KVM_CAP_VAPIC */
> #define KVM_TPR_ACCESS_REPORTING _IOWR(KVMIO, 0x92, struct
> kvm_tpr_access_ctl)
>
>Surprisingly (or not), KVM_GET_CPUID2 is not even described in Documentation/virt/kvm/api.txt.
>

Maybe KVM_GET_CPUID2 is defined for integrity only.

>
>Reviewed-by: Vitaly Kuznetsov <vkuznets@redhat.com>
>

Many thanks for your review!

\
 
 \ /
  Last update: 2020-02-28 02:36    [W:0.030 / U:4.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site