aboutsummaryrefslogtreecommitdiffstats
path: root/tools/perf/scripts/python
diff options
context:
space:
mode:
authorNicholas Piggin <npiggin@gmail.com>2021-11-23 19:51:53 +1000
committerMichael Ellerman <mpe@ellerman.id.au>2021-11-24 21:08:58 +1100
commit9d3ddb86d96d9f0314f3baaf0e37f987b40d3eee (patch)
tree845bdf2c6d784cd8a02af947d55404eb5fcf8c36 /tools/perf/scripts/python
parentKVM: PPC: Book3S HV P9: Factor PMU save/load into context switch functions (diff)
downloadlinux-9d3ddb86d96d9f0314f3baaf0e37f987b40d3eee.tar.gz
linux-9d3ddb86d96d9f0314f3baaf0e37f987b40d3eee.zip
KVM: PPC: Book3S HV P9: Demand fault PMU SPRs when marked not inuse
The pmcregs_in_use field in the guest VPA can not be trusted to reflect what the guest is doing with PMU SPRs, so the PMU must always be managed (stopped) when exiting the guest, and SPR values set when entering the guest to ensure it can't cause a covert channel or otherwise cause other guests or the host to misbehave. So prevent guest access to the PMU with HFSCR[PM] if pmcregs_in_use is clear, and avoid the PMU SPR access on every partition switch. Guests that set pmcregs_in_use incorrectly or when first setting it and using the PMU will take a hypervisor facility unavailable interrupt that will bring in the PMU SPRs. Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Athira Jajeev <atrajeev@linux.vnet.ibm.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Link: https://lore.kernel.org/r/20211123095231.1036501-16-npiggin@gmail.com
Diffstat (limited to 'tools/perf/scripts/python')
0 files changed, 0 insertions, 0 deletions