mirror of
https://github.com/mii443/qemu.git
synced 2025-08-23 07:35:47 +00:00
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:70426b5bb7
("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 commit2cc0e449d1
) Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
This commit is contained in:
committed by
Michael Tokarev
parent
1bdf3f4ba0
commit
a15b7df35b
@ -2518,7 +2518,7 @@ static bool do_lstxv(DisasContext *ctx, int ra, TCGv displ,
|
|||||||
|
|
||||||
static bool do_lstxv_D(DisasContext *ctx, arg_D *a, bool store, bool paired)
|
static bool do_lstxv_D(DisasContext *ctx, arg_D *a, bool store, bool paired)
|
||||||
{
|
{
|
||||||
if (paired || a->rt >= 32) {
|
if (paired || a->rt < 32) {
|
||||||
REQUIRE_VSX(ctx);
|
REQUIRE_VSX(ctx);
|
||||||
} else {
|
} else {
|
||||||
REQUIRE_VECTOR(ctx);
|
REQUIRE_VECTOR(ctx);
|
||||||
|
Reference in New Issue
Block a user