diff options
author | Marc Zyngier <maz@kernel.org> | 2025-07-01 15:02:58 +0100 |
---|---|---|
committer | Marc Zyngier <maz@kernel.org> | 2025-07-03 10:39:24 +0100 |
commit | 105485a182dc6ba32e55db46839af756c105afae (patch) | |
tree | a48308ee7f0c7f71686856e474f9b0c73c84aa1f /scripts/patch-kernel | |
parent | 0e02219f9cf4f0c0aa3dbf3c820e6612bf3f0c8c (diff) |
KVM: arm64: Fix handling of FEAT_GTG for unimplemented granule sizes
Booting an EL2 guest on a system only supporting a subset of the
possible page sizes leads to interesting situations.
For example, on a system that only supports 4kB and 64kB, and is
booted with a 4kB kernel, we end-up advertising 16kB support at
stage-2, which is pretty weird.
That's because we consider that any S2 bigger than our base granule
is fair game, irrespective of what the HW actually supports. While this
is not impossible to support (KVM would happily handle it), it is likely
to be confusing for the guest.
Add new checks that will verify that this granule size is actually
supported before publishing it to the guest.
Fixes: e7ef6ed4583ea ("KVM: arm64: Enforce NV limits on a per-idregs basis")
Reviewed-by: Oliver Upton <oliver.upton@linux.dev>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Diffstat (limited to 'scripts/patch-kernel')
0 files changed, 0 insertions, 0 deletions