hostmem-file: add readonly=on|off option
commit86635aa4e9d627d5142b81c57a33dd1f36627d07
authorStefan Hajnoczi <stefanha@redhat.com>
Mon, 4 Jan 2021 17:13:19 +0000 (4 17:13 +0000)
committerEduardo Habkost <ehabkost@redhat.com>
Mon, 1 Feb 2021 22:07:34 +0000 (1 17:07 -0500)
treeeea6337f2e0f1661c4da093a987cafc7729a715a
parent369d6dc4de45b8e5e35a851f5719e7fd59a0462f
hostmem-file: add readonly=on|off option

Let -object memory-backend-file work on read-only files when the
readonly=on option is given. This can be used to share the contents of a
file between multiple guests while preventing them from consuming
Copy-on-Write memory if guests dirty the pages, for example.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
Reviewed-by: Liam Merwick <liam.merwick@oracle.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20210104171320.575838-3-stefanha@redhat.com>
Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
backends/hostmem-file.c
qemu-options.hx