qemu with hax to log dma reads & writes jcs.org/2018/11/12/vfio

9p/proxy: Fix export_flags

The common fsdev options are set by qemu_fsdev_add() before it calls
the backend specific option parsing code. In the case of "proxy" this
means "writeout" or "readonly" were simply ignored. This has been
broken from the beginning.

Reported-by: Stéphane Graber <stgraber@ubuntu.com>
Signed-off-by: Greg Kurz <groug@kaod.org>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Message-Id: <158349633705.1237488.8895481990204796135.stgit@bahia.lan>

+2 -2
+2 -2
hw/9pfs/9p-proxy.c
··· 1139 1139 } 1140 1140 if (socket) { 1141 1141 fs->path = g_strdup(socket); 1142 - fs->export_flags = V9FS_PROXY_SOCK_NAME; 1142 + fs->export_flags |= V9FS_PROXY_SOCK_NAME; 1143 1143 } else { 1144 1144 fs->path = g_strdup(sock_fd); 1145 - fs->export_flags = V9FS_PROXY_SOCK_FD; 1145 + fs->export_flags |= V9FS_PROXY_SOCK_FD; 1146 1146 } 1147 1147 return 0; 1148 1148 }