On Thu, Mar 21, 2019 at 9:06 PM Dexuan Cui <de...@microsoft.com> wrote:
>
> > From: Dexuan Cui
> > Sent: Thursday, March 21, 2019 7:09 PM
>
> > IMO there are 2 issues in ndctl/monitor.c: filter_dimm():
> >
> > 1. IMO the cmd numbers ND_CMD_SMART (1) and
> > ND_CMD_SMART_THRESHOLD(2) are not really device-neutral. They
> > work for ndctl/lib/intel.c and it looks they happen to work for
> > ndctl/lib/hpe1.c, as hpe "happens" to have:
> >        NDN_HPE1_CMD_SMART = 1,
> >        NDN_HPE1_CMD_SMART_THRESHOLD = 2,
> >
> > But for ndctl/lib/msft.c, 1 and 2 mean different things. See [1].
> > So the current "ndctl monitor" can't support msft.c.
> >
> > For ndctl/lib/hyperv.c, 1 and 2 means:
> >         ND_HYPERV_CMD_GET_HEALTH_INFO = 1,
> >         ND_HYPERV_CMD_GET_SHUTDOWN_INFO = 2,
> > They're also incompatible with ND_CMD_SMART and
> > ND_CMD_SMART_THRESHOLD.
> > Of source, the current code can "work" since these ND_HYPERV_CMD*
> > numbers happen to be the same as ND_CMD_SMART and
> > ND_CMD_SMART_THRESHOLD. So this may not be an isue for hyperv.c.
>
> Actually, this _is_ an issue for NVDIMM_FAMILY_HYPERV (and the other
> families except for NVDIMM_FAMILY_INTEL) : see the kernel function
> acpi_nfit_register_dimms(), where ND_CMD_SMART is set in the
> "cmd_mask" only for NVDIMM_FAMILY_INTEL.
>
> So, on Hyper-V, ndctl_dimm_is_cmd_supported(dimm, ND_CMD_SMART)
> is always false, and "ndctl monitor" exits with "no smart support".

Can the Hyper-V implementation emulate those commands? That's the
expectation, i.e. that the implementation can return they required
payloads, but it's fine if the payloads disclaim support for certain
fields.
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to