From: Naveen N Rao <naveen@kernel.org>
To: Sean Christopherson <seanjc@google.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
Atish Patra <atishp@meta.com>
Subject: Re: [PATCH v2 1/3] KVM: SVM: Add paranoid helper for checking if vCPU is AVIC-addressable
Date: Thu, 24 Sep 2026 16:46:22 +0530 [thread overview]
Message-ID: <arUGWlBcGnxw-dae@blrnaveerao1> (raw)
In-Reply-To: <20260923155108.1550622-2-seanjc@google.com>
On Wed, Sep 23, 2026 at 08:51:06AM -0700, Sean Christopherson wrote:
> Add a helper to check if a vCPU is addressable by AVIC hardware, i.e. has
> an APIC ID that fits in the physical ID table, and use the more paranoid
> helper when determining if a vCPU is compatible with AVIC when initializing
> the vCPU. KVM is supposed to reject vCPU creation if the vCPU's ID is
> greater than or equal to max_vcpu_ids, i.e. simply checking the
> architectural maximum *should* suffice. But piecing together why this is
> safe is unnecessarily difficult, and there is no meaningful downside to
> being extra cautious.
>
> Suggested-by: Naveen N Rao (AMD) <naveen@kernel.org>
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
> arch/x86/kvm/svm/avic.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
Reviewed-by: Naveen N Rao (AMD) <naveen@kernel.org>
- Naveen
next prev parent reply other threads:[~2026-09-24 11:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-23 15:51 [PATCH v2 0/3] KVM: SVM: Fix AVIC Physical ID table UAF Sean Christopherson
2026-09-23 15:51 ` [PATCH v2 1/3] KVM: SVM: Add paranoid helper for checking if vCPU is AVIC-addressable Sean Christopherson
2026-09-24 11:16 ` Naveen N Rao [this message]
2026-09-23 15:51 ` [PATCH v2 2/3] KVM: SVM: Use "is AVIC-addressable" helper to sanity check load()/put() Sean Christopherson
2026-09-24 11:16 ` Naveen N Rao
2026-09-23 15:51 ` [PATCH v2 3/3] KVM: SVM: Clear AVIC Physical ID table entry if vCPU creation fails Sean Christopherson
2026-09-24 11:21 ` Naveen N Rao
2026-09-24 13:55 ` Sean Christopherson
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=arUGWlBcGnxw-dae@blrnaveerao1 \
--to=naveen@kernel.org \
--cc=atishp@meta.com \
--cc=kvm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.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®