Messages in this thread | | | Date | Wed, 18 Oct 2023 22:17:04 +0000 | From | Oliver Upton <> | Subject | Re: [PATCH v7 03/12] KVM: arm64: PMU: Clear PM{C,I}NTEN{SET,CLR} and PMOVS{SET,CLR} on vCPU reset |
| |
On Wed, Oct 18, 2023 at 02:16:36PM -0700, Raghavendra Rao Ananta wrote:
[...]
> I had a brief discussion about this with Oliver, and it looks like we > might need a couple of additional changes for these register accesses: > - For the userspace accesses, we have to implement explicit get_user > and set_user callbacks that to filter out the unimplemented counters > using kvm_pmu_valid_counter_mask(). > - For the guest accesses to be correct, we might have to apply the > same mask while serving KVM_REQ_RELOAD_PMU.
To be precise, the second issue is that we want to make sure KVM's PMU emulation never uses an invalid value for the configuration, like enabling a PMC at an index inaccessible to the guest.
-- Thanks, Oliver
| |