9pfs: factor out virtio_9p_push_and_notify

The new function resides in virtio specific file.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
This commit is contained in:
Wei Liu 2016-01-07 18:30:29 +00:00 committed by Aneesh Kumar K.V
parent ebe74f8ba2
commit 0d3716b4e6
3 changed files with 14 additions and 7 deletions

View file

@ -20,6 +20,17 @@
#include "coth.h"
#include "hw/virtio/virtio-access.h"
void virtio_9p_push_and_notify(V9fsPDU *pdu)
{
V9fsState *s = pdu->s;
/* push onto queue and notify */
virtqueue_push(s->vq, &pdu->elem, pdu->size);
/* FIXME: we should batch these completions */
virtio_notify(VIRTIO_DEVICE(s), s->vq);
}
static uint64_t virtio_9p_get_features(VirtIODevice *vdev, uint64_t features,
Error **errp)
{