aboutsummaryrefslogtreecommitdiff
path: root/docs/nvdimm.txt
diff options
context:
space:
mode:
authorStefan Hajnoczi <stefanha@redhat.com>2021-01-04 17:13:20 +0000
committerEduardo Habkost <ehabkost@redhat.com>2021-02-01 17:07:34 -0500
commitdbd730e8598701e11b2fb7aee1704f4ec1787e86 (patch)
tree0a940c61f53c86ed01a859edcbe6652f28898cf5 /docs/nvdimm.txt
parent86635aa4e9d627d5142b81c57a33dd1f36627d07 (diff)
nvdimm: check -object memory-backend-file, readonly=on option
Check that -device nvdimm,unarmed=on is used when -object memory-backend-file,readonly=on and document that -device nvdimm,unarmed=on|off controls whether the NVDIMM appears read-only to the guest. 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-4-stefanha@redhat.com> Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
Diffstat (limited to 'docs/nvdimm.txt')
-rw-r--r--docs/nvdimm.txt24
1 files changed, 17 insertions, 7 deletions
diff --git a/docs/nvdimm.txt b/docs/nvdimm.txt
index c2c6e441b3..0aae682be3 100644
--- a/docs/nvdimm.txt
+++ b/docs/nvdimm.txt
@@ -17,8 +17,8 @@ following command line options:
-machine pc,nvdimm
-m $RAM_SIZE,slots=$N,maxmem=$MAX_SIZE
- -object memory-backend-file,id=mem1,share=on,mem-path=$PATH,size=$NVDIMM_SIZE
- -device nvdimm,id=nvdimm1,memdev=mem1
+ -object memory-backend-file,id=mem1,share=on,mem-path=$PATH,size=$NVDIMM_SIZE,readonly=off
+ -device nvdimm,id=nvdimm1,memdev=mem1,unarmed=off
Where,
@@ -31,9 +31,10 @@ Where,
of normal RAM devices and vNVDIMM devices, e.g. $MAX_SIZE should be
>= $RAM_SIZE + $NVDIMM_SIZE here.
- - "object memory-backend-file,id=mem1,share=on,mem-path=$PATH,size=$NVDIMM_SIZE"
- creates a backend storage of size $NVDIMM_SIZE on a file $PATH. All
- accesses to the virtual NVDIMM device go to the file $PATH.
+ - "object memory-backend-file,id=mem1,share=on,mem-path=$PATH,
+ size=$NVDIMM_SIZE,readonly=off" creates a backend storage of size
+ $NVDIMM_SIZE on a file $PATH. All accesses to the virtual NVDIMM device go
+ to the file $PATH.
"share=on/off" controls the visibility of guest writes. If
"share=on", then guest writes will be applied to the backend
@@ -42,8 +43,17 @@ Where,
"share=off", then guest writes won't be applied to the backend
file and thus will be invisible to other guests.
- - "device nvdimm,id=nvdimm1,memdev=mem1" creates a virtual NVDIMM
- device whose storage is provided by above memory backend device.
+ "readonly=on/off" controls whether the file $PATH is opened read-only or
+ read/write (default).
+
+ - "device nvdimm,id=nvdimm1,memdev=mem1,unarmed=off" creates a read/write
+ virtual NVDIMM device whose storage is provided by above memory backend
+ device.
+
+ "unarmed" controls the ACPI NFIT NVDIMM Region Mapping Structure "NVDIMM
+ State Flags" Bit 3 indicating that the device is "unarmed" and cannot accept
+ persistent writes. Linux guest drivers set the device to read-only when this
+ bit is present. Set unarmed to on when the memdev has readonly=on.
Multiple vNVDIMM devices can be created if multiple pairs of "-object"
and "-device" are provided.