Unverified Commit 0d2a1f9e authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!309 vdpa: Add the vdpa device management mechanism and optimize the iotlb

Merge Pull Request from: @Zhao_Py 
 
#I5WXCZ

[Description]​
1、add vdpa tool support in vp_vdpa 
2、multiple address spaces support in vdpa
3、support ASID based IOTLB API in vhost-vdpa
4、add suspend support vhost-vdpa

[Testing]
1. Environmental preparation
Server hardware: TaiShan 200
Network card: SmartNIC
Operating system: openEuler 22.03 LTS
2. Operation Procedure
Apply the relevant patches in the kernel and reinstall the kernel.
Enable the SmartNIC vf.
Insert the driver related to the vdpa:
```
        insmod drivers/vhost/vhost_iotlb.ko
        insmod drivers/vhost/vhost.ko
        insmod drivers/vdpa/vdpa.ko
        insmod drivers/vhost/vhost_vdpa.ko
        insmod drivers/vdpa/virtio_pci/vp_vdpa.ko
```
Run the following command to bind the VF to vp-vdpa:
```
        echo -n "1af4 1000" > /sys/bus/pci/drivers/vp-vdpa/new_id
        vdpa dev add name vdpa1 mgmtdev pci/0000:01:01.1
```
Start qemu with the following parameter to enable generic VDPA device:
```
        -device vhost-vdpa-device-pci,vhostdev=/dev/vhost-vdpa-0
```
Create a bridge on the host and add the VF to the bridge.
Configure the guest network adapter and the port on the host bridge to be in the same network segment.  
3. Expected results
The guest NIC and the port on the host bridge can be pinged.  
4. Actual results
Meets expectations

 
 
Link:https://gitee.com/openeuler/kernel/pulls/309

 
Reviewed-by: default avatarKevin Zhu <zhukeqian1@huawei.com>
Signed-off-by: default avatarXie XiuQi <xiexiuqi@huawei.com>
parents 3957c170 f65f986c
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment