You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
qemu/target/s390x
Ilya Leoshkevich fc976a67de target/s390x: Use address generation for register branch targets
Indirect branches to addresses taken from registers go through address
generation, e.g., for BRANCH ON CONDITION Principles of Operation says:

    In the RR format, the contents of general register R2 are used to
    generate the branch address

QEMU uses r2_nz handler for the respective register operands. Currently
it does not zero out extra bits in 24- and 31-bit addressing modes as
required by address generation. The very frequently used
s390x_tr_init_disas_context() function has a workaround for this,
but the code for saving an old PSW during an interrupt does not.

Add the missing masking to r2_nz. Enforce PSW validity by replacing the
workaround with an assertion.

Reported-by: Thomas Weißschuh <linux@weissschuh.net>
Reported-by: Heiko Carstens <hca@linux.ibm.com>
Link: https://lore.kernel.org/lkml/ab3131a2-c42a-47ff-bf03-e9f68ac053c0@t-8ch.de/
Cc: qemu-stable@nongnu.org
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Tested-by: Thomas Weißschuh <linux@weissschuh.net>
Message-ID: <20251016175954.41153-4-iii@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
5 days ago
..
kvm accel/kvm: Introduce KvmPutState enum 3 weeks ago
tcg target/s390x: Use address generation for register branch targets 5 days ago
Kconfig target/s390x: Add a CONFIG switch to disable legacy CPUs 1 year ago
arch_dump.c include: Rename sysemu/ -> system/ 11 months ago
cpu-dump.c include: Rename sysemu/ -> system/ 11 months ago
cpu-param.h tcg: Remove the TCG_GUEST_DEFAULT_MO definition globally 7 months ago
cpu-qom.h target: Move ArchCPUClass definition to 'cpu.h' 2 years ago
cpu-system.c add cpu_test_interrupt()/cpu_set_interrupt() helpers and use them tree wide 2 months ago
cpu.c target/s390x: Fill in TCGCPUOps.pointer_wrap 5 months ago
cpu.h accel/tcg: Hoist cpu_get_tb_cpu_state decl to accl/tcg/cpu-ops.h 6 months ago
cpu_features.c s390x/cpumodel: Add PLO-extension facility 11 months ago
cpu_features.h s390x/cpumodel: add Concurrent-functions facility support 11 months ago
cpu_features_def.h meson: rename .inc.h files to .h.inc 5 years ago
cpu_features_def.h.inc target/s390x: A fix for the trouble with tribles 4 months ago
cpu_models.c target/s390x: Fix type conflict of GLib function pointers 6 months ago
cpu_models.h target/s390x: Register CPUClass:list_cpus 7 months ago
cpu_models_system.c target/s390x: set has_deprecated_props flag 4 months ago
cpu_models_user.c target/s390x: split sysemu part of cpu models 4 years ago
diag.c include: Rename sysemu/ -> system/ 11 months ago
gdbstub.c exec: Declare tlb_flush*() in 'exec/cputlb.h' 8 months ago
gen-features.c hw/s390x/s390-virtio-ccw: Remove the deprecated 4.1 machine type 5 months ago
helper.c target/s390x: Reduce s390_store_status() scope 4 weeks ago
helper.h target/s390x: Simplify per_ifetch, per_check_exception 1 year ago
interrupt.c include: Remove 'exec/exec-all.h' 6 months ago
ioinst.c s390: implementing CHSC SEI for AP config change 5 months ago
machine.c include: Rename sysemu/ -> system/ 11 months ago
meson.build include: Rename sysemu/ -> system/ 11 months ago
mmu_helper.c target/s390x/mmu_helper: Do not ignore address_space_rw() errors 3 weeks ago
s390x-internal.h target/s390x: Reduce s390_store_status() scope 4 weeks ago
sigp.c target/s390x: Replace legacy cpu_physical_memory_[un]map() calls (3/3) 4 weeks ago
trace-events include: Rename sysemu/ -> system/ 11 months ago
trace.h trace: switch position of headers to what Meson requires 5 years ago