On 11/02/2020 18:45, Ionela Voinescu wrote: > Access to the AMU counters should be disabled by default in kvm guests, > as information from the counters might reveal activity in other guests > or activity on the host. > > Therefore, disable access to AMU registers from EL0 and EL1 in kvm > guests by: > - Hiding the presence of the extension in the feature register > (SYS_ID_AA64PFR0_EL1) on the VCPU. > - Disabling access to the AMU registers before switching to the guest. > - Trapping accesses and injecting an undefined instruction into the > guest. > > Signed-off-by: Ionela Voinescu <ionela.voinescu@xxxxxxx> > Cc: Marc Zyngier <maz@xxxxxxxxxx> > Cc: James Morse <james.morse@xxxxxxx> > Cc: Julien Thierry <julien.thierry.kdev@xxxxxxxxx> > Cc: Suzuki K Poulose <suzuki.poulose@xxxxxxx> > Cc: Catalin Marinas <catalin.marinas@xxxxxxx> > Cc: Will Deacon <will@xxxxxxxxxx> Reviewed-by: Valentin Schneider <valentin.schneider@xxxxxxx>