Re: [RFC PATCH 4/4] perf: arm_pmuv3: Keep out of guest counter partition

2025-01-28 Thread Colton Lewis
Suzuki K Poulose writes: On 27/01/2025 22:20, Colton Lewis wrote: /* Disable all counters */ - armv8pmu_pmcr_write(armv8pmu_pmcr_read() & ~ARMV8_PMU_PMCR_E); + if (cpu_pmu->partitioned) + armv8pmu_mdcr_write(armv8pmu_pmcr_read() & ~ARMV8_PMU_MDCR_HPME); ty

Re: [RFC PATCH 4/4] perf: arm_pmuv3: Keep out of guest counter partition

2025-01-28 Thread Suzuki K Poulose
On 27/01/2025 22:20, Colton Lewis wrote: If the PMU is partitioned, keep the driver out of the guest counter partition and only use the host counter partition. Partitioning is defined by the MDCR_EL2.HPMN register field and saved in cpu_pmu->hpmn. The range 0..HPMN-1 is accessible by EL1 and EL0

[RFC PATCH 4/4] perf: arm_pmuv3: Keep out of guest counter partition

2025-01-27 Thread Colton Lewis
If the PMU is partitioned, keep the driver out of the guest counter partition and only use the host counter partition. Partitioning is defined by the MDCR_EL2.HPMN register field and saved in cpu_pmu->hpmn. The range 0..HPMN-1 is accessible by EL1 and EL0 while HPMN..PMCR.N is reserved for EL2. De