From 6d7eeb7a1328fcce82b5783d9e4605bf5e4737dd Mon Sep 17 00:00:00 2001 From: Sasha Levin Date: Tue, 20 Oct 2015 23:32:33 -0400 Subject: [PATCH] kvmtool: set 9p caching mode to support writable mmaps 9p doesn't support writable mmaps by default (when cache=none), set it to loose caching to allow for writable mmaps. Reported-by: Dmitry Vyukov Signed-off-by: Sasha Levin Signed-off-by: Will Deacon --- builtin-run.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/builtin-run.c b/builtin-run.c index 6e4491c..d7d3afd 100644 --- a/builtin-run.c +++ b/builtin-run.c @@ -590,7 +590,7 @@ static struct kvm *kvm_cmd_run_init(int argc, const char **argv) } if (kvm->cfg.using_rootfs) { - strcat(real_cmdline, " rw rootflags=trans=virtio,version=9p2000.L rootfstype=9p"); + strcat(real_cmdline, " rw rootflags=trans=virtio,version=9p2000.L,cache=loose rootfstype=9p"); if (kvm->cfg.custom_rootfs) { kvm_run_set_sandbox(kvm);