qemu/target/ppc
Fabiano Rosas 40a3cb9213 target/ppc: Fix lxvx/stxvx facility check
The XT check for the lxvx/stxvx instructions is currently
inverted. This was introduced during the move to decodetree.

>From the ISA:
  Chapter 7. Vector-Scalar Extension Facility
  Load VSX Vector Indexed X-form

  lxvx XT,RA,RB
  if TX=0 & MSR.VSX=0 then VSX_Unavailable()
  if TX=1 & MSR.VEC=0 then Vector_Unavailable()
  ...
  Let XT be the value 32×TX + T.

The code currently does the opposite:

    if (paired || a->rt >= 32) {
        REQUIRE_VSX(ctx);
    } else {
        REQUIRE_VECTOR(ctx);
    }

This was already fixed for lxv/stxv at commit "2cc0e449d1 (target/ppc:
Fix lxv/stxv MSR facility check)", but the indexed forms were missed.

Cc: qemu-stable@nongnu.org
Fixes: 70426b5bb7 ("target/ppc: moved stxvx and lxvx from legacy to decodtree")
Signed-off-by: Fabiano Rosas <farosas@suse.de>
Reviewed-by: Claudio Fontana <cfontana@suse.de>
Acked-by: Ilya Leoshkevich <iii@linux.ibm.com>
Reviewed-by: Fabiano Rosas <farosas@suse.de>
Message-ID: <20240911141651.6914-1-farosas@suse.de>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
(cherry picked from commit 8bded2e73e)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2024-09-28 07:25:08 +03:00
..
translate target/ppc: Fix lxvx/stxvx facility check 2024-09-28 07:25:08 +03:00
arch_dump.c
compat.c spapr: Fix machine reset deadlock from replay-record 2023-09-06 11:19:33 +02:00
cpu_init.c accel/tcg: Remove cpu_set_cpustate_pointers 2023-10-04 11:03:54 -07:00
cpu-models.c
cpu-models.h ppc: spelling fixes 2023-09-20 07:54:34 +03:00
cpu-param.h
cpu-qom.h target/ppc: Move powerpc_input_t definition to 'cpu.h' 2023-11-07 12:13:28 +01:00
cpu.c target/ppc: Flush inputs to zero with NJ in ppc_store_vscr 2023-09-06 11:19:33 +02:00
cpu.h target/ppc: Move powerpc_input_t definition to 'cpu.h' 2023-11-07 12:13:28 +01:00
dfp_helper.c
excp_helper.c target/ppc: Fix crash on machine check caused by ifetch 2024-02-24 19:29:45 +03:00
fpu_helper.c target/ppc: Fix bugs in VSX_CVT_FP_TO_INT and VSX_CVT_FP_TO_INT2 macros 2023-11-21 08:39:58 +01:00
gdbstub.c target/ppc: Remove references to gdb_has_xml 2023-10-11 08:46:33 +01:00
helper_regs.c
helper_regs.h
helper.h target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
insn32.decode
insn64.decode
int_helper.c target/ppc: Rename variables to avoid local variable shadowing in VUPKPX 2023-10-06 10:56:54 +02:00
internal.h target/ppc: Define powerpc_pm_insn_t in 'internal.h' 2023-11-07 12:13:28 +01:00
Kconfig
kvm_ppc.h target/ppc: Prohibit target specific KVM prototypes on user emulation 2023-11-07 12:13:28 +01:00
kvm.c sysemu/kvm: Restrict kvmppc_get_radix_page_info() to ppc targets 2023-11-07 12:13:28 +01:00
machine.c target/ppc: Fix migration of CPUs with TLB_EMB TLB type 2024-09-06 17:53:25 +03:00
mem_helper.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
meson.build target/ppc: Restrict KVM objects to system emulation 2023-11-07 12:13:28 +01:00
misc_helper.c target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
mmu_common.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
mmu_helper.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
mmu-book3s-v3.c
mmu-book3s-v3.h
mmu-books.h
mmu-hash32.c
mmu-hash32.h
mmu-hash64.c
mmu-hash64.h
mmu-radix64.c target/ppc: Generate storage interrupts for radix RC changes 2023-09-06 11:19:32 +02:00
mmu-radix64.h
power8-pmu-regs.c.inc tcg: Rename cpu_env to tcg_env 2023-10-03 08:01:02 -07:00
power8-pmu.c target/helpers: Remove unnecessary 'qemu/main-loop.h' header 2023-08-31 19:47:43 +02:00
power8-pmu.h
ppc-qmp-cmds.c
spr_common.h target/ppc: Implement watchpoint debug facility for v2.07S 2023-09-06 11:19:32 +02:00
tcg-stub.c
timebase_helper.c
trace-events
trace.h
translate.c accel/tcg: Replace CPUState.env_ptr with cpu_env() 2023-10-04 11:03:54 -07:00
user_only_helper.c