Thread (3 messages) 3 messages, 3 authors, 2021-10-25

Re: [PATCH] KVM: vPMU: Don't program counter for interrupt-based event sampling w/o lapic_in_kernel

From: Paolo Bonzini <pbonzini@redhat.com>
Date: 2021-10-25 16:45:05
Also in: lkml

On 25/10/21 18:31, Sean Christopherson wrote:
quoted
vPMU depends on in-kernel lapic to deliver pmi interrupt, there is a
lot of overhead when creating/maintaining perf_event object,
locking/unlocking perf_event_ctx etc for vPMU. It silently fails to
deliver pmi interrupt if w/o in-kernel lapic currently. Let's not
program counter for interrupt-based event sampling w/o in-kernel
lapic support to avoid the whole bothering.
This feels all kinds of wrong.  AFAIK, there's no way for KVM to enumerate to
the guest that the vPMU isn't capable of generating interrupts.  I.e. any setup
that exposes a vPMU to the guest without an in-kernel local APIC is either
inherently broken or requires a paravirtualized guest.  I don't think KVM's bugs
should be optimized.
Yeah, if it simplified the code it would be a different story, but here 
there's even not one but two new checks.

Paolo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help