]> git.ipfire.org Git - thirdparty/qemu.git/commit
target/ppc: Fix lxv/stxv MSR facility check
authorNicholas Piggin <npiggin@gmail.com>
Tue, 13 Feb 2024 07:50:43 +0000 (17:50 +1000)
committerMichael Tokarev <mjt@tls.msk.ru>
Sat, 24 Feb 2024 16:29:15 +0000 (19:29 +0300)
commita15b7df35bf279b1328ee6b7939c8384aa1d364c
tree451c8b3ab15f309109506b601c0a7b9170806e55
parent1bdf3f4ba0c961f35eb50bf4fa7a3ad4da716c68
target/ppc: Fix lxv/stxv MSR facility check

The move to decodetree flipped the inequality test for the VEC / VSX
MSR facility check.

This caused application crashes under Linux, where these facility
unavailable interrupts are used for lazy-switching of VEC/VSX register
sets. Getting the incorrect interrupt would result in wrong registers
being loaded, potentially overwriting live values and/or exposing
stale ones.

Cc: qemu-stable@nongnu.org
Reported-by: Joel Stanley <joel@jms.id.au>
Fixes: 70426b5bb738 ("target/ppc: moved stxvx and lxvx from legacy to decodtree")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1769
Reviewed-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Tested-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Tested-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
(cherry picked from commit 2cc0e449d17310877fb28a942d4627ad22bb68ea)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
target/ppc/translate/vsx-impl.c.inc