1 #ifndef QEMU_VIRTIO_9P_H
2 #define QEMU_VIRTIO_9P_H
4 #include "standard-headers/linux/virtio_9p.h"
5 #include "hw/virtio/virtio.h"
8 typedef struct V9fsVirtioState
10 VirtIODevice parent_obj
;
13 V9fsPDU pdus
[MAX_REQ
];
14 VirtQueueElement
*elems
[MAX_REQ
];
18 void virtio_9p_push_and_notify(V9fsPDU
*pdu
);
20 ssize_t
virtio_pdu_vmarshal(V9fsPDU
*pdu
, size_t offset
,
21 const char *fmt
, va_list ap
);
22 ssize_t
virtio_pdu_vunmarshal(V9fsPDU
*pdu
, size_t offset
,
23 const char *fmt
, va_list ap
);
24 void virtio_init_iov_from_pdu(V9fsPDU
*pdu
, struct iovec
**piov
,
25 unsigned int *pniov
, bool is_write
);
27 #define TYPE_VIRTIO_9P "virtio-9p-device"
28 #define VIRTIO_9P(obj) \
29 OBJECT_CHECK(V9fsVirtioState, (obj), TYPE_VIRTIO_9P)