From: Sean Christopherson <seanjc@google.com>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>, Joerg Roedel <joro@8bytes.org>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
syzbot+f3985126b746b3d59c9d@syzkaller.appspotmail.com,
Alexander Potapenko <glider@google.com>
Subject: Re: [PATCH 2/2] KVM: x86: Manually retrieve CPUID.0x1 when getting FMS for RESET/INIT
Date: Thu, 30 Sep 2021 15:11:26 +0000 [thread overview]
Message-ID: <YVXTnheIB6MCKGve@google.com> (raw)
In-Reply-To: <75632fa9-e813-266c-7b72-cf9d8142cebf@redhat.com>
On Thu, Sep 30, 2021, Paolo Bonzini wrote:
> On 30/09/21 00:24, Sean Christopherson wrote:
> > * RESET since KVM emulates RESET before exposing the vCPU to userspace,
> > * i.e. it'simpossible for kvm_cpuid() to find a valid entry on RESET.
> > + * But, go through the motions in case that's ever remedied. Note, the
> > + * index for CPUID.0x1 is not significant, arbitrarily specify '0'.
>
> Just one nit, this comment change is not really needed because almost all
> callers are using '0' for the same reason.
>
> But, perhaps adding kvm_find_cpuid_entry_index and removing the last
> parameter from kvm_find_cpuid_entry would be a good idea.
I like this idea, but only if callers are forced to specify the index when the
index is significant, e.g. add a magic CPUID_INDEX_DONT_CARE and WARN in
cpuid_entry2_find() if index is significant and index == DONT_CARE.
I'll fiddle with this, unless you want the honors?
> Also, the kvm_cpuid() reference needs to be changed, which I did upon
> commit.
Doh, thanks!
next prev parent reply other threads:[~2021-09-30 15:11 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-29 22:24 [PATCH 0/2] KVM: x86: Fix mostly theoretical undefined behavior Sean Christopherson
2021-09-29 22:24 ` [PATCH 1/2] KVM: x86: Swap order of CPUID entry "index" vs. "significant flag" checks Sean Christopherson
2021-09-29 22:51 ` Jim Mattson
2021-09-29 22:24 ` [PATCH 2/2] KVM: x86: Manually retrieve CPUID.0x1 when getting FMS for RESET/INIT Sean Christopherson
2021-09-29 22:49 ` Jim Mattson
2021-09-30 8:25 ` Paolo Bonzini
2021-09-30 15:11 ` Sean Christopherson [this message]
2021-09-30 16:45 ` Paolo Bonzini
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=YVXTnheIB6MCKGve@google.com \
--to=seanjc@google.com \
--cc=glider@google.com \
--cc=jmattson@google.com \
--cc=joro@8bytes.org \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=syzbot+f3985126b746b3d59c9d@syzkaller.appspotmail.com \
--cc=vkuznets@redhat.com \
--cc=wanpengli@tencent.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.