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
async-teardown.c
balloon.c
bootdevice.c
cpu-throttle.c
cpu-timers.c
cpus.c system/cpus: Add cpu_pause() function 2024-07-16 20:04:08 +02:00
datadir.c
device_tree-stub.c
device_tree.c
dirtylimit.c
dma-helpers.c
globals.c hw/xen: detect when running inside stubdomain 2024-07-01 14:57:18 +02:00
ioport.c
main.c
memory_ldst.c.inc
memory_mapping.c
memory.c memory: remove IOMMU MR iommu_set_page_size_mask() callback 2024-07-09 11:50:37 +02:00
meson.build
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
qemu-seccomp.c
qtest.c qtest: move qtest_{get, set}_virtual_clock to accel/qtest/qtest.c 2024-06-24 10:14:56 +01:00
rtc.c
runstate-action.c
runstate-hmp-cmds.c
runstate.c pvpanic: Emit GUEST_PVSHUTDOWN QMP event on pvpanic shutdown signal 2024-07-01 17:16:04 -04:00
tpm-hmp-cmds.c
tpm.c
trace-events tracepoints: move physmem trace points 2024-07-05 12:33:37 +01:00
trace.h
vl.c vl: fix "type is NULL" in -vga help 2024-07-16 20:04:08 +02:00
watchpoint.c