KVM: arm64: Save ID registers' sanitized value per guest
authorJing Zhang <jingzhangos@google.com>
Fri, 9 Jun 2023 19:00:49 +0000 (19:00 +0000)
committerOliver Upton <oliver.upton@linux.dev>
Thu, 15 Jun 2023 12:55:08 +0000 (12:55 +0000)
commit473341469042b39535ee800a19c45110ebc46346
treea29a5b091843657c0ce90399f61c3d1c8abed5e6
parentd86cde6e335fa442c6b0866562140a2bef25402a
KVM: arm64: Save ID registers' sanitized value per guest

Initialize the default ID register values upon the first call to
KVM_ARM_VCPU_INIT. The vCPU feature flags are finalized at that point,
so it is possible to determine the maximum feature set supported by a
particular VM configuration. Do nothing with these values for now, as we
need to rework the plumbing of what's already writable to be compatible
with the generic infrastructure.

Co-developed-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Reiji Watanabe <reijiw@google.com>
Signed-off-by: Jing Zhang <jingzhangos@google.com>
Link: https://lore.kernel.org/r/20230609190054.1542113-7-oliver.upton@linux.dev
[Oliver: Hoist everything into KVM_ARM_VCPU_INIT time, so the features
 are final]
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
arch/arm64/include/asm/kvm_host.h
arch/arm64/kvm/sys_regs.c
arch/arm64/kvm/sys_regs.h