[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <84444ec9-cebf-1ec2-ec3e-8b28e587682d@redhat.com>
Date: Mon, 25 Oct 2021 18:44:56 +0200
From: Paolo Bonzini <pbonzini@...hat.com>
To: Sean Christopherson <seanjc@...gle.com>,
Wanpeng Li <kernellwp@...il.com>
Cc: linux-kernel@...r.kernel.org, kvm@...r.kernel.org,
Vitaly Kuznetsov <vkuznets@...hat.com>,
Wanpeng Li <wanpengli@...cent.com>,
Jim Mattson <jmattson@...gle.com>,
Joerg Roedel <joro@...tes.org>
Subject: Re: [PATCH] KVM: vPMU: Don't program counter for interrupt-based
event sampling w/o lapic_in_kernel
On 25/10/21 18:31, Sean Christopherson wrote:
>> 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
Powered by blists - more mailing lists