From: Paolo Bonzini <pbonzini@redhat.com>
To: Jim Mattson <jmattson@google.com>
Cc: linmiaohe <linmiaohe@huawei.com>,
"Radim Krčmář" <rkrcmar@redhat.com>,
"Sean Christopherson" <sean.j.christopherson@intel.com>,
"Vitaly Kuznetsov" <vkuznets@redhat.com>,
"Wanpeng Li" <wanpengli@tencent.com>,
"Joerg Roedel" <joro@8bytes.org>,
"Thomas Gleixner" <tglx@linutronix.de>,
"Ingo Molnar" <mingo@redhat.com>,
"Borislav Petkov" <bp@alien8.de>,
"H . Peter Anvin" <hpa@zytor.com>,
"kvm list" <kvm@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>,
"the arch/x86 maintainers" <x86@kernel.org>
Subject: Re: [PATCH v2] KVM: X86: deprecate obsolete KVM_GET_CPUID2 ioctl
Date: Mon, 2 Mar 2020 19:02:39 +0100 [thread overview]
Message-ID: <e173c489-dee7-a86d-3ec4-6fe45938a2d8@redhat.com> (raw)
In-Reply-To: <CALMp9eQqFKnCLYGXdab-k=Q=h-H5x8VnV20F3HH9fDZTDuQcEQ@mail.gmail.com>
On 02/03/20 18:44, Jim Mattson wrote:
> On Mon, Mar 2, 2020 at 9:09 AM Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>> On 02/03/20 18:01, Jim Mattson wrote:
>>>> And in fact, it's not used anywhere. So it should be
>>>> deprecated.
>>> I don't know how you can make the assertion that this ioctl is not
>>> used anywhere. For instance, I see a use of it in Google's code base.
>>
>> Right, it does not seem to be used anywhere according to e.g. Debian
>> code search but of course it can have users.
>>
>> What are you using it for? It's true that cpuid->nent is never written
>> back to userspace, so the ioctl is basically unusable unless you already
>> know how many entries are written. Or unless you fill the CPUID entries
>> with garbage before calling it, I guess; is that what you are doing?
>
> One could use GET_CPUID2 after SET_CPUID2, to see what changes kvm
> made to the requested guest CPUID information without telling you.
Yeah, I think GET_CPUID2 with the same number of leaves that you have
passed to SET_CPUID2 should work.
Paolo
next prev parent reply other threads:[~2020-03-02 18:02 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-27 3:21 [PATCH v2] KVM: X86: deprecate obsolete KVM_GET_CPUID2 ioctl linmiaohe
2020-02-27 11:36 ` Vitaly Kuznetsov
2020-03-02 16:31 ` Paolo Bonzini
2020-03-02 16:31 ` Paolo Bonzini
2020-03-02 17:01 ` Jim Mattson
2020-03-02 17:09 ` Paolo Bonzini
2020-03-02 17:44 ` Jim Mattson
2020-03-02 18:02 ` Paolo Bonzini [this message]
2020-03-02 18:30 ` Jim Mattson
2020-02-28 1:36 linmiaohe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e173c489-dee7-a86d-3ec4-6fe45938a2d8@redhat.com \
--to=pbonzini@redhat.com \
--cc=bp@alien8.de \
--cc=hpa@zytor.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linmiaohe@huawei.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=rkrcmar@redhat.com \
--cc=sean.j.christopherson@intel.com \
--cc=tglx@linutronix.de \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
--cc=x86@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).