@samitouri / QOSamiQemu / commits / 44cb540d2d

qemu-options: document 9pfs max_xattr option

Add documentation for the new "max_xattr" command line option of 9pfs server, introduced by the previous commit. Link: https://lore.kernel.org/qemu-devel/b5a1a6ba299a49183d0032d9e4cd5e009d4aae47.1781361555.git.qemu_oss@crudebyte.com Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com>

Christian Schoenebeck committed Jun 13, 2026 at 16:55 UTC 44cb540d2d079ce2c785b130e163ab42b9e1a109
1 file changed +20 -8
qemu-options.hx
+20 -8
@@ -1940,19 +1940,19 @@ ERST
1940
1941 DEF("fsdev", HAS_ARG, QEMU_OPTION_fsdev,
1942 "-fsdev local,id=id,path=path,security_model=mapped-xattr|mapped-file|passthrough|none\n"
1943 - " [,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode]\n"
1943 + " [,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode][,max_xattr=max]\n"
1944 " [[,throttling.bps-total=b]|[[,throttling.bps-read=r][,throttling.bps-write=w]]]\n"
1945 " [[,throttling.iops-total=i]|[[,throttling.iops-read=r][,throttling.iops-write=w]]]\n"
1946 " [[,throttling.bps-total-max=bm]|[[,throttling.bps-read-max=rm][,throttling.bps-write-max=wm]]]\n"
1947 " [[,throttling.iops-total-max=im]|[[,throttling.iops-read-max=irm][,throttling.iops-write-max=iwm]]]\n"
1948 " [[,throttling.iops-size=is]]\n"
1949 - "-fsdev synth,id=id\n",
1949 + "-fsdev synth,id=id[,max_xattr=max]\n",
1950 QEMU_ARCH_ALL)
1951
1952 SRST
1953 -``-fsdev local,id=id,path=path,security_model=security_model [,writeout=writeout][,readonly=on][,fmode=fmode][,dmode=dmode] [,throttling.option=value[,throttling.option=value[,...]]]``
1953 +``-fsdev local,id=id,path=path,security_model=security_model [,writeout=writeout][,readonly=on][,fmode=fmode][,dmode=dmode][,max_xattr=max] [,throttling.option=value[,throttling.option=value[,...]]]``
1954 \
1955 -``-fsdev synth,id=id[,readonly=on]``
1955 +``-fsdev synth,id=id[,readonly=on][,max_xattr=max]``
1956 Define a new file system device. Valid options are:
1957
1958 ``local``
@@ -2026,6 +2026,12 @@ SRST
2026 Let every is bytes of a request count as a new request for iops
2027 throttling purposes.
2028
2029 + ``max_xattr=max``
2030 + Specifies the maximum number of concurrent xattr FIDs allowed for
2031 + this export. The default is 1024. Set to 0 for allowing an infinite
2032 + number of xattr FIDs. This limit prevents host memory exhaustion
2033 + attacks by capping the number of simultaneous xattr FIDs.
2034 +
2035 -fsdev option is used along with -device driver "virtio-9p-...".
2036
2037 ``-device virtio-9p-type,fsdev=id,mount_tag=mount_tag``
@@ -2045,14 +2051,14 @@ ERST
2051
2052 DEF("virtfs", HAS_ARG, QEMU_OPTION_virtfs,
2053 "-virtfs local,path=path,mount_tag=tag,security_model=mapped-xattr|mapped-file|passthrough|none\n"
2048 - " [,id=id][,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode][,multidevs=remap|forbid|warn]\n"
2049 - "-virtfs synth,mount_tag=tag[,id=id][,readonly=on]\n",
2054 + " [,id=id][,writeout=immediate][,readonly=on][,fmode=fmode][,dmode=dmode][,multidevs=remap|forbid|warn][,max_xattr=max]\n"
2055 + "-virtfs synth,mount_tag=tag[,id=id][,readonly=on][,max_xattr=max]\n",
2056 QEMU_ARCH_ALL)
2057
2058 SRST
2053 -``-virtfs local,path=path,mount_tag=mount_tag ,security_model=security_model[,writeout=writeout][,readonly=on] [,fmode=fmode][,dmode=dmode][,multidevs=multidevs]``
2059 +``-virtfs local,path=path,mount_tag=mount_tag ,security_model=security_model[,writeout=writeout][,readonly=on] [,fmode=fmode][,dmode=dmode][,multidevs=multidevs][,max_xattr=max]``
2060 \
2055 -``-virtfs synth,mount_tag=mount_tag``
2061 +``-virtfs synth,mount_tag=mount_tag[,max_xattr=max]``
2062 Define a new virtual filesystem device and expose it to the guest using
2063 a virtio-9p-device (a.k.a. 9pfs), which essentially means that a certain
2064 directory on host is made directly accessible by guest as a pass-through
@@ -2118,6 +2124,12 @@ SRST
2124 Specifies the tag name to be used by the guest to mount this
2125 export point.
2126
2127 + ``max_xattr=max``
2128 + Specifies the maximum number of concurrent xattr FIDs allowed for
2129 + this export. The default is 1024. Set to 0 for allowing an infinite
2130 + number of xattr FIDs. This limit prevents host memory exhaustion
2131 + attacks by capping the number of simultaneous xattr FIDs.
2132 +
2133 ``multidevs=remap|forbid|warn``
2134 Specifies how to deal with multiple devices being shared with
2135 the same 9p export in order to avoid file ID collisions on guest.