zdev: Add support for virtio devices

Add support for managing virtual I/O ccw (virtio-ccw) devices in
lszdev/chzdev.

New zdev device type virtio. Each virtio device type (blk, net,
gpu, vsock, etc.) is represented by a unique subtype of the virtio
base type.

If the virtio device type is recognized, then it will show up as
virtio-blk or virtio-net, or whatever the virtio device type is.
Otherwise, it will just show up as virtio-ccw.

Fixes: https://github.com/ibm-s390-linux/s390-tools/issues/29
Reviewed-by: Peter Oberparleiter <oberpar@linux.ibm.com>
Signed-off-by: Peter Jin <pjin@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Peter Jin
2025-05-28 13:03:40 -04:00
committed by Jan Höppner
parent 2d86117167
commit 2349236bb4
7 changed files with 317 additions and 3 deletions

View File

@@ -42,6 +42,9 @@ chzdev_objects += lcs.o lcs_auto.o
# AP devtype
chzdev_objects += ap.o
# virtio devtype
chzdev_objects += virtio.o
# Generic CCW devtype
chzdev_objects += generic_ccw.o
@@ -75,6 +78,9 @@ lszdev_objects += lcs.o lcs_auto.o
# AP devtype
lszdev_objects += ap.o
# virtio devtype
lszdev_objects += virtio.o
# Generic CCW devtype
lszdev_objects += generic_ccw.o