public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
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,
	Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
Subject: Re: [PATCH] KVM: SVM: Check vCPU ID against max x2AVIC ID if and only if x2AVIC is enabled
Date: Wed, 14 Jan 2026 23:05:54 +0530	[thread overview]
Message-ID: <aWfOY7v3T_SRdHMp@blrnaveerao1> (raw)
In-Reply-To: <20260112232805.1512361-1-seanjc@google.com>

On Mon, Jan 12, 2026 at 03:28:05PM -0800, Sean Christopherson wrote:
> When allocating the AVIC backing page, only check one of the max AVIC vs.
> x2AVIC ID based on whether or not x2AVIC is enabled.  Doing so fixes a bug
> where KVM incorrectly inhibits AVIC if x2AVIC is _disabled_ and any vCPU
> with a non-zero APIC ID is created, as x2avic_max_physical_id is left '0'
> when x2AVIC is disabled.
> 
> Fixes: 940fc47cfb0d ("KVM: SVM: Add AVIC support for 4k vCPUs in x2AVIC mode")
> Cc: stable@vger.kernel.org
> Cc: Naveen N Rao (AMD) <naveen@kernel.org>
> Cc: Suravee Suthikulpanit <suravee.suthikulpanit@amd.com>
> Signed-off-by: Sean Christopherson <seanjc@google.com>
> ---
>  arch/x86/kvm/svm/avic.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

I think the bad commit is:
f628a34a9d52 ("KVM: SVM: Replace "avic_mode" enum with "x2avic_enabled" boolean")

... which introduced x2avic_enabled.

Other than that:
Reviewed-by: Naveen N Rao (AMD) <naveen@kernel.org>


Thanks,
Naveen


  reply	other threads:[~2026-01-14 17:34 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 23:28 [PATCH] KVM: SVM: Check vCPU ID against max x2AVIC ID if and only if x2AVIC is enabled Sean Christopherson
2026-01-14 17:35 ` Naveen N Rao [this message]
2026-01-14 19:42   ` Sean Christopherson
2026-01-15 18:03 ` 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=aWfOY7v3T_SRdHMp@blrnaveerao1 \
    --to=naveen@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pbonzini@redhat.com \
    --cc=seanjc@google.com \
    --cc=suravee.suthikulpanit@amd.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