virtio-9p: add the virtio-9p device.

Create virtio-9p-device which extends virtio-device, so it can be connected on
virtio-bus.

Signed-off-by: KONRAD Frederic <fred.konrad@greensocs.com>
Message-id: 1366708123-19626-2-git-send-email-fred.konrad@greensocs.com
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
KONRAD Frederic 2013-04-23 11:08:40 +02:00 committed by Anthony Liguori
parent 93b971c4ff
commit e7303c4303
3 changed files with 76 additions and 9 deletions

View file

@ -225,6 +225,7 @@ typedef struct V9fsState
CoRwlock rename_lock;
int32_t root_fid;
Error *migration_blocker;
V9fsConf fsconf;
} V9fsState;
typedef struct V9fsStatState {
@ -401,4 +402,12 @@ extern int v9fs_name_to_path(V9fsState *s, V9fsPath *dirpath,
#define pdu_unmarshal(pdu, offset, fmt, args...) \
v9fs_unmarshal(pdu->elem.out_sg, pdu->elem.out_num, offset, 1, fmt, ##args)
#define TYPE_VIRTIO_9P "virtio-9p-device"
#define VIRTIO_9P(obj) \
OBJECT_CHECK(V9fsState, (obj), TYPE_VIRTIO_9P)
#define DEFINE_VIRTIO_9P_PROPERTIES(_state, _field) \
DEFINE_PROP_STRING("mount_tag", _state, _field.tag), \
DEFINE_PROP_STRING("fsdev", _state, _field.fsdev_id)
#endif