arm64/cpufeature: Validate hypervisor capabilities during CPU hotplug
authorAnshuman Khandual <anshuman.khandual@arm.com>
Tue, 12 May 2020 01:57:27 +0000 (07:27 +0530)
committerWill Deacon <will@kernel.org>
Wed, 20 May 2020 14:59:23 +0000 (15:59 +0100)
commitc73433fc630cda102f6527d4e5dfd289a9baec08
tree74f7dec4356f79cdea99be5dfde31134e8bf6497
parenteeb2d87ece1219cff33e5107c2a6d57803354d15
arm64/cpufeature: Validate hypervisor capabilities during CPU hotplug

This validates hypervisor capabilities like VMID width, IPA range for any
hot plug CPU against system finalized values. KVM's view of the IPA space
is used while allowing a given CPU to come up. While here, it factors out
get_vmid_bits() for general use.

Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will@kernel.org>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: James Morse <james.morse@arm.com>
Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: kvmarm@lists.cs.columbia.edu
Cc: linux-kernel@vger.kernel.org
Suggested-by: Suzuki Poulose <suzuki.poulose@arm.com>
Signed-off-by: Anshuman Khandual <anshuman.khandual@arm.com>
Reviewed-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/1589248647-22925-1-git-send-email-anshuman.khandual@arm.com
Signed-off-by: Will Deacon <will@kernel.org>
arch/arm64/include/asm/cpufeature.h
arch/arm64/include/asm/kvm_mmu.h
arch/arm64/kernel/cpufeature.c
arch/arm64/kvm/reset.c