> From: Verma, Vishal L <[email protected]> > Sent: Tuesday, March 26, 2019 2:56 PM > > Hi Dexuan, > > Thanks for making the changes, this revision /mostly/ looks good to me > except - > > The kernel dsm mask just seems to be hard-coded in [1]
Yes, the kernel basically hard-codes the dsm_mask to 0x1F for Hyper-V, but the kernel doesn't export the dsm_mask to the userspace; instead, the kernel exports the "nvdimm->cmd_mask" to the userspace: see drivers/nvdimm/dimm_devs.c: commands_show(). The cmd_mask is initialized in acpi_nfit_register_dimms(), and it's not 1:1 mapped to the dsm_mask for non-NVDIMM_FAMILY_INTEL families: see acpi_nfit_register_dimms(). > So is there any reason that that can't simply be allowed to advertise > "everything is supported", similar to what the MSFT family does, and > that should remove the need for playing games with dimm-ops (i.e. now > there is another layer that can affect command support detection). Here ndctl is checking if ND_CMD_SMART is supported in dimm->cmd_mask. For all the non-NVDIMM_FAMILY_INTEL families, the check is false, including the HPE1 and MSFT families. So IMO we need this new dimm-ops to make "ndctl monitor" work for Hyper-V. I think the other non-INTEL families can't work with "ndctl monitor" either, but I don't have a hardward to test. Thanks, -- Dexuan _______________________________________________ Linux-nvdimm mailing list [email protected] https://lists.01.org/mailman/listinfo/linux-nvdimm
