On 11/04/2015 07:00 AM, Eduardo Habkost wrote:
On Mon, Nov 02, 2015 at 05:13:10PM +0800, Xiao Guangrong wrote:
Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file
locates at DAX enabled filesystem
On 11/03/2015 02:14 PM, Shannon Zhao wrote:
On 2015/11/2 17:13, Xiao Guangrong wrote:
Implement CreateField term which is used by NVDIMM _DSM method in later patch
Signed-off-by: Xiao Guangrong
---
hw/acpi/aml-build.c | 13 +
include/hw/acpi/aml-build.h | 1 +
2
On 11/03/2015 01:09 AM, Vladimir Sementsov-Ogievskiy wrote:
On 02.11.2015 12:13, Xiao Guangrong wrote:
Use the whole file size if @size is not specified which is useful
if we want to directly pass a file to guest
Signed-off-by: Xiao Guangrong
---
backends/hostmem-file.c | 22
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
On 11/03/2015 09:55 PM, Paolo Bonzini wrote:
On 03/11/2015 04:56, Xiao Guangrong wrote:
On 11/03/2015 05:12 AM, Paolo Bonzini wrote:
On 02/11/2015 10:13, Xiao Guangrong wrote:
Currently, file_ram_alloc() only works on directory - it creates a file
under @path and do mmap on it
This
On 11/03/2015 09:13 PM, Igor Mammedov wrote:
On Mon, 2 Nov 2015 17:13:29 +0800
Xiao Guangrong wrote:
NVDIMM devices is defined in ACPI 6.0 9.20 NVDIMM Devices
There is a root device under \_SB and specified NVDIMM devices are under the
root device. Each NVDIMM device has _ADR which
On 11/03/2015 08:34 PM, Igor Mammedov wrote:
On Mon, 2 Nov 2015 17:13:11 +0800
Xiao Guangrong wrote:
Currently, file_ram_alloc() only works on directory - it creates a file
under @path and do mmap on it
This patch tries to allow it to work on file directly, if @path is a
directory it
On 11/03/2015 08:30 PM, Igor Mammedov wrote:
On Mon, 2 Nov 2015 17:13:08 +0800
Xiao Guangrong wrote:
It avoid explicit Mutex and will be used by NVDIMM ACPI
Signed-off-by: Xiao Guangrong
---
hw/acpi/aml-build.c | 26 --
include/hw/acpi/aml-build.h | 1
On 11/03/2015 05:12 AM, Paolo Bonzini wrote:
On 02/11/2015 10:13, Xiao Guangrong wrote:
Currently, file_ram_alloc() only works on directory - it creates a file
under @path and do mmap on it
This patch tries to allow it to work on file directly, if @path is a
directory it works as before
On 11/03/2015 12:11 AM, Vladimir Sementsov-Ogievskiy wrote:
On 02.11.2015 12:13, Xiao Guangrong wrote:
lseek can not work for all block devices as the man page says:
| Some devices are incapable of seeking and POSIX does not specify
| which devices must support lseek().
This patch tries to
On 11/02/2015 11:12 PM, Vladimir Sementsov-Ogievskiy wrote:
On 02.11.2015 12:13, Xiao Guangrong wrote:
Currently, file_ram_alloc() only works on directory - it creates a file
under @path and do mmap on it
This patch tries to allow it to work on file directly, if @path is a
It isn't t
On 11/02/2015 10:51 PM, Vladimir Sementsov-Ogievskiy wrote:
On 02.11.2015 12:13, Xiao Guangrong wrote:
Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file
locates at DAX enabled filesystem
So this
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 ad
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 an
Add NVDIMM maintainer
Signed-off-by: Xiao Guangrong
---
MAINTAINERS | 7 +++
1 file changed, 7 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 3144113..865c0cf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -907,6 +907,13 @@ M: Jiri Pirko
S: Maintained
F: hw/net/rocker
Function 6 is used to set Namespace Label Data
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index f30e2ff..2553be9 100644
--- a/hw/acpi
Function 5 is used to get Namespace Label Data
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 63
1 file changed, 63 insertions(+)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index cdc361c
, we save handle, handle,
arg1 and arg2 to dsm memory. Arg3 is conditionally saved in later patch
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 184 +++
1 file changed, 184 insertions(+)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
is true on default and
it is false on 2.4 and its earlier version to keep compatibility
Signed-off-by: Xiao Guangrong
---
default-configs/i386-softmmu.mak | 1 +
default-configs/mips-softmmu.mak | 1 +
default-configs/mips64-softmmu.mak | 1 +
default-configs/mips64el-softmmu.mak | 1
w and Data window are not needed
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c| 355
hw/i386/acpi-build.c| 6 +
include/hw/mem/nvdimm.h | 10 ++
3 files changed, 371 insertions(+)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvd
FIT buffer is not completely mapped into guest address space, so a new
function, Read FIT, function index 0x, is reserved by QEMU to
read the piece of FIT buffer. The buffer is concatenated before _FIT
return
Refer to docs/specs/acpi-nvdimm.txt for detailed design
Signed-off-by: Xiao
ry-backend-file,
id=mem1,size=1G,mem-path=/dev/pmem0 -device nvdimm,memdev=mem1" to
create NVDIMM device for guest
Signed-off-by: Xiao Guangrong
---
default-configs/i386-softmmu.mak | 1 +
default-configs/x86_64-softmmu.mak | 1 +
hw/acpi/memory_hotplug.c | 6 ++
Function 4 is used to get Namespace label size
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 87 +++-
1 file changed, 86 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index
Check if the input Arg3 is valid then store it into dsm_in if needed
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 53ed675..e179a72 100644
--- a/hw/acpi
i "s/PCDIMM/DIMM/g"
find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" \
| xargs sed -i "s/pc_dimm/dimm/g"
find ./ -name "trace-events" | xargs sed -i "s/pc-dimm/dimm/g"
It prepares the work which abstracts dimm device
Rename qmp_pc_dimm_device_list.c to qmp_dimm_device_list.c
Signed-off-by: Xiao Guangrong
---
stubs/Makefile.objs | 2 +-
stubs/{qmp_pc_dimm_device_list.c => qmp_dimm_device_list.c} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename st
It describes the basic concepts of NVDIMM ACPI and the interface
between QEMU and the ACPI BIOS
Signed-off-by: Xiao Guangrong
---
docs/specs/acpi_nvdimm.txt | 179 +
1 file changed, 179 insertions(+)
create mode 100644 docs/specs/acpi_nvdimm.txt
Rename:
pc-dimm.c => dimm.c
pc-dimm.h => dimm.h
It prepares the work which abstracts dimm device type for both pc-dimm and
nvdimm
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Xiao Guangrong
---
hw/Makefile.objs | 2 +-
hw/acpi/
A base device, dimm, is abstracted from pc-dimm, so that we can
build nvdimm device based on dimm in the later patch
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Xiao Guangrong
---
default-configs/i386-softmmu.mak | 1 +
default-configs/ppc64-softmmu.mak | 1 +
default-configs
lseek can not work for all block devices as the man page says:
| Some devices are incapable of seeking and POSIX does not specify
| which devices must support lseek().
This patch tries to add the support on Linux by using BLKGETSIZE64
ioctl
Signed-off-by: Xiao Guangrong
---
util/osdep.c | 20
-by: Xiao Guangrong
---
exec.c | 80 ++
1 file changed, 51 insertions(+), 29 deletions(-)
diff --git a/exec.c b/exec.c
index 9075f4d..db0fdaf 100644
--- a/exec.c
+++ b/exec.c
@@ -1174,14 +1174,60 @@ void qemu_mutex_unlock_ramlist(void
On 10/31/2015 10:15 PM, Xiao Guangrong wrote:
On 10/31/2015 06:52 PM, Vladimir Sementsov-Ogievskiy wrote:
On 30.10.2015 08:56, 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
It's not used any more
Signed-off-by: Xiao Guangrong
---
include/hw/mem/pc-dimm.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index d83bf30..11a8937 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -20,8
e return value of get_memory_region as it
assumed the backend memory of pc-dimm is always properly initialized,
we make get_memory_region internally catch the case if something is
wrong
Signed-off-by: Xiao Guangrong
---
hw/mem/dimm.c| 3 ++-
hw/mem/pc-dimm.c | 12 +++-
2 files cha
sov-Ogievskiy
Signed-off-by: Xiao Guangrong
---
backends/hostmem-file.c | 11 +++
1 file changed, 3 insertions(+), 8 deletions(-)
diff --git a/backends/hostmem-file.c b/backends/hostmem-file.c
index e9b6d21..9097a57 100644
--- a/backends/hostmem-file.c
+++ b/backends/hostmem-file.c
@@ -46
Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file
locates at DAX enabled filesystem
So this patch let it work on any kind of path
Signed-off-by: Xiao Guangrong
---
exec.c | 24
is is useful for the users who want to pass whole nvdimm
device and make its data completely be visible to guest
The parameter is false on default
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c| 12
hw/mem/nvdimm.c | 43 ---
Use the whole file size if @size is not specified which is useful
if we want to directly pass a file to guest
Signed-off-by: Xiao Guangrong
---
backends/hostmem-file.c | 22 ++
1 file changed, 18 insertions(+), 4 deletions(-)
diff --git a/backends/hostmem-file.c b/backends
Implement Concatenate term which is used by NVDIMM _DSM method
in later patch
Signed-off-by: Xiao Guangrong
---
hw/acpi/aml-build.c | 14 ++
include/hw/acpi/aml-build.h | 1 +
2 files changed, 15 insertions(+)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index
It avoid explicit Mutex and will be used by NVDIMM ACPI
Signed-off-by: Xiao Guangrong
---
hw/acpi/aml-build.c | 26 --
include/hw/acpi/aml-build.h | 1 +
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
currently only allow to access device's Label Namespace
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Xiao Guangrong
---
hw/acpi/aml-build.c | 2 +-
hw/acpi/nvdimm.c| 158 +++-
include/hw/acpi/aml-build.h | 1 +
3 files changed
It is used to get the size of the specified file, also qemu_fd_getlength()
is introduced to unify the code with raw_getlength() in block/raw-posix.c
Signed-off-by: Xiao Guangrong
---
block/raw-posix.c| 7 +--
include/qemu/osdep.h | 2 ++
util/osdep.c | 31
Implement CreateField term which is used by NVDIMM _DSM method in later patch
Signed-off-by: Xiao Guangrong
---
hw/acpi/aml-build.c | 13 +
include/hw/acpi/aml-build.h | 1 +
2 files changed, 14 insertions(+)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index
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;
You
nvdimm need 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
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Xiao Guangrong
---
hw
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 efc06ab..9f792ab
Implement DeRefOf term which is used by NVDIMM _DSM method in later patch
Reviewed-by: Igor Mammedov
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
Implement SizeOf term which is used by NVDIMM _DSM method in later patch
Reviewed-by: Igor Mammedov
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
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/dimm.c | 14 --
1 file
pc_existing_dimms_capacity() can be static since it is not used out of
pc-dimm.c and drop the pc_ prefix to prepare the work which abstracts
dimm device type from pc-dimm
Reviewed-by: Vladimir Sementsov-Ogievskiy
Signed-off-by: Xiao Guangrong
---
hw/mem/pc-dimm.c | 73
Signed-off-by: Xiao Guangrong
---
exec.c | 33 ++---
include/qemu/osdep.h | 1 +
target-ppc/kvm.c | 23 +--
util/oslib-posix.c | 37 +
util/oslib-win32.c | 5 +
5 files changed, 50
On 10/31/2015 10:11 PM, Eduardo Habkost wrote:
On Sat, Oct 31, 2015 at 04:09:56PM +0800, Xiao Guangrong wrote:
On 10/30/2015 11:54 PM, Eduardo Habkost wrote:
On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote:
There are three places use the some logic to get the page size on
the
On 10/31/2015 09:45 PM, Eduardo Habkost wrote:
On Sat, Oct 31, 2015 at 04:46:05PM +0800, Xiao Guangrong wrote:
On 10/31/2015 01:30 AM, Eduardo Habkost wrote:
On Fri, Oct 30, 2015 at 01:56:05PM +0800, Xiao Guangrong wrote:
Use the whole file size if @size is not specified which is useful
if
On 10/31/2015 09:55 PM, Eduardo Habkost wrote:
On Sat, Oct 31, 2015 at 03:44:39PM +0800, Xiao Guangrong wrote:
On 10/30/2015 10:04 PM, Vladimir Sementsov-Ogievskiy wrote:
On 30.10.2015 08:56, Xiao Guangrong wrote:
Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
of
On 10/31/2015 07:05 PM, Vladimir Sementsov-Ogievskiy wrote:
On 30.10.2015 08:56, 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 protect the
On 10/31/2015 06:52 PM, Vladimir Sementsov-Ogievskiy wrote:
On 30.10.2015 08:56, 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 an
On 10/31/2015 05:37 PM, Vladimir Sementsov-Ogievskiy wrote:
On 31.10.2015 10:26, Xiao Guangrong wrote:
On 10/30/2015 09:26 PM, Vladimir Sementsov-Ogievskiy wrote:
logic is changed:
in old version gethugepagesize on statfs error generates exit(1)
in new it returns getpagesize() in
On 10/31/2015 01:30 AM, Eduardo Habkost wrote:
On Fri, Oct 30, 2015 at 01:56:05PM +0800, Xiao Guangrong wrote:
Use the whole file size if @size is not specified which is useful
if we want to directly pass a file to guest
Signed-off-by: Xiao Guangrong
---
backends/hostmem-file.c | 48
On 10/30/2015 11:54 PM, Eduardo Habkost wrote:
On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote:
There are three places use the some logic to get the page size on
the file path or file fd
This patch introduces qemu_file_get_page_size() to unify the code
Signed-off-by: Xiao
On 10/31/2015 01:06 AM, Eric Blake wrote:
On 10/29/2015 11:56 PM, Xiao Guangrong wrote:
This patch is generated by this script:
find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
| xargs sed -i "s/PC_DIMM/DIMM/g"
find ./ -
On 10/31/2015 12:10 AM, Vladimir Sementsov-Ogievskiy wrote:
On 30.10.2015 08:56, Xiao Guangrong wrote:
This patch is generated by this script:
find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
| xargs sed -i "s/PC_DIMM/DIMM/g"
On 10/30/2015 11:54 PM, Eduardo Habkost wrote:
On Fri, Oct 30, 2015 at 01:56:01PM +0800, Xiao Guangrong wrote:
There are three places use the some logic to get the page size on
the file path or file fd
This patch introduces qemu_file_get_page_size() to unify the code
Signed-off-by: Xiao
On 10/30/2015 11:27 PM, Vladimir Sementsov-Ogievskiy wrote:
On 30.10.2015 08:56, Xiao Guangrong wrote:
Use the whole file size if @size is not specified which is useful
if we want to directly pass a file to guest
Signed-off-by: Xiao Guangrong
---
backends/hostmem-file.c | 48
On 10/30/2015 10:25 PM, Vladimir Sementsov-Ogievskiy wrote:
On 30.10.2015 08:56, Xiao Guangrong wrote:
Currently, file_ram_alloc() only works on directory - it creates a file
under @path and do mmap on it
This patch tries to allow it to work on file directly, if @path is a
directory it works
On 10/30/2015 10:04 PM, Vladimir Sementsov-Ogievskiy wrote:
On 30.10.2015 08:56, Xiao Guangrong wrote:
Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file
locates at DAX enabled filesystem
So this
On 10/30/2015 09:26 PM, Vladimir Sementsov-Ogievskiy wrote:
logic is changed:
in old version gethugepagesize on statfs error generates exit(1)
in new it returns getpagesize() in this case (through fd_getpagesize)
(I think, fd_getpagesize should be fixed to handle error)
Indeed. I wi
On 10/30/2015 06:14 PM, Stefan Hajnoczi wrote:
On Fri, Oct 30, 2015 at 01:56:21PM +0800, Xiao Guangrong wrote:
static uint64_t
nvdimm_dsm_read(void *opaque, hwaddr addr, unsigned size)
{
-return 0;
+AcpiNVDIMMState *state = opaque;
+MemoryRegion *dsm_ram_mr = &state->
Add NVDIMM maintainer
Signed-off-by: Xiao Guangrong
---
MAINTAINERS | 7 +++
1 file changed, 7 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 3144113..865c0cf 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -907,6 +907,13 @@ M: Jiri Pirko
S: Maintained
F: hw/net/rocker
Function 6 is used to set Namespace Label Data
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 31 +++
1 file changed, 31 insertions(+)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 8c27b25..5c8be41 100644
--- a/hw/acpi/nvdimm.c
+++ b/hw/acpi/nvdimm.c
Function 5 is used to get Namespace Label Data
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 63
1 file changed, 63 insertions(+)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 67c4699..8c27b25 100644
--- a/hw/acpi
Function 4 is used to get Namespace label size
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 87 +++-
1 file changed, 86 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 300a3aa..67c4699 100644
--- a
currently only allow to access device's Label Namespace
Reviewed-by: Stefan Hajnoczi
Signed-off-by: Xiao Guangrong
---
hw/acpi/aml-build.c | 2 +-
hw/acpi/nvdimm.c| 156 +++-
include/hw/acpi/aml-build.h | 1 +
3 files changed
FIT buffer is not completely mapped into guest address space, so a new
function, Read FIT, function index 0x, is reserved by QEMU to
read the piece of FIT buffer. The buffer is concatenated before _FIT
return
Refer to docs/specs/acpi-nvdimm.txt for detailed design
Signed-off-by: Xiao
, we save handle, handle,
arg1 and arg2 to dsm memory. Arg3 is conditionally saved in later patch
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 184 +++
1 file changed, 184 insertions(+)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
w and Data window are not needed
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c| 355
hw/i386/acpi-build.c| 6 +
include/hw/mem/nvdimm.h | 10 ++
3 files changed, 371 insertions(+)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvd
is true on default and
it is false on 2.4 and its earlier version to keep compatibility
Signed-off-by: Xiao Guangrong
---
default-configs/i386-softmmu.mak | 1 +
default-configs/mips-softmmu.mak | 1 +
default-configs/mips64-softmmu.mak | 1 +
default-configs/mips64el-softmmu.mak | 1
Check if the input Arg3 is valid then store it into dsm_in if needed
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c | 27 ++-
1 file changed, 26 insertions(+), 1 deletion(-)
diff --git a/hw/acpi/nvdimm.c b/hw/acpi/nvdimm.c
index 53ed675..e179a72 100644
--- a/hw/acpi
is is useful for the users who want to pass whole nvdimm
device and make its data completely be visible to guest
The parameter is false on default
Signed-off-by: Xiao Guangrong
---
hw/acpi/nvdimm.c| 12
hw/mem/nvdimm.c | 43 ---
It describes the basic concepts of NVDIMM ACPI and the interface
between QEMU and the ACPI BIOS
Signed-off-by: Xiao Guangrong
---
docs/specs/acpi_nvdimm.txt | 179 +
1 file changed, 179 insertions(+)
create mode 100644 docs/specs/acpi_nvdimm.txt
ry-backend-file,
id=mem1,size=1G,mem-path=/dev/pmem0 -device nvdimm,memdev=mem1" to
create NVDIMM device for guest
Signed-off-by: Xiao Guangrong
---
default-configs/i386-softmmu.mak | 1 +
default-configs/x86_64-softmmu.mak | 1 +
hw/acpi/memory_hotplug.c | 6 ++
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
region
Signed-off-by: Xiao G
f \
| xargs sed -i "s/PCDIMM/DIMM/g"
find ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \
| xargs sed -i "s/pc_dimm/dimm/g"
find ./ -name "trace-events" -type f | xargs sed -i "s/pc-dimm/dimm/g"
It prepares the
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/dimm.c | 14 --
1 file
nvdimm need 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/dimm.c | 5 +
include/hw
Rename qmp_pc_dimm_device_list.c to qmp_dimm_device_list.c
Signed-off-by: Xiao Guangrong
---
stubs/Makefile.objs | 2 +-
stubs/{qmp_pc_dimm_device_list.c => qmp_dimm_device_list.c} | 0
2 files changed, 1 insertion(+), 1 deletion(-)
rename st
pc_existing_dimms_capacity() can be static since it is not used out of
pc-dimm.c and drop the pc_ prefix to prepare the work which abstracts
dimm device type from pc-dimm
Signed-off-by: Xiao Guangrong
---
hw/mem/pc-dimm.c | 73
include/hw
A base device, dimm, is abstracted from pc-dimm, so that we can
build nvdimm device based on dimm in the later patch
Signed-off-by: Xiao Guangrong
---
default-configs/i386-softmmu.mak | 1 +
default-configs/ppc64-softmmu.mak | 1 +
default-configs/x86_64-softmmu.mak | 1 +
hw/mem
It's not used any more
Signed-off-by: Xiao Guangrong
---
include/hw/mem/pc-dimm.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/hw/mem/pc-dimm.h b/include/hw/mem/pc-dimm.h
index d83bf30..11a8937 100644
--- a/include/hw/mem/pc-dimm.h
+++ b/include/hw/mem/pc-dimm.h
@@ -20,8
- hostmem-file.c is compiled only if CONFIG_LINUX is enabled so that is
unnecessary to do the same check in the source file
- the interface, HostMemoryBackendClass->alloc(), is not called many
times, do not need to check if the memory-region is initialized
Signed-off-by: Xiao Guangr
-by: Xiao Guangrong
---
exec.c | 80 ++
1 file changed, 51 insertions(+), 29 deletions(-)
diff --git a/exec.c b/exec.c
index 3ca7e50..f219010 100644
--- a/exec.c
+++ b/exec.c
@@ -1174,14 +1174,60 @@ void qemu_mutex_unlock_ramlist(void
Rename:
pc-dimm.c => dimm.c
pc-dimm.h => dimm.h
It prepares the work which abstracts dimm device type for both pc-dimm and
nvdimm
Signed-off-by: Xiao Guangrong
---
hw/Makefile.objs | 2 +-
hw/acpi/ich9.c | 2 +-
hw/acpi/memory_hot
It avoid explicit Mutex and will be used by NVDIMM ACPI
Signed-off-by: Xiao Guangrong
---
hw/acpi/aml-build.c | 26 --
include/hw/acpi/aml-build.h | 1 +
2 files changed, 25 insertions(+), 2 deletions(-)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
Currently file_ram_alloc() is designed for hugetlbfs, however, the memory
of nvdimm can come from either raw pmem device eg, /dev/pmem, or the file
locates at DAX enabled filesystem
So this patch let it work on any kind of path
Signed-off-by: Xiao Guangrong
---
exec.c | 56
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 efc06ab..9f792ab
Implement Concatenate term which is used by NVDIMM _DSM method
in later patch
Signed-off-by: Xiao Guangrong
---
hw/acpi/aml-build.c | 14 ++
include/hw/acpi/aml-build.h | 1 +
2 files changed, 15 insertions(+)
diff --git a/hw/acpi/aml-build.c b/hw/acpi/aml-build.c
index
Use the whole file size if @size is not specified which is useful
if we want to directly pass a file to guest
Signed-off-by: Xiao Guangrong
---
backends/hostmem-file.c | 48
1 file changed, 44 insertions(+), 4 deletions(-)
diff --git a/backends
There are three places use the some logic to get the page size on
the file path or file fd
This patch introduces qemu_file_get_page_size() to unify the code
Signed-off-by: Xiao Guangrong
---
include/qemu/osdep.h | 1 +
target-ppc/kvm.c | 21 +++--
util/oslib-posix.c | 16
Implement DeRefOf term which is used by NVDIMM _DSM method in later patch
Reviewed-by: Igor Mammedov
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
//if (nfit_mem->bdw && nfit_mem->memdev_pmem)
+ if (nfit_mem->memdev_pmem)
flags |= NDD_ALIASING;
You can append another NVDIMM device in guest and do:
# cd /sys/bus/nd/devices/
# cd namespace1.0/
# echo `uuidgen` &
Implement SizeOf term which is used by NVDIMM _DSM method in later patch
Reviewed-by: Igor Mammedov
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
501 - 600 of 842 matches
Mail list logo