Re: [RFC PATCH v2 4/5] kvm/svm: Update the per-CPU wakeup-list during vCPU load and unload

From: Sean Christopherson

Date: Wed Jul 08 2026 - 09:42:59 EST


KVM: SVM:

And this shortlog+changelog is woefully inadequate. For all intents and purposes
this patch adds KVM support for GAPPI. So, state that in the shortlog, explain
what GAPPI is (and spell out the acronym), how it works, what KVM's scheme is,
and so on and so forth. I'm not even going to try to review the code without that.

On Wed, Jul 08, 2026, Sairaj Kodilkar wrote:
> When a vCPU is unloaded from a physical CPU enqueue it on that CPU's
> GAPPI wakeup list. Remove the vCPU from the wakeup list when it is loaded
> on to a CPU again.
>
> Also enqueue from avic_pi_update_irte() when vCPU is not running and
> ir_list is still empty. This handles the condition where vCPU load skips
> the per-CPU wakeup-list update when ir_list is empty.
>
> The GAPPI wakeup handler walks this CPU's list and wakes vCPUs that still
> have a pending IRR. Install it with kvm_set_posted_intr_wakeup_handler()
> so deliveries on POSTED_INTR_WAKEUP_VECTOR invoke it.