diff options
| author | Qiang Ma <maqianga@uniontech.com> | 2026-06-11 15:46:43 +0300 |
|---|---|---|
| committer | Huacai Chen <chenhuacai@loongson.cn> | 2026-06-11 15:46:43 +0300 |
| commit | ebd50de14f1a06b7e0206083904bcc62b9ba65be (patch) | |
| tree | df244f2606aa49928b83a3b8ca621deea6441332 /scripts/Makefile.thinlto | |
| parent | fb89e0fe2dc4246c86ad0eb0fa2b7cb2f8ba9728 (diff) | |
| download | linux-ebd50de14f1a06b7e0206083904bcc62b9ba65be.tar.xz | |
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 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
