qemu-cr16/accel
Xiaoyao Li 00c0911c68 accel/kvm: Set guest_memfd_offset to non-zero value only when guest_memfd is valid
Current QEMU unconditionally sets the guest_memfd_offset of KVMSlot in
kvm_set_phys_mem(), which leads to the trace of kvm_set_user_memory looks:

kvm_set_user_memory AddrSpace#0 Slot#4 flags=0x2 gpa=0xe0000 size=0x20000 ua=0x7f5840de0000 guest_memfd=-1 guest_memfd_offset=0x3e0000 ret=0

It's confusing that the guest_memfd_offset has a non-zero value while
the guest_memfd is invalid (-1).

Change to only set guest_memfd_offset when guest_memfd is valid and
leave it as 0 when no valid guest_memfd.

Signed-off-by: Xiaoyao Li <xiaoyao.li@intel.com>
Link: https://lore.kernel.org/r/20250728115707.1374614-4-xiaoyao.li@intel.com
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2025-09-17 19:01:57 +02:00
..
hvf accel: make all calls to qemu_process_cpu_events look the same 2025-09-17 19:00:56 +02:00
kvm accel/kvm: Set guest_memfd_offset to non-zero value only when guest_memfd is valid 2025-09-17 19:01:57 +02:00
qtest accel: Extract AccelClass definition to 'accel/accel-ops.h' 2025-07-15 19:34:33 +02:00
stubs accel/whpx: Expose whpx_enabled() to common code 2025-07-04 14:43:46 +02:00
tcg tcg/user: do not set exit_request gratuitously 2025-09-17 19:00:56 +02:00
xen accel: Extract AccelClass definition to 'accel/accel-ops.h' 2025-07-15 19:34:33 +02:00
accel-blocker.c include: Rename sysemu/ -> system/ 2024-12-20 17:44:56 +01:00
accel-common.c accel: Extract AccelClass definition to 'accel/accel-ops.h' 2025-07-15 19:34:33 +02:00
accel-internal.h accel: Include missing 'qemu/accel.h' header in accel-internal.h 2025-04-25 17:09:58 +02:00
accel-qmp.c accel/system: Introduce @x-accel-stats QMP command 2025-07-15 19:34:33 +02:00
accel-system.c accel/system: Add 'info accel' on human monitor 2025-07-15 19:34:33 +02:00
accel-target.c accel: Move target-agnostic code from accel-target.c -> accel-common.c 2025-04-25 17:09:58 +02:00
accel-user.c accel: Implement accel_init_ops_interfaces() for both system/user mode 2025-04-25 17:09:58 +02:00
dummy-cpus.c accel: make all calls to qemu_process_cpu_events look the same 2025-09-17 19:00:56 +02:00
dummy-cpus.h accel/dummy: Extract 'dummy-cpus.h' header from 'system/cpus.h' 2025-07-04 14:43:46 +02:00
Kconfig hw/xen: Link XenPVH with GPEX PCIe bridge 2025-03-04 14:45:34 +01:00
meson.build accel/system: Introduce @x-accel-stats QMP command 2025-07-15 19:34:33 +02:00