> From: qi.f...@fujitsu.com <qi.f...@fujitsu.com> > Sent: Sunday, February 24, 2019 8:48 PM > To: Dexuan Cui <de...@microsoft.com>; Dave Jiang <dave.ji...@intel.com>; > Vishal Verma <vishal.l.ve...@intel.com>; Dan Williams > <dan.j.willi...@intel.com>; linux-nvdimm@lists.01.org; Michael Kelley > <mikel...@microsoft.com>; Johannes Thumshirn <jthumsh...@suse.de> > Subject: RE: [ndctl PATCH v2 4/4] ndctl, monitor: support > NVDIMM_FAMILY_HYPERV > > > > > Hi Qi, > > Generally speaking, I agree with you, but here the fact is that we can only > monitor this > > one single event "dimm-health-state" for Hyper-V Virtual NVDIMM, and the > other > > events are meaningless for Hyper-V Virtual NVDIMM, as they're not > supported by > > Hyper-V Virtual NVDIMM. > > > > So, if the user specifies more events than just "dimm-health-state", or the > user doesn't > > specify "dimm-health-state", it's reasonable to force monitor.event_flags to > equal to > > ND_EVENT_HEALTH_STATE, and I explicitly print a warning. > > > > The line "monitor.event_flags = ND_EVENT_HEALTH_STATE" only runs in a > Linux VM > > running on Hyper-V. It can't adversely affect bare metal cases. In a Linux > > VM > on > > Hyper-V, all the NVDIMMs appearing in the VM are Hyper-V Virtual > NVDIMMs. > > > > A physical NVDIMM can't be directly passed through to a VM and the > hypervisors (e.g., > > Xen, KVM, Hyper-V, Qemu, etc.) have to virtualize it to make it available > > to a > VM. In a > > VM, the NVDIMM_FAMILY is NVDIMM_FAMILY_HYPERV only when the VM > runs on > > Hyper-V. > > > > So I think we should be good. :-) > > > > Thanks, > > -- Dexuan > > Hi Dexuan, > > Thanks for your explanation. > I think at least we should document it into man page, so that the users could > know that their options may be modified by monitor.
Good suggestion! After the patch receives more comments and/or after it's accepted, I'll add a new patch for the man page: Documentation/ndctl/ndctl-monitor.txt. > Though I have a little concern about that there may be other events for > Hyper-V Virtual NVDIMM can be monitored in future... > Qi As far as I know, that's unlikely, at least in the foreseeable future. :-) The VM is supposed to see a virtual NVDIMM, for which the hypervisor only emulates the minimal necessary info, based on the physical NVDIMM's state. Thanks, --Dexuan _______________________________________________ Linux-nvdimm mailing list Linux-nvdimm@lists.01.org https://lists.01.org/mailman/listinfo/linux-nvdimm