MAINTAINERS: Add David Gibson as ppc maintainer
[qemu/cris-port.git] / hw / 9pfs / virtio-9p.h
blob7f6d88553937e4b28fb199eba3bf0525009bac26
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"
6 #include "9p.h"
8 typedef struct V9fsVirtioState
10 VirtIODevice parent_obj;
11 VirtQueue *vq;
12 size_t config_size;
13 V9fsPDU pdus[MAX_REQ];
14 VirtQueueElement *elems[MAX_REQ];
15 V9fsState state;
16 } V9fsVirtioState;
18 extern 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)
31 #endif