[PATCH v6 12/13] x86/memory_failure: Introduce {set, clear}_mce_nospec()

2018-07-13 Thread Dan Williams
Currently memory_failure() returns zero if the error was handled. On that result mce_unmap_kpfn() is called to zap the page out of the kernel linear mapping to prevent speculative fetches of potentially poisoned memory. However, in the case of dax mapped devmap pages the page may be in active

[PATCH v6 11/13] x86/mm/pat: Prepare {reserve, free}_memtype() for "decoy" addresses

2018-07-13 Thread Dan Williams
In preparation for using set_memory_uc() instead set_memory_np() for isolating poison from speculation, teach the memtype code to sanitize physical addresses vs __PHYSICAL_MASK. The motivation for using set_memory_uc() for this case is to allow ongoing access to persistent memory pages via the

[PATCH v6 13/13] libnvdimm, pmem: Restore page attributes when clearing errors

2018-07-13 Thread Dan Williams
Use clear_mce_nospec() to restore WB mode for the kernel linear mapping of a pmem page that was marked 'HWPoison'. A page with 'HWPoison' set has also been marked UC in PAT (page attribute table) via set_mce_nospec() to prevent speculative retrievals of poison. The 'HWPoison' flag is only cleared

[PATCH v6 08/13] mm, memory_failure: Collect mapping size in collect_procs()

2018-07-13 Thread Dan Williams
In preparation for supporting memory_failure() for dax mappings, teach collect_procs() to also determine the mapping size. Unlike typical mappings the dax mapping size is determined by walking page-table entries rather than using the compound-page accounting for THP pages. Acked-by: Naoya

[PATCH v6 10/13] mm, memory_failure: Teach memory_failure() about dev_pagemap pages

2018-07-13 Thread Dan Williams
mce: Uncorrected hardware memory error in user-access at af34214200 {1}[Hardware Error]: It has been corrected by h/w and requires no further action mce: [Hardware Error]: Machine check events logged {1}[Hardware Error]: event severity: corrected Memory failure: 0xaf34214:

[PATCH v6 07/13] mm, madvise_inject_error: Let memory_failure() optionally take a page reference

2018-07-13 Thread Dan Williams
The madvise_inject_error() routine uses get_user_pages() to lookup the pfn and other information for injected error, but it does not release that pin. The assumption is that failed pages should be taken out of circulation. However, for dax mappings it is not possible to take pages out of

[PATCH v6 09/13] filesystem-dax: Introduce dax_lock_mapping_entry()

2018-07-13 Thread Dan Williams
In preparation for implementing support for memory poison (media error) handling via dax mappings, implement a lock_page() equivalent. Poison error handling requires rmap and needs guarantees that the page->mapping association is maintained / valid (inode not freed) for the duration of the lookup.

[PATCH v6 06/13] mm, dev_pagemap: Do not clear ->mapping on final put

2018-07-13 Thread Dan Williams
MEMORY_DEVICE_FS_DAX relies on typical page semantics whereby ->mapping is only ever cleared by truncation, not final put. Without this fix dax pages may forget their mapping association at the end of every page pin event. Move this atypical behavior that HMM wants into the HMM ->page_free()

[PATCH v6 04/13] filesystem-dax: Set page->index

2018-07-13 Thread Dan Williams
In support of enabling memory_failure() handling for filesystem-dax mappings, set ->index to the pgoff of the page. The rmap implementation requires ->index to bound the search through the vma interval tree. The index is set and cleared at dax_associate_entry() and dax_disassociate_entry() time

[PATCH v6 05/13] mm, madvise_inject_error: Disable MADV_SOFT_OFFLINE for ZONE_DEVICE pages

2018-07-13 Thread Dan Williams
Given that dax / device-mapped pages are never subject to page allocations remove them from consideration by the soft-offline mechanism. Reported-by: Naoya Horiguchi Signed-off-by: Dan Williams --- mm/memory-failure.c |8 1 file changed, 8 insertions(+) diff --git

[PATCH v6 03/13] device-dax: Set page->index

2018-07-13 Thread Dan Williams
In support of enabling memory_failure() handling for device-dax mappings, set ->index to the pgoff of the page. The rmap implementation requires ->index to bound the search through the vma interval tree. The ->index value is never cleared. There is no possibility for the page to become associated

[PATCH v6 01/13] device-dax: Convert to vmf_insert_mixed and vm_fault_t

2018-07-13 Thread Dan Williams
Use new return type vm_fault_t for fault and huge_fault handler. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. Commit 1c8f422059ae ("mm: change return type to

[PATCH v6 00/13] mm: Teach memory_failure() about ZONE_DEVICE pages

2018-07-13 Thread Dan Williams
Changes since v5 [1]: * Move put_page() before memory_failure() in madvise_inject_error() (Naoya) * The previous change uncovered a latent bug / broken assumption in __put_devmap_managed_page(). We need to preserve page->mapping for dax pages when they go idle. * Rename mapping_size() to

[PATCH v6 02/13] device-dax: Enable page_mapping()

2018-07-13 Thread Dan Williams
In support of enabling memory_failure() handling for device-dax mappings, set the ->mapping association of pages backing device-dax mappings. The rmap implementation requires page_mapping() to return the address_space hosting the vmas that map the page. The ->mapping pointer is never cleared.

Re: [fstests PATCH v2 2/2] generic/999: test DAX DMA vs truncate/hole-punch

2018-07-13 Thread Dave Chinner
On Tue, Jul 10, 2018 at 04:09:42PM -0600, Ross Zwisler wrote: > This adds a regression test for the following series: > > https://lists.01.org/pipermail/linux-nvdimm/2018-July/016842.html > > which adds synchronization between DAX DMA in ext4 and truncate/hole-punch. > The intention of the test

Re: [PATCH v5 05/11] mm, madvise_inject_error: Let memory_failure() optionally take a page reference

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 11:31 PM, Naoya Horiguchi wrote: > Hello Dan, > > On Wed, Jul 04, 2018 at 02:40:49PM -0700, Dan Williams wrote: >> The madvise_inject_error() routine uses get_user_pages() to lookup the >> pfn and other information for injected error, but it does not release >> that pin.

Re: [PATCH v5 08/11] mm, memory_failure: Teach memory_failure() about dev_pagemap pages

2018-07-13 Thread Dan Williams
On Fri, Jul 13, 2018 at 1:52 AM, Naoya Horiguchi wrote: > On Wed, Jul 04, 2018 at 02:41:06PM -0700, Dan Williams wrote: >> mce: Uncorrected hardware memory error in user-access at af34214200 >> {1}[Hardware Error]: It has been corrected by h/w and requires no >> further action >>

Re: [PATCH v4 11/11] libnvdimm: add documentation for nvdimm security support

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote: > Add theory of operation for the security support that's going into > libnvdimm. > > Signed-off-by: Dave Jiang > --- > Documentation/nvdimm/security | 70 > + > 1 file changed, 70 insertions(+) >

Re: [PATCH v4 10/11] nfit_test: add test support for Intel nvdimm security DSMs

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote: > Add nfit_test support for DSM functions "Get Security State", > "Set Passphrase", "Disable Passphrase", "Unlock Unit", "Freeze Lock", > and "Secure Erase" for the fake DIMMs. > > Also adding a sysfs knob in order to put the DIMMs in "locked"

Re: [PATCH v4 09/11] nfit_test: add context to dimm_dev for nfit_test

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote: > In order to access the nfit_test context via sideband sysfs knobs, the > dimm_dev needs to be more than struct device in order to point back to > struct nfit_test. Wrapping the original struct device with a struct > nfit_dimm_dev and saving the

Re: [PATCH v4 08/11] nfit/libnvdimm: add support for issue secure erase DSM to Intel nvdimm

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote: > Add support to issue a secure erase DSM to the Intel nvdimm. The > required passphrase is acquired from userspace through the kernel key > management. To trigger the action, "erase" is written to the "security" > sysfs attribute. libnvdimm

[ndctl PATCH v13 2/5] ndctl, monitor: add main ndctl monitor configuration file

2018-07-13 Thread QI Fuli
This patch adds the main configuration file(/etc/ndctl/monitor.conf) of ndctl monitor. It contains the configuration directives that give ndctl monitor instructions. Users can change the configuration by editing this file or using [--config-file] option to override this file. The changed value

[ndctl PATCH v13 4/5] ndctl, documentation: add man page for monitor

2018-07-13 Thread QI Fuli
This patch is used to add man page for ndctl monitor command. Signed-off-by: QI Fuli --- Documentation/ndctl/Makefile.am | 3 +- Documentation/ndctl/ndctl-monitor.txt | 108 ++ 2 files changed, 110 insertions(+), 1 deletion(-) create mode 100644

[ndctl PATCH v13 0/5] ndctl, monitor: add ndctl monitor daemon

2018-07-13 Thread QI Fuli
This is the v13 patch for ndctl monitor, a tiny daemon to monitor the smart events of nvdimm DIMMs. Since NVDIMM does not have a feature like mirroring, if it breaks down, the data will be impossible to restore. Ndctl monitor daemon will catch the smart events notify from firmware and outputs

[ndctl PATCH v13 1/5] ndctl, monitor: add a new command - monitor

2018-07-13 Thread QI Fuli
Ndctl monitor is used for monitoring the smart events of NVDIMMs. When a smart event fires, monitor will output the notifications which include dimm health status and event information to syslog, standard output or a file by setting [--log] option. The notifications follow json format and can be

[ndctl PATCH v13 5/5] ndctl, test: add a new unit test for monitor

2018-07-13 Thread QI Fuli
Add a new unit test to test all options of the monitor command. Based-on-patch-by: Yasunori Goto Acked-by: Masayoshi Mizuma Signed-off-by: QI Fuli --- .gitignore | 1 + test/Makefile.am | 14 +++- test/list-smart-dimm.c | 117 +++ test/monitor.sh

[ndctl PATCH v13 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-07-13 Thread QI Fuli
This patch adds the systemd unit file for ndctl-monitor service. The systemd unit directory can be configured by setting environment variable "--with-systemd-unit-dir[=DIR]". A monitor daemon can be started as a system service: # systemctl start ndctl-monitor.service Signed-off-by: QI Fuli

Re: [PATCH v4 07/11] nfit/libnvdimm: add freeze security support to Intel nvdimm

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote: > Add support for freeze security on Intel nvdimm. This locks out any > changes to security for the DIMM unless a reboot is done. This is triggered > by writing "freeze" to the "security" sysfs attribute. libnvdimm will > support the generic

Re: [PATCH v4 06/11] nfit/libnvdimm: add disable passphrase support to Intel nvdimm.

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:49 PM, Dave Jiang wrote: > Add support to disable passphrase (security) for the Intel nvdimm. The > passphrase used for disabling is pulled from userspace via the kernel > key management. The action is triggered by writing "disable" to the sysfs > attribute "security".

Re: [PATCH v4 05/11] nfit/libnvdimm: add set passphrase support for Intel nvdimms

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote: > Add support for setting and/or updating passphrase on the Intel nvdimms. > The passphrase is pulled from userspace through the kernel key management. > We trigger the update via writing "update" to the sysfs attribute > "security". The state of

Re: [PATCH v4 04/11] nfit/libnvdimm: add unlock of nvdimm support for Intel DIMMs

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote: > Add support to allow query the security status of the Intel nvdimms and > also unlock the dimm via the kernel key management APIs. The passphrase is > expected to be pulled from userspace through keyutils. Moving the Intel > related bits to its

Re: [PATCH v4 03/11] nfit/libnvdimm: store dimm id as a member to struct nvdimm

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote: > The generated dimm id is needed for the sysfs attribute as well as being > used as the identifier/description for the security key. Since it's > constant and should never change, store it as a member of struct nvdimm. > > Signed-off-by: Dave

Re: [PATCH v4 02/11] libnvdimm: create keyring to store security keys

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote: > Prepping the libnvdimm to support security management by adding a keyring > in order to provide passphrase management through the kernel key management > APIs. > > Signed-off-by: Dave Jiang > --- > drivers/nvdimm/core.c |7 +++ >

Re: [PATCH v4 01/11] nfit: add support for Intel DSM 1.7 commands

2018-07-13 Thread Dan Williams
On Thu, Jul 12, 2018 at 1:48 PM, Dave Jiang wrote: > Add command definition for security commands defined in Intel DSM > specification v1.7. This includes "get security state", "set passphrase", > "unlock unit", "freeze lock", "secure erase", "ovewrite", and > "overwrite query". Since we are

[PATCH 6/6] ndctl: add request-key upcall reference app

2018-07-13 Thread Dave Jiang
Adding a reference upcall helper for request-key in order to retrieve the security passphrase from userspace to provide to the kernel. The reference app uses keyutils API to respond to the upcall from the kernel and is invoked by /sbin/request-key of the keyutils. Signed-off-by: Dave Jiang ---

[PATCH 2/6] ndctl: add update to security support

2018-07-13 Thread Dave Jiang
Add API call for triggering sysfs knob to update the security for a DIMM in libndctl. Also add the ndctl "update-security" to trigger that as well. ndctl does not actually handle the passphrase file. It only initiates the update and expects all the necessary mechanisms are already in place.

[PATCH 1/6] ndctl: add support for display security state

2018-07-13 Thread Dave Jiang
Adding libndctl API call for retrieving security state for a DIMM and also adding support to ndctl list for displaying security state. Signed-off-by: Dave Jiang --- Documentation/ndctl/ndctl-list.txt |8 ndctl/lib/dimm.c | 16

[PATCH 0/6] ndctl: add security support

2018-07-13 Thread Dave Jiang
The following series implements mechanisms that utilize the sysfs knobs provided by the kernel in order to support the Intel DSM v1.7 spec that provides security to NVDIMM. The following abilities are added: 1. display security state 2. update security 3. disable security 4. freeze security 5.

[PATCH 3/6] ndctl: add disable security support

2018-07-13 Thread Dave Jiang
Add support for disable security to libndctl and also command line option of "disable-security" for ndctl. This provides a way to disable security on the nvdimm. ndctl does not handle the actual processing of the passphrase. It only starts the request. Signed-off-by: Dave Jiang ---

[PATCH 4/6] ndctl: add support for freeze security

2018-07-13 Thread Dave Jiang
Add support for freeze security to libndctl and also command line option of "freeze-security" for ndctl. This will lock the ability to make changes to the NVDIMM security. Signed-off-by: Dave Jiang --- Documentation/ndctl/Makefile.am |1 +

[PATCH 5/6] ndctl: add support for secure erase

2018-07-13 Thread Dave Jiang
Add support for secure erase to libndctl and also command line option of "secure-erase" for ndctl. This will initiate the request to securely erase a DIMM. ndctl does not actually handle the verification of the security. That is handled by the kernel and the key upcall mechanism. Signed-off-by:

Re: [ndctl PATCH v12 2/5] ndctl, monitor: add main ndctl monitor configuration file

2018-07-13 Thread Verma, Vishal L
On Sat, 2018-07-14 at 00:54 +0900, QI Fuli wrote: > This patch adds the main configuration file(/etc/ndctl/monitor.conf) > of ndctl monitor. It contains the configuration directives that give > ndctl monitor instructions. Users can change the configuration by > editing this file or using

Re: [RFC v3 2/2] virtio-pmem: Add virtio pmem driver

2018-07-13 Thread Luiz Capitulino
On Fri, 13 Jul 2018 13:22:31 +0530 Pankaj Gupta wrote: > This patch adds virtio-pmem driver for KVM guest. > > Guest reads the persistent memory range information from Qemu over > VIRTIO and registers it on nvdimm_bus. It also creates a nd_region > object with the persistent memory range

Re: [ndctl PATCH v12 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-07-13 Thread Verma, Vishal L
On Fri, 2018-07-13 at 19:05 +, Verma, Vishal L wrote: > On Fri, 2018-07-13 at 14:24 -0400, Masayoshi Mizuma wrote: > > Hi Qi, > > > > On 07/13/2018 11:54 AM, QI Fuli wrote: > > > This patch adds the systemd unit file for ndctl-monitor service. > > > The systemd unit directory can be

Re: [RFC v3 1/2] libnvdimm: Add flush callback for virtio pmem

2018-07-13 Thread Luiz Capitulino
On Fri, 13 Jul 2018 13:22:30 +0530 Pankaj Gupta wrote: > This patch adds functionality to perform flush from guest to host > over VIRTIO. We are registering a callback based on 'nd_region' type. > As virtio_pmem driver requires this special flush interface, for rest > of the region types we are

Re: [ndctl PATCH v12 4/5] ndctl, documentation: add man page for monitor

2018-07-13 Thread Verma, Vishal L
On Sat, 2018-07-14 at 00:54 +0900, QI Fuli wrote: > This patch is used to add man page for ndctl monitor command. > > Signed-off-by: QI Fuli > --- > Documentation/ndctl/Makefile.am | 3 +- > Documentation/ndctl/ndctl-monitor.txt | 104 ++ > 2 files changed, 106

Re: [ndctl PATCH v12 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-07-13 Thread Verma, Vishal L
On Fri, 2018-07-13 at 14:24 -0400, Masayoshi Mizuma wrote: > Hi Qi, > > On 07/13/2018 11:54 AM, QI Fuli wrote: > > This patch adds the systemd unit file for ndctl-monitor service. > > The systemd unit directory can be configured by setting environment > > variable

Re: [ndctl PATCH v12 1/5] ndctl, monitor: add a new command - monitor

2018-07-13 Thread Verma, Vishal L
Hi Qi, On Sat, 2018-07-14 at 00:53 +0900, QI Fuli wrote: > Ndctl monitor is used for monitoring the smart events of NVDIMMs. > When a smart event fires, monitor will output the notifications which > include dimm health status and event information to syslog, standard > output or a file by setting

Re: [ndctl PATCH v12 5/5] ndctl, test: add a new unit test for monitor

2018-07-13 Thread Masayoshi Mizuma
Hi Qi, On 07/13/2018 11:54 AM, QI Fuli wrote: > Add a new unit test to test all options of the monitor command. > > Based-on-patch-by: Yasunori Goto > Acked-by: Masayoshi Mizuma > Signed-off-by: QI Fuli [...] > +test_filter_dimmevent() > +{ > + monitor_dimms="$(get_monitor_dimm | awk

Re: [ndctl PATCH v12 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-07-13 Thread Masayoshi Mizuma
Hi Qi, On 07/13/2018 11:54 AM, QI Fuli wrote: > This patch adds the systemd unit file for ndctl-monitor service. > The systemd unit directory can be configured by setting environment > variable "--with-systemd-unit-dir[=DIR]". > > A monitor daemon can be started as a system service: >#

[ndctl PATCH v12 0/5] ndctl, monitor: add ndctl monitor daemon

2018-07-13 Thread QI Fuli
This is the v12 patch for ndctl monitor, a tiny daemon to monitor the smart events of nvdimm DIMMs. Since NVDIMM does not have a feature like mirroring, if it breaks down, the data will be impossible to restore. Ndctl monitor daemon will catch the smart events notify from firmware and outputs

[ndctl PATCH v12 1/5] ndctl, monitor: add a new command - monitor

2018-07-13 Thread QI Fuli
Ndctl monitor is used for monitoring the smart events of NVDIMMs. When a smart event fires, monitor will output the notifications which include dimm health status and event information to syslog, standard output or a file by setting [--log] option. The notifications follow json format and can be

[ndctl PATCH v12 4/5] ndctl, documentation: add man page for monitor

2018-07-13 Thread QI Fuli
This patch is used to add man page for ndctl monitor command. Signed-off-by: QI Fuli --- Documentation/ndctl/Makefile.am | 3 +- Documentation/ndctl/ndctl-monitor.txt | 104 ++ 2 files changed, 106 insertions(+), 1 deletion(-) create mode 100644

[ndctl PATCH v12 2/5] ndctl, monitor: add main ndctl monitor configuration file

2018-07-13 Thread QI Fuli
This patch adds the main configuration file(/etc/ndctl/monitor.conf) of ndctl monitor. It contains the configuration directives that give ndctl monitor instructions. Users can change the configuration by editing this file or using [--config-file] option to override this file. The changed value

[ndctl PATCH v12 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-07-13 Thread QI Fuli
This patch adds the systemd unit file for ndctl-monitor service. The systemd unit directory can be configured by setting environment variable "--with-systemd-unit-dir[=DIR]". A monitor daemon can be started as a system service: # systemctl start ndctl-monitor.service Signed-off-by: QI Fuli

[ndctl PATCH v12 5/5] ndctl, test: add a new unit test for monitor

2018-07-13 Thread QI Fuli
Add a new unit test to test all options of the monitor command. Based-on-patch-by: Yasunori Goto Acked-by: Masayoshi Mizuma Signed-off-by: QI Fuli --- .gitignore | 1 + test/Makefile.am | 14 +++- test/list-smart-dimm.c | 117 +++ test/monitor.sh

Re: [ndctl PATCH v11 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-07-13 Thread Masayoshi Mizuma
Hi Qi, On 07/13/2018 08:57 AM, Qi, Fuli wrote: >> -Original Message- >> From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com] >> Sent: Friday, July 13, 2018 11:47 AM >> To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利 >> Subject: Re: [ndctl PATCH v11 3/5] ndctl, monitor: add the unit file

RE: [ndctl PATCH v11 3/5] ndctl, monitor: add the unit file of systemd for ndctl-monitor service

2018-07-13 Thread Qi, Fuli
> -Original Message- > From: Verma, Vishal L [mailto:vishal.l.ve...@intel.com] > Sent: Friday, July 13, 2018 11:47 AM > To: linux-nvdimm@lists.01.org; Qi, Fuli/斉 福利 > Subject: Re: [ndctl PATCH v11 3/5] ndctl, monitor: add the unit file of > systemd for > ndctl-monitor service > > > On

Re: [PATCH v5 08/11] mm, memory_failure: Teach memory_failure() about dev_pagemap pages

2018-07-13 Thread Naoya Horiguchi
On Wed, Jul 04, 2018 at 02:41:06PM -0700, Dan Williams wrote: > mce: Uncorrected hardware memory error in user-access at af34214200 > {1}[Hardware Error]: It has been corrected by h/w and requires no further > action > mce: [Hardware Error]: Machine check events logged >

[RFC v3 2/2] virtio-pmem: Add virtio pmem driver

2018-07-13 Thread Pankaj Gupta
This patch adds virtio-pmem driver for KVM guest. Guest reads the persistent memory range information from Qemu over VIRTIO and registers it on nvdimm_bus. It also creates a nd_region object with the persistent memory range information so that existing 'nvdimm/pmem' driver can reserve this

[RFC v3] qemu: Add virtio pmem device

2018-07-13 Thread Pankaj Gupta
This patch adds virtio-pmem Qemu device. This device presents memory address range information to guest which is backed by file backend type. It acts like persistent memory device for KVM guest. Guest can perform read and persistent write operations on this memory range with the help of DAX

[RFC v3 0/2] kvm "fake DAX" device flushing

2018-07-13 Thread Pankaj Gupta
This is RFC V3 for 'fake DAX' flushing interface sharing for review. This patchset has two parts: - Guest virtio-pmem driver Guest driver reads persistent memory range from paravirt device and registers with 'nvdimm_bus'. 'nvdimm/pmem' driver uses this information to allocate persistent

[RFC v3 1/2] libnvdimm: Add flush callback for virtio pmem

2018-07-13 Thread Pankaj Gupta
This patch adds functionality to perform flush from guest to host over VIRTIO. We are registering a callback based on 'nd_region' type. As virtio_pmem driver requires this special flush interface, for rest of the region types we are registering existing flush function. Also report the error

Re: [PATCH v5 06/11] mm, memory_failure: Collect mapping size in collect_procs()

2018-07-13 Thread Naoya Horiguchi
On Wed, Jul 04, 2018 at 02:40:55PM -0700, Dan Williams wrote: > In preparation for supporting memory_failure() for dax mappings, teach > collect_procs() to also determine the mapping size. Unlike typical > mappings the dax mapping size is determined by walking page-table > entries rather than

Re: [PATCH V2 0/4] Fix kvm misconceives NVDIMM pages as reserved mmio

2018-07-13 Thread Zhang,Yi
Ping for further review, comments. Thanks All Regards Yi. On 2018年07月11日 01:01, Zhang Yi wrote: > For device specific memory space, when we move these area of pfn to > memory zone, we will set the page reserved flag at that time, some of > these reserved for device mmio, and some of these are

Re: [PATCH v5 05/11] mm, madvise_inject_error: Let memory_failure() optionally take a page reference

2018-07-13 Thread Naoya Horiguchi
Hello Dan, On Wed, Jul 04, 2018 at 02:40:49PM -0700, Dan Williams wrote: > The madvise_inject_error() routine uses get_user_pages() to lookup the > pfn and other information for injected error, but it does not release > that pin. The assumption is that failed pages should be taken out of >