]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: arm64: Trap access to pVM restricted features
authorFuad Tabba <tabba@google.com>
Sun, 10 Oct 2021 14:56:35 +0000 (15:56 +0100)
committerMarc Zyngier <maz@kernel.org>
Mon, 11 Oct 2021 13:57:30 +0000 (14:57 +0100)
commit95231be53a237028ec14d34d67f7a87d710ae853
tree3e66d77adfa2e77e8e90e655fd22d2138aa00990
parente109984c61bd70496101df59c413fcc4d180ecf6
KVM: arm64: Trap access to pVM restricted features

Trap accesses to restricted features for VMs running in protected
mode.

Access to feature registers are emulated, and only supported
features are exposed to protected VMs.

Accesses to restricted registers as well as restricted
instructions are trapped, and an undefined exception is injected
into the protected guests, i.e., with EC = 0x0 (unknown reason).
This EC is the one used, according to the Arm Architecture
Reference Manual, for unallocated or undefined system registers
or instructions.

Only affects the functionality of protected VMs. Otherwise,
should not affect non-protected VMs when KVM is running in
protected mode.

Signed-off-by: Fuad Tabba <tabba@google.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211010145636.1950948-11-tabba@google.com
arch/arm64/kvm/hyp/nvhe/switch.c