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

The PF/VF can not be attached into the VM with shared memory but no hugepages-backend

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • None
    • rhel-9.6
    • qemu-kvm / Devices
    • No
    • Low
    • rhel-sst-virtualization-hwe
    • ssg_virtualization
    • None
    • QE ack
    • False
    • Hide

      None

      Show
      None
    • None
    • Red Hat Enterprise Linux
    • None
    • None
    • SanityOnly
    • x86_64
    • All
    • None

      What were you trying to do that didn't work?
      The PF/VF can not be attached into the VM with shared memory but no hugepages-backend

      Please provide the package NVR for which bug is seen:
      host:
      5.14.0-545.el9.x86_64
      qemu-kvm-9.1.0-7.el9.x86_64
      libvirt-10.10.0-3.el9.x86_64

      How reproducible:
      100%

      Steps to reproduce
      1.start a VM with shared memory but no hugepages-backend

       

      # virt-install --machine=q35 --noreboot --name=rhel96 --cpu host-passthrough --memory=8196 --vcpus=4 --graphics type=vnc,port=5996,listen=0.0.0.0 --boot=uefi --network bridge=switch,model=virtio,mac=52:54:00:00:96:96 --import --noautoconsole --disk path=/home/images/RHEL96.qcow2,bus=virtio,cache=none,format=qcow2,io=threads,size=20 --osinfo detect=on,require=off --memorybacking access.mode=shared

       

       

       

      # virsh start rhel96

       

      2.hot-plug a PF/VF into the VM

       

      # virsh attach-device rhel96 60\:00.0.xml
      error: Failed to attach device from 60:00.0.xml
      error: internal error: unable to execute QEMU command 'device_add': vfio 0000:60:00.0: failed to setup container for group 4: memory listener initialization failed: Region pc.ram: vfio_container_dma_map(0x562443f37680, 0x0, 0x30000, 0x7f7f3fbff000) = -14 (Bad address)

       

      3. check the qemu-kvm log

      # cat /var/log/libvirt/qemu/rhel96.log
      ...
      VFIO_MAP_DMA failed: Bad address
      VFIO_MAP_DMA failed: Bad address
      VFIO_MAP_DMA failed: Bad address
      VFIO_MAP_DMA failed: Bad address

      Expected results
      The PF/VF can be hot-plugged into VM without any error/warning

      Actual results
      The PF/VF can't be hot-plugged into VM 

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

                Created:
                Updated: