[PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-09-07 Thread Zhang Yi
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

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-09-18 Thread Dan Williams
On Fri, Sep 7, 2018 at 2:25 AM 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 not, such as > NVDIMM pmem. > > Now, we map these d

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-09-19 Thread David Hildenbrand
Am 19.09.18 um 04:53 schrieb Dan Williams: > On Fri, Sep 7, 2018 at 2:25 AM 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 no

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-09-20 Thread Yi Zhang
On 2018-09-19 at 09:20:25 +0200, David Hildenbrand wrote: > Am 19.09.18 um 04:53 schrieb Dan Williams: > > > > Should we consider just not setting PageReserved for > > devm_memremap_pages()? Perhaps kvm is not be the only component making > > these assumptions about this flag? > > I was asking th

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-09-20 Thread Dan Williams
On Thu, Sep 20, 2018 at 7:11 AM Yi Zhang wrote: > > On 2018-09-19 at 09:20:25 +0200, David Hildenbrand wrote: > > Am 19.09.18 um 04:53 schrieb Dan Williams: > > > > > > Should we consider just not setting PageReserved for > > > devm_memremap_pages()? Perhaps kvm is not be the only component making

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-09-21 Thread Yi Zhang
On 2018-09-20 at 14:19:17 -0700, Dan Williams wrote: > On Thu, Sep 20, 2018 at 7:11 AM Yi Zhang wrote: > > > > On 2018-09-19 at 09:20:25 +0200, David Hildenbrand wrote: > > > Am 19.09.18 um 04:53 schrieb Dan Williams: > > > > > > > > Should we consider just not setting PageReserved for > > > > dev

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-09-21 Thread David Hildenbrand
On 22/09/2018 00:47, Yi Zhang wrote: > On 2018-09-20 at 14:19:17 -0700, Dan Williams wrote: >> On Thu, Sep 20, 2018 at 7:11 AM Yi Zhang wrote: >>> >>> On 2018-09-19 at 09:20:25 +0200, David Hildenbrand wrote: Am 19.09.18 um 04:53 schrieb Dan Williams: > > Should we consider just not s

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-09-21 Thread Dan Williams
On Fri, Sep 21, 2018 at 7:24 AM David Hildenbrand wrote: [..] > > Remove the PageReserved flag sounds more reasonable. > > And Could we still have a flag to identify it is a device private memory, or > > where these pages coming from? > > We could use a page type for that or what you proposed. (as

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-09-21 Thread David Hildenbrand
On 21/09/2018 20:17, Dan Williams wrote: > On Fri, Sep 21, 2018 at 7:24 AM David Hildenbrand wrote: > [..] >>> Remove the PageReserved flag sounds more reasonable. >>> And Could we still have a flag to identify it is a device private memory, or >>> where these pages coming from? >> >> We could use

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-10-19 Thread Barret Rhoden
On 2018-09-21 at 21:29 David Hildenbrand wrote: > On 21/09/2018 20:17, Dan Williams wrote: > > On Fri, Sep 21, 2018 at 7:24 AM David Hildenbrand wrote: > > [..] > >>> Remove the PageReserved flag sounds more reasonable. > >>> And Could we still have a flag to identify it is a device private mem

Re: [PATCH V5 4/4] kvm: add a check if pfn is from NVDIMM pmem.

2018-10-21 Thread Yi Zhang
On 2018-10-19 at 12:33:48 -0400, Barret Rhoden wrote: > On 2018-09-21 at 21:29 David Hildenbrand wrote: > > On 21/09/2018 20:17, Dan Williams wrote: > > > On Fri, Sep 21, 2018 at 7:24 AM David Hildenbrand > > > wrote: > > > [..] > > >>> Remove the PageReserved flag sounds more reasonable. > >