KVM: arm64: Expose MOPS instructions to guests
authorKristina Martsenko <kristina.martsenko@arm.com>
Fri, 22 Sep 2023 11:25:08 +0000 (12:25 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 9 Oct 2023 19:54:25 +0000 (19:54 +0000)
commite0bb80c62cfd0c289c841d35e412e633299530e3
tree8f3b31ed6e6271adb455e0c6de4e78aa459572bc
parent2de451a329cf662beeba71f63c7f83ee24ca6642
KVM: arm64: Expose MOPS instructions to guests

Expose the Armv8.8 FEAT_MOPS feature to guests in the ID register and
allow the MOPS instructions to be run in a guest. Only expose MOPS if
the whole system supports it.

Note, it is expected that guests do not use these instructions on MMIO,
similarly to other instructions where ESR_EL2.ISV==0 such as LDP/STP.

Signed-off-by: Kristina Martsenko <kristina.martsenko@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20230922112508.1774352-3-kristina.martsenko@arm.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_arm.h
arch/arm64/kvm/hyp/include/nvhe/fixed_config.h
arch/arm64/kvm/sys_regs.c