qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/11] 9p: Add support for Darwin
@ 2021-10-13 23:03 Will Cohen
  2021-10-13 23:03 ` [PATCH 01/11] 9p: linux: Fix a couple Linux assumptions Will Cohen
                   ` (11 more replies)
  0 siblings, 12 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:03 UTC (permalink / raw)
  To: qemu-devel

This is a continuation of a patch series adding 9p server support for Darwin,
originally submitted by Keno Fischer in mid-2018
(https://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg04643.html). In
some sense, this could be considered [PATCH v4] of that process, but I assume
that the multi-year gap merits a fresh start..

It has since been updated and rebased for NixOS by Michael Roitzsch
(https://github.com/NixOS/nixpkgs/pull/122420) with a goal of resubmitting
upstream. I am submitting his patch set as suggested, as developed by Michael,
with his Signed-off-by headers included in full.

Additionally, I have run the patches through checkpatch.pl and adjusted coding
style accordingly (with the exception of ignoring warnings about avoid
architecture specific defines in hw/9pfs/9p-util-darwin.c, where they seem
unavoidable), and have signed off on those modified commits.




^ permalink raw reply	[flat|nested] 20+ messages in thread

* [PATCH 01/11] 9p: linux: Fix a couple Linux assumptions
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
@ 2021-10-13 23:03 ` Will Cohen
  2021-10-13 23:03 ` [PATCH 02/11] 9p: Rename 9p-util -> 9p-util-linux Will Cohen
                   ` (10 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer, Keno Fischer

From: Keno Fischer <keno@alumni.harvard.edu>

 - Guard Linux only headers.
 - Add qemu/statfs.h header to abstract over the which
   headers are needed for struct statfs
 - Define `ENOATTR` only if not only defined
   (it's defined in system headers on Darwin).

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
---
 fsdev/file-op-9p.h    |  2 +-
 hw/9pfs/9p-local.c    |  2 ++
 hw/9pfs/9p.c          |  2 +-
 include/qemu/statfs.h | 19 +++++++++++++++++++
 include/qemu/xattr.h  |  4 +++-
 5 files changed, 26 insertions(+), 3 deletions(-)
 create mode 100644 include/qemu/statfs.h

diff --git a/fsdev/file-op-9p.h b/fsdev/file-op-9p.h
index 42f677cf38..d9d058b756 100644
--- a/fsdev/file-op-9p.h
+++ b/fsdev/file-op-9p.h
@@ -16,7 +16,7 @@
 
 #include <dirent.h>
 #include <utime.h>
-#include <sys/vfs.h>
+#include "qemu/statfs.h"
 #include "qemu-fsdev-throttle.h"
 
 #define SM_LOCAL_MODE_BITS    0600
diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index 210d9e7705..1a5e3eed73 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -32,10 +32,12 @@
 #include "qemu/error-report.h"
 #include "qemu/option.h"
 #include <libgen.h>
+#ifdef CONFIG_LINUX
 #include <linux/fs.h>
 #ifdef CONFIG_LINUX_MAGIC_H
 #include <linux/magic.h>
 #endif
+#endif
 #include <sys/ioctl.h>
 
 #ifndef XFS_SUPER_MAGIC
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index c857b31321..2f0e960162 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -32,7 +32,7 @@
 #include "migration/blocker.h"
 #include "qemu/xxhash.h"
 #include <math.h>
-#include <linux/limits.h>
+#include <limits.h>
 
 int open_fd_hw;
 int total_open_fd;
diff --git a/include/qemu/statfs.h b/include/qemu/statfs.h
new file mode 100644
index 0000000000..dde289f9bb
--- /dev/null
+++ b/include/qemu/statfs.h
@@ -0,0 +1,19 @@
+/*
+ * Host statfs header abstraction
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2, or any
+ * later version.  See the COPYING file in the top-level directory.
+ *
+ */
+#ifndef QEMU_STATFS_H
+#define QEMU_STATFS_H
+
+#ifdef CONFIG_LINUX
+# include <sys/vfs.h>
+#endif
+#ifdef CONFIG_DARWIN
+# include <sys/param.h>
+# include <sys/mount.h>
+#endif
+
+#endif
diff --git a/include/qemu/xattr.h b/include/qemu/xattr.h
index a83fe8e749..f1d0f7be74 100644
--- a/include/qemu/xattr.h
+++ b/include/qemu/xattr.h
@@ -22,7 +22,9 @@
 #ifdef CONFIG_LIBATTR
 #  include <attr/xattr.h>
 #else
-#  define ENOATTR ENODATA
+#  if !defined(ENOATTR)
+#    define ENOATTR ENODATA
+#  endif
 #  include <sys/xattr.h>
 #endif
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 02/11] 9p: Rename 9p-util -> 9p-util-linux
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
  2021-10-13 23:03 ` [PATCH 01/11] 9p: linux: Fix a couple Linux assumptions Will Cohen
@ 2021-10-13 23:03 ` Will Cohen
  2021-10-13 23:03 ` [PATCH 03/11] 9p: darwin: Handle struct stat(fs) differences Will Cohen
                   ` (9 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer, Michael Roitzsch

From: Keno Fischer <keno@juliacomputing.com>

The current file only has the Linux versions of these functions.
Rename the file accordingly and update the Makefile to only build
it on Linux. A Darwin version of these will follow later in the
series.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com>
---
 hw/9pfs/{9p-util.c => 9p-util-linux.c} | 2 +-
 hw/9pfs/meson.build                    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
 rename hw/9pfs/{9p-util.c => 9p-util-linux.c} (97%)

diff --git a/hw/9pfs/9p-util.c b/hw/9pfs/9p-util-linux.c
similarity index 97%
rename from hw/9pfs/9p-util.c
rename to hw/9pfs/9p-util-linux.c
index 3221d9b498..398614a5d0 100644
--- a/hw/9pfs/9p-util.c
+++ b/hw/9pfs/9p-util-linux.c
@@ -1,5 +1,5 @@
 /*
- * 9p utilities
+ * 9p utilities (Linux Implementation)
  *
  * Copyright IBM, Corp. 2017
  *
diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build
index 99be5d9119..1b28e70040 100644
--- a/hw/9pfs/meson.build
+++ b/hw/9pfs/meson.build
@@ -4,7 +4,6 @@ fs_ss.add(files(
   '9p-posix-acl.c',
   '9p-proxy.c',
   '9p-synth.c',
-  '9p-util.c',
   '9p-xattr-user.c',
   '9p-xattr.c',
   '9p.c',
@@ -14,6 +13,7 @@ fs_ss.add(files(
   'coth.c',
   'coxattr.c',
 ))
+fs_ss.add(when: 'CONFIG_LINUX', if_true: files('9p-util-linux.c'))
 fs_ss.add(when: 'CONFIG_XEN', if_true: files('xen-9p-backend.c'))
 softmmu_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss)
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 03/11] 9p: darwin: Handle struct stat(fs) differences
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
  2021-10-13 23:03 ` [PATCH 01/11] 9p: linux: Fix a couple Linux assumptions Will Cohen
  2021-10-13 23:03 ` [PATCH 02/11] 9p: Rename 9p-util -> 9p-util-linux Will Cohen
@ 2021-10-13 23:03 ` Will Cohen
  2021-10-13 23:03 ` [PATCH 04/11] 9p: darwin: Handle struct dirent differences Will Cohen
                   ` (8 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer

From: Keno Fischer <keno@juliacomputing.com>

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
---
 hw/9pfs/9p-proxy.c | 17 ++++++++++++++---
 hw/9pfs/9p-synth.c |  2 ++
 hw/9pfs/9p.c       | 16 ++++++++++++++--
 3 files changed, 30 insertions(+), 5 deletions(-)

diff --git a/hw/9pfs/9p-proxy.c b/hw/9pfs/9p-proxy.c
index 09bd9f1464..be1546c1be 100644
--- a/hw/9pfs/9p-proxy.c
+++ b/hw/9pfs/9p-proxy.c
@@ -123,10 +123,15 @@ static void prstatfs_to_statfs(struct statfs *stfs, ProxyStatFS *prstfs)
     stfs->f_bavail = prstfs->f_bavail;
     stfs->f_files = prstfs->f_files;
     stfs->f_ffree = prstfs->f_ffree;
+#ifdef CONFIG_DARWIN
+    stfs->f_fsid.val[0] = prstfs->f_fsid[0] & 0xFFFFFFFFU;
+    stfs->f_fsid.val[1] = prstfs->f_fsid[1] >> 32 & 0xFFFFFFFFU;
+#else
     stfs->f_fsid.__val[0] = prstfs->f_fsid[0] & 0xFFFFFFFFU;
     stfs->f_fsid.__val[1] = prstfs->f_fsid[1] >> 32 & 0xFFFFFFFFU;
     stfs->f_namelen = prstfs->f_namelen;
     stfs->f_frsize = prstfs->f_frsize;
+#endif
 }
 
 /* Converts proxy_stat structure to VFS stat structure */
@@ -143,12 +148,18 @@ static void prstat_to_stat(struct stat *stbuf, ProxyStat *prstat)
    stbuf->st_size = prstat->st_size;
    stbuf->st_blksize = prstat->st_blksize;
    stbuf->st_blocks = prstat->st_blocks;
-   stbuf->st_atim.tv_sec = prstat->st_atim_sec;
-   stbuf->st_atim.tv_nsec = prstat->st_atim_nsec;
+   stbuf->st_atime = prstat->st_atim_sec;
    stbuf->st_mtime = prstat->st_mtim_sec;
-   stbuf->st_mtim.tv_nsec = prstat->st_mtim_nsec;
    stbuf->st_ctime = prstat->st_ctim_sec;
+#ifdef CONFIG_DARWIN
+   stbuf->st_atimespec.tv_nsec = prstat->st_atim_nsec;
+   stbuf->st_mtimespec.tv_nsec = prstat->st_mtim_nsec;
+   stbuf->st_ctimespec.tv_nsec = prstat->st_ctim_nsec;
+#else
+   stbuf->st_atim.tv_nsec = prstat->st_atim_nsec;
+   stbuf->st_mtim.tv_nsec = prstat->st_mtim_nsec;
    stbuf->st_ctim.tv_nsec = prstat->st_ctim_nsec;
+#endif
 }
 
 /*
diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c
index b38088e066..4a4a776d06 100644
--- a/hw/9pfs/9p-synth.c
+++ b/hw/9pfs/9p-synth.c
@@ -427,7 +427,9 @@ static int synth_statfs(FsContext *s, V9fsPath *fs_path,
     stbuf->f_bsize = 512;
     stbuf->f_blocks = 0;
     stbuf->f_files = synth_node_count;
+#ifndef CONFIG_DARWIN
     stbuf->f_namelen = NAME_MAX;
+#endif
     return 0;
 }
 
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 2f0e960162..17b62d72fc 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -1276,11 +1276,17 @@ static int stat_to_v9stat_dotl(V9fsPDU *pdu, const struct stat *stbuf,
     v9lstat->st_blksize = stbuf->st_blksize;
     v9lstat->st_blocks = stbuf->st_blocks;
     v9lstat->st_atime_sec = stbuf->st_atime;
-    v9lstat->st_atime_nsec = stbuf->st_atim.tv_nsec;
     v9lstat->st_mtime_sec = stbuf->st_mtime;
-    v9lstat->st_mtime_nsec = stbuf->st_mtim.tv_nsec;
     v9lstat->st_ctime_sec = stbuf->st_ctime;
+#ifdef CONFIG_DARWIN
+    v9lstat->st_atime_nsec = stbuf->st_atimespec.tv_nsec;
+    v9lstat->st_mtime_nsec = stbuf->st_mtimespec.tv_nsec;
+    v9lstat->st_ctime_nsec = stbuf->st_ctimespec.tv_nsec;
+#else
+    v9lstat->st_atime_nsec = stbuf->st_atim.tv_nsec;
+    v9lstat->st_mtime_nsec = stbuf->st_mtim.tv_nsec;
     v9lstat->st_ctime_nsec = stbuf->st_ctim.tv_nsec;
+#endif
     /* Currently we only support BASIC fields in stat */
     v9lstat->st_result_mask = P9_STATS_BASIC;
 
@@ -3503,9 +3509,15 @@ static int v9fs_fill_statfs(V9fsState *s, V9fsPDU *pdu, struct statfs *stbuf)
     f_bavail = stbuf->f_bavail / bsize_factor;
     f_files  = stbuf->f_files;
     f_ffree  = stbuf->f_ffree;
+#ifdef CONFIG_DARWIN
+    fsid_val = (unsigned int)stbuf->f_fsid.val[0] |
+               (unsigned long long)stbuf->f_fsid.val[1] << 32;
+    f_namelen = MAXNAMLEN;
+#else
     fsid_val = (unsigned int) stbuf->f_fsid.__val[0] |
                (unsigned long long)stbuf->f_fsid.__val[1] << 32;
     f_namelen = stbuf->f_namelen;
+#endif
 
     return pdu_marshal(pdu, offset, "ddqqqqqqd",
                        f_type, f_bsize, f_blocks, f_bfree,
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 04/11] 9p: darwin: Handle struct dirent differences
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
                   ` (2 preceding siblings ...)
  2021-10-13 23:03 ` [PATCH 03/11] 9p: darwin: Handle struct stat(fs) differences Will Cohen
@ 2021-10-13 23:03 ` Will Cohen
  2021-10-13 23:03 ` [PATCH 05/11] 9p: darwin: Ignore O_{NOATIME, DIRECT} Will Cohen
                   ` (7 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer, Michael Roitzsch

From: Keno Fischer <keno@juliacomputing.com>

On darwin d_seekoff exists, but is optional and does not seem to
be commonly used by file systems. Use `telldir` instead to obtain
the seek offset.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com>
---
 hw/9pfs/9p-synth.c |  2 ++
 hw/9pfs/9p.c       | 33 +++++++++++++++++++++++++++++++--
 hw/9pfs/codir.c    |  4 ++++
 3 files changed, 37 insertions(+), 2 deletions(-)

diff --git a/hw/9pfs/9p-synth.c b/hw/9pfs/9p-synth.c
index 4a4a776d06..09b9c25288 100644
--- a/hw/9pfs/9p-synth.c
+++ b/hw/9pfs/9p-synth.c
@@ -222,7 +222,9 @@ static void synth_direntry(V9fsSynthNode *node,
 {
     strcpy(entry->d_name, node->name);
     entry->d_ino = node->attr->inode;
+#ifndef CONFIG_DARWIN
     entry->d_off = off + 1;
+#endif
 }
 
 static struct dirent *synth_get_dentry(V9fsSynthNode *dir,
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 17b62d72fc..2464ffeb94 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -2202,6 +2202,25 @@ static int v9fs_xattr_read(V9fsState *s, V9fsPDU *pdu, V9fsFidState *fidp,
     return offset;
 }
 
+/**
+ * Get the seek offset of a dirent. If not available from the structure itself,
+ * obtain it by calling telldir.
+ */
+static int v9fs_dent_telldir(V9fsPDU *pdu, V9fsFidState *fidp,
+                             struct dirent *dent)
+{
+#ifdef CONFIG_DARWIN
+    /*
+     * Darwin has d_seekoff, which appears to function similarly to d_off.
+     * However, it does not appear to be supported on all file systems,
+     * so use telldir for correctness.
+     */
+    return telldir(fidp->fs.dir.stream);
+#else
+    return dent->d_off;
+#endif
+}
+
 static int coroutine_fn v9fs_do_readdir_with_stat(V9fsPDU *pdu,
                                                   V9fsFidState *fidp,
                                                   uint32_t max_count)
@@ -2265,7 +2284,11 @@ static int coroutine_fn v9fs_do_readdir_with_stat(V9fsPDU *pdu,
         count += len;
         v9fs_stat_free(&v9stat);
         v9fs_path_free(&path);
-        saved_dir_pos = dent->d_off;
+        saved_dir_pos = v9fs_dent_telldir(pdu, fidp, dent);
+        if (saved_dir_pos < 0) {
+            err = saved_dir_pos;
+            break;
+        }
     }
 
     v9fs_readdir_unlock(&fidp->fs.dir);
@@ -2404,6 +2427,7 @@ static int coroutine_fn v9fs_do_readdir(V9fsPDU *pdu, V9fsFidState *fidp,
     V9fsString name;
     int len, err = 0;
     int32_t count = 0;
+    off_t off;
     struct dirent *dent;
     struct stat *st;
     struct V9fsDirEnt *entries = NULL;
@@ -2464,12 +2488,17 @@ static int coroutine_fn v9fs_do_readdir(V9fsPDU *pdu, V9fsFidState *fidp,
             qid.version = 0;
         }
 
+        off = v9fs_dent_telldir(pdu, fidp, dent);
+        if (off < 0) {
+            err = off;
+            break;
+        }
         v9fs_string_init(&name);
         v9fs_string_sprintf(&name, "%s", dent->d_name);
 
         /* 11 = 7 + 4 (7 = start offset, 4 = space for storing count) */
         len = pdu_marshal(pdu, 11 + count, "Qqbs",
-                          &qid, dent->d_off,
+                          &qid, off,
                           dent->d_type, &name);
 
         v9fs_string_free(&name);
diff --git a/hw/9pfs/codir.c b/hw/9pfs/codir.c
index 032cce04c4..78aca1d98b 100644
--- a/hw/9pfs/codir.c
+++ b/hw/9pfs/codir.c
@@ -167,7 +167,11 @@ static int do_readdir_many(V9fsPDU *pdu, V9fsFidState *fidp,
         }
 
         size += len;
+#ifdef CONFIG_DARWIN
+        saved_dir_pos = telldir(fidp->fs.dir.stream);
+#else
         saved_dir_pos = dent->d_off;
+#endif
     }
 
     /* restore (last) saved position */
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 05/11] 9p: darwin: Ignore O_{NOATIME, DIRECT}
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
                   ` (3 preceding siblings ...)
  2021-10-13 23:03 ` [PATCH 04/11] 9p: darwin: Handle struct dirent differences Will Cohen
@ 2021-10-13 23:03 ` Will Cohen
  2021-10-13 23:04 ` [PATCH 06/11] 9p: darwin: Compatibility defn for XATTR_SIZE_MAX Will Cohen
                   ` (6 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer, Michael Roitzsch, Will Cohen, Greg Kurz

From: Keno Fischer <keno@juliacomputing.com>

Darwin doesn't have either of these flags. Darwin does have
F_NOCACHE, which is similar to O_DIRECT, but has different
enough semantics that other projects don't generally map
them automatically. In any case, we don't support O_DIRECT
on Linux at the moment either.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com>
Signed-off-by: Will Cohen <wwcohen@gmail.com>
---
 hw/9pfs/9p-util.h |  2 ++
 hw/9pfs/9p.c      | 13 ++++++++++++-
 2 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h
index 546f46dc7d..627baebaba 100644
--- a/hw/9pfs/9p-util.h
+++ b/hw/9pfs/9p-util.h
@@ -41,6 +41,7 @@ again:
     fd = openat(dirfd, name, flags | O_NOFOLLOW | O_NOCTTY | O_NONBLOCK,
                 mode);
     if (fd == -1) {
+#ifndef CONFIG_DARWIN
         if (errno == EPERM && (flags & O_NOATIME)) {
             /*
              * The client passed O_NOATIME but we lack permissions to honor it.
@@ -53,6 +54,7 @@ again:
             flags &= ~O_NOATIME;
             goto again;
         }
+#endif
         return -1;
     }
 
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 2464ffeb94..97dc8b246f 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -131,11 +131,20 @@ static int dotl_to_open_flags(int flags)
         { P9_DOTL_NONBLOCK, O_NONBLOCK } ,
         { P9_DOTL_DSYNC, O_DSYNC },
         { P9_DOTL_FASYNC, FASYNC },
+#ifndef CONFIG_DARWIN
+        { P9_DOTL_NOATIME, O_NOATIME },
+        /*
+         *  On Darwin, we could map to F_NOCACHE, which is
+         *  similar, but doesn't quite have the same
+         *  semantics. However, we don't support O_DIRECT
+         *  even on linux at the moment, so we just ignore
+         *  it here.
+         */
         { P9_DOTL_DIRECT, O_DIRECT },
+#endif
         { P9_DOTL_LARGEFILE, O_LARGEFILE },
         { P9_DOTL_DIRECTORY, O_DIRECTORY },
         { P9_DOTL_NOFOLLOW, O_NOFOLLOW },
-        { P9_DOTL_NOATIME, O_NOATIME },
         { P9_DOTL_SYNC, O_SYNC },
     };
 
@@ -164,10 +173,12 @@ static int get_dotl_openflags(V9fsState *s, int oflags)
      */
     flags = dotl_to_open_flags(oflags);
     flags &= ~(O_NOCTTY | O_ASYNC | O_CREAT);
+#ifndef CONFIG_DARWIN
     /*
      * Ignore direct disk access hint until the server supports it.
      */
     flags &= ~O_DIRECT;
+#endif
     return flags;
 }
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 06/11] 9p: darwin: Compatibility defn for XATTR_SIZE_MAX
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
                   ` (4 preceding siblings ...)
  2021-10-13 23:03 ` [PATCH 05/11] 9p: darwin: Ignore O_{NOATIME, DIRECT} Will Cohen
@ 2021-10-13 23:04 ` Will Cohen
  2021-10-13 23:04 ` [PATCH 07/11] 9p: darwin: *xattr_nofollow implementations Will Cohen
                   ` (5 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer, Will Cohen

From: Keno Fischer <keno@juliacomputing.com>

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Will Cohen <wwcohen@gmail.com>
---
 hw/9pfs/9p.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 97dc8b246f..3fc43cb482 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -3927,6 +3927,14 @@ out_nofid:
     v9fs_string_free(&name);
 }
 
+#if defined(CONFIG_DARWIN) && !defined(XATTR_SIZE_MAX)
+/*
+ * Darwin doesn't seem to define a maximum xattr size in its user
+ * space header, but looking at the kernel source, HFS supports
+ *  up to INT32_MAX, so use that as the maximum.
+ */
+#define XATTR_SIZE_MAX INT32_MAX
+#endif
 static void coroutine_fn v9fs_xattrcreate(void *opaque)
 {
     int flags, rflags = 0;
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 07/11] 9p: darwin: *xattr_nofollow implementations
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
                   ` (5 preceding siblings ...)
  2021-10-13 23:04 ` [PATCH 06/11] 9p: darwin: Compatibility defn for XATTR_SIZE_MAX Will Cohen
@ 2021-10-13 23:04 ` Will Cohen
  2021-10-13 23:04 ` [PATCH 08/11] 9p: darwin: Compatibility for f/l*xattr Will Cohen
                   ` (4 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer, Michael Roitzsch

From: Keno Fischer <keno@juliacomputing.com>

This implements the darwin equivalent of the functions that were
moved to 9p-util(-linux) earlier in this series in the new
9p-util-darwin file.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com>
---
 hw/9pfs/9p-util-darwin.c | 64 ++++++++++++++++++++++++++++++++++++++++
 hw/9pfs/meson.build      |  1 +
 2 files changed, 65 insertions(+)
 create mode 100644 hw/9pfs/9p-util-darwin.c

diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c
new file mode 100644
index 0000000000..cdb4c9e24c
--- /dev/null
+++ b/hw/9pfs/9p-util-darwin.c
@@ -0,0 +1,64 @@
+/*
+ * 9p utilities (Darwin Implementation)
+ *
+ * This work is licensed under the terms of the GNU GPL, version 2 or later.
+ * See the COPYING file in the top-level directory.
+ */
+
+#include "qemu/osdep.h"
+#include "qemu/xattr.h"
+#include "9p-util.h"
+
+ssize_t fgetxattrat_nofollow(int dirfd, const char *filename, const char *name,
+                             void *value, size_t size)
+{
+    int ret;
+    int fd = openat_file(dirfd, filename,
+                         O_RDONLY | O_PATH_9P_UTIL | O_NOFOLLOW, 0);
+    if (fd == -1) {
+        return -1;
+    }
+    ret = fgetxattr(fd, name, value, size, 0, 0);
+    close_preserve_errno(fd);
+    return ret;
+}
+
+ssize_t flistxattrat_nofollow(int dirfd, const char *filename,
+                              char *list, size_t size)
+{
+    int ret;
+    int fd = openat_file(dirfd, filename,
+                         O_RDONLY | O_PATH_9P_UTIL | O_NOFOLLOW, 0);
+    if (fd == -1) {
+        return -1;
+    }
+    ret = flistxattr(fd, list, size, 0);
+    close_preserve_errno(fd);
+    return ret;
+}
+
+ssize_t fremovexattrat_nofollow(int dirfd, const char *filename,
+                                const char *name)
+{
+    int ret;
+    int fd = openat_file(dirfd, filename, O_PATH_9P_UTIL | O_NOFOLLOW, 0);
+    if (fd == -1) {
+        return -1;
+    }
+    ret = fremovexattr(fd, name, 0);
+    close_preserve_errno(fd);
+    return ret;
+}
+
+int fsetxattrat_nofollow(int dirfd, const char *filename, const char *name,
+                         void *value, size_t size, int flags)
+{
+    int ret;
+    int fd = openat_file(dirfd, filename, O_PATH_9P_UTIL | O_NOFOLLOW, 0);
+    if (fd == -1) {
+        return -1;
+    }
+    ret = fsetxattr(fd, name, value, size, 0, flags);
+    close_preserve_errno(fd);
+    return ret;
+}
diff --git a/hw/9pfs/meson.build b/hw/9pfs/meson.build
index 1b28e70040..12443b6ad5 100644
--- a/hw/9pfs/meson.build
+++ b/hw/9pfs/meson.build
@@ -14,6 +14,7 @@ fs_ss.add(files(
   'coxattr.c',
 ))
 fs_ss.add(when: 'CONFIG_LINUX', if_true: files('9p-util-linux.c'))
+fs_ss.add(when: 'CONFIG_DARWIN', if_true: files('9p-util-darwin.c'))
 fs_ss.add(when: 'CONFIG_XEN', if_true: files('xen-9p-backend.c'))
 softmmu_ss.add_all(when: 'CONFIG_FSDEV_9P', if_true: fs_ss)
 
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 08/11] 9p: darwin: Compatibility for f/l*xattr
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
                   ` (6 preceding siblings ...)
  2021-10-13 23:04 ` [PATCH 07/11] 9p: darwin: *xattr_nofollow implementations Will Cohen
@ 2021-10-13 23:04 ` Will Cohen
  2021-10-13 23:04 ` [PATCH 09/11] 9p: darwin: Provide a fallback implementation for utimensat Will Cohen
                   ` (3 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer, Greg Kurz

From: Keno Fischer <keno@juliacomputing.com>

On darwin `fgetxattr` takes two extra optional arguments,
and the l* variants are not defined (in favor of an extra
flag to the regular variants.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Reviewed-by: Greg Kurz <groug@kaod.org>
---
 hw/9pfs/9p-local.c | 12 ++++++++----
 hw/9pfs/9p-util.h  | 17 +++++++++++++++++
 2 files changed, 25 insertions(+), 4 deletions(-)

diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index 1a5e3eed73..2bfff79b12 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -781,16 +781,20 @@ static int local_fstat(FsContext *fs_ctx, int fid_type,
         mode_t tmp_mode;
         dev_t tmp_dev;
 
-        if (fgetxattr(fd, "user.virtfs.uid", &tmp_uid, sizeof(uid_t)) > 0) {
+        if (qemu_fgetxattr(fd, "user.virtfs.uid",
+                           &tmp_uid, sizeof(uid_t)) > 0) {
             stbuf->st_uid = le32_to_cpu(tmp_uid);
         }
-        if (fgetxattr(fd, "user.virtfs.gid", &tmp_gid, sizeof(gid_t)) > 0) {
+        if (qemu_fgetxattr(fd, "user.virtfs.gid",
+                           &tmp_gid, sizeof(gid_t)) > 0) {
             stbuf->st_gid = le32_to_cpu(tmp_gid);
         }
-        if (fgetxattr(fd, "user.virtfs.mode", &tmp_mode, sizeof(mode_t)) > 0) {
+        if (qemu_fgetxattr(fd, "user.virtfs.mode",
+                           &tmp_mode, sizeof(mode_t)) > 0) {
             stbuf->st_mode = le32_to_cpu(tmp_mode);
         }
-        if (fgetxattr(fd, "user.virtfs.rdev", &tmp_dev, sizeof(dev_t)) > 0) {
+        if (qemu_fgetxattr(fd, "user.virtfs.rdev",
+                           &tmp_dev, sizeof(dev_t)) > 0) {
             stbuf->st_rdev = le64_to_cpu(tmp_dev);
         }
     } else if (fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) {
diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h
index 627baebaba..38ef8b289d 100644
--- a/hw/9pfs/9p-util.h
+++ b/hw/9pfs/9p-util.h
@@ -19,6 +19,23 @@
 #define O_PATH_9P_UTIL 0
 #endif
 
+#ifdef CONFIG_DARWIN
+#define qemu_fgetxattr(...) fgetxattr(__VA_ARGS__, 0, 0)
+#define qemu_lgetxattr(...) getxattr(__VA_ARGS__, 0, XATTR_NOFOLLOW)
+#define qemu_llistxattr(...) listxattr(__VA_ARGS__, XATTR_NOFOLLOW)
+#define qemu_lremovexattr(...) removexattr(__VA_ARGS__, XATTR_NOFOLLOW)
+static inline int qemu_lsetxattr(const char *path, const char *name,
+                                 const void *value, size_t size, int flags) {
+    return setxattr(path, name, value, size, 0, flags | XATTR_NOFOLLOW);
+}
+#else
+#define qemu_fgetxattr fgetxattr
+#define qemu_lgetxattr lgetxattr
+#define qemu_llistxattr llistxattr
+#define qemu_lremovexattr lremovexattr
+#define qemu_lsetxattr lsetxattr
+#endif
+
 static inline void close_preserve_errno(int fd)
 {
     int serrno = errno;
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 09/11] 9p: darwin: Provide a fallback implementation for utimensat
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
                   ` (7 preceding siblings ...)
  2021-10-13 23:04 ` [PATCH 08/11] 9p: darwin: Compatibility for f/l*xattr Will Cohen
@ 2021-10-13 23:04 ` Will Cohen
  2021-10-13 23:04 ` [PATCH 10/11] 9p: darwin: Implement compatibility for mknodat Will Cohen
                   ` (2 subsequent siblings)
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer

From: Keno Fischer <keno@juliacomputing.com>

This function is new in Mac OS 10.13. Provide a fallback implementation
when building against older SDKs. The complication in the definition comes
having to separately handle the used SDK version and the target OS version.

- If the SDK version is too low (__MAC_10_13 not defined), utimensat is not
  defined in the header, so we must not try to use it (doing so would error).
- Otherwise, if the targetted OS version is at least 10.13, we know this
  function is available, so we can unconditionally call it.
- Lastly, we check for the availability of the __builtin_available macro to
  potentially insert a dynamic check for this OS version. However, __builtin_available
  is only available with sufficiently recent versions of clang and while all
  Apple clang versions that ship with Xcode versions that support the 10.13
  SDK support with builtin, we want to allow building with compilers other
  than Apple clang that may not support this builtin.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
---
 hw/9pfs/9p-local.c       |  2 +-
 hw/9pfs/9p-util-darwin.c | 96 ++++++++++++++++++++++++++++++++++++++++
 hw/9pfs/9p-util-linux.c  |  6 +++
 hw/9pfs/9p-util.h        |  8 ++++
 hw/9pfs/9p.c             |  1 +
 5 files changed, 112 insertions(+), 1 deletion(-)

diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index 2bfff79b12..4268703d05 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -1076,7 +1076,7 @@ static int local_utimensat(FsContext *s, V9fsPath *fs_path,
         goto out;
     }
 
-    ret = utimensat(dirfd, name, buf, AT_SYMLINK_NOFOLLOW);
+    ret = utimensat_nofollow(dirfd, name, buf);
     close_preserve_errno(dirfd);
 out:
     g_free(dirpath);
diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c
index cdb4c9e24c..ac414bcbfd 100644
--- a/hw/9pfs/9p-util-darwin.c
+++ b/hw/9pfs/9p-util-darwin.c
@@ -62,3 +62,99 @@ int fsetxattrat_nofollow(int dirfd, const char *filename, const char *name,
     close_preserve_errno(fd);
     return ret;
 }
+
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+
+static int update_times_from_stat(int fd, struct timespec times[2],
+                                  int update0, int update1)
+{
+    struct stat buf;
+    int ret = fstat(fd, &buf);
+    if (ret == -1) {
+        return ret;
+    }
+    if (update0) {
+        times[0] = buf.st_atimespec;
+    }
+    if (update1) {
+        times[1] = buf.st_mtimespec;
+    }
+    return 0;
+}
+
+int utimensat_nofollow(int dirfd, const char *filename,
+                       const struct timespec times_in[2])
+{
+    int ret, fd;
+    int special0, special1;
+    struct timeval futimes_buf[2];
+    struct timespec times[2];
+    memcpy(times, times_in, 2 * sizeof(struct timespec));
+
+/* Check whether we have an SDK version that defines utimensat */
+#if defined(__MAC_10_13)
+# if __MAC_OS_X_VERSION_MIN_REQUIRED >= __MAC_10_13
+#  define UTIMENSAT_AVAILABLE 1
+# elif __has_builtin(__builtin_available)
+#  define UTIMENSAT_AVAILABLE __builtin_available(macos 10.13, *)
+# else
+#  define UTIMENSAT_AVAILABLE 0
+# endif
+    if (UTIMENSAT_AVAILABLE) {
+        return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW);
+    }
+#endif
+
+    /* utimensat not available. Use futimes. */
+    fd = openat_file(dirfd, filename, O_PATH_9P_UTIL | O_NOFOLLOW, 0);
+    if (fd == -1) {
+        return -1;
+    }
+
+    special0 = times[0].tv_nsec == UTIME_OMIT;
+    special1 = times[1].tv_nsec == UTIME_OMIT;
+    if (special0 || special1) {
+        /* If both are set, nothing to do */
+        if (special0 && special1) {
+            ret = 0;
+            goto done;
+        }
+
+        ret = update_times_from_stat(fd, times, special0, special1);
+        if (ret < 0) {
+            goto done;
+        }
+    }
+
+    special0 = times[0].tv_nsec == UTIME_NOW;
+    special1 = times[1].tv_nsec == UTIME_NOW;
+    if (special0 || special1) {
+        ret = futimes(fd, NULL);
+        if (ret < 0) {
+            goto done;
+        }
+
+        /* If both are set, we are done */
+        if (special0 && special1) {
+            ret = 0;
+            goto done;
+        }
+
+        ret = update_times_from_stat(fd, times, special0, special1);
+        if (ret < 0) {
+            goto done;
+        }
+    }
+
+    futimes_buf[0].tv_sec = times[0].tv_sec;
+    futimes_buf[0].tv_usec = times[0].tv_nsec / 1000;
+    futimes_buf[1].tv_sec = times[1].tv_sec;
+    futimes_buf[1].tv_usec = times[1].tv_nsec / 1000;
+    ret = futimes(fd, futimes_buf);
+
+done:
+    close_preserve_errno(fd);
+    return ret;
+}
diff --git a/hw/9pfs/9p-util-linux.c b/hw/9pfs/9p-util-linux.c
index 398614a5d0..d54bf57a59 100644
--- a/hw/9pfs/9p-util-linux.c
+++ b/hw/9pfs/9p-util-linux.c
@@ -62,3 +62,9 @@ int fsetxattrat_nofollow(int dirfd, const char *filename, const char *name,
     g_free(proc_path);
     return ret;
 }
+
+int utimensat_nofollow(int dirfd, const char *filename,
+                       const struct timespec times[2])
+{
+    return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW);
+}
diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h
index 38ef8b289d..1c477a0e66 100644
--- a/hw/9pfs/9p-util.h
+++ b/hw/9pfs/9p-util.h
@@ -36,6 +36,12 @@ static inline int qemu_lsetxattr(const char *path, const char *name,
 #define qemu_lsetxattr lsetxattr
 #endif
 
+/* Compatibility with old SDK Versions for Darwin */
+#if defined(CONFIG_DARWIN) && !defined(UTIME_NOW)
+#define UTIME_NOW -1
+#define UTIME_OMIT -2
+#endif
+
 static inline void close_preserve_errno(int fd)
 {
     int serrno = errno;
@@ -96,5 +102,7 @@ ssize_t flistxattrat_nofollow(int dirfd, const char *filename,
                               char *list, size_t size);
 ssize_t fremovexattrat_nofollow(int dirfd, const char *filename,
                                 const char *name);
+int utimensat_nofollow(int dirfd, const char *filename,
+                       const struct timespec times[2]);
 
 #endif
diff --git a/hw/9pfs/9p.c b/hw/9pfs/9p.c
index 3fc43cb482..6fe42e61fc 100644
--- a/hw/9pfs/9p.c
+++ b/hw/9pfs/9p.c
@@ -27,6 +27,7 @@
 #include "virtio-9p.h"
 #include "fsdev/qemu-fsdev.h"
 #include "9p-xattr.h"
+#include "9p-util.h"
 #include "coth.h"
 #include "trace.h"
 #include "migration/blocker.h"
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 10/11] 9p: darwin: Implement compatibility for mknodat
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
                   ` (8 preceding siblings ...)
  2021-10-13 23:04 ` [PATCH 09/11] 9p: darwin: Provide a fallback implementation for utimensat Will Cohen
@ 2021-10-13 23:04 ` Will Cohen
  2021-10-13 23:04 ` [PATCH 11/11] 9p: darwin: meson: Allow VirtFS on Darwin Will Cohen
  2021-10-14  7:03 ` [PATCH 00/11] 9p: Add support for Darwin Greg Kurz
  11 siblings, 0 replies; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer, Will Cohen

From: Keno Fischer <keno@juliacomputing.com>

Darwin does not support mknodat. However, to avoid race conditions
with later setting the permissions, we must avoid using mknod on
the full path instead. We could try to fchdir, but that would cause
problems if multiple threads try to call mknodat at the same time.
However, luckily there is a solution: Darwin as an (unexposed in the
C library) system call that sets the cwd for the current thread only.
This should suffice to use mknod safely.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Will Cohen <wwcohen@gmail.com>
---
 hw/9pfs/9p-local.c       |  5 +++--
 hw/9pfs/9p-util-darwin.c | 33 +++++++++++++++++++++++++++++++++
 hw/9pfs/9p-util-linux.c  |  5 +++++
 hw/9pfs/9p-util.h        |  2 ++
 4 files changed, 43 insertions(+), 2 deletions(-)

diff --git a/hw/9pfs/9p-local.c b/hw/9pfs/9p-local.c
index 4268703d05..42b65e143b 100644
--- a/hw/9pfs/9p-local.c
+++ b/hw/9pfs/9p-local.c
@@ -673,7 +673,7 @@ static int local_mknod(FsContext *fs_ctx, V9fsPath *dir_path,
 
     if (fs_ctx->export_flags & V9FS_SM_MAPPED ||
         fs_ctx->export_flags & V9FS_SM_MAPPED_FILE) {
-        err = mknodat(dirfd, name, fs_ctx->fmode | S_IFREG, 0);
+        err = qemu_mknodat(dirfd, name, fs_ctx->fmode | S_IFREG, 0);
         if (err == -1) {
             goto out;
         }
@@ -688,7 +688,7 @@ static int local_mknod(FsContext *fs_ctx, V9fsPath *dir_path,
         }
     } else if (fs_ctx->export_flags & V9FS_SM_PASSTHROUGH ||
                fs_ctx->export_flags & V9FS_SM_NONE) {
-        err = mknodat(dirfd, name, credp->fc_mode, credp->fc_rdev);
+        err = qemu_mknodat(dirfd, name, credp->fc_mode, credp->fc_rdev);
         if (err == -1) {
             goto out;
         }
@@ -701,6 +701,7 @@ static int local_mknod(FsContext *fs_ctx, V9fsPath *dir_path,
 
 err_end:
     unlinkat_preserve_errno(dirfd, name, 0);
+
 out:
     close_preserve_errno(dirfd);
     return err;
diff --git a/hw/9pfs/9p-util-darwin.c b/hw/9pfs/9p-util-darwin.c
index ac414bcbfd..25e67d5067 100644
--- a/hw/9pfs/9p-util-darwin.c
+++ b/hw/9pfs/9p-util-darwin.c
@@ -158,3 +158,36 @@ done:
     close_preserve_errno(fd);
     return ret;
 }
+
+#ifndef SYS___pthread_fchdir
+# define SYS___pthread_fchdir 349
+#endif
+
+/*
+ * This is an undocumented OS X syscall. It would be best to avoid it,
+ * but there doesn't seem to be another safe way to implement mknodat.
+ * Dear Apple, please implement mknodat before you remove this syscall.
+ */
+static int fchdir_thread_local(int fd)
+{
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+    return syscall(SYS___pthread_fchdir, fd);
+#pragma clang diagnostic pop
+}
+
+int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev)
+{
+    int preserved_errno, err;
+    if (fchdir_thread_local(dirfd) < 0) {
+        return -1;
+    }
+    err = mknod(filename, mode, dev);
+    preserved_errno = errno;
+    /* Stop using the thread-local cwd */
+    fchdir_thread_local(-1);
+    if (err < 0) {
+        errno = preserved_errno;
+    }
+    return err;
+}
diff --git a/hw/9pfs/9p-util-linux.c b/hw/9pfs/9p-util-linux.c
index d54bf57a59..4f57d8c047 100644
--- a/hw/9pfs/9p-util-linux.c
+++ b/hw/9pfs/9p-util-linux.c
@@ -68,3 +68,8 @@ int utimensat_nofollow(int dirfd, const char *filename,
 {
     return utimensat(dirfd, filename, times, AT_SYMLINK_NOFOLLOW);
 }
+
+int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev)
+{
+    return mknodat(dirfd, filename, mode, dev);
+}
diff --git a/hw/9pfs/9p-util.h b/hw/9pfs/9p-util.h
index 1c477a0e66..cac682d335 100644
--- a/hw/9pfs/9p-util.h
+++ b/hw/9pfs/9p-util.h
@@ -105,4 +105,6 @@ ssize_t fremovexattrat_nofollow(int dirfd, const char *filename,
 int utimensat_nofollow(int dirfd, const char *filename,
                        const struct timespec times[2]);
 
+int qemu_mknodat(int dirfd, const char *filename, mode_t mode, dev_t dev);
+
 #endif
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* [PATCH 11/11] 9p: darwin: meson: Allow VirtFS on Darwin
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
                   ` (9 preceding siblings ...)
  2021-10-13 23:04 ` [PATCH 10/11] 9p: darwin: Implement compatibility for mknodat Will Cohen
@ 2021-10-13 23:04 ` Will Cohen
  2021-10-15 12:10   ` Paolo Bonzini
  2021-10-14  7:03 ` [PATCH 00/11] 9p: Add support for Darwin Greg Kurz
  11 siblings, 1 reply; 20+ messages in thread
From: Will Cohen @ 2021-10-13 23:04 UTC (permalink / raw)
  To: qemu-devel; +Cc: Keno Fischer, Michael Roitzsch

From: Keno Fischer <keno@juliacomputing.com>

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com>
---
 fsdev/meson.build |  1 +
 meson.build       | 17 ++++++++++-------
 2 files changed, 11 insertions(+), 7 deletions(-)

diff --git a/fsdev/meson.build b/fsdev/meson.build
index adf57cc43e..b632b66348 100644
--- a/fsdev/meson.build
+++ b/fsdev/meson.build
@@ -7,6 +7,7 @@ fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files(
   'qemu-fsdev.c',
 ), if_false: files('qemu-fsdev-dummy.c'))
 softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
+softmmu_ss.add_all(when: 'CONFIG_DARWIN', if_true: fsdev_ss)
 
 if have_virtfs_proxy_helper
   executable('virtfs-proxy-helper',
diff --git a/meson.build b/meson.build
index 99a0a3e689..5e777b271d 100644
--- a/meson.build
+++ b/meson.build
@@ -1203,17 +1203,20 @@ have_host_block_device = (targetos != 'darwin' or
 # config-host.h #
 #################
 
-have_virtfs = (targetos == 'linux' and
-    have_system and
-    libattr.found() and
-    libcap_ng.found())
+if targetos == 'linux'
+  have_virtfs = (have_system and
+      libattr.found() and
+      libcap_ng.found())
+elif targetos == 'darwin'
+  have_virtfs = have_system
+endif
 
-have_virtfs_proxy_helper = have_virtfs and have_tools
+have_virtfs_proxy_helper = targetos == 'linux' and have_virtfs and have_tools
 
 if get_option('virtfs').enabled()
   if not have_virtfs
-    if targetos != 'linux'
-      error('virtio-9p (virtfs) requires Linux')
+    if targetos != 'linux' and targetos != 'darwin'
+      error('virtio-9p (virtfs) requires Linux or Darwin')
     elif not libcap_ng.found() or not libattr.found()
       error('virtio-9p (virtfs) requires libcap-ng-devel and libattr-devel')
     elif not have_system
-- 
2.33.0



^ permalink raw reply related	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/11] 9p: Add support for Darwin
  2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
                   ` (10 preceding siblings ...)
  2021-10-13 23:04 ` [PATCH 11/11] 9p: darwin: meson: Allow VirtFS on Darwin Will Cohen
@ 2021-10-14  7:03 ` Greg Kurz
  2021-10-14 10:48   ` Will Cohen
  11 siblings, 1 reply; 20+ messages in thread
From: Greg Kurz @ 2021-10-14  7:03 UTC (permalink / raw)
  To: Will Cohen; +Cc: Christian Schoenebeck, qemu-devel

Hi Will,

It is strongly recommended that you Cc maintainers to increase the odds
they notice your patches in the flood of qemu-devel. FYI I only noticed
them because git-send-email Cc'd me thanks to the Reviewed-by: tags and
my address didn't change in the meantime. I'm thus Cc'ing Christian
who is the primary maintainer now (i.e. the person that can merge
your patches and send a PR for upstream inclusion).

FWIW git-publish [1] can Cc the relevant people for free.

[1] https://github.com/stefanha/git-publish

On Wed, 13 Oct 2021 19:03:54 -0400
Will Cohen <wwcohen@gmail.com> wrote:

> This is a continuation of a patch series adding 9p server support for Darwin,
> originally submitted by Keno Fischer in mid-2018
> (https://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg04643.html). In
> some sense, this could be considered [PATCH v4] of that process, but I assume
> that the multi-year gap merits a fresh start..
> 

This makes sense. For consistency with that assumption, it would also
make sense to clear all preexisting Reviewed-by: tags.

> It has since been updated and rebased for NixOS by Michael Roitzsch
> (https://github.com/NixOS/nixpkgs/pull/122420) with a goal of resubmitting
> upstream. I am submitting his patch set as suggested, as developed by Michael,
> with his Signed-off-by headers included in full.
> 

QEMU cares about tracking of who did what and follows a policy inspired
from the linux kernel [2] [3].

Michael's Signed-off-by: should then appear on all patches, with a
mention of the extra changes that he made, e.g.

Signed-off-by: Keno Fischer <keno@juliacomputing.com>
[Michael Roitzsch: - rebased for NixOS
                   - some other change]
Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com>

If no changes were made, you still need to add a Signed-off-by: tag.

[2] https://wiki.qemu.org/Contribute/SubmitAPatch
[3] http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches?id=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#n297

> Additionally, I have run the patches through checkpatch.pl and adjusted coding
> style accordingly (with the exception of ignoring warnings about avoid

Good ! If you have an account on gitlab, you can also push a branch there.
It will be submitted to gitlab CI and maybe give you the opportunity to
polish the patches some more before submission.

> architecture specific defines in hw/9pfs/9p-util-darwin.c, where they seem
> unavoidable), and have signed off on those modified commits.
> 

As explained above, your Signed-off-by: is also needed in all patches,
even if you didn't change them.

Cheers,

--
Greg

> 
> 



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/11] 9p: Add support for Darwin
  2021-10-14  7:03 ` [PATCH 00/11] 9p: Add support for Darwin Greg Kurz
@ 2021-10-14 10:48   ` Will Cohen
  2021-10-14 11:57     ` Christian Schoenebeck
  0 siblings, 1 reply; 20+ messages in thread
From: Will Cohen @ 2021-10-14 10:48 UTC (permalink / raw)
  To: Greg Kurz; +Cc: Christian Schoenebeck, qemu-devel

[-- Attachment #1: Type: text/plain, Size: 3174 bytes --]

Many thanks for all the clarifications — it’s my first time using
git-send-email and first time with mailing-list-based devel workflows. Will
adjust accordingly, work through gitlab, and eventually resend via
git-publish as v2.

On Thu, Oct 14, 2021 at 3:04 AM Greg Kurz <groug@kaod.org> wrote:

> Hi Will,
>
> It is strongly recommended that you Cc maintainers to increase the odds
> they notice your patches in the flood of qemu-devel. FYI I only noticed
> them because git-send-email Cc'd me thanks to the Reviewed-by: tags and
> my address didn't change in the meantime. I'm thus Cc'ing Christian
> who is the primary maintainer now (i.e. the person that can merge
> your patches and send a PR for upstream inclusion).
>
> FWIW git-publish [1] can Cc the relevant people for free.
>
> [1] https://github.com/stefanha/git-publish
>
> On Wed, 13 Oct 2021 19:03:54 -0400
> Will Cohen <wwcohen@gmail.com> wrote:
>
> > This is a continuation of a patch series adding 9p server support for
> Darwin,
> > originally submitted by Keno Fischer in mid-2018
> > (https://lists.nongnu.org/archive/html/qemu-devel/2018-06/msg04643.html).
> In
> > some sense, this could be considered [PATCH v4] of that process, but I
> assume
> > that the multi-year gap merits a fresh start..
> >
>
> This makes sense. For consistency with that assumption, it would also
> make sense to clear all preexisting Reviewed-by: tags.
>
> > It has since been updated and rebased for NixOS by Michael Roitzsch
> > (https://github.com/NixOS/nixpkgs/pull/122420) with a goal of
> resubmitting
> > upstream. I am submitting his patch set as suggested, as developed by
> Michael,
> > with his Signed-off-by headers included in full.
> >
>
> QEMU cares about tracking of who did what and follows a policy inspired
> from the linux kernel [2] [3].
>
> Michael's Signed-off-by: should then appear on all patches, with a
> mention of the extra changes that he made, e.g.
>
> Signed-off-by: Keno Fischer <keno@juliacomputing.com>
> [Michael Roitzsch: - rebased for NixOS
>                    - some other change]
> Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com>
>
> If no changes were made, you still need to add a Signed-off-by: tag.
>
> [2] https://wiki.qemu.org/Contribute/SubmitAPatch
> [3]
> http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches?id=f6f94e2ab1b33f0082ac22d71f66385a60d8157f#n297
>
> > Additionally, I have run the patches through checkpatch.pl and adjusted
> coding
> > style accordingly (with the exception of ignoring warnings about avoid
>
> Good ! If you have an account on gitlab, you can also push a branch there.
> It will be submitted to gitlab CI and maybe give you the opportunity to
> polish the patches some more before submission.
>
> > architecture specific defines in hw/9pfs/9p-util-darwin.c, where they
> seem
> > unavoidable), and have signed off on those modified commits.
> >
>
> As explained above, your Signed-off-by: is also needed in all patches,
> even if you didn't change them.
>
> Cheers,
>
> --
> Greg
>
> >
> >
>
>

[-- Attachment #2: Type: text/html, Size: 4572 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/11] 9p: Add support for Darwin
  2021-10-14 10:48   ` Will Cohen
@ 2021-10-14 11:57     ` Christian Schoenebeck
  2021-10-14 12:22       ` Will Cohen
  0 siblings, 1 reply; 20+ messages in thread
From: Christian Schoenebeck @ 2021-10-14 11:57 UTC (permalink / raw)
  To: qemu-devel; +Cc: Will Cohen, Greg Kurz

On Donnerstag, 14. Oktober 2021 12:48:55 CEST Will Cohen wrote:
> Many thanks for all the clarifications — it’s my first time using
> git-send-email and first time with mailing-list-based devel workflows. Will
> adjust accordingly, work through gitlab, and eventually resend via
> git-publish as v2.

So the intended use case is macOS being host.

Has this been tested, and if yes, using which 9p client and which macOS 
version?

Best regards,
Christian Schoenebeck




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/11] 9p: Add support for Darwin
  2021-10-14 11:57     ` Christian Schoenebeck
@ 2021-10-14 12:22       ` Will Cohen
  2021-10-14 12:55         ` Christian Schoenebeck
  0 siblings, 1 reply; 20+ messages in thread
From: Will Cohen @ 2021-10-14 12:22 UTC (permalink / raw)
  To: Christian Schoenebeck; +Cc: qemu-devel, Greg Kurz

[-- Attachment #1: Type: text/plain, Size: 862 bytes --]

Correct. It's been tested and functions when applied to QEMU master, with
host running macOS Big Sur 11.6 (personal machine) using client 9p2000.L
(taking a cue from the guest mounting instructions on
https://wiki.qemu.org/Documentation/9psetup).

On Thu, Oct 14, 2021 at 7:57 AM Christian Schoenebeck <
qemu_oss@crudebyte.com> wrote:

> On Donnerstag, 14. Oktober 2021 12:48:55 CEST Will Cohen wrote:
> > Many thanks for all the clarifications — it’s my first time using
> > git-send-email and first time with mailing-list-based devel workflows.
> Will
> > adjust accordingly, work through gitlab, and eventually resend via
> > git-publish as v2.
>
> So the intended use case is macOS being host.
>
> Has this been tested, and if yes, using which 9p client and which macOS
> version?
>
> Best regards,
> Christian Schoenebeck
>
>
>

[-- Attachment #2: Type: text/html, Size: 1244 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/11] 9p: Add support for Darwin
  2021-10-14 12:22       ` Will Cohen
@ 2021-10-14 12:55         ` Christian Schoenebeck
  2021-10-14 13:23           ` Will Cohen
  0 siblings, 1 reply; 20+ messages in thread
From: Christian Schoenebeck @ 2021-10-14 12:55 UTC (permalink / raw)
  To: qemu-devel; +Cc: Will Cohen, Greg Kurz

On Donnerstag, 14. Oktober 2021 14:22:19 CEST Will Cohen wrote:
> Correct. It's been tested and functions when applied to QEMU master, with
> host running macOS Big Sur 11.6 (personal machine) using client 9p2000.L
> (taking a cue from the guest mounting instructions on
> https://wiki.qemu.org/Documentation/9psetup).

So it was the Linux kernel's 9p client on guest side with 9p 'local' fs driver 
and 9p transport driver was 'virtio-pci'.

I was just wondering if somebody already bothered for macOS being the guest, 
because that use case is a bit more challenging, especially with macOS 11 and 
higher. But I see that's nothing you were into.

> On Thu, Oct 14, 2021 at 7:57 AM Christian Schoenebeck <
> 
> qemu_oss@crudebyte.com> wrote:
> > On Donnerstag, 14. Oktober 2021 12:48:55 CEST Will Cohen wrote:
> > > Many thanks for all the clarifications — it’s my first time using
> > > git-send-email and first time with mailing-list-based devel workflows.
> > 
> > Will
> > 
> > > adjust accordingly, work through gitlab, and eventually resend via
> > > git-publish as v2.
> > 
> > So the intended use case is macOS being host.
> > 
> > Has this been tested, and if yes, using which 9p client and which macOS
> > version?
> > 
> > Best regards,
> > Christian Schoenebeck




^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/11] 9p: Add support for Darwin
  2021-10-14 12:55         ` Christian Schoenebeck
@ 2021-10-14 13:23           ` Will Cohen
  2021-10-20 12:38             ` Christian Schoenebeck
  0 siblings, 1 reply; 20+ messages in thread
From: Will Cohen @ 2021-10-14 13:23 UTC (permalink / raw)
  To: Christian Schoenebeck; +Cc: qemu-devel, Greg Kurz

[-- Attachment #1: Type: text/plain, Size: 2447 bytes --]

Correct, sorry for the imprecise language. The use case being contemplated
is limited to Linux as the guest side, specifically for cross-platform
tools where the macOS implementation consists of integrating a Linux VM via
QEMU.

NixOS (updater of the original patch,
https://github.com/NixOS/nixpkgs/pull/122420) would be able to use this to
provide macOS support via a VM.

Lima and Podman as containerization alternatives to Docker would like to
performantly mount volumes between macOS users and their respective VMs.
Lima currently accomplishes this via sshfs, but would like to move to 9p
for stability/performance reasons (https://github.com/lima-vm/lima/issues/20).
Podman has yet to fully settle on an implementation at all due to similar
outstanding concerns, but the furthest along proposed implementation choice
has been 9pfs as well (https://github.com/containers/podman/pull/11454),
pending adoption of such functionality in QEMU upstream.

On Thu, Oct 14, 2021 at 8:55 AM Christian Schoenebeck <
qemu_oss@crudebyte.com> wrote:

> On Donnerstag, 14. Oktober 2021 14:22:19 CEST Will Cohen wrote:
> > Correct. It's been tested and functions when applied to QEMU master, with
> > host running macOS Big Sur 11.6 (personal machine) using client 9p2000.L
> > (taking a cue from the guest mounting instructions on
> > https://wiki.qemu.org/Documentation/9psetup).
>
> So it was the Linux kernel's 9p client on guest side with 9p 'local' fs
> driver
> and 9p transport driver was 'virtio-pci'.
>
> I was just wondering if somebody already bothered for macOS being the
> guest,
> because that use case is a bit more challenging, especially with macOS 11
> and
> higher. But I see that's nothing you were into.
>
> > On Thu, Oct 14, 2021 at 7:57 AM Christian Schoenebeck <
> >
> > qemu_oss@crudebyte.com> wrote:
> > > On Donnerstag, 14. Oktober 2021 12:48:55 CEST Will Cohen wrote:
> > > > Many thanks for all the clarifications — it’s my first time using
> > > > git-send-email and first time with mailing-list-based devel
> workflows.
> > >
> > > Will
> > >
> > > > adjust accordingly, work through gitlab, and eventually resend via
> > > > git-publish as v2.
> > >
> > > So the intended use case is macOS being host.
> > >
> > > Has this been tested, and if yes, using which 9p client and which macOS
> > > version?
> > >
> > > Best regards,
> > > Christian Schoenebeck
>
>
>

[-- Attachment #2: Type: text/html, Size: 3338 bytes --]

^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 11/11] 9p: darwin: meson: Allow VirtFS on Darwin
  2021-10-13 23:04 ` [PATCH 11/11] 9p: darwin: meson: Allow VirtFS on Darwin Will Cohen
@ 2021-10-15 12:10   ` Paolo Bonzini
  0 siblings, 0 replies; 20+ messages in thread
From: Paolo Bonzini @ 2021-10-15 12:10 UTC (permalink / raw)
  To: Will Cohen, qemu-devel; +Cc: Keno Fischer, Michael Roitzsch

On 14/10/21 01:04, Will Cohen wrote:
> From: Keno Fischer <keno@juliacomputing.com>
> 
> Signed-off-by: Keno Fischer <keno@juliacomputing.com>
> Signed-off-by: Michael Roitzsch <reactorcontrol@icloud.com>
> ---
>   fsdev/meson.build |  1 +
>   meson.build       | 17 ++++++++++-------
>   2 files changed, 11 insertions(+), 7 deletions(-)
> 
> diff --git a/fsdev/meson.build b/fsdev/meson.build
> index adf57cc43e..b632b66348 100644
> --- a/fsdev/meson.build
> +++ b/fsdev/meson.build
> @@ -7,6 +7,7 @@ fsdev_ss.add(when: ['CONFIG_FSDEV_9P'], if_true: files(
>     'qemu-fsdev.c',
>   ), if_false: files('qemu-fsdev-dummy.c'))
>   softmmu_ss.add_all(when: 'CONFIG_LINUX', if_true: fsdev_ss)
> +softmmu_ss.add_all(when: 'CONFIG_DARWIN', if_true: fsdev_ss)
>   
>   if have_virtfs_proxy_helper
>     executable('virtfs-proxy-helper',
> diff --git a/meson.build b/meson.build
> index 99a0a3e689..5e777b271d 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1203,17 +1203,20 @@ have_host_block_device = (targetos != 'darwin' or
>   # config-host.h #
>   #################
>   
> -have_virtfs = (targetos == 'linux' and
> -    have_system and
> -    libattr.found() and
> -    libcap_ng.found())
> +if targetos == 'linux'
> +  have_virtfs = (have_system and
> +      libattr.found() and
> +      libcap_ng.found())
> +elif targetos == 'darwin'
> +  have_virtfs = have_system
> +endif
>   
> -have_virtfs_proxy_helper = have_virtfs and have_tools
> +have_virtfs_proxy_helper = targetos == 'linux' and have_virtfs and have_tools
>   
>   if get_option('virtfs').enabled()
>     if not have_virtfs
> -    if targetos != 'linux'
> -      error('virtio-9p (virtfs) requires Linux')
> +    if targetos != 'linux' and targetos != 'darwin'
> +      error('virtio-9p (virtfs) requires Linux or Darwin')
>       elif not libcap_ng.found() or not libattr.found()
>         error('virtio-9p (virtfs) requires libcap-ng-devel and libattr-devel')
>       elif not have_system
> 

Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>



^ permalink raw reply	[flat|nested] 20+ messages in thread

* Re: [PATCH 00/11] 9p: Add support for Darwin
  2021-10-14 13:23           ` Will Cohen
@ 2021-10-20 12:38             ` Christian Schoenebeck
  0 siblings, 0 replies; 20+ messages in thread
From: Christian Schoenebeck @ 2021-10-20 12:38 UTC (permalink / raw)
  To: qemu-devel; +Cc: Will Cohen, Greg Kurz

On Donnerstag, 14. Oktober 2021 15:23:25 CEST Will Cohen wrote:
> Correct, sorry for the imprecise language. The use case being contemplated
> is limited to Linux as the guest side, specifically for cross-platform
> tools where the macOS implementation consists of integrating a Linux VM via
> QEMU.
> 
> NixOS (updater of the original patch,
> https://github.com/NixOS/nixpkgs/pull/122420) would be able to use this to
> provide macOS support via a VM.
> 
> Lima and Podman as containerization alternatives to Docker would like to
> performantly mount volumes between macOS users and their respective VMs.
> Lima currently accomplishes this via sshfs, but would like to move to 9p
> for stability/performance reasons
> (https://github.com/lima-vm/lima/issues/20). Podman has yet to fully settle
> on an implementation at all due to similar outstanding concerns, but the
> furthest along proposed implementation choice has been 9pfs as well
> (https://github.com/containers/podman/pull/11454), pending adoption of such
> functionality in QEMU upstream.

I only had a glimpse on the patches so far. From what I've seen, I don't 
expect much of a problem to bring this series through. I will have a closer 
look on v2 though. I also have to read the old discussions where I was not 
involved yet.

Soft freeze for QEMU 6.2 is close BTW (November 2nd):
https://wiki.qemu.org/Planning/6.2

Best regards,
Christian Schoenebeck




^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2021-10-20 12:39 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-13 23:03 [PATCH 00/11] 9p: Add support for Darwin Will Cohen
2021-10-13 23:03 ` [PATCH 01/11] 9p: linux: Fix a couple Linux assumptions Will Cohen
2021-10-13 23:03 ` [PATCH 02/11] 9p: Rename 9p-util -> 9p-util-linux Will Cohen
2021-10-13 23:03 ` [PATCH 03/11] 9p: darwin: Handle struct stat(fs) differences Will Cohen
2021-10-13 23:03 ` [PATCH 04/11] 9p: darwin: Handle struct dirent differences Will Cohen
2021-10-13 23:03 ` [PATCH 05/11] 9p: darwin: Ignore O_{NOATIME, DIRECT} Will Cohen
2021-10-13 23:04 ` [PATCH 06/11] 9p: darwin: Compatibility defn for XATTR_SIZE_MAX Will Cohen
2021-10-13 23:04 ` [PATCH 07/11] 9p: darwin: *xattr_nofollow implementations Will Cohen
2021-10-13 23:04 ` [PATCH 08/11] 9p: darwin: Compatibility for f/l*xattr Will Cohen
2021-10-13 23:04 ` [PATCH 09/11] 9p: darwin: Provide a fallback implementation for utimensat Will Cohen
2021-10-13 23:04 ` [PATCH 10/11] 9p: darwin: Implement compatibility for mknodat Will Cohen
2021-10-13 23:04 ` [PATCH 11/11] 9p: darwin: meson: Allow VirtFS on Darwin Will Cohen
2021-10-15 12:10   ` Paolo Bonzini
2021-10-14  7:03 ` [PATCH 00/11] 9p: Add support for Darwin Greg Kurz
2021-10-14 10:48   ` Will Cohen
2021-10-14 11:57     ` Christian Schoenebeck
2021-10-14 12:22       ` Will Cohen
2021-10-14 12:55         ` Christian Schoenebeck
2021-10-14 13:23           ` Will Cohen
2021-10-20 12:38             ` Christian Schoenebeck

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).