KVM: X86: deprecate obsolete KVM_GET_CPUID2 ioctl
Quoted 12 lines · Vitaly Kuznetsov
Review
Quoted 7 lines · linmiaohe
From: Miaohe Lin <[email protected]>
(quoted diff) +1
-3- 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. :)
Quoted 5 lines
Review
Quoted 3 lines
(quoted diff) +1
-0case 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.
Quoted 8 lines
#define
KVM_GET_CPUID2_IOWR(KVMIO, 0x91, struct kvm_cpuid2)
/* Available withKVM_CAP_VAPIC*/
#defineKVM_TPR_ACCESS_REPORTING_IOWR(KVMIO,0x92, structkvm_tpr_access_ctl)Surprisingly (or not),
KVM_GET_CPUID2is not even described inDocumentation/virt/kvm/api.txt.
Maybe KVM_GET_CPUID2 is defined for integrity only.
Quoted 3 lines
Reviewed-by Vitaly Kuznetsov <[email protected]>
Many thanks for your review!