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

QEMU devices cannot be unplugged after ping pong migration between RHEL 8.10 <-> RHEL 9.4

Details

    • Normal
    • sst_virtualization
    • ssg_virtualization
    • QE ack
    • False
    • Hide

      None

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

    Description

      What were you trying to do that didn't work?

      After performing ping-pong migration (in both ways) it's not possible to hotunplug any DIMM or the virtio-balloon device, either it is present in the QEMU cmd or hotplugged after migration process.

      Please provide the package NVR for which bug is seen:

      Test environment

      RHEL 8.10 host
      kernel-4.18.0-537.el8.x86_64
      qemu-kvm-6.2.0-46.module+el8.10.0+21144+ad14f781
      edk2-ovmf-20220126gitbb1bba3d77-8.el8.noarch
      Intel(R) Xeon(R) Silver 4310 CPU @ 2.10GHz

      RHEL 9.4 host
      kernel-5.14.0-413.el9.x86_64
      qemu-kvm-8.2.0-4.el9
      edk2-ovmf-20231122-3.el9.noarch
      Intel(R) Xeon(R) Silver 4310 CPU @ 2.10GHz

      VM
      RHEL 8.10 OVMF

      How reproducible:

      100%

      Steps to reproduce

      1. Boot up source and destination VMs with the following QEMU cmd[1]
      2. Perform ping-pong migration. Basically consists in migrating from source to destination and then migrating back to the source host (that has became destination as it needs to be stopped and include -incoming defer option)
      3. Try to unplug the existing DIMM devices or hotplug a new one and try to hotunplug it

      (qemu) info migrate
      globals:
      store-global-state: on
      only-migratable: off
      send-configuration: on
      send-section-footer: on
      decompress-error-check: on
      clear-bitmap-shift: 18
      Migration status: completed
      total time: 0 ms
      (qemu) info memory-devices
      Memory device [dimm]: "dimm0"
      addr: 0x280000000
      slot: 0
      node: 0
      size: 8589934592
      memdev: /objects/mem1
      hotplugged: false
      hotpluggable: true
      Memory device [dimm]: "dimm1"
      addr: 0x480000000
      slot: 1
      node: 0
      size: 2147483648
      memdev: /objects/mem2
      hotplugged: false
      hotpluggable: true
      (qemu) device_del dimm0
      (qemu) device_del dimm1
      (qemu) info memory-devices
      Memory device [dimm]: "dimm0"
      addr: 0x280000000
      slot: 0
      node: 0
      size: 8589934592
      memdev: /objects/mem1
      hotplugged: false
      hotpluggable: true
      Memory device [dimm]: "dimm1"
      addr: 0x480000000
      slot: 1
      node: 0
      size: 2147483648
      memdev: /objects/mem2
      hotplugged: false
      hotpluggable: true

      4. For virtio-balloon try to unplug or inflate/deflate it.

      {"execute": "query-balloon"}
      {"return": {"actual": 19327352832}}
      {"execute": "balloon", "arguments":{"value": 2147483648}}
      {"return": {}}
      {"execute": "device_del", "arguments": {"id": "balloon0"}}
      {"return": {}}
      {"execute": "query-balloon"}
      {"return": {"actual": 19327352832}}
      

      [1]

      /usr/libexec/qemu-kvm \
      -name 'vm1' \
      -sandbox on \
      -blockdev '{"node-name": "file_ovmf_code", "driver": "file", "filename": "/usr/share/OVMF/OVMF_CODE.secboot.fd", "auto-read-only": true, "discard": "unmap"}' \
      -blockdev '{"node-name": "drive_ovmf_code", "driver": "raw", "read-only": true, "file": "file_ovmf_code"}' \
      -blockdev '{"node-name": "file_ovmf_vars", "driver": "file", "filename": "/mnt/shared/avocado-vt-vm1_rhel8100-64-virtio-scsi-ovmf_qcow2_filesystem_VARS.raw", "auto-read-only": true, "discard": "unmap"}' \
      -blockdev '{"node-name": "drive_ovmf_vars", "driver": "raw", "read-only": false, "file": "file_ovmf_vars"}' \
      -machine pc-q35-rhel8.6.0,pflash0=drive_ovmf_code,pflash1=drive_ovmf_vars,nvdimm=on \
      -device '{"id": "pcie-root-port-0", "driver": "pcie-root-port", "multifunction": true, "bus": "pcie.0", "addr": "0x1", "chassis": 1}' \
      -device '{"id": "pcie-pci-bridge-0", "driver": "pcie-pci-bridge", "addr": "0x0", "bus": "pcie-root-port-0"}' \
      -nodefaults \
      -nographic \
      -device '{"driver": "VGA", "bus": "pcie.0", "addr": "0x2"}' \
      -device pvpanic,ioport=0x505,id=id5SK4co \
      -device '{"id": "pcie-root-port-1", "port": 1, "driver": "pcie-root-port", "addr": "0x1.0x1", "bus": "pcie.0", "chassis": 2}' \
      -device '{"id": "pcie-root-port-2", "port": 2, "driver": "pcie-root-port", "addr": "0x1.0x2", "bus": "pcie.0", "chassis": 3}' \
      -device '{"id": "pcie-root-port-3", "port": 3, "driver": "pcie-root-port", "addr": "0x1.0x3", "bus": "pcie.0", "chassis": 4}' \
      -device '{"id": "pcie-root-port-4", "port": 4, "driver": "pcie-root-port", "addr": "0x1.0x4", "bus": "pcie.0", "chassis": 5}' \
      -device '{"id": "pcie-root-port-5", "port": 5, "driver": "pcie-root-port", "addr": "0x1.0x5", "bus": "pcie.0", "chassis": 6}' \
      -device virtio-scsi-pci,id=virtio_scsi_pci0,bus=pcie.0,addr=0x3 \
      -drive id=drive_image1,if=none,snapshot=off,aio=threads,cache=none,format=qcow2,file=/mnt/shared/rhel8100-64-virtio-scsi-ovmf.qcow2 \
      -device scsi-hd,id=image1,drive=drive_image1 \
      -device '{"driver": "virtio-net-pci", "mac": "9a:6f:c3:79:a8:58", "id": "id1XH6qg", "netdev": "idhia6GM", "bus": "pcie-root-port-3", "addr": "0x0"}' \
      -netdev tap,id=idhia6GM,script=/etc/qemu-ifup,downscript=/etc/qemu-ifdown,vhost=on \
      -cpu 'Icelake-Server-noTSX' \
      -smp 16,sockets=2,dies=1,cores=8,threads=1 \
      -m 8G,slots=20,maxmem=24G \
      -object '{"qom-type":"memory-backend-ram","id":"mem0","size": 8589934592}' \
      -object '{"qom-type":"memory-backend-memfd","id":"mem1","reserve":true,"size":8589934592}' \
      -object '{"qom-type":"memory-backend-file","id":"mem2","mem-path":"/dev/hugepages/mem2","size":2147483648}' \
      -device '{"driver":"pc-dimm","id":"dimm0","memdev":"mem1"}' \
      -numa node,memdev=mem0,cpus=0-15 \
      -device '{"driver":"pc-dimm","id":"dimm1","memdev":"mem2"}'\
      -vnc :1 \
      -rtc base=utc,clock=host,driftfix=slew \
      -boot order=cdn,once=c,menu=off,strict=off \
      -enable-kvm \
      -monitor stdio \
      -device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pcie-root-port-4","addr":"0x0"}' \
      -serial tcp:0:1234,server,nowait \
      -monitor unix:/tmp/monitor3,server,nowait \
      -qmp tcp:0:3333,server,nowait

      Expected results

      DIMM and virtio-balloon-pci devices to be unplugged.

      Actual results

      Device unplug doesn't work and for virtio-balloon the resize neither works.

      Attachments

        Activity

          People

            virt-maint virt-maint
            mcasquer@redhat.com Mario Casquero
            virt-maint virt-maint
            Mario Casquero Mario Casquero
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: