public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sean Christopherson <seanjc@google.com>
To: Khushit Shah <khushit.shah@nutanix.com>
Cc: David Woodhouse <dwmw2@infradead.org>,
	"pbonzini@redhat.com" <pbonzini@redhat.com>,
	 "kai.huang@intel.com" <kai.huang@intel.com>,
	"mingo@redhat.com" <mingo@redhat.com>,
	 "x86@kernel.org" <x86@kernel.org>, "bp@alien8.de" <bp@alien8.de>,
	"hpa@zytor.com" <hpa@zytor.com>,
	 "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"kvm@vger.kernel.org" <kvm@vger.kernel.org>,
	 "dave.hansen@linux.intel.com" <dave.hansen@linux.intel.com>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	 Jon Kohler <jon@nutanix.com>,
	Shaju Abraham <shaju.abraham@nutanix.com>
Subject: Re: [PATCH v5 1/3] KVM: x86: Refactor suppress EOI broadcast logic
Date: Fri, 16 Jan 2026 09:34:10 -0800	[thread overview]
Message-ID: <aWp2kjvTFAw1wPt6@google.com> (raw)
In-Reply-To: <E19BAC02-F4E4-4F66-A85D-A0D12D355E23@nutanix.com>

On Fri, Jan 16, 2026, Khushit Shah wrote:
> > On 16 Jan 2026, at 2:31 PM, David Woodhouse <dwmw2@infradead.org> wrote:
> > 
> > But KVM *will* notify listeners, surely? When the guest issues the EOI
> > via the I/O APIC EOIR register.
> > 
> > For that commit to have made any difference, Xen *has* to have been
> > buggy, enabling directed EOI in the local APIC despite the I/O APIC not
> > having the required support. Thus interrupts never got EOI'd at all,
> > and sure, the notifiers didn't get called.

Oh, I 100% agree there were bugs aplenty on both sides, but that's exactly why I
don't want to add support for the in-kernel I/O APIC without a strong reason for
doing so.

> You are describing 
> 0bcc3fb95b97 ("KVM: lapic: stop advertising DIRECTED_EOI when in-kernel IOAPIC is in use”)
> Since then I guess this issue should have been fixed?!  As
> c806a6ad35bf ("KVM: x86: call irq notifiers with directed EOI”)  was much earlier.
> 
> > On 16 Jan 2026, at 2:31 PM, David Woodhouse <dwmw2@infradead.org> wrote:
> > 
> > If you're concerned about what to backport to stable, then arguably
> > it's *only* KVM_X2APIC_DISABLE_SUPPRESS_EOI_BROADCAST which should be
> > backported, as that's the bug, and _ENABLE_ is a new feature?
> 
> I think neither DISABLE or ENABLE is a new feature at least for split
> IRQCHIP.  It’s just giving a way to user-space to fix a bug in a way they
> like, because that’s how it should have been from the beginning.

Ya.  I don't see ENABLE (for split IRQCHIP) as a new feature, because it's the
only way for userspace to fix its setups without changing the virtual CPU model
exposed to the guest.

For better or worse, the aforementioned commit 0bcc3fb95b97 ("KVM: lapic: stop
advertising DIRECTED_EOI when in-kernel IOAPIC is in use”) already clobbered the
virtual model when using an in-kernel I/O APIC.  Even though KVM (AFAIK) got away
with the switcheroo then, I am strongly opposed to _KVM_ changing the virtual CPU
model.  I.e. I want to give userspace the ability to choose how to address the
issue, because only userspace (or rather, the platform owner) knows whether or
not its I/O APIC implementation plays nice with ENABLE, whether it's risker to
continue with QUIRK vs. DISABLE, etc.

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

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-29 11:17 [PATCH v5 0/3] KVM: x86: Add userspace control for Suppress EOI Broadcast Khushit Shah
2025-12-29 11:17 ` [PATCH v5 1/3] KVM: x86: Refactor suppress EOI broadcast logic Khushit Shah
2026-01-02 16:23   ` David Woodhouse
2026-01-12  4:15     ` Khushit Shah
2026-01-13 23:40       ` David Woodhouse
2026-01-14  0:10       ` Sean Christopherson
2026-01-16  4:41         ` Khushit Shah
2026-01-16  9:01         ` David Woodhouse
2026-01-16 10:02           ` Khushit Shah
2026-01-16 17:34             ` Sean Christopherson [this message]
2026-01-23 13:04               ` Khushit Shah
2026-01-13 23:11   ` Sean Christopherson
2025-12-29 11:17 ` [PATCH v5 2/3] KVM: x86/ioapic: Implement support for I/O APIC version 0x20 with EOIR Khushit Shah
2025-12-29 11:39   ` David Woodhouse
2025-12-29 12:21     ` Khushit Shah
2025-12-29 13:01       ` David Woodhouse
2025-12-29 15:16         ` Khushit Shah
2025-12-29 15:36           ` David Woodhouse
2025-12-29 15:57             ` Khushit Shah
2026-01-02 16:17               ` David Woodhouse
2026-01-12  3:22                 ` Khushit Shah
2025-12-29 11:17 ` [PATCH v5 3/3] KVM: x86: Add x2APIC "features" to control EOI broadcast suppression Khushit Shah
2026-01-02 16:41   ` David Woodhouse
2026-01-12  3:27     ` Khushit Shah
2026-01-29  4:49 ` [PATCH v5 4/3] KVM: selftests: Add test cases for EOI suppression modes David Woodhouse
2026-01-29 15:19   ` Sean Christopherson
2026-01-29 15:58     ` David Woodhouse
2026-02-04  0:00       ` 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=aWp2kjvTFAw1wPt6@google.com \
    --to=seanjc@google.com \
    --cc=bp@alien8.de \
    --cc=dave.hansen@linux.intel.com \
    --cc=dwmw2@infradead.org \
    --cc=hpa@zytor.com \
    --cc=jon@nutanix.com \
    --cc=kai.huang@intel.com \
    --cc=khushit.shah@nutanix.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=shaju.abraham@nutanix.com \
    --cc=tglx@linutronix.de \
    --cc=x86@kernel.org \
    /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