[Qemu-devel] [PATCH v3 13/13] docs: add NVDIMM ACPI documentation

2016-06-07 Thread Xiao Guangrong
It describes the basic concepts of NVDIMM ACPI and the interfaces between QEMU and the ACPI BIOS Signed-off-by: Xiao Guangrong --- docs/specs/acpi_nvdimm.txt | 132 + 1 file changed, 132 insertions(+) create mode 100644 docs/specs/acpi_nvdimm.txt

[Qemu-devel] [PATCH v3 08/13] nvdimm acpi: abstract the operations for root & nvdimm devices

2016-06-07 Thread Xiao Guangrong
It separates the operations between root device and nvdimm devices in order to introducing label functions support for nvdimm device Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 74 ++-- 1 file changed, 56 insertions(+), 18 deletions

[Qemu-devel] [PATCH v3 11/13] nvdimm acpi: support Get Namespace Label Data function

2016-06-07 Thread Xiao Guangrong
Function 5 is used to get Namespace Label Data Reviewed-by: Stefan Hajnoczi Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 83 +++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index

[Qemu-devel] [PATCH v3 06/13] nvdimm acpi: save arg3 of _DSM method

2016-06-07 Thread Xiao Guangrong
Check if the input Arg3 is valid then store it into ARG3 if it is needed Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 14355f8..95504e9 100644 --- a/hw/acpi/nvdimm.c +++ b/hw

[Qemu-devel] [PATCH v3 05/13] nvdimm acpi: set HDLE properly

2016-06-07 Thread Xiao Guangrong
Now we pass HDLE to Qemu properly, use 0 for root device and use the handle for nvdimm devices Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index b4c2262

[Qemu-devel] [PATCH v3 01/13] pc-dimm: introduce get_vmstate_memory_region callback

2016-06-07 Thread Xiao Guangrong
This callback returns the MemoryRegion that is the memory of dimm should be kept during live migration nvdimm device is different with pc-dimm as its memory includes not only the MemoryRegion directly mapping to guest's address space but also the memory used as label data Signed-off-by:

[Qemu-devel] [PATCH v3 07/13] nvdimm acpi: check UUID

2016-06-07 Thread Xiao Guangrong
Check arg0 which indicates UUID to see if it is valid Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 95504e9..b01f2c6 100644 --- a/hw/acpi/nvdimm.c

[Qemu-devel] [PATCH v3 04/13] acpi: add aml_call5

2016-06-07 Thread Xiao Guangrong
It will be used by NVDIMM ACPI Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 14 ++ include/hw/acpi/aml-build.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 6849949..4e31b87 100644 --- a/hw/acpi/aml

[Qemu-devel] [PATCH v3 02/13] nvdimm: support nvdimm label

2016-06-07 Thread Xiao Guangrong
ned-off-by: Xiao Guangrong --- hw/mem/nvdimm.c | 132 include/hw/mem/nvdimm.h | 55 +++- 2 files changed, 186 insertions(+), 1 deletion(-) diff --git a/hw/mem/nvdimm.c b/hw/mem/nvdimm.c index 0a602f2..2c64d52 100644 --

[Qemu-devel] [PATCH v3 03/13] acpi: add aml_object_type

2016-06-07 Thread Xiao Guangrong
Implement ObjectType which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index fce2d2d..6849949

[Qemu-devel] [PATCH v3 00/13] NVDIMM: introduce nvdimm label support

2016-06-07 Thread Xiao Guangrong
ruct acpi_nfit_desc *a continue; } - if (nfit_mem->bdw && nfit_mem->memdev_pmem) + //if (nfit_mem->bdw && nfit_mem->memdev_pmem) + if (nfit_mem->memdev_pmem) flags |= NDD_ALIASING;

Re: [Qemu-devel] [QEMU PATCH v2] target-i386: Add Skylake-Client CPU model

2016-06-02 Thread Xiao Guangrong
: Xiao Guangrong Signed-off-by: Eduardo Habkost --- Changes v1 -> v2: * Remove XSAVES, edited commit message Reviewed-by: Xiao Guangrong I thought this patch has already been upstream yet, but it is not. :(

Re: [Qemu-devel] [PATCH 4/6 Resend] Vhost-pci RFC: Detailed Description in the Virtio Specification Format

2016-06-02 Thread Xiao Guangrong
On 06/02/2016 04:43 PM, Wang, Wei W wrote: On Thu 6/2/2016 11:52 AM, Xiao Guangrong wrote: On 06/02/2016 11:15 AM, Wang, Wei W wrote: On Wed 6/1/2016 4:15 PM, Xiao Guangrong wrote: On 05/29/2016 04:11 PM, Wei Wang wrote: Signed-off-by: Wei Wang --- Details | 324

Re: [Qemu-devel] [PATCH 4/6 Resend] Vhost-pci RFC: Detailed Description in the Virtio Specification Format

2016-06-01 Thread Xiao Guangrong
On 06/02/2016 11:15 AM, Wang, Wei W wrote: On Wed 6/1/2016 4:15 PM, Xiao Guangrong wrote: On 05/29/2016 04:11 PM, Wei Wang wrote: Signed-off-by: Wei Wang --- Details | 324 1 file changed, 324 insertions(+) create

Re: [Qemu-devel] [PATCH 4/6 Resend] Vhost-pci RFC: Detailed Description in the Virtio Specification Format

2016-06-01 Thread Xiao Guangrong
On 05/29/2016 04:11 PM, Wei Wang wrote: Signed-off-by: Wei Wang --- Details | 324 1 file changed, 324 insertions(+) create mode 100644 Details diff --git a/Details b/Details new file mode 100644 index 000..4ea2252 ---

Re: [Qemu-devel] [PATCH v2 00/15] PATCH 00/15] NVDIMM: introduce nvdimm label support

2016-05-30 Thread Xiao Guangrong
On 05/31/2016 02:52 AM, Stefan Hajnoczi wrote: I have reviewed the non-ACPI parts of this series. Aside from minor comments: Reviewed-by: Stefan Hajnoczi Really appreciate all your review! Thanks your, Stefan!

Re: [Qemu-devel] [PATCH v2 03/15] pc-dimm: keep the state of the whole backend memory

2016-05-30 Thread Xiao Guangrong
On 05/31/2016 02:42 AM, Stefan Hajnoczi wrote: On Fri, May 20, 2016 at 04:20:00PM +0800, Xiao Guangrong wrote: QEMU keeps the state of memory of dimm device during live migration, however, it is not enough for nvdimm device as its memory does not contain its label data, so that we should

[Qemu-devel] [PATCH v2 15/15] docs: add NVDIMM ACPI documentation

2016-05-20 Thread Xiao Guangrong
It describes the basic concepts of NVDIMM ACPI and the interfaces between QEMU and the ACPI BIOS Signed-off-by: Xiao Guangrong --- docs/specs/acpi_nvdimm.txt | 132 + 1 file changed, 132 insertions(+) create mode 100644 docs/specs/acpi_nvdimm.txt

[Qemu-devel] [PATCH v2 06/15] acpi: add aml_call5

2016-05-20 Thread Xiao Guangrong
It will be used by NVDIMM ACPI Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 14 ++ include/hw/acpi/aml-build.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 85c3ef7..1783216 100644 --- a/hw/acpi/aml

[Qemu-devel] [PATCH v2 13/15] nvdimm acpi: support Get Namespace Label Data function

2016-05-20 Thread Xiao Guangrong
Function 5 is used to get Namespace Label Data Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 83 +++- 1 file changed, 82 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 94424a4..0c0b4bf 100644 --- a

[Qemu-devel] [PATCH v2 04/15] nvdimm: support nvdimm label

2016-05-20 Thread Xiao Guangrong
Introduce a parameter, 'label-size', which is the size of nvdimm label data area which is reserved at the end of backend memory. It is required at least 128k Two callbacks, read_label_data() and write_label_data(), are used to operate the label area Signed-off-by: Xiao Guangrong -

[Qemu-devel] [PATCH v2 08/15] nvdimm acpi: save arg3 of _DSM method

2016-05-20 Thread Xiao Guangrong
Check if the input Arg3 is valid then store it into ARG3 if it is needed Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 586c02a..38aba3d 100644 --- a/hw/acpi/nvdimm.c +++ b/hw

[Qemu-devel] [PATCH v2 14/15] nvdimm acpi: support Set Namespace Label Data function

2016-05-20 Thread Xiao Guangrong
Function 6 is used to set Namespace Label Data Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 44 +++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 0c0b4bf..0e7a81f 100644 --- a/hw/acpi

[Qemu-devel] [PATCH v2 02/15] pc-dimm: introduce realize callback

2016-05-20 Thread Xiao Guangrong
nvdimm needs to check if the backend memory is large enough to contain label data and init its memory region when the device is realized, so introduce realize callback which is called after common dimm has been realize Signed-off-by: Xiao Guangrong --- hw/mem/pc-dimm.c | 5

[Qemu-devel] [PATCH v2 09/15] nvdimm acpi: check UUID

2016-05-20 Thread Xiao Guangrong
Check arg0 which indicates UUID to see if it is valid Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 38aba3d..4177227 100644 --- a/hw/acpi/nvdimm.c

[Qemu-devel] [PATCH v2 03/15] pc-dimm: keep the state of the whole backend memory

2016-05-20 Thread Xiao Guangrong
QEMU keeps the state of memory of dimm device during live migration, however, it is not enough for nvdimm device as its memory does not contain its label data, so that we should protect the whole backend memory instead Signed-off-by: Xiao Guangrong --- hw/mem/pc-dimm.c | 13 +++-- 1

[Qemu-devel] [PATCH v2 12/15] nvdimm acpi: support Get Namespace Label Size function

2016-05-20 Thread Xiao Guangrong
Function 4 is used to get Namespace label size Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 130 +-- 1 file changed, 127 insertions(+), 3 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 7af428f..94424a4 100644

[Qemu-devel] [PATCH v2 00/15] PATCH 00/15] NVDIMM: introduce nvdimm label support

2016-05-20 Thread Xiao Guangrong
&& nfit_mem->memdev_pmem) + if (nfit_mem->memdev_pmem) flags |= NDD_ALIASING; You can append a NVDIMM device in guest and do: # cd /sys/bus/nd/devices/ # cd namespace0.0/ # echo `uuidgen` > uuid # echo `expr 1024 \* 1024 \* 128` > size

[Qemu-devel] [PATCH v2 10/15] nvdimm acpi: abstract the operations for root & nvdimm devices

2016-05-20 Thread Xiao Guangrong
It separates the operations between root device and nvdimm devices in order to introducing label functions support for nvdimm device Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 74 ++-- 1 file changed, 56 insertions(+), 18 deletions

[Qemu-devel] [PATCH v2 07/15] nvdimm acpi: set HDLE properly

2016-05-20 Thread Xiao Guangrong
Now we pass HDLE to Qemu properly, use 0 for root device and use the handle for nvdimm devices Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 9531340

[Qemu-devel] [PATCH v2 05/15] acpi: add aml_object_type

2016-05-20 Thread Xiao Guangrong
Implement ObjectType which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ab89ca6..85c3ef7

[Qemu-devel] [PATCH v2 11/15] nvdimm acpi: check revision

2016-05-20 Thread Xiao Guangrong
Cuurently only revision 1 is supported Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 897d0a6..7af428f 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -483,6 +483,13

[Qemu-devel] [PATCH v2 01/15] pc-dimm: get memory region from ->get_memory_region()

2016-05-20 Thread Xiao Guangrong
d-off-by: Xiao Guangrong --- hw/mem/pc-dimm.c | 3 ++- include/hw/mem/pc-dimm.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 9e7de56..70b9451 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -354,8 +354,9 @@ static

Re: [Qemu-devel] Question about vNVDIMM file format

2016-05-18 Thread Xiao Guangrong
Hi Rich, On 05/17/2016 02:25 AM, Richard W.M. Jones wrote: On Mon, May 16, 2016 at 09:53:36AM -0700, Stefan Hajnoczi wrote: On Mon, May 16, 2016 at 04:04:01PM +0100, Richard W.M. Jones wrote: I'm playing with ext4 and DAX. I'm using: -object memory-backend-file,id=mem1,share,mem-path=/v

Re: [Qemu-devel] Question about vNVDIMM file format

2016-05-16 Thread Xiao Guangrong
On 05/16/2016 11:04 PM, Richard W.M. Jones wrote: I'm playing with ext4 and DAX. Thanks for your try, Rich! :) I'm using: -object memory-backend-file,id=mem1,share,mem-path=/var/tmp/pmem,size=4G \ -device nvdimm,memdev=mem1,id=nv1 where /var/tmp/pmem is a 4 GB ext4 filesystem image

Re: [Qemu-devel] XSAVES in GET_SUPPORTED_CPUID (was Re: [PATCH] target-i386: add Skylake-Client cpu mode)

2016-05-03 Thread Xiao Guangrong
On 05/04/2016 12:11 AM, Eduardo Habkost wrote: (CCing KVM mailing list) On Tue, May 03, 2016 at 02:38:44PM +0800, Xiao Guangrong wrote: On 04/29/2016 01:34 AM, Eduardo Habkost wrote: On Wed, Apr 27, 2016 at 04:13:06PM +0800, Xiao Guangrong wrote: [...] 1. As XSAVES is disabled in upstream

Re: [Qemu-devel] [PATCH] target-i386: add Skylake-Client cpu mode

2016-05-02 Thread Xiao Guangrong
On 04/29/2016 01:34 AM, Eduardo Habkost wrote: (CCing some additional Intel people) On Wed, Apr 27, 2016 at 04:13:06PM +0800, Xiao Guangrong wrote: From: Eduardo Habkost Introduce Skylake-Client cpu mode which inherits the features from Broadwell and supports some additional features that

Re: [Qemu-devel] [PATCH] target-i386: add Skylake-Client cpu mode

2016-04-28 Thread Xiao Guangrong
No, i am afraid it is not a Skylake Client feature. On 04/29/2016 11:11 AM, Huang, Kai wrote: Hi Guangrong, How about also add SGX to Skylake? Thanks, -Kai On 4/27/2016 8:13 PM, Xiao Guangrong wrote: From: Eduardo Habkost Introduce Skylake-Client cpu mode which inherits the features from

[Qemu-devel] [PATCH] target-i386: add Skylake-Client cpu mode

2016-04-27 Thread Xiao Guangrong
e Skylake-Client and Skylake-Server cpu modes separately. ] Signed-off-by: Eduardo Habkost Signed-off-by: Xiao Guangrong --- target-i386/cpu.c | 39 +++ 1 file changed, 39 insertions(+) diff --git a/target-i386/cpu.c b/target-i386/cpu.c index ddae932..2f2c647

Re: [Qemu-devel] [PATCH 00/15] NVDIMM: introduce nvdimm label support

2016-03-22 Thread Xiao Guangrong
On 03/22/2016 07:17 PM, Michael S. Tsirkin wrote: On Thu, Mar 17, 2016 at 04:32:46PM +0800, Xiao Guangrong wrote: This patchset is against commit d4207b223eef3 (fw-cfg: support writeable blobs) on pci branch of Michael's git tree and can be found at: https://github.com/xiaogr/qem

Re: [Qemu-devel] [PATCH 12/15] nvdimm acpi: support Get Namespace Label Size function

2016-03-22 Thread Xiao Guangrong
On 03/17/2016 06:58 PM, Stefan Hajnoczi wrote: On Thu, Mar 17, 2016 at 04:32:58PM +0800, Xiao Guangrong wrote: -/* No function except function 0 is supported yet. */ -nvdimm_dsm_no_payload(1 /* Not Supported */, dsm_mem_addr); +if (!nvdimm) { +return nvdimm_dsm_no_payload

Re: [Qemu-devel] [PATCH 10/15] nvdimm acpi: abstract the operations for root device and nvdimm devices

2016-03-22 Thread Xiao Guangrong
On 03/17/2016 06:35 PM, Stefan Hajnoczi wrote: On Thu, Mar 17, 2016 at 04:32:56PM +0800, Xiao Guangrong wrote: +static void +nvdimm_dsm_function0(uint32_t supported_func, hwaddr dsm_mem_addr) +{ +NvdimmDsmFunc0Out func0 = { +.len = cpu_to_le32(sizeof(func0

Re: [Qemu-devel] [PATCH 04/15] nvdimm: support nvdimm label

2016-03-22 Thread Xiao Guangrong
On 03/17/2016 06:28 PM, Stefan Hajnoczi wrote: On Thu, Mar 17, 2016 at 04:32:50PM +0800, Xiao Guangrong wrote: +static void nvdimm_init(Object *obj) +{ +object_property_add_bool(obj, "reserve-label", nvdimm_get_reserve_label, + nvdimm_set_reserve_l

Re: [Qemu-devel] [PATCH 00/15] NVDIMM: introduce nvdimm label support

2016-03-22 Thread Xiao Guangrong
Sorry for the delay and i just come back from my vacation. On 03/23/2016 04:30 AM, Stefan Hajnoczi wrote: On Tue, Mar 22, 2016 at 08:37:40AM -0700, Dan Williams wrote: On Thu, Mar 17, 2016 at 3:04 AM, Stefan Hajnoczi wrote: On Thu, Mar 17, 2016 at 04:32:46PM +0800, Xiao Guangrong wrote

[Qemu-devel] [PATCH 02/15] pc-dimm: introduce realize callback

2016-03-19 Thread Xiao Guangrong
nvdimm needs to check if the backend memory is large enough to contain label data and init its memory region when the device is realized, so introduce realize callback which is called after common dimm has been realize Signed-off-by: Xiao Guangrong --- hw/mem/pc-dimm.c | 5

[Qemu-devel] [PATCH 15/15] docs: add NVDIMM ACPI documentation

2016-03-19 Thread Xiao Guangrong
It describes the basic concepts of NVDIMM ACPI and the interfaces between QEMU and the ACPI BIOS Signed-off-by: Xiao Guangrong --- docs/specs/acpi_nvdimm.txt | 132 + 1 file changed, 132 insertions(+) create mode 100644 docs/specs/acpi_nvdimm.txt

[Qemu-devel] [PATCH 03/15] pc-dimm: keep the state of the whole backend memory

2016-03-19 Thread Xiao Guangrong
QEMU keeps the state of memory of dimm device during live migration, however, it is not enough for nvdimm device as its memory does not contain its label data, so that we should protect the whole backend memory instead Signed-off-by: Xiao Guangrong --- hw/mem/pc-dimm.c | 13 +++-- 1

[Qemu-devel] [PATCH 10/15] nvdimm acpi: abstract the operations for root device and nvdimm devices

2016-03-19 Thread Xiao Guangrong
It separates the operations between root device and nvdimm devices in order to introducing label functions support for nvdimm device Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 72 ++-- 1 file changed, 54 insertions(+), 18 deletions

[Qemu-devel] [PATCH 00/15] NVDIMM: introduce nvdimm label support

2016-03-19 Thread Xiao Guangrong
d/devices/ # cd namespace0.0/ # echo `uuidgen` > uuid # echo `expr 1024 \* 1024 \* 128` > size then reload nd.pmem.ko You can see /dev/pmem0 appears Xiao Guangrong (15): pc-dimm: get memory region from ->get_memory_region() pc-dimm: introduce realize callback pc-dimm: keep the state

[Qemu-devel] [PATCH 11/15] nvdimm acpi: check revision

2016-03-19 Thread Xiao Guangrong
Cuurently only revision 1 is supported Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 071f66f..83d80f5 100644 --- a/hw/acpi/nvdimm.c +++ b/hw/acpi/nvdimm.c @@ -481,6 +481,13

[Qemu-devel] [PATCH 04/15] nvdimm: support nvdimm label

2016-03-19 Thread Xiao Guangrong
ata(), are used to operate the label area Signed-off-by: Xiao Guangrong --- hw/mem/nvdimm.c | 95 + include/hw/mem/nvdimm.h | 61 ++- 2 files changed, 155 insertions(+), 1 deletion(-) diff --git a/hw/mem/nvdimm.

[Qemu-devel] [PATCH 12/15] nvdimm acpi: support Get Namespace Label Size function

2016-03-19 Thread Xiao Guangrong
Function 4 is used to get Namespace label size Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 130 +-- 1 file changed, 126 insertions(+), 4 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 83d80f5..4b5f672 100644

[Qemu-devel] [PATCH 05/15] acpi: add aml_object_type

2016-03-19 Thread Xiao Guangrong
Implement ObjectType which is used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 8 include/hw/acpi/aml-build.h | 1 + 2 files changed, 9 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index ab89ca6..85c3ef7

[Qemu-devel] [PATCH 13/15] nvdimm acpi: support Get Namespace Label Data function

2016-03-19 Thread Xiao Guangrong
Function 5 is used to get Namespace Label Data Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 81 +++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 4b5f672..1240328 100644 --- a

[Qemu-devel] [PATCH 14/15] nvdimm acpi: support Set Namespace Label Data function

2016-03-19 Thread Xiao Guangrong
Function 6 is used to set Namespace Label Data Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 42 +- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 1240328..f17be52 100644 --- a/hw/acpi

[Qemu-devel] [PATCH 07/15] nvdimm acpi: set HDLE properly

2016-03-19 Thread Xiao Guangrong
Now we pass HDLE to Qemu properly, use 0 for root device and use the handle for nvdimm devices Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 9531340

[Qemu-devel] [PATCH 01/15] pc-dimm: get memory region from ->get_memory_region()

2016-03-19 Thread Xiao Guangrong
d-off-by: Xiao Guangrong --- hw/mem/pc-dimm.c | 3 ++- include/hw/mem/pc-dimm.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/hw/mem/pc-dimm.c b/hw/mem/pc-dimm.c index 973bf20..0ba17f0 100644 --- a/hw/mem/pc-dimm.c +++ b/hw/mem/pc-dimm.c @@ -353,8 +353,9 @@ static

[Qemu-devel] [PATCH 06/15] acpi: add aml_call5

2016-03-19 Thread Xiao Guangrong
It will be used by NVDIMM ACPI Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 14 ++ include/hw/acpi/aml-build.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 85c3ef7..1783216 100644 --- a/hw/acpi/aml

[Qemu-devel] [PATCH 09/15] nvdimm acpi: check UUID

2016-03-19 Thread Xiao Guangrong
Check arg0 which indicates UUID to see if it is valid Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 32 ++-- 1 file changed, 26 insertions(+), 6 deletions(-) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 38aba3d..4177227 100644 --- a/hw/acpi/nvdimm.c

[Qemu-devel] [PATCH 08/15] nvdimm acpi: save arg3 of _DSM method

2016-03-18 Thread Xiao Guangrong
Check if the input Arg3 is valid then store it into ARG3 if it is needed Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 20 1 file changed, 20 insertions(+) diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c index 586c02a..38aba3d 100644 --- a/hw/acpi/nvdimm.c +++ b/hw

[Qemu-devel] [PATCH v6 3/4] nvdimm acpi: let qemu handle _DSM method

2016-03-04 Thread Xiao Guangrong
If dsm memory is successfully patched, we let qemu fully emulate the dsm method This patch saves _DSM input parameters into dsm memory, tell dsm memory address to QEMU, then fetch the result from the dsm memory Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 120

[Qemu-devel] [PATCH v6 1/4] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-03-04 Thread Xiao Guangrong
32 bits IO port starting from 0x0a18 in guest is reserved for NVDIMM ACPI emulation. The table, NVDIMM_DSM_MEM_FILE, will be patched into NVDIMM ACPI binary code OSPM uses this port to tell QEMU the final address of the DSM memory and notify QEMU to emulate the DSM method Signed-off-by: Xiao

[Qemu-devel] [PATCH v6 2/4] nvdimm acpi: introduce patched dsm memory

2016-03-04 Thread Xiao Guangrong
The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided by bios and patched into int32 object named "MEMA" Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 20 +--- 1 file c

[Qemu-devel] [PATCH v6 4/4] nvdimm acpi: emulate dsm method

2016-03-04 Thread Xiao Guangrong
Emulate dsm method after IO VM-exit Currently, we only introduce the framework and no function is actually supported Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c| 56 + include/hw/mem/nvdimm.h | 8 +++ 2 files changed, 64

[Qemu-devel] [PATCH v6 0/4] NVDIMM ACPI: introduce the framework of QEMU emulated DSM

2016-03-04 Thread Xiao Guangrong
we should keep the 64 bits stuff in the private place where common ACPI operation does not touch it Xiao Guangrong (4): nvdimm acpi: initialize the resource used by NVDIMM ACPI nvdimm acpi: introduce patched dsm memory nvdimm acpi: let qemu handle _DSM method nvdimm acpi: emulate dsm metho

Re: [Qemu-devel] [PATCH v5 2/5] nvdimm acpi: introduce patched dsm memory

2016-03-04 Thread Xiao Guangrong
On 03/03/2016 09:12 PM, Michael S. Tsirkin wrote: /* copy AML table into ACPI tables blob and patch header there */ g_array_append_vals(table_data, ssdt->buf->data, ssdt->buf->len); +mem_addr_offset = build_append_named_dword(table_data, +

Re: [Qemu-devel] [PATCH v5 3/5] nvdimm acpi: let qemu handle _DSM method

2016-03-04 Thread Xiao Guangrong
On 03/03/2016 09:23 PM, Michael S. Tsirkin wrote: + * + * They are RAM mapping on host so that these accesses never cause + * VM-EXIT. + */ +field = aml_field("NRAM", AML_DWORD_ACC, AML_NOLOCK, AML_PRESERVE); +aml_append(field, aml_named_field("HDLE", + si

Re: [Qemu-devel] [PATCH v5 0/5] NVDIMM ACPI: introduce the framework of QEMU emulated DSM

2016-03-03 Thread Xiao Guangrong
On 03/03/2016 09:43 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 07:50:36PM +0800, Xiao Guangrong wrote: This patchset is against commit 429fb940caadf9 (fw-cfg: support writeable blobs) on pci branch of Michael's git tree and can be found at: https://github.com/xiaogr/qem

Re: [Qemu-devel] [PATCH v5 5/5] nvdimm acpi: add _CRS

2016-03-03 Thread Xiao Guangrong
On 03/03/2016 09:29 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 07:50:41PM +0800, Xiao Guangrong wrote: As Igor suggested that we can report the BIOS patched operation region so that OSPM could see that particular range is in use and be able to notice conflicts if it happens some

Re: [Qemu-devel] [PATCH v5 4/5] nvdimm acpi: emulate dsm method

2016-03-03 Thread Xiao Guangrong
On 03/03/2016 09:25 PM, Michael S. Tsirkin wrote: + +/* + * function 0 is called to inquire what functions which functions Okay, will fix.

Re: [Qemu-devel] [PATCH v5 3/5] nvdimm acpi: let qemu handle _DSM method

2016-03-03 Thread Xiao Guangrong
On 03/03/2016 09:23 PM, Michael S. Tsirkin wrote: +struct NvdimmDsmIn { +uint32_t handle; +uint32_t revision; +uint32_t function; + /* the remaining size in the page is used by arg3. */ Pls fix indentation so /* aligns with union. Good eyes. Surprise me that checkpatch did

Re: [Qemu-devel] [PATCH v5 2/5] nvdimm acpi: introduce patched dsm memory

2016-03-03 Thread Xiao Guangrong
On 03/03/2016 09:12 PM, Michael S. Tsirkin wrote: -(void *)(table_data->data + table_data->len - ssdt->buf->len), -"SSDT", ssdt->buf->len, 1, NULL, "NVDIMM"); +(void *)(table_data->data + nvdimm_ssdt), +"SSDT", table_data->len - nvdimm_ssdt, 1, NULL, "NVDIMM");

Re: [Qemu-devel] [PATCH v5 1/5] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-03-02 Thread Xiao Guangrong
On 03/02/2016 07:58 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 07:50:37PM +0800, Xiao Guangrong wrote: 32 bits IO port starting from 0x0a18 in guest is reserved for NVDIMM ACPI emulation. The table, NVDIMM_DSM_MEM_FILE, will be patched into NVDIMM ACPI binary code OSPM uses this

[Qemu-devel] [PATCH v5 2/5] nvdimm acpi: introduce patched dsm memory

2016-03-02 Thread Xiao Guangrong
The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided by bios and patched into int32 object named "MEMA" Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 20 +--- 1 file c

[Qemu-devel] [PATCH v5 5/5] nvdimm acpi: add _CRS

2016-03-02 Thread Xiao Guangrong
As Igor suggested that we can report the BIOS patched operation region so that OSPM could see that particular range is in use and be able to notice conflicts if it happens some day Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 27 +++ 1 file changed, 27 insertions

[Qemu-devel] [PATCH v5 3/5] nvdimm acpi: let qemu handle _DSM method

2016-03-02 Thread Xiao Guangrong
If dsm memory is successfully patched, we let qemu fully emulate the dsm method This patch saves _DSM input parameters into dsm memory, tell dsm memory address to QEMU, then fetch the result from the dsm memory Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 117

[Qemu-devel] [PATCH v5 0/5] NVDIMM ACPI: introduce the framework of QEMU emulated DSM

2016-03-02 Thread Xiao Guangrong
in the private place where common ACPI operation does not touch it Xiao Guangrong (5): nvdimm acpi: initialize the resource used by NVDIMM ACPI nvdimm acpi: introduce patched dsm memory nvdimm acpi: let qemu handle _DSM method nvdimm acpi: emulate dsm method nvdimm acpi: add _CRS hw

[Qemu-devel] [PATCH v5 4/5] nvdimm acpi: emulate dsm method

2016-03-02 Thread Xiao Guangrong
Emulate dsm method after IO VM-exit Currently, we only introduce the framework and no function is actually supported Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c| 56 + include/hw/mem/nvdimm.h | 8 +++ 2 files changed, 64

[Qemu-devel] [PATCH v5 1/5] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-03-02 Thread Xiao Guangrong
32 bits IO port starting from 0x0a18 in guest is reserved for NVDIMM ACPI emulation. The table, NVDIMM_DSM_MEM_FILE, will be patched into NVDIMM ACPI binary code OSPM uses this port to tell QEMU the final address of the DSM memory and notify QEMU to emulate the DSM method Signed-off-by: Xiao

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-02 Thread Xiao Guangrong
On 03/02/2016 04:44 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 03:29:33PM +0800, Xiao Guangrong wrote: On 03/02/2016 03:20 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 03:15:19PM +0800, Xiao Guangrong wrote: On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: On Wed

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 03:20 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 03:15:19PM +0800, Xiao Guangrong wrote: On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 11:30:10AM +0800, Xiao Guangrong wrote: On 03/02/2016 01:09 AM, Michael S. Tsirkin wrote: Can&#

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 03:15 PM, Xiao Guangrong wrote: +in = g_malloc(TARGET_PAGE_SIZE); ugh. manual memory management :( Hmm... Or use GArray? But it is :) Sorry, typo. But it is the static size and we should read all memory out to get the consistent data to avid guest changes it at

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 02:36 PM, Michael S. Tsirkin wrote: On Wed, Mar 02, 2016 at 11:30:10AM +0800, Xiao Guangrong wrote: On 03/02/2016 01:09 AM, Michael S. Tsirkin wrote: Can't guest trigger this? If yes, don't put such code in production please: this will fill up disk on the host.

Re: [Qemu-devel] [PATCH v4 0/9] NVDIMM ACPI: introduce the framework of QEMU emulated

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 12:36 AM, Michael S. Tsirkin wrote: On Tue, Mar 01, 2016 at 06:56:02PM +0800, Xiao Guangrong wrote: This patchset is against commit 2212ef27b342b98b220fe9 (fw-cfg: support writeable blobs) on pci branch of Michael's git tree and can be found at: https://github.com/x

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 01:12 AM, Michael S. Tsirkin wrote: On Tue, Mar 01, 2016 at 06:56:10PM +0800, Xiao Guangrong wrote: Emulate dsm method after IO VM-exit Currently, we only introduce the framework and no function is actually supported Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c

Re: [Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
On 03/02/2016 01:09 AM, Michael S. Tsirkin wrote: Can't guest trigger this? If yes, don't put such code in production please: this will fill up disk on the host. Okay, the evil guest can read the IO port freely. I will use nvdimm_debug() instead. static void nvdimm_dsm_write(void

[Qemu-devel] [PATCH 8/9] nvdimm acpi: emulate dsm method

2016-03-01 Thread Xiao Guangrong
Emulate dsm method after IO VM-exit Currently, we only introduce the framework and no function is actually supported Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 2 +- hw/acpi/nvdimm.c| 44 include/hw/acpi/aml-build.h

[Qemu-devel] [PATCH 3/9] acpi: allow using object as offset for OperationRegion

2016-03-01 Thread Xiao Guangrong
Extend aml_operation_region() to use object as offset Reviewed-by: Igor Mammedov Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 4 ++-- hw/i386/acpi-build.c| 31 --- include/hw/acpi/aml-build.h | 2 +- 3 files changed, 19 insertions(+), 18

[Qemu-devel] [PATCH 7/9] nvdimm acpi: let qemu handle _DSM method

2016-03-01 Thread Xiao Guangrong
If dsm memory is successfully patched, we let qemu fully emulate the dsm method This patch saves _DSM input parameters into dsm memory, tell dsm memory address to QEMU, then fetch the result from the dsm memory Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 117

[Qemu-devel] [PATCH 6/9] nvdimm acpi: introduce patched dsm memory

2016-03-01 Thread Xiao Guangrong
The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided by bios and patched into int32 object named "MEMA" Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 20 +--- 1 file c

[Qemu-devel] [PATCH 9/9] nvdimm acpi: add _CRS

2016-03-01 Thread Xiao Guangrong
As Igor suggested that we can report the BIOS patched operation region so that OSPM could see that particular range is in use and be able to notice conflicts if it happens some day Signed-off-by: Xiao Guangrong --- hw/acpi/nvdimm.c | 27 +++ 1 file changed, 27 insertions

[Qemu-devel] [PATCH 2/9] acpi: add aml_concatenate()

2016-03-01 Thread Xiao Guangrong
It will be used by nvdimm acpi Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 7 +++ include/hw/acpi/aml-build.h | 1 + 2 files changed, 8 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 45b7f0a..bb0cf52 100644 --- a/hw/acpi/aml-build.c +++ b/hw

[Qemu-devel] [PATCH 5/9] acpi: add build_append_named_dword, returning an offset in buffer

2016-03-01 Thread Xiao Guangrong
n is there for, except no known windows release so far implements DataTableRegion. Signed-off-by: Michael S. Tsirkin Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 28 include/hw/acpi/aml-build.h | 3 +++ 2 files changed, 31 insertions(+) diff --git

[Qemu-devel] [PATCH 4/9] nvdimm acpi: initialize the resource used by NVDIMM ACPI

2016-03-01 Thread Xiao Guangrong
32 bits IO port starting from 0x0a18 in guest is reserved for NVDIMM ACPI emulation. The table, NVDIMM_DSM_MEM_FILE, will be patched into NVDIMM ACPI binary code OSPM uses this port to tell QEMU the final address of the DSM memory and notify QEMU to emulate the DSM method Signed-off-by: Xiao

[Qemu-devel] [PATCH 1/9] acpi: add aml_create_field()

2016-03-01 Thread Xiao Guangrong
It will be used by nvdimm acpi Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 14 ++ include/hw/acpi/aml-build.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c index 6675535..45b7f0a 100644 --- a/hw/acpi/aml

[Qemu-devel] [PATCH v4 0/9] NVDIMM ACPI: introduce the framework of QEMU emulated

2016-03-01 Thread Xiao Guangrong
uch it Michael S. Tsirkin (1): acpi: add build_append_named_dword, returning an offset in buffer Xiao Guangrong (8): acpi: add aml_create_field() acpi: add aml_concatenate() acpi: allow using object as offset for OperationRegion nvdimm acpi: initialize the resource used by NVDIMM ACPI nvdimm

Re: [Qemu-devel] [PATCH v3 5/8] nvdimm acpi: introduce patched dsm memory

2016-03-01 Thread Xiao Guangrong
On 03/01/2016 05:08 PM, Michael S. Tsirkin wrote: On Tue, Mar 01, 2016 at 04:53:23PM +0800, Xiao Guangrong wrote: On 02/29/2016 05:38 PM, Michael S. Tsirkin wrote: +/* Build NAME(, 0x) where 0x is encoded as a dword, + * and return the offset to 0x for runtime

Re: [Qemu-devel] [PATCH v3 5/8] nvdimm acpi: introduce patched dsm memory

2016-03-01 Thread Xiao Guangrong
egion is there for, except no known windows release so far implements DataTableRegion. [ Xiao: fixed missed NameOp and applied it to NVDIMM ACPI. ] Signed-off-by: Michael S. Tsirkin Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 1 + hw/acpi/nvdimm.c| 33 +++-

Re: [Qemu-devel] [PATCH v3 5/8] nvdimm acpi: introduce patched dsm memory

2016-03-01 Thread Xiao Guangrong
On 02/29/2016 05:38 PM, Michael S. Tsirkin wrote: On Sun, Feb 14, 2016 at 04:51:02PM +0800, Xiao Guangrong wrote: The dsm memory is used to save the input parameters and store the dsm result which is filled by QEMU. The address of dsm memory is decided by bios and patched into int32 object

Re: [Qemu-devel] [PATCH v7 0/5] don't use NVDIMM for balooning

2016-02-22 Thread Xiao Guangrong
EMU along with configured balloon almost immediately inflates balloon and effectively kill the guest as qemu counts nvdimm as part of the ram. Reviewed-by: Xiao Guangrong

<    1   2   3   4   5   6   7   8   9   >