From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Xiao Guangrong <xiaoguangrong.eric@gmail.com>,
"Michael S. Tsirkin" <mst@redhat.com>,
Julio Montes <julio.montes@intel.com>,
Eduardo Habkost <ehabkost@redhat.com>,
eric.g.ernst@gmail.com, Stefan Hajnoczi <stefanha@redhat.com>,
Igor Mammedov <imammedo@redhat.com>,
Paolo Bonzini <pbonzini@redhat.com>,
Richard Henderson <rth@twiddle.net>
Subject: [PATCH v3 0/3] nvdimm: read-only file support
Date: Mon, 4 Jan 2021 17:13:17 +0000 [thread overview]
Message-ID: <20210104171320.575838-1-stefanha@redhat.com> (raw)
v3:
* Produce an error when -device nvdimm,unarmed=off is used with -object
memory-backend-file,readonly=on instead of silently switching on
unarmed. [Igor]
* Use Object *obj instead of Object *o [Igor]
* Do not dereference MEMORY_BACKEND_FILE(o)->readonly directly, use a
local variable to hold the HostMemoryBackendFile pointer. [Igor]
v2:
* s/the the/the/ in documentation [Philippe]
* Assign nvdimm->unarmed earlier [Philippe]
There is currently no way to back an NVDIMM with a read-only file so it can be
safely shared between untrusted guests.
Introduce an -object memory-backend-file,readonly=on|off option.
Julio Montes sent an earlier patch here:
https://patchew.org/QEMU/20190708211936.8037-1-julio.montes@intel.com/
Eric Ernst requested this feature again for Kata Containers so I gave it a try.
Stefan Hajnoczi (3):
memory: add readonly support to memory_region_init_ram_from_file()
hostmem-file: add readonly=on|off option
nvdimm: check -object memory-backend-file,readonly=on option
docs/nvdimm.txt | 24 +++++++++++++++++-------
include/exec/memory.h | 2 ++
include/exec/ram_addr.h | 5 +++--
include/qemu/mmap-alloc.h | 2 ++
backends/hostmem-file.c | 28 +++++++++++++++++++++++++++-
hw/mem/nvdimm.c | 9 +++++++++
softmmu/memory.c | 7 +++++--
softmmu/physmem.c | 18 +++++++++++-------
util/mmap-alloc.c | 10 ++++++----
util/oslib-posix.c | 2 +-
qemu-options.hx | 5 ++++-
11 files changed, 87 insertions(+), 25 deletions(-)
--
2.29.2
next reply other threads:[~2021-01-04 17:16 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-01-04 17:13 Stefan Hajnoczi [this message]
2021-01-04 17:13 ` [PATCH v3 1/3] memory: add readonly support to memory_region_init_ram_from_file() Stefan Hajnoczi
2021-01-04 17:13 ` [PATCH v3 2/3] hostmem-file: add readonly=on|off option Stefan Hajnoczi
2021-01-04 17:13 ` [PATCH v3 3/3] nvdimm: check -object memory-backend-file, readonly=on option Stefan Hajnoczi
2021-01-04 21:02 ` [PATCH v3 0/3] nvdimm: read-only file support Eduardo Habkost
2021-01-14 14:05 ` Stefan Hajnoczi
2021-01-21 20:41 ` Eduardo Habkost
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210104171320.575838-1-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=ehabkost@redhat.com \
--cc=eric.g.ernst@gmail.com \
--cc=imammedo@redhat.com \
--cc=julio.montes@intel.com \
--cc=mst@redhat.com \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=xiaoguangrong.eric@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).