diff options
author | Ryan Roberts <ryan.roberts@arm.com> | 2023-11-27 11:17:33 +0000 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2023-11-27 15:03:50 +0000 |
commit | 419edf48d79f6fb2cc3fa090131864e95b321d41 (patch) | |
tree | 2fa4026bb36063759031d12241540bc2aff741a8 /tools/pci | |
parent | bd412e2a310cbc43b424198b0065086b0f462625 (diff) |
KVM: arm64: Convert translation level parameter to s8
With the introduction of FEAT_LPA2, the Arm ARM adds a new level of
translation, level -1, so levels can now be in the range [-1;3]. 3 is
always the last level and the first level is determined based on the
number of VA bits in use.
Convert level variables to use a signed type in preparation for
supporting this new level -1.
Since the last level is always anchored at 3, and the first level varies
to suit the number of VA/IPA bits, take the opportunity to replace
KVM_PGTABLE_MAX_LEVELS with the 2 macros KVM_PGTABLE_FIRST_LEVEL and
KVM_PGTABLE_LAST_LEVEL. This removes the assumption from the code that
levels run from 0 to KVM_PGTABLE_MAX_LEVELS - 1, which will soon no
longer be true.
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-9-ryan.roberts@arm.com
Diffstat (limited to 'tools/pci')
0 files changed, 0 insertions, 0 deletions