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

[virtio-win][viomem] viomem device hotunplug fail with pc machine type

    • rhel-sst-virtualization-windows
    • ssg_virtualization
    • None
    • QE ack
    • False
    • Hide

      None

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

      Description of problem:

      viomem device hotunplug fail with pc type machine.

      Version-Release number of selected component (if applicable):

      kernel-5.14.0-526.el9.x86_64
      qemu-kvm-9.1.0-1.el9.x86_64
      edk2-ovmf-20240524-8.el9.noarch
      seabios-bin-1.16.3-2.el9.noarch
      virtio-win-prewhql-266.iso

      How reproducible:
      100%

      Steps to Reproduce:
      1. Boot a win10.x64(PC) guest with a viomem device

      /usr/libexec/qemu-kvm \
      -name 'win10' \
      -machine pc \
      -nodefaults \
      -device VGA,bus=pci.0 \
      -blockdev node-name=file_stg1,driver=file,cache.direct=on,cache.no-flush=off,filename=win10-64-virtio.qcow2,aio=threads \
      -blockdev node-name=drive_stg1,driver=qcow2,cache.direct=on,cache.no-flush=off,file=file_stg1 \
      -device virtio-blk-pci,id=stg1,drive=drive_stg1,bus=pci.0 \
      -device virtio-net-pci,mac=9a:36:83:b6:3d:05,id=idJVpmsF,netdev=id23ZUK6,bus=pci.0 \
      -netdev tap,id=id23ZUK6,vhost=on,script=/etc/qemu-ifup \
      -m 4G,maxmem=80G,slots=20 \
      -smp 2,maxcpus=4 \
      -cpu 'Skylake-Server' \
      -cdrom /home/kvm_autotest_root/iso/windows/virtio-win-prewhql-0.1-266.iso \
      -device piix3-usb-uhci,id=usb -device usb-tablet,id=input0 \
      -vnc :10 \
      -rtc base=localtime,clock=host,driftfix=slew \
      -boot order=cdn,once=c,menu=off,strict=off \
      -enable-kvm \
      -qmp tcp:0:1212,server,nowait \
      -monitor stdio \
      -object memory-backend-ram,id=vmem0,size=8G \
      -device virtio-mem-pci,id=vm0,memdev=vmem0,node=0,requested-size=1G,bus=pci.0 \

      2. hotplug a viomem device
      HMP
      (qemu) object_add memory-backend-ram,id=vmem1,size=8G
      (qemu) device_add virtio-mem-pci,id=vm1,memdev=vmem1,requested-size=0,bus=pci.0

      3.unplugg this viomem device

      (qemu) device_del vm1

      Actual results:
      (qemu) device_del vm1
      Error: virtio-mem device cannot get unplugged while 'unplugged-inaccessible' != 'on'

      Expected results:
      The viomem device can be hotunplugged successfully(when requested-size=0).

      Other information:
      1. ALso Test win2016(PC), hit the same problem.

              mkedzier1 Marek Kedzierski
              rhn-support-menli Menghuan Li
              Meirav Dean Meirav Dean
              Menghuan Li Menghuan Li
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated: