Re: [PATCH v8 5/5] KVM: selftests: Add svm_pmu_host_guest_test for Host-Only/Guest-Only bits

From: Yosry Ahmed

Date: Tue Jun 09 2026 - 21:10:01 EST


> +int main(int argc, char *argv[])
> +{
> + struct kvm_pmu_event_filter *filter;
> + struct kvm_vcpu *vcpu;
> + struct kvm_vm *vm;
> + struct ucall uc;
> + gva_t svm_gva;
> +
> + TEST_REQUIRE(kvm_cpu_has(X86_FEATURE_SVM));
> + TEST_REQUIRE(kvm_is_pmu_enabled());

Nit: This is probably redundant since we can't enable the mediated PMU
when the PMU is disabled, but it might be useful to tell us that the
mediated PMU is disabled *because* the PMU is disabled.