[virtio-9p] qemu: virtio-9p: Implement LOPEN

Implement 9p2000.L version of open(LOPEN) interface in qemu 9p server.

For LOPEN, no need to convert the flags to and from 9p mode to VFS mode.

Synopsis:

    size[4] Tlopen tag[2] fid[4] mode[4]

    size[4] Rlopen tag[2] qid[13] iounit[4]

Current qemu 9p server does not support following flags:
    O_NOCTTY, O_NONBLOCK, O_ASYNC & O_CLOEXEC

[Fix mode format - jvrao@linux.vnet.ibm.com]

Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
diff --git a/hw/virtio-9p.h b/hw/virtio-9p.h
index 4d179b7..cd7c67e 100644
--- a/hw/virtio-9p.h
+++ b/hw/virtio-9p.h
@@ -15,6 +15,8 @@
 enum {
     P9_TSTATFS = 8,
     P9_RSTATFS,
+    P9_TLOPEN = 12,
+    P9_RLOPEN,
     P9_TLCREATE = 14,
     P9_RLCREATE,
     P9_TSYMLINK = 16,
@@ -259,7 +261,7 @@
 typedef struct V9fsOpenState {
     V9fsPDU *pdu;
     size_t offset;
-    int8_t mode;
+    int32_t mode;
     V9fsFidState *fidp;
     V9fsQID qid;
     struct stat stbuf;