Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-05 Thread Vladimir Sementsov-Ogievskiy
On 03.11.2015 17:47, Xiao Guangrong wrote: On 11/03/2015 12:16 AM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 18:06, Xiao Guangrong wrote: On 11/02/2015 10:26 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 16:08, Xiao Guangrong wrote: On 11/02/2015 08:19 PM, Vladimir

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-05 Thread Eduardo Habkost
On Mon, Nov 02, 2015 at 05:13:22PM +0800, Xiao Guangrong wrote: [...] > static MemoryRegion *pc_dimm_get_memory_region(DIMMDevice *dimm) > { > -return host_memory_backend_get_memory(dimm->hostmem, _abort); > +Error *local_err = NULL; > +MemoryRegion *mr; > + > +mr =

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-05 Thread Xiao Guangrong
On 11/06/2015 01:29 AM, Eduardo Habkost wrote: On Mon, Nov 02, 2015 at 05:13:22PM +0800, Xiao Guangrong wrote: [...] static MemoryRegion *pc_dimm_get_memory_region(DIMMDevice *dimm) { -return host_memory_backend_get_memory(dimm->hostmem, _abort); +Error *local_err = NULL; +

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-03 Thread Xiao Guangrong
On 11/03/2015 12:16 AM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 18:06, Xiao Guangrong wrote: On 11/02/2015 10:26 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 16:08, Xiao Guangrong wrote: On 11/02/2015 08:19 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13,

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 16:08, Xiao Guangrong wrote: On 11/02/2015 08:19 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: Curretly, the memory region of backed memory is directly mapped to guest's address space, however, it is not true for nvdimm device This patch

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-02 Thread Xiao Guangrong
On 11/02/2015 10:26 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 16:08, Xiao Guangrong wrote: On 11/02/2015 08:19 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: Curretly, the memory region of backed memory is directly mapped to guest's address

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-02 Thread Xiao Guangrong
On 11/02/2015 08:19 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: Curretly, the memory region of backed memory is directly mapped to guest's address space, however, it is not true for nvdimm device This patch let dimm device realize this fact and use

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 18:06, Xiao Guangrong wrote: On 11/02/2015 10:26 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 16:08, Xiao Guangrong wrote: On 11/02/2015 08:19 PM, Vladimir Sementsov-Ogievskiy wrote: On 02.11.2015 12:13, Xiao Guangrong wrote: Curretly, the memory region of backed

Re: [PATCH v7 20/35] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-11-02 Thread Vladimir Sementsov-Ogievskiy
On 02.11.2015 12:13, Xiao Guangrong wrote: Curretly, the memory region of backed memory is directly mapped to guest's address space, however, it is not true for nvdimm device This patch let dimm device realize this fact and use DIMMDeviceClass->get_memory_region method to get the mapped memory