> From: Dan Williams <dan.j.williams(a)intel.com>
> Sent: Thursday, March 21, 2019 10:37 PM
> No, I think you misunderstand. Hyper-V implements "function-1",
> "command-1" support can be emulated. The request is to translate the
> Hyper-V function-1 payload into the command-1 payload format.
Then, yes, I think so. The first 2 patches of this patchset do the translation:
[ndctl,v2,1/4] libndctl: add support for NVDIMM_FAMILY_HYPERV's _DSM Function 1
[ndctl,v2,2/4] libndctl: NVDIMM_FAMILY_HYPERV: add .smart_get_shutdown_count (Function
The problem is how to skip the checkings in ndctl/monitor.c: filter_dimm() on Hyper-V.
If we return early in filter_dimm(), mfa->num_dimm will be zero, then monitor_event()
can't be called, and we have no chance to monitor the events and do the translation.
I'd rather change ndctl_dimm_cmd_is_supported() to call back into a
dimm-op so that the Hyper-V implementation can say "yes, I support
(emulate) the necessary monitor commands".