What were you trying to do that didn't work?
launch a sev-snp guest with pflash, but qemu doesn't report errors properly.
What is the impact of this issue to you?
the error is not very properly
Please provide the package NVR for which the bug is seen:
qemu-kvm-9.1.0-25.el9
How reproducible is this bug?:100%
Steps to reproduce
- launch a sev-snp guest with pflash
virt-install -name snp --import --cpu host-passthrough --memory 10480 --memtune hard_limit=11000000 --vcpus=32,sockets=2,cores=16,threads=1 --disk path=/home/sevsnp_test_import.qcow2,size=20,cache=none,format=qcow2 --osinfo detect=on,require=off graphics vnc,listen=0.0.0.0 --controller type=virtio-serial --rng type=/dev/random --launchSecurity sev-snp,policy=0x30000 -network default,model=virtio --serial pty --console pty --machine q35 --boot uefi,loader.stateless=yes,loader.type=pflash,loader=/usr/share/edk2/ovmf/OVMF.amdsev.fd --check all=off --xml ./os/@firmware=
Expected results
qemu report errors properly.
eg with qemu-kvm-10.0.0-7.el10, it shows: ERROR internal error: QEMU unexpectedly closed the monitor (vm='snp'): 2025-08-07T04:58:27.115767Z qemu-kvm: pflash with kvm requires KVM readonly memory support
Actual results
ERROR internal error: QEMU unexpectedly closed the monitor (vm='snp'): 2025-08-07T04:15:58.074169Z qemu-kvm: kvm_set_user_memory_region: KVM_SET_USER_MEMORY_REGION2 failed, slot=2, start=0xffc00000, size=0x400000, flags=0x2, guest_memfd=-1, guest_memfd_offset=0x0: Invalid argument