[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[RFC 00/10] add generic vDPA device support
|
From: |
Longpeng(Mike) |
|
Subject: |
[RFC 00/10] add generic vDPA device support |
|
Date: |
Wed, 5 Jan 2022 08:58:50 +0800 |
From: Longpeng <longpeng2@huawei.com>
Hi guys,
This patchset tries to support the generic vDPA device, the previous
disscussion can be found here [1].
With the generic vDPA device, QEMU won't need to touch the device
types any more, such like vfio.
We can use the generic vDPA device as follow:
-device vhost-vdpa-device-pci,vdpa-dev=/dev/vhost-vdpa-X
I've done some simple tests on Huawei's offloading card (net, 0.95)
and vdpa_sim_blk (1.0);
Note:
the kernel part does not send out yet, I'll send it as soon as possible.
[1] https://lore.kernel.org/all/20211208052010.1719-1-longpeng2@huawei.com/
Longpeng (Mike) (10):
virtio: get class_id and pci device id by the virtio id
vhost: add 3 commands for vhost-vdpa
vdpa: add the infrastructure of vdpa-dev
vdpa-dev: implement the instance_init/class_init interface
vdpa-dev: implement the realize interface
vdpa-dev: implement the unrealize interface
vdpa-dev: implement the get_config/set_config interface
vdpa-dev: implement the get_features interface
vdpa-dev: implement the set_status interface
vdpa-dev: mark the device as unmigratable
hw/virtio/Kconfig | 5 +
hw/virtio/meson.build | 2 +
hw/virtio/vdpa-dev-pci.c | 127 +++++++++++++
hw/virtio/vdpa-dev.c | 355 +++++++++++++++++++++++++++++++++++
hw/virtio/virtio-pci.c | 93 +++++++++
hw/virtio/virtio-pci.h | 4 +
include/hw/virtio/vdpa-dev.h | 26 +++
linux-headers/linux/vhost.h | 10 +
8 files changed, 622 insertions(+)
create mode 100644 hw/virtio/vdpa-dev-pci.c
create mode 100644 hw/virtio/vdpa-dev.c
create mode 100644 include/hw/virtio/vdpa-dev.h
--
2.23.0
- [RFC 00/10] add generic vDPA device support,
Longpeng(Mike) <=
- [RFC 02/10] vhost: add 3 commands for vhost-vdpa, Longpeng(Mike), 2022/01/04
- Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa, Jason Wang, 2022/01/04
- Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa, Michael S. Tsirkin, 2022/01/05
- Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa, Jason Wang, 2022/01/05
- RE: [RFC 02/10] vhost: add 3 commands for vhost-vdpa, Longpeng (Mike, Cloud Infrastructure Service Product Dept.), 2022/01/05
- Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa, Jason Wang, 2022/01/05
- Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa, Michael S. Tsirkin, 2022/01/05
- Re: [RFC 02/10] vhost: add 3 commands for vhost-vdpa, Jason Wang, 2022/01/05