mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 14:02:06 -04:00
KVM: selftests: arm64: Support P52V48 4K and 16K guest_modes
Add support for VM_MODE_P52V48_4K and VM_MODE_P52V48_16K guest modes by using the FEAT_LPA2 pte format for stage1, when FEAT_LPA2 is available. Reviewed-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Ryan Roberts <ryan.roberts@arm.com> Signed-off-by: Marc Zyngier <maz@kernel.org> Link: https://lore.kernel.org/r/20231127111737.1897081-13-ryan.roberts@arm.com
This commit is contained in:
committed by
Marc Zyngier
parent
72324ac52d
commit
10a0cc3b68
@@ -148,6 +148,7 @@ const char *vm_guest_mode_string(uint32_t i)
|
||||
{
|
||||
static const char * const strings[] = {
|
||||
[VM_MODE_P52V48_4K] = "PA-bits:52, VA-bits:48, 4K pages",
|
||||
[VM_MODE_P52V48_16K] = "PA-bits:52, VA-bits:48, 16K pages",
|
||||
[VM_MODE_P52V48_64K] = "PA-bits:52, VA-bits:48, 64K pages",
|
||||
[VM_MODE_P48V48_4K] = "PA-bits:48, VA-bits:48, 4K pages",
|
||||
[VM_MODE_P48V48_16K] = "PA-bits:48, VA-bits:48, 16K pages",
|
||||
@@ -173,6 +174,7 @@ const char *vm_guest_mode_string(uint32_t i)
|
||||
|
||||
const struct vm_guest_mode_params vm_guest_mode_params[] = {
|
||||
[VM_MODE_P52V48_4K] = { 52, 48, 0x1000, 12 },
|
||||
[VM_MODE_P52V48_16K] = { 52, 48, 0x4000, 14 },
|
||||
[VM_MODE_P52V48_64K] = { 52, 48, 0x10000, 16 },
|
||||
[VM_MODE_P48V48_4K] = { 48, 48, 0x1000, 12 },
|
||||
[VM_MODE_P48V48_16K] = { 48, 48, 0x4000, 14 },
|
||||
@@ -251,6 +253,7 @@ struct kvm_vm *____vm_create(enum vm_guest_mode mode)
|
||||
case VM_MODE_P36V48_64K:
|
||||
vm->pgtable_levels = 3;
|
||||
break;
|
||||
case VM_MODE_P52V48_16K:
|
||||
case VM_MODE_P48V48_16K:
|
||||
case VM_MODE_P40V48_16K:
|
||||
case VM_MODE_P36V48_16K:
|
||||
|
||||
Reference in New Issue
Block a user