Re: [PATCH v6 08/16] KVM: x86/pmu: Add support for KVM_X86_PMU_OP_OPTIONAL_RET0

From: Sean Christopherson

Date: Tue May 26 2026 - 19:31:15 EST


On Wed, May 06, 2026, Yosry Ahmed wrote:
> Add definitions for KVM_X86_PMU_OP_OPTIONAL_RET0() to resolve to
> __static_call_return0, similar to KVM_X86_OP_OPTIONAL_RET0(). Move the
> definition of kvm_pmu_call() to pmu.h, and add declarations for the
> static PMU calls in the header to allow making callbacks from the header
> in following changes.
>
> Suggested-by: Sean Christopherson <seanjc@xxxxxxxxxx>
> Signed-off-by: Yosry Ahmed <yosry@xxxxxxxxxx>
> ---
> arch/x86/include/asm/kvm-x86-pmu-ops.h | 4 +++-
> arch/x86/include/asm/kvm_host.h | 1 -
> arch/x86/kvm/pmu.c | 4 ++++
> arch/x86/kvm/pmu.h | 8 ++++++++
> 4 files changed, 15 insertions(+), 2 deletions(-)
>
> diff --git a/arch/x86/include/asm/kvm-x86-pmu-ops.h b/arch/x86/include/asm/kvm-x86-pmu-ops.h
> index d5452b3433b7d..03ed2c917bb56 100644
> --- a/arch/x86/include/asm/kvm-x86-pmu-ops.h
> +++ b/arch/x86/include/asm/kvm-x86-pmu-ops.h
> @@ -1,6 +1,7 @@
> /* SPDX-License-Identifier: GPL-2.0 */
> #if !defined(KVM_X86_PMU_OP) || \
> - !defined(KVM_X86_PMU_OP_OPTIONAL)
> + !defined(KVM_X86_PMU_OP_OPTIONAL) || \
> + !defined(KVM_X86_PMU_OP_OPTIONAL_RET0)

Align indentation.