KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV2/3 to protected VMs
authorFuad Tabba <tabba@google.com>
Tue, 4 Apr 2023 15:23:21 +0000 (16:23 +0100)
committerOliver Upton <oliver.upton@linux.dev>
Tue, 4 Apr 2023 15:52:06 +0000 (15:52 +0000)
commite81625218bf7986ba1351a98c43d346b15601d26
treecf1885de77cca93af99f7bd3c71e50e40f729ab4
parentf9ea835e99bc8d049bf2a3ec8fa5a7cb4fcade23
KVM: arm64: Advertise ID_AA64PFR0_EL1.CSV2/3 to protected VMs

The existing pKVM code attempts to advertise CSV2/3 using values
initialized to 0, but never set. To advertise CSV2/3 to protected
guests, pass the CSV2/3 values to hyp when initializing hyp's
view of guests' ID_AA64PFR0_EL1.

Similar to non-protected KVM, these are system-wide, rather than
per cpu, for simplicity.

Fixes: 6c30bfb18d0b ("KVM: arm64: Add handlers for protected VM System Registers")
Signed-off-by: Fuad Tabba <tabba@google.com>
Link: https://lore.kernel.org/r/20230404152321.413064-1-tabba@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/kvm/arm.c
arch/arm64/kvm/hyp/include/nvhe/fixed_config.h
arch/arm64/kvm/hyp/nvhe/sys_regs.c