All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix kvm misconceives NVDIMM pages as reserved mmio
@ 2018-07-04 15:30 ` Zhang Yi
  0 siblings, 0 replies; 36+ messages in thread
From: Zhang Yi @ 2018-07-04 15:30 UTC (permalink / raw)
  To: kvm, linux-kernel, linux-nvdimm, pbonzini, dan.j.williams, jack,
	hch, yu.c.zhang
  Cc: linux-mm, yi.z.zhang, rkrcmar

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 not, such as
NVDIMM pmem.

Now, we map these dev_dax or fs_dax pages to kvm for DIMM/NVDIMM
backend, since these pages are reserved. the check of
kvm_is_reserved_pfn() misconceives those pages as MMIO. Therefor, we
introduce 2 page map types, MEMORY_DEVICE_FS_DAX/MEMORY_DEVICE_DEV_DAX,
to indentify these pages are from NVDIMM pmem. and let kvm treat these
as normal pages.

Without this patch, Many operations will be missed due to this
mistreatment to pmem pages. For example, a page may not have chance to
be unpinned for KVM guest(in kvm_release_pfn_clean); not able to be
marked as dirty/accessed(in kvm_set_pfn_dirty/accessed) etc.

Zhang Yi (3):
  kvm: remove redundant reserved page check
  mm: introduce memory type MEMORY_DEVICE_DEV_DAX
  kvm: add a function to check if page is from NVDIMM pmem.

 drivers/dax/pmem.c       |  1 +
 include/linux/memremap.h |  1 +
 virt/kvm/kvm_main.c      | 25 +++++++++++++++++--------
 3 files changed, 19 insertions(+), 8 deletions(-)

-- 
2.7.4

_______________________________________________
Linux-nvdimm mailing list
Linux-nvdimm@lists.01.org
https://lists.01.org/mailman/listinfo/linux-nvdimm

^ permalink raw reply	[flat|nested] 36+ messages in thread

end of thread, other threads:[~2018-07-09 12:36 UTC | newest]

Thread overview: 36+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-04 15:30 [PATCH 0/3] Fix kvm misconceives NVDIMM pages as reserved mmio Zhang Yi
2018-07-04 15:30 ` Zhang Yi
2018-07-04 15:30 ` Zhang Yi
2018-07-04 15:30 ` [PATCH 1/3] kvm: remove redundant reserved page check Zhang Yi
2018-07-04 15:30   ` Zhang Yi
2018-07-04 15:30   ` Zhang Yi
2018-07-04 15:30 ` [PATCH 2/3] mm: introduce memory type MEMORY_DEVICE_DEV_DAX Zhang Yi
2018-07-04 15:30   ` Zhang Yi
2018-07-04 15:30   ` Zhang Yi
2018-07-04 14:50   ` Dan Williams
2018-07-04 14:50     ` Dan Williams
2018-07-04 14:50     ` Dan Williams
2018-07-05 13:20     ` zhangyi6
2018-07-05 13:20       ` zhangyi6
2018-07-05 13:20       ` zhangyi6
2018-07-05 13:20       ` zhangyi6
2018-07-04 15:30 ` [PATCH 3/3] kvm: add a function to check if page is from NVDIMM pmem Zhang Yi
2018-07-04 15:30   ` Zhang Yi
2018-07-04 15:30   ` Zhang Yi
2018-07-04 14:50   ` Dan Williams
2018-07-04 14:50     ` Dan Williams
2018-07-04 14:50     ` Dan Williams
2018-07-04 15:27     ` Paolo Bonzini
2018-07-04 15:27       ` Paolo Bonzini
2018-07-04 15:27       ` Paolo Bonzini
2018-07-04 15:25   ` Paolo Bonzini
2018-07-04 15:25     ` Paolo Bonzini
2018-07-04 15:25     ` Paolo Bonzini
2018-07-05 13:19     ` Zhang,Yi
2018-07-05 13:19       ` Zhang,Yi
2018-07-05 13:19       ` Zhang,Yi
2018-07-05 13:19       ` Zhang,Yi
2018-07-09 12:36       ` Jan Kara
2018-07-09 12:36         ` Jan Kara
2018-07-09 12:36         ` Jan Kara
2018-07-09 12:36         ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.