diff options
| author | 2026-06-11 20:46:43 +0800 | |
|---|---|---|
| committer | 2026-06-11 20:46:43 +0800 | |
| commit | ebd50de14f1a06b7e0206083904bcc62b9ba65be (patch) | |
| tree | df244f2606aa49928b83a3b8ca621deea6441332 /tools/perf/scripts/python/stackcollapse.py | |
| parent | LoongArch: KVM: Check the return values for put_user() (diff) | |
LoongArch: KVM: Return full old CSR value from kvm_emu_xchg_csr()
The LoongArch CSRXCHG instruction returns the full old CSR value in rd
after applying the masked update. kvm_emu_xchg_csr() currently masks
the saved value before returning it to the guest, so rd receives only
the bits selected by the write mask.
That breaks the architectural behavior and makes a zero mask return 0
instead of the previous CSR value. So, keep the masked CSR update, but
return the unmodified old CSR value.
Cc: stable@vger.kernel.org
Fixes: da50f5a693ff ("LoongArch: KVM: Implement handle csr exception")
Reviewed-by: Bibo Mao <maobibo@loongson.cn>
Signed-off-by: Qiang Ma <maqianga@uniontech.com>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Diffstat (limited to 'tools/perf/scripts/python/stackcollapse.py')
0 files changed, 0 insertions, 0 deletions
