> From: Dan Williams <dan.j.willi...@intel.com>
> Sent: Thursday, March 21, 2019 9:13 PM
> > ...
> > 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.

Hyper-V Virtual NVDIMM doesn't emulate ND_CMD_SMART(1). 
The _DSM Function 1 on Hyper-V is "Get Health Information" [1], which is
incomptabile with NVDIMM_FAMILY_INTEL's ND_CMD_SMART(1). 

Even if Hyper-V could emulate ND_CMD_SMART, the current "ndctl monitor"
code still wouldn't work for Hyper-V (and the other families): the essence of 
the
issue is that:
1. the kernel only sets ND_CMD_SMART flag for NVDIMM_FAMILY_INTEL.
2. "ndctl monitor" assumes the ND_CMD_SMART should be set by checking
/sys/class/nd/ndctl0/device/nmem0/commands.

This means ndctl_dimm_is_cmd_supported(dimm, ND_CMD_SMART) can
only be true on NVDIMM_FAMILY_INTEL.

My patch skips the assumption of ndctl on Hyper-V, so "ndctl monitor"
can work on Hyper-V.

It looks we do need an ops->monitor_supported() in ndctl?

Thanks,
-- Dexuan

[1] See http://www.uefi.org/RFIC_LIST ("Virtual NVDIMM 0x1901").
_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

Reply via email to