[<prev] [next>] [day] [month] [year] [list]
Message-ID: <9054db11e0c946eba998864aa0c40fa2@huawei.com>
Date: Fri, 28 Feb 2020 01:36:07 +0000
From: linmiaohe <linmiaohe@...wei.com>
To: Vitaly Kuznetsov <vkuznets@...hat.com>
CC: "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>,
"pbonzini@...hat.com" <pbonzini@...hat.com>,
"rkrcmar@...hat.com" <rkrcmar@...hat.com>,
"sean.j.christopherson@...el.com" <sean.j.christopherson@...el.com>,
"wanpengli@...cent.com" <wanpengli@...cent.com>,
"jmattson@...gle.com" <jmattson@...gle.com>,
"joro@...tes.org" <joro@...tes.org>,
"tglx@...utronix.de" <tglx@...utronix.de>,
"mingo@...hat.com" <mingo@...hat.com>,
"bp@...en8.de" <bp@...en8.de>, "hpa@...or.com" <hpa@...or.com>
Subject: Re: [PATCH v2] KVM: X86: deprecate obsolete KVM_GET_CPUID2 ioctl
Vitaly Kuznetsov <vkuznets@...hat.com> writes:
>linmiaohe <linmiaohe@...wei.com> writes:
>
>> From: Miaohe Lin <linmiaohe@...wei.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@...hat.com>
>
Many thanks for your review!
Powered by blists - more mailing lists