aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc/spapr_nvdimm.c
diff options
context:
space:
mode:
Diffstat (limited to 'hw/ppc/spapr_nvdimm.c')
-rw-r--r--hw/ppc/spapr_nvdimm.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/hw/ppc/spapr_nvdimm.c b/hw/ppc/spapr_nvdimm.c
index 25be8082d7..81410aa63f 100644
--- a/hw/ppc/spapr_nvdimm.c
+++ b/hw/ppc/spapr_nvdimm.c
@@ -37,9 +37,15 @@ void spapr_nvdimm_validate_opts(NVDIMMDevice *nvdimm, uint64_t size,
QemuUUID uuid;
int ret;
+ if (object_property_get_int(OBJECT(nvdimm), NVDIMM_LABEL_SIZE_PROP,
+ &error_abort) == 0) {
+ error_setg(errp, "PAPR requires NVDIMM devices to have label-size set");
+ return;
+ }
+
if (size % SPAPR_MINIMUM_SCM_BLOCK_SIZE) {
- error_setg(errp, "NVDIMM memory size excluding the label area"
- " must be a multiple of %" PRIu64 "MB",
+ error_setg(errp, "PAPR requires NVDIMM memory size (excluding label)"
+ " to be a multiple of %" PRIu64 "MB",
SPAPR_MINIMUM_SCM_BLOCK_SIZE / MiB);
return;
}