[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 01/49] target/ppc: Fix lxv/stxv MSR facility check
From: |
Nicholas Piggin |
Subject: |
[PULL 01/49] target/ppc: Fix lxv/stxv MSR facility check |
Date: |
Mon, 19 Feb 2024 18:28:50 +1000 |
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
Tested-by: Harsh Prateek Bora <harshpb@linux.ibm.com>
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
---
target/ppc/translate/vsx-impl.c.inc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/target/ppc/translate/vsx-impl.c.inc
b/target/ppc/translate/vsx-impl.c.inc
index 6db87ab336..0266f09119 100644
--- a/target/ppc/translate/vsx-impl.c.inc
+++ b/target/ppc/translate/vsx-impl.c.inc
@@ -2268,7 +2268,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)
{
- if (paired || a->rt >= 32) {
+ if (paired || a->rt < 32) {
REQUIRE_VSX(ctx);
} else {
REQUIRE_VECTOR(ctx);
--
2.42.0
- [PULL 00/49] ppc-for-9.0 queue, Nicholas Piggin, 2024/02/19
- [PULL 01/49] target/ppc: Fix lxv/stxv MSR facility check,
Nicholas Piggin <=
- [PULL 02/49] target/ppc: Fix crash on machine check caused by ifetch, Nicholas Piggin, 2024/02/19
- [PULL 03/49] tests/avocado: mark boot_linux.py long runtime instead of flaky, Nicholas Piggin, 2024/02/19
- [PULL 04/49] tests/avocado: improve flaky ppc/pnv boot_linux_console.py test, Nicholas Piggin, 2024/02/19
- [PULL 05/49] tests/avocado: ppc add powernv10 boot_linux_console test, Nicholas Piggin, 2024/02/19
- [PULL 06/49] tests/avocado: Add ppc pseries and powernv hash MMU tests, Nicholas Piggin, 2024/02/19
- [PULL 07/49] tests/avocado: Add pseries KVM boot_linux test, Nicholas Piggin, 2024/02/19
- [PULL 08/49] tests/avocado: ppc add hypervisor tests, Nicholas Piggin, 2024/02/19
- [PULL 10/49] tests/avocado: Use default CPU for pseries machine, Nicholas Piggin, 2024/02/19
- [PULL 09/49] tests/avocado: Add FreeBSD distro boot tests for ppc, Nicholas Piggin, 2024/02/19