mirror of
https://github.com/torvalds/linux.git
synced 2026-06-01 19:13:47 +02:00
KVM: arm64: Expand valid block mappings to FEAT_LPA/LPA2 support
With 52bit PAs, block mappings can exist at different levels (such as level 0 for 4kB pages, or level 1 for 16kB and 64kB pages). Account for this in walk_s1(). Reviewed-by: Oliver Upton <oliver.upton@linux.dev> Signed-off-by: Marc Zyngier <maz@kernel.org>
This commit is contained in:
parent
dd82412c2b
commit
5da3a3b27a
|
|
@ -448,11 +448,11 @@ static int walk_s1(struct kvm_vcpu *vcpu, struct s1_walk_info *wi,
|
|||
|
||||
switch (BIT(wi->pgshift)) {
|
||||
case SZ_4K:
|
||||
valid_block = level == 1 || level == 2;
|
||||
valid_block = level == 1 || level == 2 || (wi->pa52bit && level == 0);
|
||||
break;
|
||||
case SZ_16K:
|
||||
case SZ_64K:
|
||||
valid_block = level == 2;
|
||||
valid_block = level == 2 || (wi->pa52bit && level == 1);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user