qemu/system
Zhenzhong Duan 644a52778a system/physmem: use return value of ram_block_discard_require() as errno
When ram_block_discard_require() fails, errno is passed to error_setg_errno().
It's a stale value or 0 which is unrelated to ram_block_discard_require().

As ram_block_discard_require() already returns -EBUSY in failure case,
use it as errno for error_setg_errno().

Fixes: 852f0048f3 ("make guest_memfd require uncoordinated discard")
Signed-off-by: Zhenzhong Duan <zhenzhong.duan@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: David Hildenbrand <david@redhat.com>
Message-ID: <20240716064213.290696-1-zhenzhong.duan@intel.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-07-16 20:04:08 +02:00
..
arch_init.c system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
async-teardown.c system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
balloon.c balloon: Fix a misleading error message 2023-11-17 10:07:52 +01:00
bootdevice.c system/bootdevice: Don't unregister reset handler in restore_boot_order() 2024-02-27 13:01:42 +00:00
cpu-throttle.c qemu/main-loop: rename qemu_cond_wait_iothread() to qemu_cond_wait_bql() 2024-01-08 10:45:43 -05:00
cpu-timers.c system/cpu-timers: Introduce ICountMode enumerator 2024-01-19 12:28:59 +01:00
cpus.c system/cpus: Add cpu_pause() function 2024-07-16 20:04:08 +02:00
datadir.c system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
device_tree-stub.c kconfig: allow compiling out QEMU device tree code per target 2024-05-10 15:45:15 +02:00
device_tree.c kconfig: allow compiling out QEMU device tree code per target 2024-05-10 15:45:15 +02:00
dirtylimit.c migration: migration_thread_is_self 2024-03-11 16:28:59 -04:00
dma-helpers.c system/physmem: Propagate AddressSpace to MapClient helpers 2024-05-08 19:43:23 +02:00
globals.c hw/xen: detect when running inside stubdomain 2024-07-01 14:57:18 +02:00
ioport.c exec/ioport: Add portio_list_set_enabled() 2024-02-14 06:09:32 -05:00
main.c softmmu: pass the main loop status to gdb "Wxx" packet 2023-10-12 12:33:24 +10:00
memory_ldst.c.inc system: Move memory_ldst.c.inc to system 2024-02-13 10:59:25 +03:00
memory_mapping.c memory: follow Error API guidelines 2023-10-19 23:13:27 +02:00
memory.c memory: remove IOMMU MR iommu_set_page_size_mask() callback 2024-07-09 11:50:37 +02:00
meson.build kconfig: allow compiling out QEMU device tree code per target 2024-05-10 15:45:15 +02:00
physmem.c system/physmem: use return value of ram_block_discard_require() as errno 2024-07-16 20:04:08 +02:00
qdev-monitor.c qapi: Inline and remove QERR_DEVICE_NO_HOTPLUG definition 2024-04-24 09:50:58 +02:00
qemu-seccomp.c seccomp: report EPERM instead of killing process for spawn set 2024-03-19 20:17:12 +00:00
qtest.c qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c 2024-06-24 10:14:56 +01:00
rtc.c error: Drop superfluous #include "qapi/qmp/qerror.h" 2024-04-24 09:50:58 +02:00
runstate-action.c system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
runstate-hmp-cmds.c system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
runstate.c pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal 2024-07-01 17:16:04 -04:00
tpm-hmp-cmds.c system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
tpm.c * util/log: re-allow switching away from stderr log file 2023-10-09 10:11:18 -04:00
trace-events tracepoints: move physmem trace points 2024-07-05 12:33:37 +01:00
trace.h system: Rename softmmu/ directory as system/ 2023-10-08 21:08:08 +02:00
vl.c vl: fix "type is NULL" in -vga help 2024-07-16 20:04:08 +02:00
watchpoint.c system/watchpoint: Move TCG specific code to accel/tcg/ 2024-01-19 12:28:59 +01:00