Re: [PATCH 1/2] KVM: arm64: Add PMU event filtering infrastructure

2020-02-17 Thread Robin Murphy
On 15/02/2020 10:28 am, Marc Zyngier wrote: On Fri, 14 Feb 2020 22:01:01 +, Robin Murphy wrote: Hi Robin, Hi Marc, On 2020-02-14 6:36 pm, Marc Zyngier wrote: [...] @@ -585,6 +585,14 @@ static void kvm_pmu_create_perf_event(struct kvm_vcpu *vcpu, u64 select_idx) pmc->idx

Re: [PATCH 1/2] KVM: arm64: Add PMU event filtering infrastructure

2020-02-15 Thread Marc Zyngier
On Fri, 14 Feb 2020 22:01:01 +, Robin Murphy wrote: Hi Robin, > > Hi Marc, > > On 2020-02-14 6:36 pm, Marc Zyngier wrote: > [...] > > @@ -585,6 +585,14 @@ static void kvm_pmu_create_perf_event(struct kvm_vcpu > > *vcpu, u64 select_idx) > > pmc->idx != ARMV8_PMU_CYCLE_IDX) > >

Re: [PATCH 1/2] KVM: arm64: Add PMU event filtering infrastructure

2020-02-14 Thread Robin Murphy
Hi Marc, On 2020-02-14 6:36 pm, Marc Zyngier wrote: [...] @@ -585,6 +585,14 @@ static void kvm_pmu_create_perf_event(struct kvm_vcpu *vcpu, u64 select_idx) pmc->idx != ARMV8_PMU_CYCLE_IDX) return; + /* +* If we have a filter in place and that the event

[PATCH 1/2] KVM: arm64: Add PMU event filtering infrastructure

2020-02-14 Thread Marc Zyngier
It can be desirable to expose a PMU to a guest, and yet not want the guest to be able to count some of the implemented events (because this would give information on shared resources, for example. For this, let's extend the PMUv3 device API, and offer a way to setup a bitmap of the allowed events