linux/arch/arm64
Reiji Watanabe ea9ca904d2 KVM: arm64: PMU: Allow userspace to limit PMCR_EL0.N for the guest
KVM does not yet support userspace modifying PMCR_EL0.N (With
the previous patch, KVM ignores what is written by userspace).
Add support userspace limiting PMCR_EL0.N.

Disallow userspace to set PMCR_EL0.N to a value that is greater
than the host value as KVM doesn't support more event counters
than what the host HW implements. Also, make this register
immutable after the VM has started running. To maintain the
existing expectations, instead of returning an error, KVM
returns a success for these two cases.

Finally, ignore writes to read-only bits that are cleared on
vCPU reset, and RES{0,1} bits (including writable bits that
KVM doesn't support yet), as those bits shouldn't be modified
(at least with the current KVM).

Co-developed-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Raghavendra Rao Ananta <rananta@google.com>
Link: https://lore.kernel.org/r/20231020214053.2144305-8-rananta@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
2023-10-24 22:59:30 +00:00
..
boot Char/Misc driver changes for 6.6-rc1 2023-09-01 09:53:54 -07:00
configs Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
crypto crypto: arm64/aes - remove Makefile hack 2023-08-11 19:19:27 +08:00
hyperv arm64/hyperv: Use CPUHP_AP_HYPERV_ONLINE state to fix CPU online sequencing 2023-06-17 23:09:47 +00:00
include KVM: arm64: PMU: Set PMCR_EL0.N for vCPU based on the associated PMU 2023-10-24 22:59:30 +00:00
kernel arm64: cpufeature: Fix CLRBHB and BC detection 2023-09-18 10:45:11 +01:00
kvm KVM: arm64: PMU: Allow userspace to limit PMCR_EL0.N for the guest 2023-10-24 22:59:30 +00:00
lib arm64 fixes for -rc1 2023-09-08 12:48:37 -07:00
mm Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
net bpf, arm64: Support signed div/mod instructions 2023-08-18 15:46:35 +02:00
tools arm64: cpufeature: Fix CLRBHB and BC detection 2023-09-18 10:45:11 +01:00
xen
Kbuild
Kconfig - An extensive rework of kexec and crash Kconfig from Eric DeVolder 2023-08-29 14:53:51 -07:00
Kconfig.debug
Kconfig.platforms STM32 STM32MP25 for v6.5, round 1 2023-06-20 22:28:44 +02:00
Makefile