diff options
author | Marc Zyngier <maz@kernel.org> | 2025-07-21 11:19:50 +0100 |
---|---|---|
committer | Oliver Upton <oliver.upton@linux.dev> | 2025-07-21 09:35:57 -0700 |
commit | 303084ad12767db64c84ba8fcd0450aec38c8534 (patch) | |
tree | a7330d850aa4e0bfb33af0dee2443f1acbb6d193 /tools/perf/scripts/python/flamegraph.py | |
parent | c6e35dff58d348c1a9489e9b3b62b3721e62631d (diff) |
KVM: arm64: Filter out HCR_EL2 bits when running in hypervisor context
Most HCR_EL2 bits are not supposed to affect EL2 at all, but only
the guest. However, we gladly merge these bits with the host's
HCR_EL2 configuration, irrespective of entering L1 or L2.
This leads to some funky behaviour, such as L1 trying to inject
a virtual SError for L2, and getting a taste of its own medecine.
Not quite what the architecture anticipated.
In the end, the only bits that matter are those we have defined as
invariants, either because we've made them RESx (E2H, HCD...), or
that we actively refuse to merge because the mess with KVM's own
logic.
Use the sanitisation infrastructure to get the RES1 bits, and let
things rip in a safer way.
Fixes: 04ab519bb86df ("KVM: arm64: nv: Configure HCR_EL2 for FEAT_NV2")
Signed-off-by: Marc Zyngier <maz@kernel.org>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20250721101955.535159-3-maz@kernel.org
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools/perf/scripts/python/flamegraph.py')
0 files changed, 0 insertions, 0 deletions