From: Paolo Bonzini <pbonzini@redhat.com>
To: Vitaly Kuznetsov <vkuznets@redhat.com>, kvm@vger.kernel.org
Cc: Sean Christopherson <seanjc@google.com>,
Wanpeng Li <wanpengli@tencent.com>,
Jim Mattson <jmattson@google.com>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] KVM: x86: Check .flags in kvm_cpuid_check_equal() too
Date: Wed, 26 Jan 2022 16:44:42 +0100 [thread overview]
Message-ID: <718ac952-e9ec-a211-9a43-d4b4a1ea001a@redhat.com> (raw)
In-Reply-To: <20220126131804.2839410-1-vkuznets@redhat.com>
On 1/26/22 14:18, Vitaly Kuznetsov wrote:
> kvm_cpuid_check_equal() checks for the (full) equality of the supplied
> CPUID data so .flags need to be checked too.
>
> Reported-by: Sean Christopherson <seanjc@google.com>
> Fixes: c6617c61e8fe ("KVM: x86: Partially allow KVM_SET_CPUID{,2} after KVM_RUN")
> Signed-off-by: Vitaly Kuznetsov <vkuznets@redhat.com>
> ---
> arch/x86/kvm/cpuid.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/x86/kvm/cpuid.c b/arch/x86/kvm/cpuid.c
> index 89d7822a8f5b..ddfd97f62ba8 100644
> --- a/arch/x86/kvm/cpuid.c
> +++ b/arch/x86/kvm/cpuid.c
> @@ -133,6 +133,7 @@ static int kvm_cpuid_check_equal(struct kvm_vcpu *vcpu, struct kvm_cpuid_entry2
> orig = &vcpu->arch.cpuid_entries[i];
> if (e2[i].function != orig->function ||
> e2[i].index != orig->index ||
> + e2[i].flags != orig->flags ||
> e2[i].eax != orig->eax || e2[i].ebx != orig->ebx ||
> e2[i].ecx != orig->ecx || e2[i].edx != orig->edx)
> return -EINVAL;
Queued, with Cc to stable.
Paolo
prev parent reply other threads:[~2022-01-26 15:44 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-26 13:18 Vitaly Kuznetsov
2022-01-26 15:44 ` Paolo Bonzini [this message]
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=718ac952-e9ec-a211-9a43-d4b4a1ea001a@redhat.com \
--to=pbonzini@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=seanjc@google.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®