当我尝试使用IVSHMEM时遇到了一个问题。下面是我这边的配置:
用于IVSHMEM设备的
<shmem name='ivshmem'>
<model type='ivshmem-plain'/>
<size unit='M'>2</size>
<address type='pci' domain='0x0000' bus='0x00' slot='0x10' function='0x0'/>
</shmem>启动后的
/usr/bin/qemu-system-x86_64 .(忽略其他选项) -object内存-后端-文件,id=shmmem-shm 0,mem-path=/dev/shm/hostmem,size=4194304,share=yes -device ivshmem-平原,id=shmem0,memdev=shmmem-shm 0,bus=pcie.0,addr=0x10
*-memory UNCLAIMED
description: RAM memory
product: Inter-VM shared memory
vendor: Red Hat, Inc.
physical id: 10
bus info: pci@0000:00:10.0
version: 01
width: 64 bits
clock: 33MHz (30.3ns)
configuration: latency=0
resources: memory:fcc1c000-fcc1c0ff memory:fdc00000-fdffffff我的主机os和阵风vm os是ubuntu20.04,版本是:
uname -a5.8.0-43-通用#49~20.04.1-Ubuntu星期五2月5日09:57:56 UTC 2021 x86_64 GNU/Linux
对这个有什么意见吗?
发布于 2022-01-04 14:47:57
首先需要加载通用驱动程序:
modprobe uio_pci_generic然后您将看到PCI设备。
之后,您可以通过以下方式加载自己的内核模块
insmod uio_ivshmem.ko请注意,您可能需要首先构建模块。
https://stackoverflow.com/questions/66432392
复制相似问题