Hello,
Thank you.
Below is my log where I follow exactly the steps described in LSDK 21.08 User Guide, section 10.1.3.7. Of course, I use the numbers assigned to DPAA2 objects on my NXP board rather than the ones in the User Guide. The same is true for files locations.
restool dprc create dprc.1
dprc.2 is created under dprc.1
restool dpio create --container=dprc.2
dpio.16 is created under dprc.2
restool dpcon create --num-priorities=2 --container=dprc.2
dpcon.48 is created under dprc.2
restool dpmcp create --container=dprc.2
dpmcp.38 is created under dprc.2
restool dpmcp create --container=dprc.2
dpmcp.39 is created under dprc.2
restool dpbp create --container=dprc.2
dpbp.3 is created under dprc.2
restool dpni create --container=dprc.2
dpni.2 is created under dprc.2
restool dprc assign dprc.2 --object=dpio.16 --plugged=1
restool dprc assign dprc.2 --object=dpcon.48 --plugged=1
restool dprc assign dprc.2 --object=dpmcp.38 --plugged=1
restool dprc assign dprc.2 --object=dpmcp.39 --plugged=1
restool dprc assign dprc.2 --object=dpbp.3 --plugged=1
restool dprc assign dprc.2 --object=dpni.2 --plugged=1
restool dprc show dprc.2
dprc.2 contains 6 objects:
object label plugged-state
dpni.2 plugged
dpbp.3 plugged
dpmcp.39 plugged
dpmcp.38 plugged
dpio.16 plugged
dpcon.48 plugged
restool dprc connect dprc.1 --endpoint1=dpni.2 --endpoint2=dpmac.4
echo vfio-fsl-mc > /sys/bus/fsl-mc/devices/dprc.2/driver_override
echo dprc.2 > /sys/bus/fsl-mc/drivers/vfio-fsl-mc/bind
qemu-system-aarch64 -smp 1 -m 512 -cpu host -machine type=virt,gic-version=3 -kernel /home/user/Image -enable-kvm -display none -serial tcp::4446,server,telnet -drive if=none,file=/home/user/rootfs_lsdk2108_ubuntu_main_arm64.ext4,id=foo,format=raw -device virtio-blk-device,drive=foo -append 'root=/dev/vda rw console=ttyAMA0 rootwait earlyprintk' -monitor stdio -device vfio-fsl-mc,host=dprc.2 -S
QEMU 4.2.1 monitor - type 'help' for more information
(qemu) qemu-system-aarch64: -serial tcp::4446,server,telnet: info: QEMU waiting for connection on: disconnected:telnet:0.0.0.0:4446,server
// At this point qemu waits for connection. Once I telnet to it I get the error message:
qemu-system-aarch64: -device vfio-fsl-mc,host=dprc.2: 'vfio-fsl-mc' is not a valid device model name
Your log shows creation of dprc.2 under dprc.1 and then misses all other steps that exist in my log up to the binding of dprc.2 resource container (echo commands above). Can it be a reason somehow that my sequence does not work?
My understanding, perhaps wrong, was that dpni, dpio etc. objects must be provided to VM's so that in the end to present to VM OS's networking stack an ethernet driver. Figure 134 in the LSDK 21.08 User Guide shows the things that way. Without being able to export all of these pieces to VM it won't be able to do networking. Am I right?
Serguei