Re: [Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-10 Thread Dan Williams
On Sat, Oct 10, 2015 at 8:52 PM, Xiao Guangrong wrote: [..] > == Test == > In host > 1) create memory backed file, e.g # dd if=zero of=/tmp/nvdimm bs=1G count=10 > 2) append "-object memory-backend-file,share,id=mem1, >mem-path=/tmp/nvdimm -device nvdimm,memdev=mem1,reserve-label-data,

Re: [Qemu-devel] [PATCH 1/2] tests: Add ivshmem qtest

2015-10-10 Thread Marc-André Lureau
Hi Andreas, Thanks for the patches. I suppose I should insert it in my ivshmem series, since the second patch requires it. On Sun, Oct 11, 2015 at 12:18 AM, Andreas Färber wrote: > + * QTest testcase for Nahanni I think nahanni is an archaic codename (not used in qemu code), ivshmem is really m

Re: [Qemu-devel] [PATCH 2/2] ivshmem-test: Implement tests

2015-10-10 Thread Andreas Färber
Am 11.10.2015 um 00:18 schrieb Andreas Färber: > diff --git a/tests/Makefile b/tests/Makefile > index 3b7e6ac..324829b 100644 > --- a/tests/Makefile > +++ b/tests/Makefile > @@ -146,6 +146,8 @@ gcov-files-pci-y += hw/display/virtio-gpu-pci.c > gcov-files-pci-$(CONFIG_VIRTIO_VGA) += hw/display/virt

[Qemu-devel] [PATCH 1/2] tests: Add ivshmem qtest

2015-10-10 Thread Andreas Färber
Note that it launches two instances, as sharing memory is the purpose of Nahanni/ivshmem. Cc: Cam Macdonell Cc: Marc-André Lureau Signed-off-by: Andreas Färber --- tests/Makefile | 3 +++ tests/ivshmem-test.c | 51 +++ 2 files changed, 54

[Qemu-devel] [PATCH 2/2] ivshmem-test: Implement tests

2015-10-10 Thread Andreas Färber
From: Marc-André Lureau Add 4 ivshmem tests: - single qemu instance and basic IO - pair of instances, check memory sharing - pair of instances with server, and MSIX - hot plug/unplug A temporary shm is created as well as a directory to place server socket, both should be clear on exit and abort.

Re: [Qemu-devel] [PULL 41/48] tests: add ivshmem qtest

2015-10-10 Thread Michael Roth
Quoting marcandre.lur...@redhat.com (2015-10-06 14:19:37) > From: Marc-André Lureau > > Adds 4 ivshmemtests: > - single qemu instance and basic IO > - pair of instances, check memory sharing > - pair of instances with server, and MSIX > - hot plug/unplug > > A temporary shm is created as well as

[Qemu-devel] Arm virtual machine networking problem with build for 64bit host

2015-10-10 Thread mar.krzeminski
Hello, I have my own virtual machine (already asked some questions about that here). I also have my own gmac model. I am building qemu (version 2.4.0.1) for 32 and 64 linux hosts. The problem is with 64 bit binary. If I run as guest under qemu linux, I could not even ping my machine. In 32 bit

[Qemu-devel] [PATCH v3 31/32] nvdimm: allow using whole backend memory as pmem

2015-10-10 Thread Xiao Guangrong
Introduce a parameter, named "reserve-label-data", which indicates that QEMU does not reserve any region on the backend memory to support label data, instead, it will build a readonly label data in memory which has a active namespace containing whole backend memory This is useful for the users who

Re: [Qemu-devel] [PATCH v7 05/14] qapi: Lazy creation of array types

2015-10-10 Thread Eric Blake
On 10/07/2015 10:38 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Commit ac88219a had several TODO markers about whether we needed >> to automatically create the corresponding array type alongside >> any other type. It turns out that most of the time, we don't! >> >> +def _make_sim

[Qemu-devel] [PATCH v3 29/32] nvdimm: support DSM_CMD_GET_NAMESPACE_LABEL_DATA

2015-10-10 Thread Xiao Guangrong
Function 5 is used to get Namespace Label Data Signed-off-by: Xiao Guangrong --- hw/mem/nvdimm/acpi.c | 33 + 1 file changed, 33 insertions(+) diff --git a/hw/mem/nvdimm/acpi.c b/hw/mem/nvdimm/acpi.c index b420e2f..e0a37cb 100644 --- a/hw/mem/nvdimm/acpi.c +++ b/

[Qemu-devel] [PATCH v3 26/32] nvdimm: save arg3 for NVDIMM device _DSM method

2015-10-10 Thread Xiao Guangrong
Check if the input Arg3 is valid then store it into dsm_in if needed We only do the save on NVDIMM device since we are not going to support any function on root device Signed-off-by: Xiao Guangrong --- hw/mem/nvdimm/acpi.c | 21 - 1 file changed, 20 insertions(+), 1 deletion

[Qemu-devel] [PATCH v3 25/32] nvdimm: build ACPI nvdimm devices

2015-10-10 Thread Xiao Guangrong
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 returns its handle used to associate MEMDEV structure in NFIT We reserve handle 0 for root device. In this patch, w

[Qemu-devel] [PATCH v3 23/32] nvdimm: build ACPI NFIT table

2015-10-10 Thread Xiao Guangrong
NFIT is defined in ACPI 6.0: 5.2.25 NVDIMM Firmware Interface Table (NFIT) Currently, we only support PMEM mode. Each device has 3 structures: - SPA structure, defines the PMEM region info - MEM DEV structure, it has the @handle which is used to associate specified ACPI NVDIMM device we will i

[Qemu-devel] [PATCH v3 24/32] nvdimm: init the address region used by DSM method

2015-10-10 Thread Xiao Guangrong
Map the NVDIMM ACPI memory region to guest address space Signed-off-by: Xiao Guangrong --- hw/mem/nvdimm/acpi.c | 75 hw/mem/nvdimm/internal.h | 8 ++ 2 files changed, 78 insertions(+), 5 deletions(-) diff --git a/hw/mem/nvdimm/acpi.c b/

[Qemu-devel] [PATCH v3 16/32] pc-dimm: rename pc-dimm.c and pc-dimm.h

2015-10-10 Thread Xiao Guangrong
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_hotplug.c

[Qemu-devel] [PATCH v3 32/32] nvdimm: add maintain info

2015-10-10 Thread Xiao Guangrong
Add NVDIMM maintainer Signed-off-by: Xiao Guangrong --- MAINTAINERS | 6 ++ 1 file changed, 6 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 9bde832..204d82a 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -868,6 +868,12 @@ M: Jiri Pirko S: Maintained F: hw/net/rocker/ +NVDIM

[Qemu-devel] [PATCH v3 20/32] dimm: introduce realize callback

2015-10-10 Thread Xiao Guangrong
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/mem

[Qemu-devel] [PATCH v3 14/32] pc-dimm: drop the prefix of pc-dimm

2015-10-10 Thread Xiao Guangrong
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 ./ -name "*.[ch]" -o -name "*.json" -o -name "trace-events" -type f \ | xargs sed -i "s/PCDIMM/DIMM/g" find ./ -name "*.[ch]" -o -name "*.json

[Qemu-devel] [PATCH v3 30/32] nvdimm: support DSM_CMD_SET_NAMESPACE_LABEL_DATA

2015-10-10 Thread Xiao Guangrong
Function 6 is used to set Namespace Label Data Signed-off-by: Xiao Guangrong --- hw/mem/nvdimm/acpi.c | 36 1 file changed, 36 insertions(+) diff --git a/hw/mem/nvdimm/acpi.c b/hw/mem/nvdimm/acpi.c index e0a37cb..6f05b37 100644 --- a/hw/mem/nvdimm/acpi.c +++

[Qemu-devel] [PATCH v3 19/32] dimm: keep the state of the whole backend memory

2015-10-10 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/dimm.c | 14 -- 1 file c

[Qemu-devel] [PATCH v3 15/32] stubs: rename qmp_pc_dimm_device_list.c

2015-10-10 Thread Xiao Guangrong
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 stubs/{qmp_pc_d

[Qemu-devel] [PATCH v3 28/32] nvdimm: support DSM_CMD_NAMESPACE_LABEL_SIZE function

2015-10-10 Thread Xiao Guangrong
Function 4 is used to get Namespace label size Signed-off-by: Xiao Guangrong --- hw/mem/nvdimm/acpi.c | 90 +--- 1 file changed, 86 insertions(+), 4 deletions(-) diff --git a/hw/mem/nvdimm/acpi.c b/hw/mem/nvdimm/acpi.c index cb6a428..b420e2f 10064

[Qemu-devel] [PATCH v3 18/32] dimm: get mapped memory region from DIMMDeviceClass->get_memory_region

2015-10-10 Thread Xiao Guangrong
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 Guangrong --- hw

[Qemu-devel] [PATCH v3 27/32] nvdimm: support DSM_CMD_IMPLEMENTED function

2015-10-10 Thread Xiao Guangrong
__DSM is defined in ACPI 6.0: 9.14.1 _DSM (Device Specific Method) Function 0 is a query function. We do not support any function on root device and only 3 functions are support for NVDIMM device, DSM_CMD_NAMESPACE_LABEL_SIZE, DSM_CMD_GET_NAMESPACE_LABEL_DATA and DSM_CMD_SET_NAMESPACE_LABEL_DATA,

[Qemu-devel] [PATCH v3 13/32] pc-dimm: make pc_existing_dimms_capacity static and rename it

2015-10-10 Thread Xiao Guangrong
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/

[Qemu-devel] [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

[Qemu-devel] [PATCH v3 11/32] hostmem-file: use whole file size if possible

2015-10-10 Thread Xiao Guangrong
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 | 47 +++ 1 file changed, 43 insertions(+), 4 deletions(-) diff --git a/backends/ho

[Qemu-devel] [PATCH v3 10/32] hostmem-file: clean up memory allocation

2015-10-10 Thread Xiao Guangrong
- 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 Guangrong ---

[Qemu-devel] [PATCH v3 12/32] pc-dimm: remove DEFAULT_PC_DIMMSIZE

2015-10-10 Thread Xiao Guangrong
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 c1ee7b0..15590f1 100644 --- a/include/hw/mem/pc-dimm.h +++ b/include/hw/mem/pc-dimm.h @@ -20,8 +20,6 @@

[Qemu-devel] [PATCH v3 21/32] nvdimm: implement NVDIMM device abstract

2015-10-10 Thread Xiao Guangrong
Introduce "nvdimm" device which is based on dimm device type 128K memory region which is the minimum namespace label size required by NVDIMM Namespace Spec locates at the end of backend memory device is reserved for label data We can use "-m 1G,maxmem=100G,slots=10 -object memory-backend-file, id

[Qemu-devel] [PATCH v3 09/32] exec: allow file_ram_alloc to work on file

2015-10-10 Thread Xiao Guangrong
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, otherwise it treats @path as the target file then directly allocate memory from it Signed-off-by

[Qemu-devel] [PATCH v3 06/32] acpi: add aml_object_type

2015-10-10 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 d3b071f..c5639b5 1

[Qemu-devel] [PATCH v3 05/32] acpi: add aml_concatenate

2015-10-10 Thread Xiao Guangrong
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 ab5

[Qemu-devel] [PATCH v3 17/32] dimm: abstract dimm device from pc-dimm

2015-10-10 Thread Xiao Guangrong
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/x86_64-softmmu.mak | 1 + hw/mem/Makefile.objs | 3 ++- hw/mem/dimm.c

[Qemu-devel] [PATCH v3 07/32] util: introduce qemu_file_get_page_size()

2015-10-10 Thread Xiao Guangrong
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

[Qemu-devel] [PATCH v3 04/32] acpi: add aml_mutex, aml_acquire, aml_release

2015-10-10 Thread Xiao Guangrong
Implement Mutex, Acquire and Release terms which are used by NVDIMM _DSM method in later patch Signed-off-by: Xiao Guangrong --- hw/acpi/aml-build.c | 32 include/hw/acpi/aml-build.h | 3 +++ 2 files changed, 35 insertions(+) diff --git a/hw/acpi/aml-bu

[Qemu-devel] [PATCH v3 00/32] implement vNVDIMM

2015-10-10 Thread Xiao Guangrong
Changelog in v3: There is huge change in this version, thank Igor, Stefan, Paolo, Eduardo, Michael for their valuable comments, the patchset finally gets better shape. - changes from Igor's comments: 1) abstract dimm device type from pc-dimm and create nvdimm device based on dimm, then it us

[Qemu-devel] [PATCH v3 08/32] exec: allow memory to be allocated from any kind of path

2015-10-10 Thread Xiao Guangrong
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 | 55 ++---

[Qemu-devel] [PATCH v3 03/32] acpi: add aml_create_field

2015-10-10 Thread Xiao Guangrong
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 a722

[Qemu-devel] [PATCH v3 01/32] acpi: add aml_derefof

2015-10-10 Thread Xiao Guangrong
Implement DeRefOf term 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 0d4b324..cbd53f4

[Qemu-devel] [PATCH v3 02/32] acpi: add aml_sizeof

2015-10-10 Thread Xiao Guangrong
Implement SizeOf term 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 cbd53f4..a72214d

[Qemu-devel] [PATCH v2] armv7-m: exit on external reset request

2015-10-10 Thread Michael Davidsaver
Implement the SYSRESETREQ bit of the AIRCR register for armv7-m (ie. cortex-m3) to trigger a GPIO out. Change armv7m_init to return the DeviceState* for the NVIC. This allows access to all GPIO blocks, not just the IRQ inputs. Move qdev_get_gpio_in() calls out of armv7m_init() into board code for

Re: [Qemu-devel] [PATCH] target-tilegx: Let prefetch nop instructions return before allocating dest temporary register

2015-10-10 Thread Chen Gang
Hello all: It looks I have to spend quite a few free time resources on tilegx gcc testsuite issues, next (may 2-3 months at least, I guess). So for tilegx qemu, I guess, I need to start to implement the floating point, at present. I shall try to finish within this month (although it seems not qui

Re: [Qemu-devel] [PATCH] armv7-m: exit on external reset request

2015-10-10 Thread Michael Davidsaver
On 10/09/2015 02:51 PM, Michael Davidsaver wrote: > On 10/09/2015 02:18 PM, Peter Crosthwaite wrote: >> On Fri, Oct 9, 2015 at 10:25 AM, Michael Davidsaver >> wrote: >>> >>> >>> On 10/09/2015 12:59 PM, Peter Maydell wrote: On 8 October 2015 at 16:40, Michael Davidsaver wrote: > .

[Qemu-devel] [PATCH v6 1/1] block/gluster: add support for multiple gluster backup volfile servers

2015-10-10 Thread Prasanna Kumar Kalever
This patch adds a way to specify multiple volfile servers to the gluster block backend of QEMU with tcp|rdma transport types and their port numbers. Problem: Currenly VM Image on gluster volume is specified like this: file=gluster[+tcp]://host[:port]/testvol/a.img Assuming we have three hosts i

[Qemu-devel] [Bug 1504513] Re: Socket leak on each call to qemu_socket()

2015-10-10 Thread Mark Pizzolato
I'm not sure that my original report was distributed to the folks who need to see this. My primary email address has a DKIM policy (DMARC) which says that all messages from my address are signed. I received various DMARC reports which said that the bug report sent as "From: m...@mydomain.com" wer

[Qemu-devel] Quick question on NVME on qemu

2015-10-10 Thread sahlot arvind
Hello, Does qemu emulate a proper NVMe controller? Can someone please tell me how can I use it to emulate a proper NVMe controller? Is there some way to enable logging PCI accesses to NVMe controller so that I can see what accesses my driver or OS is doing? Thanks in advance! Sahlot

[Qemu-devel] [Bug 1357226] Re: qemu: uncaught target signal 11 (Segmentation fault) - core dumped

2015-10-10 Thread Brett Weir
I'm running into this same problem, and it's making automation of Raspberry Pi builds of my application difficult. I'm running in a chroot environment: 3.19.0-25-generic #26~14.04.1-Ubuntu SMP Fri Jul 24 21:16:20 UTC 2015 armv7l GNU/Linux Package: qemu Version: 1.1.2+dfsg-6a+deb7u11 -- You rec

Re: [Qemu-devel] [PATCH v4 2/3] pci: Update pci_regs header

2015-10-10 Thread Knut Omang
On Wed, 2015-10-07 at 16:32 +0300, Marcel Apfelbaum wrote: > On 09/12/2015 03:36 PM, Knut Omang wrote: > > Merge in new definitions from kernel v4.2 > > Adds definition necessary to support emulated SR/IOV. > > In the meantime Paolo updated this header to 4.3-RC1, is this patch > still needed? >

Re: [Qemu-devel] [PATCH COLO-Frame v9 04/32] migration: Add state records for migration incoming

2015-10-10 Thread zhanghailiang
On 2015/10/10 0:18, Dr. David Alan Gilbert wrote: * zhanghailiang (zhang.zhanghaili...@huawei.com) wrote: For migration destination, we also need to know its state, we will use it in COLO. Here we add a new member 'state' for MigrationIncomingState, and also use migrate_set_state() to modify it