Skip to content

Commit

Permalink
scripts: add virtio-fs DAX option to run.py
Browse files Browse the repository at this point in the history
Signed-off-by: Fotis Xenakis <foxen@windowslive.com>
Message-Id: <VI1PR03MB3773F8FBFC80E3B631C9E7A1A6959@VI1PR03MB3773.eurprd03.prod.outlook.com>
  • Loading branch information
foxeng authored and wkozaczuk committed Apr 1, 2021
1 parent 2eda045 commit 47601e6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/run.py
Original file line number Diff line number Diff line change
@@ -178,9 +178,10 @@ def start_osv_qemu(options):
"-drive", "file=%s,if=none,id=hd1" % (options.cloud_init_image)]

if options.virtio_fs_tag:
dax = (",cache-size=%s" % options.virtio_fs_dax) if options.virtio_fs_dax else ""
args += [
"-chardev", "socket,id=char0,path=/tmp/vhostqemu",
"-device", "vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=%s" % options.virtio_fs_tag,
"-device", "vhost-user-fs-pci,queue-size=1024,chardev=char0,tag=%s%s" % (options.virtio_fs_tag, dax),
"-object", "memory-backend-file,id=mem,size=%s,mem-path=/dev/shm,share=on" % options.memsize,
"-numa", "node,memdev=mem"]

@@ -602,6 +603,8 @@ def main(options):
help="virtio-fs device tag")
parser.add_argument("--virtio-fs-dir", action="store",
help="path to the directory exposed via virtio-fs mount")
parser.add_argument("--virtio-fs-dax", action="store",
help="DAX window size for virtio-fs device (disabled if not specified)")
parser.add_argument("--mount-fs", default=[], action="append",
help="extra mounts (forwarded to respective kernel command line option)")
parser.add_argument("--ip", default=[], action="append",

0 comments on commit 47601e6

Please sign in to comment.