qemu/include
Denis V. Lunev d7f16bad8f hw/ide/ahci: refuse a PIO transfer with no command header
ahci_map_clb_address() already clears cur_cmd, so every consumer of it
has to cope with there being no current command. ahci_pio_transfer(),
ahci_commit_buf() and ahci_populate_sglist() all dereference it
unconditionally instead.

Give the three of them a NULL check. Declaring the data transferred
anyway is not enough: ide_transfer_start() goes on to call the end
transfer function, and for a multi-sector write that is
ide_sector_write(), which commits an io_buffer the guest never
refilled. Clearing PxCMD.ST during a WRITE SECTOR(S) of two sectors
therefore writes the first sector's contents over the second, at a
sector the guest chose.

Let pio_transfer report that nothing was transferred and halt there, so
no callback acts on a buffer that was never filled. Only the AHCI HBA
implements the callback, so the signature change is local to it.

Cc: John Snow <jsnow@redhat.com>
Cc: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>
Signed-off-by: Denis V. Lunev <den@openvz.org>
2026-08-26 12:59:19 +02:00
..
accel accel/tcg: Improve docstrings around TCGCPUOps::*watchpoint* handlers 2026-07-06 15:42:18 +02:00
authz
block block/qapi: take stats->lock when reading BlockAcctStats for query-blockstats 2026-08-03 10:42:29 +02:00
chardev ui/console: default vc encoding to cp437 for machine < 11.1 2026-05-09 10:24:33 +04:00
crypto crypto/cipher: Add setaad/gettag for AEAD modes 2026-08-11 18:25:58 +02:00
disas target/mips: Enable disassembly via capstone 2026-08-18 17:35:33 -07:00
exec accel/tcg: Use TLB_FORCE_SLOW not TLB_MMIO for user-only plugins 2026-07-07 09:48:42 -07:00
fpu fpu: Export floatN_minmax 2026-05-22 11:21:37 -07:00
gdbstub gdbstub: Introduce GdbBreakpointType enumerator 2026-07-06 15:42:18 +02:00
hw hw/ide/ahci: refuse a PIO transfer with no command header 2026-08-26 12:59:19 +02:00
io io: add missing coroutine annotation 2026-07-27 15:51:03 +04:00
libdecnumber include/libdecnumber: replace FSF postal address with licenses URL 2025-06-26 00:42:37 +02:00
migration migration: Make switchover-ack re-usable 2026-07-07 07:12:46 +02:00
monitor monitor: Rename MonitorHMP @mon -> @hmp 2026-08-16 16:34:03 +02:00
net net: Correct padding check in qemu_receive_packet() 2026-07-21 12:18:36 +02:00
plugins plugins: use int64_t for the syscall filter return value 2026-06-18 16:47:12 -07:00
qapi qapi/qmp-registry: Remove unnecessary 'monitor/monitor.h' header 2026-08-16 16:32:42 +02:00
qemu host-utils: fix ssub32/64_saturate return type and clamp direction 2026-08-11 23:20:45 -07:00
qobject json-parser: add location to JSON parsing errors 2026-07-02 13:56:35 +02:00
qom qom/object.c: rename object_class_property_uint*_ptr() to object_class_static_property_uint*_ptr() 2026-08-14 11:31:18 +01:00
scsi scsi: always send valid PREEMPT TYPE field 2026-05-08 16:40:03 +02:00
semihosting semihosting/uaccess: Use the cpu_internal_tswap() functions 2026-03-12 19:24:24 +00:00
standard-headers hw/misc/vmlaunchupdate: add api header 2026-08-20 16:40:33 +02:00
system igvm + vmlaunchupdate: allow guests supply their own igvm firmware images. 2026-08-21 10:39:31 -07:00
tcg tcg: Export tcg_gen_ussub_i{32,64,tl} 2026-08-21 09:14:35 +01:00
ui ui/egl: fix qemu_egl_display type 2026-08-25 15:20:43 +04:00
user user/guest-host: Include exec/abi_ptr.h 2026-07-21 12:18:36 +02:00
elf.h elf: Add EF_MIPS_ARCH_ASE definitions 2025-09-02 17:57:05 +02:00
glib-compat.h glib-compat: add fallback for g_clear_fd/g_autofd 2026-06-24 15:41:14 +04:00
qemu-io.h
qemu-main.h ui & main loop: Redesign of system-specific main thread event handling 2024-12-31 21:21:34 +01:00