Re: [PATCH] KVM: x86: Synchronize APIC State with QEMU when irqchip=split
From: David Woodhouse
Date: Thu Aug 14 2025 - 05:19:25 EST
On Thu, 2025-08-14 at 16:54 +0800, hugo lee wrote:
> On Wed, Aug 13, 2025 David Woodhouse <dwmw2@xxxxxxxxxxxxx> wrote:
> >
> > On Wed, 2025-08-13 at 17:30 +0800, hugo lee wrote:
> > >
> > > Sorry for the misleading, what I was going to say is
> > > do only cpu_synchroniza_state() in this new userspace exit reason
> > > and do nothing on the PIT.
> > > So QEMU will ignore the PIT as the guests do.
> > >
> > > The resample is great and needed, but the synchronization
> > > makes more sense to me on this question.
> >
> > So if the guest doesn't actually quiesce the PIT, QEMU will *still*
> > keep waking up to waggle the PIT output pin, it's just that QEMU won't
> > bother telling the kernel about it?
>
> Yes, just as guests wish.
> This could eliminate the most performance loss.
>
> But I guess resample is more acceptable.
Simpler, cleaner, solves it for more use cases including when the
interrupt *is* delivered to the PIC but just never services. And allows
us to fix the VFIO INTx abomination and use the kernel's irqfd API
properly...
But that's a discussion for the qemu-devel list, I suppose.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature