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

[vfio migration][8.2]Disable postcopy for VM with migratable vfio device

    • qemu-kvm-8.2.0-1.el9
    • Normal
    • sst_virtualization
    • ssg_virtualization
    • None
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • x86_64
    • Linux
    • 8.2.0
    • None

      What were you trying to do that didn't work?
      We should get a warning like "VFIO migration is not supported with postcopy migration" when do mlx vfio post-copy migration, instead of crashes

      Please provide the package NVR for which bug is seen:
      qemu-kvm-8.1.0-4.el9.x86_64

      How reproducible:
      100%

      Steps to reproduce
      (1) create a MT2910 VF and setup the VF for migration
      (2) start a Q35 + SEABIOS VM with a mlx VF
      (3) do post-copy migration for the VM

       

      # /bin/virsh migrate --verbose --persistent --postcopy --timeout 3 --timeout-postcopy --live rhel93-seabios qemu+ssh://10.73.212.96/system
      Migration: [50.18 %]
      error: internal error: QEMU unexpectedly closed the monitor (vm='rhel94'): DS =0000 00000000 0000ffff 00009300
      FS =0000 00000000 0000ffff 00009300
      GS =0000 00000000 0000ffff 00009300
      LDT=0000 00000000 0000ffff 00008200
      TR =0000 00000000 0000ffff 00008b00
      GDT= 00000000 0000ffff
      IDT= 00000000 0000ffff
      CR0=60000010 CR2=00000000 CR3=00000000 CR4=00000000
      DR0=0000000000000000 DR1=0000000000000000 DR2=0000000000000000 DR3=0000000000000000 
      DR6=00000000ffff0ff0 DR7=0000000000000400
      EFER=0000000000000000
      FCW=037f FSW=0000 [ST=0] FTW=00 MXCSR=00001f80
      FPR0=0000000000000000 0000 FPR1=0000000000000000 0000
      FPR2=0000000000000000 0000 FPR3=0000000000000000 0000
      FPR4=0000000000000000 0000 FPR5=0000000000000000 0000
      FPR6=0000000000000000 0000 FPR7=0000000000000000 0000
      XMM00=0000000000000000 0000000000000000 XMM01=0000000000000000 0000000000000000
      XMM02=0000000000000000 0000000000000000 XMM03=0000000000000000 0000000000000000
      XMM04=0000000000000000 0000000000000000 XMM05=0000000000000000 0000000000000000
      XMM06=0000000000000000 0000000000000000 XMM07=0000000000000000 0000000000000000

       

      The related qemu-kvm log:
      2023-11-16T08:55:13.607618Z qemu-kvm: failed to save SaveStateEntry with id(name): 2(ram): -5
      2023-11-16T08:55:13.607844Z qemu-kvm: Detected IO failure for postcopy. Migration paused.

      Expected results
      The mlx vfio  post-copy migration is blocked and the qemu-kvm throws a warning like "VFIO migration is not supported with postcopy migration"

      Actual results
      The mlx vfio  post-copy migration can be started but failed and the VM is stuck in the paused status

       

      Additional info:
      The fix in qemu-kvm-8.0.0-16.el9_3 does not be included in qemu-kvm 8.1 and will come into 8.2

       

      Upstream patches:

      615379764ae6 vfio/migration: Block VFIO migration with background snapshot
      bf7ef7a2da3e vfio/migration: Block VFIO migration with postcopy migration
      08fc4cb51774 migration: Add .save_prepare() handler to struct SaveVMHandlers
      f543aa222da1 migration: Move more initializations to migrate_init()
      8118349b1bc5 vfio/migration: Fail adding device with enable-migration=on and existing blocker
      38c482b47785 migration: Add migration prefix to functions in target.c
      5c7a4b60350e vfio/migration: Allow migration of multiple P2P supporting devices
      94f775e428f8 vfio/migration: Add P2P support for VFIO migration
      3d4d0f0e0663 vfio/migration: Refactor PRE_COPY and RUNNING state checks
      02b2e25360ea qdev: Add qdev_add_vm_change_state_handler_full()
      9d3103c81be3 sysemu: Add prepare callback to struct VMChangeStateEntry
      5485298ce097 vfio/migration: Move from STOP_COPY to STOP in vfio_save_cleanup()

            rh-ee-clegoate Cédric Le Goater
            yanghliu@redhat.com YangHang Liu
            Cédric Le Goater Cédric Le Goater
            YangHang Liu YangHang Liu
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved: