linux/arch
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
..
alpha Kbuild updates for v6.6 2023-09-05 11:01:47 -07:00
arc ARC updates for v6.6 2023-09-04 15:38:24 -07:00
arm xen: simplify evtchn_do_upcall() call maze 2023-09-19 07:04:49 +02:00
arm64 KVM: arm64: PMU: Allow userspace to limit PMCR_EL0.N for the guest 2023-10-24 22:59:30 +00:00
csky arch/csky 2nd patches for 6.6 2023-09-01 08:02:45 -07:00
hexagon Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
ia64 acpi: Provide ia64 dummy implementation of acpi_proc_quirk_mwait_check() 2023-09-11 08:13:17 +00:00
loongarch LoongArch: Don't inline kasan_mem_to_shadow()/kasan_shadow_to_mem() 2023-09-20 14:26:29 +08:00
m68k ata changes for 6.6 2023-09-05 12:37:28 -07:00
microblaze Microblaze patches for 6.6-rc1 2023-09-05 10:15:22 -07:00
mips ARM: 2023-09-07 13:52:20 -07:00
nios2 Add x86 shadow stack support 2023-08-31 12:20:12 -07:00
openrisc OpenRISC updates for 6.6 2023-09-05 10:09:31 -07:00
parisc parisc architecture fixes and enhancements for kernel v6.6-rc2: 2023-09-13 11:35:53 -07:00
powerpc powerpc/dexcr: Move HASHCHK trap handler 2023-09-18 12:23:48 +10:00
riscv RISC-V: KVM: Fix riscv_vcpu_get_isa_ext_single() for missing extensions 2023-09-21 15:04:01 +05:30
s390 s390/cert_store: fix string length handling 2023-09-19 13:25:44 +02:00
sh sh: mm: re-add lost __ref to ioremap_prot() to fix modpost warning 2023-09-19 13:21:32 -07:00
sparc ata changes for 6.6 2023-09-05 12:37:28 -07:00
um This pull request contains the following changes for UML: 2023-09-04 11:32:21 -07:00
x86 ARM: 2023-09-24 14:14:35 -07:00
xtensa Xtensa updates for v6.6 2023-09-07 10:30:17 -07:00
.gitignore
Kconfig Add x86 shadow stack support 2023-08-31 12:20:12 -07:00