Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-114594

QEMU need to report errors properly when launch SEV-SNP guest with pflash

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Undefined Undefined
    • None
    • rhel-9.7
    • qemu-kvm
    • No
    • Moderate
    • rhel-virt-confidential-virt
    • None
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • Unspecified
    • Unspecified
    • Unspecified
    • x86_64
    • None

      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

      1. 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

              rhn-engineering-pbonzini Paolo Bonzini
              jinl@redhat.com Jin Liu
              virt-maint virt-maint
              Jin Liu Jin Liu
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated: