.uuid_str = "ca0817e2-b618-11ea-9db3-507b9ddc0f72",
                .physical_id = 0,
                .num_formats = 1,
+               .flags = PAPR_PMEM_UNARMED | PAPR_PMEM_EMPTY |
+                        PAPR_PMEM_SAVE_FAILED | PAPR_PMEM_SHUTDOWN_DIRTY |
+                        PAPR_PMEM_HEALTH_FATAL,
        },
 };
 
        return a->mode;
 }
 
+static ssize_t flags_show(struct device *dev,
+                         struct device_attribute *attr, char *buf)
+{
+       struct nvdimm *nvdimm = to_nvdimm(dev);
+       struct ndtest_dimm *dimm = nvdimm_provider_data(nvdimm);
+       struct seq_buf s;
+       u64 flags;
+
+       flags = dimm->flags;
+
+       seq_buf_init(&s, buf, PAGE_SIZE);
+       if (flags & PAPR_PMEM_UNARMED_MASK)
+               seq_buf_printf(&s, "not_armed ");
+
+       if (flags & PAPR_PMEM_BAD_SHUTDOWN_MASK)
+               seq_buf_printf(&s, "flush_fail ");
+
+       if (flags & PAPR_PMEM_BAD_RESTORE_MASK)
+               seq_buf_printf(&s, "restore_fail ");
+
+       if (flags & PAPR_PMEM_SAVE_MASK)
+               seq_buf_printf(&s, "save_fail ");
+
+       if (flags & PAPR_PMEM_SMART_EVENT_MASK)
+               seq_buf_printf(&s, "smart_notify ");
+
+
+       if (seq_buf_used(&s))
+               seq_buf_printf(&s, "\n");
+
+       return seq_buf_used(&s);
+}
+static DEVICE_ATTR_RO(flags);
+
 static struct attribute *ndtest_nvdimm_attributes[] = {
        &dev_attr_nvdimm_show_handle.attr,
        &dev_attr_vendor.attr,
        &dev_attr_formats.attr,
        &dev_attr_format.attr,
        &dev_attr_format1.attr,
+       &dev_attr_flags.attr,
        NULL,
 };
 
                set_bit(NDD_LABELING, &dimm_flags);
        }
 
+       if (dimm->flags & PAPR_PMEM_UNARMED_MASK)
+               set_bit(NDD_UNARMED, &dimm_flags);
+
        dimm->nvdimm = nvdimm_create(priv->bus, dimm,
                                    ndtest_nvdimm_attribute_groups, dimm_flags,
                                    NDTEST_SCM_DIMM_CMD_MASK, 0, NULL);
 
 #include <linux/platform_device.h>
 #include <linux/libnvdimm.h>
 
+/* SCM device is unable to persist memory contents */
+#define PAPR_PMEM_UNARMED                   (1ULL << (63 - 0))
+/* SCM device failed to persist memory contents */
+#define PAPR_PMEM_SHUTDOWN_DIRTY            (1ULL << (63 - 1))
+/* SCM device contents are not persisted from previous IPL */
+#define PAPR_PMEM_EMPTY                     (1ULL << (63 - 3))
+#define PAPR_PMEM_HEALTH_CRITICAL           (1ULL << (63 - 4))
+/* SCM device will be garded off next IPL due to failure */
+#define PAPR_PMEM_HEALTH_FATAL              (1ULL << (63 - 5))
+/* SCM contents cannot persist due to current platform health status */
+#define PAPR_PMEM_HEALTH_UNHEALTHY          (1ULL << (63 - 6))
+
+/* Bits status indicators for health bitmap indicating unarmed dimm */
+#define PAPR_PMEM_UNARMED_MASK (PAPR_PMEM_UNARMED |            \
+                               PAPR_PMEM_HEALTH_UNHEALTHY)
+
+#define PAPR_PMEM_SAVE_FAILED                (1ULL << (63 - 10))
+
+/* Bits status indicators for health bitmap indicating unflushed dimm */
+#define PAPR_PMEM_BAD_SHUTDOWN_MASK (PAPR_PMEM_SHUTDOWN_DIRTY)
+
+/* Bits status indicators for health bitmap indicating unrestored dimm */
+#define PAPR_PMEM_BAD_RESTORE_MASK  (PAPR_PMEM_EMPTY)
+
+/* Bit status indicators for smart event notification */
+#define PAPR_PMEM_SMART_EVENT_MASK (PAPR_PMEM_HEALTH_CRITICAL | \
+                                   PAPR_PMEM_HEALTH_FATAL |    \
+                                   PAPR_PMEM_HEALTH_UNHEALTHY)
+
+#define PAPR_PMEM_SAVE_MASK                (PAPR_PMEM_SAVE_FAILED)
+
 struct ndtest_config;
 
 struct ndtest_priv {