diff options
| author | Pengpeng Hou <pengpeng@iscas.ac.cn> | 2026-07-18 12:35:40 +0800 |
|---|---|---|
| committer | Anup Patel <anup@brainfault.org> | 2026-08-07 20:48:39 +0530 |
| commit | 0e3d7d8c6c8cf71fd3162b366048b67b9eae824e (patch) | |
| tree | 1d8a5944b98dfbebc85afe2a4309854492051235 /tools/perf/scripts/python/stackcollapse.py | |
| parent | e8f3e9ba146a2089465ea7e98e857d78f8d4788a (diff) | |
RISC-V: KVM: Reject overlapping AIA IMSIC address fields
KVM lets userspace configure the IMSIC guest, HART, group-width, and
group-shift fields independently. The individual bounds allow a layout
such as guest_bits=7, hart_bits=6, group_bits=1, and group_shift=24.
That layout places the group index bit at bit 24 while the lower
guest+HART field also extends through bit 24. The IMSIC address helpers
later consume these values as one address layout: aia_imsic_ppn() masks
the lower guest+HART field and the group field, while
aia_imsic_hart_index() combines the group and HART index. Allowing an
overlapping configuration therefore gives one address bit two different
meanings.
Reject group-index layouts that start before the end of the guest+HART
field before initializing the in-kernel irqchip.
Fixes: 89d01306e34d ("RISC-V: KVM: Implement device interface for AIA irqchip")
Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn>
Reviewed-by: Anup Patel <anup@brainfault.org>
Link: https://lore.kernel.org/r/20260718040000.005.6ede2881-caplitmus-rv@iscas.ac.cn
Signed-off-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
