nvdimm: make persistence option symbolic

Replace the "nvdimm-cap" option which took numeric arguments such as "2"
with a more user friendly "nvdimm-persistence" option which takes symbolic
arguments "cpu" or "mem-ctrl".

Signed-off-by: Ross Zwisler <ross.zwisler@linux.intel.com>
Suggested-by: Michael S. Tsirkin <mst@redhat.com>
Suggested-by: Dan Williams <dan.j.williams@intel.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
Ross Zwisler 2018-06-07 16:31:11 -06:00 committed by Michael S. Tsirkin
parent 0f3ef1c062
commit 11c39b5cd9
6 changed files with 34 additions and 41 deletions

View file

@ -404,8 +404,8 @@ static GArray *nvdimm_build_device_structure(AcpiNVDIMMState *state)
}
g_slist_free(device_list);
if (state->capabilities) {
nvdimm_build_structure_caps(structures, state->capabilities);
if (state->persistence) {
nvdimm_build_structure_caps(structures, state->persistence);
}
return structures;