Issue with VFIO-PCI in QEMU: "VFIO_MAP_DMA failed: Invalid argument"

206 views
Skip to first unread message

JLtCC CK

unread,
Jan 29, 2024, 9:46:36 PM1/29/24
to Keystone Enclave Forum
Hello Keystone Community,

I am encountering an issue with my QEMU setup for a RISC-V system, where I'm trying to include VFIO-PCI devices. My QEMU launch command includes the following lines for VFIO-PCI devices:

-device vfio-pci,host=01:00.0
-device vfio-pci,host=01:00.1
-device vfio-pci,host=01:00.2
-device vfio-pci,host=01:00.3

However, when I attempt to run this configuration using `make run`, I encounter the following error:

qemu-system-riscv64: -device vfio-pci,host=01:00.0: VFIO_MAP_DMA failed: Invalid argument qemu-system-riscv64: -device vfio-pci,host=01:00.0: vfio 0000:01:00.0: failed to setup container for group 13: memory listener initialization failed: Region riscv_virt_board.ram: vfio_dma_map(0x5654ec5eb8e0, 0x80000000, 0x80000000, 0x7fa143e00000) = -22 (Invalid argument)


Interestingly, when I use this host system to run a different Linux kernel, the vfio-pci devices start without any issue. I'm seeking advice or solutions to resolve this problem. Has anyone encountered a similar issue or can provide insights into what might be going wrong?

Thank you in advance for your assistance!

Best regards,
yan

Reply all
Reply to author
Forward
0 new messages