diff options
author | Will Deacon <[email protected]> | 2020-10-29 14:47:16 +0000 |
---|---|---|
committer | Marc Zyngier <[email protected]> | 2020-10-29 19:49:03 +0000 |
commit | e2fc6a9f686d037cbd9b08b9fb657685b4a722d3 (patch) | |
tree | c7362c1a7526b438a27376f8333ee9560921ed9d /tools/perf/scripts/python/export-to-postgresql.py | |
parent | 4a1c2c7f63c52ccb11770b5ae25920a6b79d3548 (diff) |
KVM: arm64: Fix masks in stage2_pte_cacheable()
stage2_pte_cacheable() tries to figure out whether the mapping installed
in its 'pte' parameter is cacheable or not. Unfortunately, it fails
miserably because it extracts the memory attributes from the entry using
FIELD_GET(), which returns the attributes shifted down to bit 0, but then
compares this with the unshifted value generated by the PAGE_S2_MEMATTR()
macro.
A direct consequence of this bug is that cache maintenance is silently
skipped, which in turn causes 32-bit guests to crash early on when their
set/way maintenance is trapped but not emulated correctly.
Fix the broken masks by avoiding the use of FIELD_GET() altogether.
Fixes: 6d9d2115c480 ("KVM: arm64: Add support for stage-2 map()/unmap() in generic page-table")
Reported-by: Marc Zyngier <[email protected]>
Signed-off-by: Will Deacon <[email protected]>
Signed-off-by: Marc Zyngier <[email protected]>
Cc: Quentin Perret <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions