diff options
author | Marc Zyngier <maz@kernel.org> | 2021-12-27 15:48:09 +0300 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2021-12-28 14:04:20 +0300 |
commit | aa674de1dc3d2bdf2c67ad195dc81977972323c6 (patch) | |
tree | d03d1829c0c73a032e6330aa4584dceb58c41d9e /tools/testing/selftests/kvm/lib/aarch64/processor.c | |
parent | e7f58a6bd28bfd2e4f60312abf48f07de2c4121c (diff) | |
download | linux-aa674de1dc3d2bdf2c67ad195dc81977972323c6.tar.xz |
KVM: selftests: arm64: Add support for various modes with 16kB page size
The 16kB page size is not a popular choice, due to only a few CPUs
actually implementing support for it. However, it can lead to some
interesting performance improvements given the right uarch choices.
Add support for this page size for various PA/VA combinations.
Signed-off-by: Marc Zyngier <maz@kernel.org>
Reviewed-by: Andrew Jones <drjones@redhat.com>
Link: https://lore.kernel.org/r/20211227124809.1335409-7-maz@kernel.org
Diffstat (limited to 'tools/testing/selftests/kvm/lib/aarch64/processor.c')
-rw-r--r-- | tools/testing/selftests/kvm/lib/aarch64/processor.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/testing/selftests/kvm/lib/aarch64/processor.c b/tools/testing/selftests/kvm/lib/aarch64/processor.c index 70395c777ea4..9343d82519b4 100644 --- a/tools/testing/selftests/kvm/lib/aarch64/processor.c +++ b/tools/testing/selftests/kvm/lib/aarch64/processor.c @@ -252,6 +252,12 @@ void aarch64_vcpu_setup(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_vcpu_init case VM_MODE_P36V48_64K: tcr_el1 |= 1ul << 14; /* TG0 = 64KB */ break; + case VM_MODE_P48V48_16K: + case VM_MODE_P40V48_16K: + case VM_MODE_P36V48_16K: + case VM_MODE_P36V47_16K: + tcr_el1 |= 2ul << 14; /* TG0 = 16KB */ + break; case VM_MODE_P48V48_4K: case VM_MODE_P40V48_4K: case VM_MODE_P36V48_4K: @@ -267,15 +273,19 @@ void aarch64_vcpu_setup(struct kvm_vm *vm, uint32_t vcpuid, struct kvm_vcpu_init tcr_el1 |= 6ul << 32; /* IPS = 52 bits */ break; case VM_MODE_P48V48_4K: + case VM_MODE_P48V48_16K: case VM_MODE_P48V48_64K: tcr_el1 |= 5ul << 32; /* IPS = 48 bits */ break; case VM_MODE_P40V48_4K: + case VM_MODE_P40V48_16K: case VM_MODE_P40V48_64K: tcr_el1 |= 2ul << 32; /* IPS = 40 bits */ break; case VM_MODE_P36V48_4K: + case VM_MODE_P36V48_16K: case VM_MODE_P36V48_64K: + case VM_MODE_P36V47_16K: tcr_el1 |= 1ul << 32; /* IPS = 36 bits */ break; default: |