Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: > We reserve the memory region 0xFF0 ~ 0xFFF0 for NVDIMM ACPI > which is used as: > - the first page is mapped as MMIO, ACPI write data to this page to > transfer the control to QEMU > > - the second page is RAM-based which

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao Guangrong wrote: > >>+nvdimm_init_memory_state(>nvdimm_memory, system_memory, > >>machine, > >>+ TARGET_PAGE_SIZE); > >>+ > > > >Shouldn't this be conditional on presence of the nvdimm device? > > > > We will

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 03:39 PM, Michael S. Tsirkin wrote: On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao Guangrong wrote: +nvdimm_init_memory_state(>nvdimm_memory, system_memory, machine, + TARGET_PAGE_SIZE); + Shouldn't this be conditional on presence of the

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 02:56 PM, Michael S. Tsirkin wrote: On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: We reserve the memory region 0xFF0 ~ 0xFFF0 for NVDIMM ACPI which is used as: - the first page is mapped as MMIO, ACPI write data to this page to transfer the control

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 03:39 PM, Michael S. Tsirkin wrote: > >On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao Guangrong wrote: > +nvdimm_init_memory_state(>nvdimm_memory, system_memory, > machine, > +

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Igor Mammedov
On Mon, 19 Oct 2015 09:56:12 +0300 "Michael S. Tsirkin" wrote: > On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: [...] > > diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h > > index f6bd2c4..aa95961 100644 > > --- a/include/hw/mem/nvdimm.h > > +++

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 06:01:17PM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 05:46 PM, Igor Mammedov wrote: > >On Mon, 19 Oct 2015 12:17:22 +0300 > >"Michael S. Tsirkin" wrote: > > > >>On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: > >>> > >>> > >>>On

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Igor Mammedov
On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: > On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: > > > > > > On 10/19/2015 03:39 PM, Michael S. Tsirkin wrote: > > >On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao Guangrong wrote: > > +

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 05:46 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong wrote: On 10/19/2015 03:39 PM, Michael S. Tsirkin wrote: On Mon, Oct 19, 2015 at 03:27:21PM +0800, Xiao

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Igor Mammedov
On Mon, 19 Oct 2015 18:01:17 +0800 Xiao Guangrong wrote: > > > On 10/19/2015 05:46 PM, Igor Mammedov wrote: > > On Mon, 19 Oct 2015 12:17:22 +0300 > > "Michael S. Tsirkin" wrote: > > > >> On Mon, Oct 19, 2015 at 03:44:13PM +0800, Xiao Guangrong

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Mon, Oct 19, 2015 at 11:18:36AM +0200, Igor Mammedov wrote: > On Mon, 19 Oct 2015 09:56:12 +0300 > "Michael S. Tsirkin" wrote: > > > On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: > [...] > > > diff --git a/include/hw/mem/nvdimm.h b/include/hw/mem/nvdimm.h >

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Michael S. Tsirkin
On Tue, Oct 20, 2015 at 01:54:12AM +0800, Xiao Guangrong wrote: > > > On 10/19/2015 06:25 PM, Michael S. Tsirkin wrote: > >On Mon, Oct 19, 2015 at 11:18:36AM +0200, Igor Mammedov wrote: > >>On Mon, 19 Oct 2015 09:56:12 +0300 > >>"Michael S. Tsirkin" wrote: > >> > >>>On Sun, Oct

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 06:42 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 18:01:17 +0800 Xiao Guangrong wrote: On 10/19/2015 05:46 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: On Mon, Oct 19, 2015 at

Re: [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 06:25 PM, Michael S. Tsirkin wrote: On Mon, Oct 19, 2015 at 11:18:36AM +0200, Igor Mammedov wrote: On Mon, 19 Oct 2015 09:56:12 +0300 "Michael S. Tsirkin" wrote: On Sun, Oct 11, 2015 at 11:52:54AM +0800, Xiao Guangrong wrote: [...] diff --git

Re: [Qemu-devel] [PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-19 Thread Xiao Guangrong
On 10/19/2015 06:42 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 18:01:17 +0800 Xiao Guangrong wrote: On 10/19/2015 05:46 PM, Igor Mammedov wrote: On Mon, 19 Oct 2015 12:17:22 +0300 "Michael S. Tsirkin" wrote: On Mon, Oct 19, 2015 at

[PATCH v3 22/32] nvdimm: init the address region used by NVDIMM ACPI

2015-10-10 Thread Xiao Guangrong
We reserve the memory region 0xFF0 ~ 0xFFF0 for NVDIMM ACPI which is used as: - the first page is mapped as MMIO, ACPI write data to this page to transfer the control to QEMU - the second page is RAM-based which used to save the input info of _DSM method and QEMU reuse it store output