mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
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:
@@ -42,5 +42,6 @@ int devnode_cmp(struct devnode *, struct devnode *);
|
||||
int devnode_add_block_from_sysfs(struct util_list *, const char *);
|
||||
int devnode_add_net_from_sysfs(struct util_list *, const char *);
|
||||
char *devnode_readlink(struct devnode *);
|
||||
char *devnode_get_virtio_dir(const char *ccw_path);
|
||||
|
||||
#endif /* DEVNODE_H */
|
||||
|
||||
19
zdev/include/virtio.h
Normal file
19
zdev/include/virtio.h
Normal file
@@ -0,0 +1,19 @@
|
||||
/*
|
||||
* zdev - Modify and display the persistent configuration of devices
|
||||
*
|
||||
* Copyright IBM Corp. 2025
|
||||
*
|
||||
* s390-tools is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the MIT license. See LICENSE for details.
|
||||
*/
|
||||
|
||||
#ifndef VIRTIO_H
|
||||
#define VIRTIO_H
|
||||
|
||||
struct devtype;
|
||||
struct subtype;
|
||||
|
||||
extern struct devtype virtio_devtype;
|
||||
/* Subtypes are defined in virtio_devtype.subtypes array */
|
||||
|
||||
#endif /* VIRTIO_H */
|
||||
Reference in New Issue
Block a user