Re: [PATCH 1/9] KVM: x86: Move the "APIC attention" macros from kvm_host.h => lapic.c
From: Sean Christopherson
Date: Fri Jun 26 2026 - 10:39:27 EST
On Fri, Jun 26, 2026, Kai Huang wrote:
> On Thu, 2026-06-25 at 15:04 -0700, Sean Christopherson wrote:
> > ---
> > arch/x86/include/asm/kvm_host.h | 10 ----------
> > arch/x86/kvm/lapic.c | 10 ++++++++++
> > 2 files changed, 10 insertions(+), 10 deletions(-)
> >
> > diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h
> > index b517257a6315..9ba8aa739f93 100644
> > --- a/arch/x86/include/asm/kvm_host.h
> > +++ b/arch/x86/include/asm/kvm_host.h
> > @@ -290,16 +290,6 @@ enum x86_intercept_stage;
> > #define PFERR_PRIVATE_ACCESS BIT_ULL(49)
> > #define PFERR_SYNTHETIC_MASK (PFERR_IMPLICIT_ACCESS | PFERR_PRIVATE_ACCESS)
> >
> > -/* apic attention bits */
> > -#define KVM_APIC_CHECK_VAPIC 0
> > -/*
> > - * The following bit is set with PV-EOI, unset on EOI.
> > - * We detect PV-EOI changes by guest by comparing
> > - * this bit with PV-EOI in guest memory.
> > - * See the implementation in apic_update_pv_eoi.
> > - */
> > -#define KVM_APIC_PV_EOI_PENDING 1
> > -
> >
>
> Nit:
>
> 'apic_update_pv_eoi' is a typo. AFAICT it even didn't exist either when PV_EOI
> was initially added in commit ae7a2a3fb6f8b ("KVM: host side for eoi
> optimization").
>
> I think it's a typo which was introduced by that commit, and my best guessing is
> the correct one should be apic_sync_pv_eoi_from_guest().
>
> Btw, the comment isn't easy to understand either IMHO. Maybe just delete it (in
> another patch perhaps, if it's worth)?
I'll "Opportunistically" update the comment as part of this code movement; the
formatting is also all kinds of funky.