Kernel KVM virtualization development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sean Christopherson" <seanjc@google.com>
Cc: kvm@vger.kernel.org
Subject: Re: [PATCH v2 2/3] KVM: SVM: Do all per-VM AVIC initialization during vCPU precreation phase
Date: Tue, 30 Jun 2026 21:18:44 +0000	[thread overview]
Message-ID: <20260630211845.8E8201F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260630210156.457151-3-seanjc@google.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The function prototype `avic_vm_init(struct kvm *kvm)` remains in `arch/x86/kvm/svm/svm.h` despite its implementation being removed.
--

commit e515c341adc5a84997456546a40c3f72c03c42b6
Author: Sean Christopherson <seanjc@google.com>

    KVM: SVM: Do all per-VM AVIC initialization during vCPU precreation phase
    
    Move all per-VM AVIC initialization from VM creation to vCPU pre-creation,
    i.e. defer allocating the logical ID table and adding the VM to the GA Log
    list until vCPUs are created.  This will allow removing the VM from the GA
    Log list before vCPUs are destroyed without needing yet another kvm_x86_ops
    hook (.vm_pre_destroy() is very intentionally called if and only if VM
    creation fully succeeds).

> diff --git a/arch/x86/kvm/svm/avic.c b/arch/x86/kvm/svm/avic.c
> index 4a0a2dbd1687f..d71a2fed1a08b 100644
> --- a/arch/x86/kvm/svm/avic.c
> +++ b/arch/x86/kvm/svm/avic.c

[ ... ]

> @@ -308,47 +308,32 @@ static int avic_alloc_physical_id_table(struct kvm *kvm)

[ ... ]

> -int avic_vm_init(struct kvm *kvm)
> +static void avic_add_vm_to_ga_log_list(struct kvm *kvm)
>  {

[Severity: Low]
Does the function prototype for avic_vm_init() in arch/x86/kvm/svm/svm.h also
need to be removed? The declaration appears to still be present even though
the implementation is removed here.

> -	unsigned long flags;
> -	int err = -ENOMEM;
>  	struct kvm_svm *kvm_svm = to_kvm_svm(kvm);

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260630210156.457151-1-seanjc@google.com?part=2

  reply	other threads:[~2026-06-30 21:18 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 21:01 [PATCH v2 0/3] KVM: SVM: Fix a (very) unlikely UAF for GA Log IRQs Sean Christopherson
2026-06-30 21:01 ` [PATCH v2 1/3] KVM: SVM: Make kvm_x86_ops.vcpu_precreate() hook fully AVIC specific Sean Christopherson
2026-06-30 21:01 ` [PATCH v2 2/3] KVM: SVM: Do all per-VM AVIC initialization during vCPU precreation phase Sean Christopherson
2026-06-30 21:18   ` sashiko-bot [this message]
2026-06-30 21:20     ` Sean Christopherson
2026-06-30 21:01 ` [PATCH v2 3/3] KVM: SVM: Remove VM from the GA Log notifier list before VM destruction Sean Christopherson
2026-06-30 21:15   ` sashiko-bot
2026-06-30 21:27     ` 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=20260630211845.8E8201F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=kvm@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --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