1
0
Fork 0
alistair23-linux/arch/arm64/kvm
Andrew Jones 11c14da8d0 KVM: arm64: Don't hide ID registers from userspace
commit f81cb2c3ad upstream.

ID registers are RAZ until they've been allocated a purpose, but
that doesn't mean they should be removed from the KVM_GET_REG_LIST
list. So far we only have one register, SYS_ID_AA64ZFR0_EL1, that
is hidden from userspace when its function, SVE, is not present.

Expose SYS_ID_AA64ZFR0_EL1 to userspace as RAZ when SVE is not
implemented. Removing the userspace visibility checks is enough
to reexpose it, as it will already return zero to userspace when
SVE is not present. The register already behaves as RAZ for the
guest when SVE is not present.

Fixes: 73433762fc ("KVM: arm64/sve: System register context switch and access support")
Reported-by: 张东旭 <xu910121@sina.com>
Signed-off-by: Andrew Jones <drjones@redhat.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org#v5.2+
Link: https://lore.kernel.org/r/20201105091022.15373-2-drjones@redhat.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-18 19:20:29 +01:00
..
hyp KVM: arm64: Assume write fault on S1PTW permission fault on instruction fetch 2020-10-01 13:18:25 +02:00
Kconfig Make anon_inodes unconditional 2019-04-19 14:03:11 +02:00
Makefile arm64: KVM: Add accessors to track guest/host only counters 2019-04-24 15:35:30 +01:00
debug.c KVM: arm64: Write arch.mdcr_el2 changes since last vcpu_load on VHE 2020-02-01 09:34:52 +00:00
fpsimd.c arm64/fpsimd: Introduce fpsimd_save_and_flush_cpu_state() and use it 2019-06-04 13:17:30 +01:00
guest.c KVM: arm64: Fix 32bit PC wrap-around 2020-05-14 07:58:26 +02:00
handle_exit.c KVM: arm64: Save the host's PtrAuth keys in non-preemptible context 2020-06-17 16:40:38 +02:00
hyp-init.S KVM: arm64: Stop clobbering x0 for HVC_SOFT_RESTART 2020-07-16 08:16:43 +02:00
hyp.S treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
inject_fault.c KVM: arm64: Correct PSTATE on exception entry 2020-02-11 04:35:16 -08:00
irq.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 422 2019-06-05 17:37:15 +02:00
pmu.c KVM: arm64: Move pmu hyp code under hyp's Makefile to avoid instrumentation 2019-05-24 14:53:20 +01:00
regmap.c arm64: KVM: regmap: Fix unexpected switch fall-through 2019-07-26 15:33:41 +01:00
reset.c KVM: arm64: Fix kvm_reset_vcpu() return code being incorrect with SVE 2020-07-16 08:16:44 +02:00
sys_regs.c KVM: arm64: Don't hide ID registers from userspace 2020-11-18 19:20:29 +01:00
sys_regs.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
sys_regs_generic_v8.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
trace.h arm64: KVM: Add trapped system register access tracepoint 2018-12-19 17:47:08 +00:00
va_layout.c arm64: mm: Introduce vabits_actual 2019-08-09 11:17:21 +01:00
vgic-sys-reg-v3.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 174 2019-05-30 11:26:41 -07:00