From: Thomas Gleixner <tglx@kernel.org>
To: Paolo Bonzini <pbonzini@redhat.com>
Cc: Sean Christopherson <seanjc@google.com>,
Jim Mattson <jmattson@google.com>,
Peter Zijlstra <peterz@infradead.org>,
Binbin Wu <binbin.wu@linux.intel.com>,
Vishal L Verma <vishal.l.verma@intel.com>,
kvm <kvm@vger.kernel.org>,
Rick P Edgecombe <rick.p.edgecombe@intel.com>,
Binbin Wu <binbin.wu@intel.com>,
the arch/x86 maintainers <x86@kernel.org>,
Paolo Bonzini <bonzini@redhat.com>
Subject: Re: CPU Lockups in KVM with deferred hrtimer rearming
Date: Wed, 22 Apr 2026 04:10:11 +0200 [thread overview]
Message-ID: <87o6jbagos.ffs@tglx> (raw)
In-Reply-To: <CABgObfb7Yy5Q3E2Boy_H4a0F3GodDOr1Z_Sw0BzdfvOmagcRnA@mail.gmail.com>
On Wed, Apr 22 2026 at 00:15, Paolo Bonzini wrote:
> On Tue, Apr 21, 2026 at 11:48 PM Thomas Gleixner <tglx@kernel.org> wrote:
>> On Tue, Apr 21 2026 at 21:39, Paolo Bonzini wrote:
>> > ... it's not decades, ack on VM exit is actually relatively recent (10
>> > years out 20 :)). The reason why it was introduced is another killer
>> > for the idea, though. Posted interrupts require it, for some reason
>> > only known to Intel.
>>
>> That's yet another attempt to provide an halfways decent argument, but
>> as anything else related to KVM/VIRT it is neither documented nor proven
>> to be true.
>
> SDM, "27.2.1 Checks on VMX Controls", under "VM-Execution Control Fields":
>
> If the “process posted interrupts” VM-execution control is 1, the
> following must be true: [...]
> — The “acknowledge interrupt on exit” VM-exit control is 1.
>
> I grant you the "not documented" (not cross referenced to the manual
> in commit 01e439be775) part, but "not proven to be true"? Neither I
> nor my predecessors are *that* clueless.
I did not claim at all that you or your predecessors are clueless, but
do I really have to do all the homework which you and them obviously
failed to do?
And even now in this discussion you came only forth with a real
explanation after I told you that it's nowhere documented in the kernel
code or the related changelogs.
Still now you tell me that 01e439be775 is the key to all of this, which
is completely irrelevant because the commit which started to violate the
core kernel code semantics and expectations is f2485b3e0c6c ("KVM: x86:
use guest_exit_irqoff") which happened _three_ years _after_ 01e439be775
introduced the detection of posted interrupts.
Do you really expect me to connect the useless changelog of f2485b3e0c6c
to the posted interrupts restrictions which are not mentioned anywhere?
> Is reading the manual enough?
Are you seriously asking me to read the manual to figure out why some
completely undocumented code exists? And then deduce why that code
violates basic principles of the core code assumptions which have been
there way _before_ any of this x86 virtualization gunk even existed on a
napkin sketch?
You are putting the cart before the horse.
KVM is violating basic principles without giving any clue to those who
try to keep them maintained. Neither in changelogs nor in code nor in
comments.
Please don't misunderstand me. I'm not trying to fingerpoint here. I'm
trying to understand how we got into this mess and what's the proper way
out of it.
At least after tons of useless wasted cycles/emails I know now that
there seems to be some real existing hardware constraint.
As a consequence I'll go and use the irq_regs workaround in
hrtimer_interrupt_rearm() for now. It's not pretty, but as I pointed out
before, it _is_ covering _all_ (even not yet discovered) KVM/VIRT
induced violations of core code semantics and expectations in one go and
it is pretty much performance neutral for the price that the KVM/VMX
host side can't take advantage of it.
If KVM/VMX want's to benefit from the semantically correct
hrtimer/HRTICK related core code improvements, then please post patches
which might hit the 7.2 merge window eventually in case they make sense
and most importantly are semantically correct.
Thanks,
tglx
next prev parent reply other threads:[~2026-04-22 2:10 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 20:50 CPU Lockups in KVM with deferred hrtimer rearming Verma, Vishal L
2026-04-20 15:00 ` Thomas Gleixner
2026-04-20 15:22 ` Thomas Gleixner
2026-04-20 20:57 ` Verma, Vishal L
2026-04-20 22:19 ` Thomas Gleixner
2026-04-20 22:24 ` Verma, Vishal L
2026-04-21 6:29 ` Thomas Gleixner
2026-04-21 4:51 ` Binbin Wu
2026-04-21 7:39 ` Thomas Gleixner
2026-04-21 11:18 ` Peter Zijlstra
2026-04-21 11:32 ` Peter Zijlstra
2026-04-21 11:34 ` Peter Zijlstra
2026-04-21 11:49 ` Peter Zijlstra
2026-04-21 12:05 ` Peter Zijlstra
2026-04-21 13:19 ` Peter Zijlstra
2026-04-21 13:29 ` Peter Zijlstra
2026-04-21 16:36 ` Thomas Gleixner
2026-04-21 18:11 ` Verma, Vishal L
2026-04-21 17:11 ` Thomas Gleixner
2026-04-21 17:20 ` Jim Mattson
2026-04-21 18:29 ` Thomas Gleixner
2026-04-21 18:55 ` Sean Christopherson
2026-04-21 20:06 ` Peter Zijlstra
2026-04-21 20:46 ` Peter Zijlstra
2026-04-21 20:57 ` Sean Christopherson
2026-04-21 21:02 ` Peter Zijlstra
2026-04-21 21:42 ` Sean Christopherson
2026-04-22 6:55 ` Peter Zijlstra
2026-04-21 20:39 ` Paolo Bonzini
2026-04-21 21:02 ` Sean Christopherson
2026-04-21 22:48 ` Thomas Gleixner
2026-04-21 23:15 ` Paolo Bonzini
2026-04-21 23:34 ` Jim Mattson
2026-04-21 23:37 ` Paolo Bonzini
2026-04-22 2:10 ` Thomas Gleixner [this message]
2026-04-21 21:49 ` Thomas Gleixner
2026-04-21 22:07 ` Sean Christopherson
2026-04-21 22:24 ` Paolo Bonzini
2026-04-21 19:18 ` Verma, Vishal L
2026-04-21 16:30 ` Thomas Gleixner
2026-04-21 16:11 ` Verma, Vishal L
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=87o6jbagos.ffs@tglx \
--to=tglx@kernel.org \
--cc=binbin.wu@intel.com \
--cc=binbin.wu@linux.intel.com \
--cc=bonzini@redhat.com \
--cc=jmattson@google.com \
--cc=kvm@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=peterz@infradead.org \
--cc=rick.p.edgecombe@intel.com \
--cc=seanjc@google.com \
--cc=vishal.l.verma@intel.com \
--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