From: David Woodhouse <dwmw2@infradead.org>
To: Sean Christopherson <seanjc@google.com>,
Luka Absandze <absandze@amazon.de>
Cc: Paolo Bonzini <pbonzini@redhat.com>,
kvm@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-doc@vger.kernel.org, Alexander Graf <graf@amazon.com>
Subject: Re: [RFC PATCH 1/2] KVM: x86/pmu: Add CAP to disable SW accounting of emulated instructions
Date: Tue, 21 Jul 2026 08:33:46 +0100 [thread overview]
Message-ID: <d538bd8eba1058d52f8d32e311c12bf216ff4118.camel@infradead.org> (raw)
In-Reply-To: <al6g4VA4l-ZIAr9Q@google.com>
[-- Attachment #1: Type: text/plain, Size: 1203 bytes --]
On Mon, 2026-07-20 at 15:27 -0700, Sean Christopherson wrote:
> On Mon, Jul 20, 2026, Luka Absandze wrote:
> > The only functional change for an opted-in VM is reduced accuracy: a
> > guest counting instructions-retired or branches-retired undercounts by
> > the instructions KVM emulates in host context, i.e. the behavior that
> > predates the accounting cited above. Hardware-executed guest
> > instructions continue to be counted by the backing perf_event, and its
> > overflow/PMI path is unchanged.
>
> Do you *need* per-VM control, or would a module param (or a magic value for
> enable_pmu) suffice? While I mostly buy the "it used to work this way" argument
> (just "mostly", because that commit landed 4.5 years ago), I'm not exactly keen
> on adding uAPI that is effectively "re-introduce a bug to workaround fundamental
> design issues in KVM's emulated PMU implementation".
Which is the bug? Some would argue that timer interrupts running 50
times slower is also a bug. We just get to choose *which* bug we want
the guest to experience :)
And I think that is a per-guest choice, if we can't find a way to do it
with *sufficient* correctness *and* efficiency (qv).
[-- Attachment #2: smime.p7s --]
[-- Type: application/pkcs7-signature, Size: 6179 bytes --]
next prev parent reply other threads:[~2026-07-21 7:33 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-20 19:22 [RFC PATCH 0/2] KVM: x86/pmu: Let userspace " Luka Absandze
2026-07-20 19:22 ` [RFC PATCH 1/2] KVM: x86/pmu: Add CAP to " Luka Absandze
2026-07-20 22:27 ` Sean Christopherson
2026-07-21 7:33 ` David Woodhouse [this message]
2026-07-21 16:53 ` Sean Christopherson
2026-07-21 19:43 ` David Woodhouse
2026-07-22 16:53 ` Sean Christopherson
2026-07-20 19:22 ` [RFC PATCH 2/2] KVM: Documentation: Document KVM_CAP_X86_DISABLE_PMU_SW_ACCOUNTING Luka Absandze
2026-07-21 7:32 ` [RFC PATCH 0/2] KVM: x86/pmu: Let userspace disable SW accounting of emulated instructions David Woodhouse
2026-07-21 16:47 ` Sean Christopherson
2026-07-21 16:55 ` David Woodhouse
2026-07-21 17:05 ` Sean Christopherson
2026-07-21 17:32 ` Absandze, Luka
2026-07-21 17:49 ` 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=d538bd8eba1058d52f8d32e311c12bf216ff4118.camel@infradead.org \
--to=dwmw2@infradead.org \
--cc=absandze@amazon.de \
--cc=graf@amazon.com \
--cc=kvm@vger.kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=pbonzini@redhat.com \
--cc=seanjc@google.com \
/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
all inboxes | Powered by JetHome®