aboutsummaryrefslogtreecommitdiff
path: root/pc-bios/s390-ccw/virtio.h
diff options
context:
space:
mode:
Diffstat (limited to 'pc-bios/s390-ccw/virtio.h')
-rw-r--r--pc-bios/s390-ccw/virtio.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/pc-bios/s390-ccw/virtio.h b/pc-bios/s390-ccw/virtio.h
index a00a320968..19fceb6495 100644
--- a/pc-bios/s390-ccw/virtio.h
+++ b/pc-bios/s390-ccw/virtio.h
@@ -11,8 +11,6 @@
#ifndef VIRTIO_H
#define VIRTIO_H
-#include "s390-ccw.h"
-
/* Status byte for guest to report progress, and synchronize features. */
/* We have seen device and processed generic fields (VIRTIO_CONFIG_F_VIRTIO) */
#define VIRTIO_CONFIG_S_ACKNOWLEDGE 1
@@ -227,6 +225,13 @@ struct ScsiDevice {
};
typedef struct ScsiDevice ScsiDevice;
+struct VirtioNetConfig {
+ uint8_t mac[6];
+ /* uint16_t status; */ /* Only with VIRTIO_NET_F_STATUS */
+ /* uint16_t max_virtqueue_pairs; */ /* Only with VIRTIO_NET_F_MQ */
+};
+typedef struct VirtioNetConfig VirtioNetConfig;
+
struct VDev {
int nr_vqs;
VRing *vrings;
@@ -239,6 +244,7 @@ struct VDev {
union {
VirtioBlkConfig blk;
VirtioScsiConfig scsi;
+ VirtioNetConfig net;
} config;
ScsiDevice *scsi_device;
bool is_cdrom;
@@ -273,4 +279,6 @@ int vring_wait_reply(void);
int virtio_run(VDev *vdev, int vqid, VirtioCmd *cmd);
void virtio_setup_ccw(VDev *vdev);
+int virtio_net_init(void *mac_addr);
+
#endif /* VIRTIO_H */