Re: [PATCH] arm/arm64: KVM : Enable vhost device selection under KVM config menu

2015-10-10 Thread Christoffer Dall
On Fri, Oct 09, 2015 at 10:08:43AM -0500, Wei Huang wrote: > vhost drivers provide guest VMs with better I/O performance and lower > CPU utilization. This patch allows users to select vhost devices under > KVM configuration menu on ARM. This makes vhost support on arm/arm64 > on a par with other

[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(-)

[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

[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 +-

[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

[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,

[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

[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

[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 ---

[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

[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

[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,

[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

[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

[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

[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,

[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

[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

[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

[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

[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

Re: [PATCH v2] KVM: arm/arm64: BUG FIX: Do not inject spurious interrupts

2015-10-10 Thread Christoffer Dall
On Fri, Oct 09, 2015 at 05:41:11PM +0300, Pavel Fedin wrote: > Hello! > > > I reworked the commit message and applied this patch. > > During testing i discovered a problem with this patch and vITS series by > Andre. > The problem is that compute_pending_for_cpu() does not know anything about

Ongoing maintainance

2015-10-10 Thread Help desk
Hello, This message contains urgent information regarding your access to E-mail network systems. The password for your network account has been tempered with and must be checked. Your network account password controls access to various systems and services such as email. To avoid any

Re: [PATCH v3 00/16] KVM: arm64: GICv3 ITS emulation

2015-10-10 Thread Christoffer Dall
Hi Andre, On Wed, Oct 07, 2015 at 03:55:10PM +0100, Andre Przywara wrote: > Hi, > > another respin and rebase of the ITS emulation series. > Major changes compared to v2 (beside some minor things like added > comments and function renames) are the rebasing and adaption to 4.3-rc > and

[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 ---

[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

[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

[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

[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

[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

[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

[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

[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 +++

[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

[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

[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

[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

Re: [PATCH 13/15] arm64: kvm: Rewrite fake pgd handling

2015-10-10 Thread Christoffer Dall
Hi Suzuki, On Tue, Sep 15, 2015 at 04:41:22PM +0100, Suzuki K. Poulose wrote: > From: "Suzuki K. Poulose" > > The existing fake pgd handling code assumes that the stage-2 entry > level can only be one level down that of the host, which may not be > true always(e.g, with

Re: [PATCH 11/15] arm64: Cleanup VTCR_EL2 computation

2015-10-10 Thread Christoffer Dall
On Tue, Sep 15, 2015 at 04:41:20PM +0100, Suzuki K. Poulose wrote: > From: "Suzuki K. Poulose" > > No functional changes. Group the common bits for VCTR_EL2 > initialisation for better readability. The granule size > and the entry level are controlled by the page size. >

Re: [PATCH 12/15] arm: kvm: Move fake PGD handling to arch specific files

2015-10-10 Thread Christoffer Dall
On Wed, Oct 07, 2015 at 11:23:52AM +0100, Marc Zyngier wrote: > On 15/09/15 16:41, Suzuki K. Poulose wrote: > > From: "Suzuki K. Poulose" > > > > Rearrange the code for fake pgd handling, which is applicable > > to only ARM64. The intention is to keep the common code

Re: [PATCH 09/15] arm64: Add page size to the kernel image header

2015-10-10 Thread Christoffer Dall
On Tue, Sep 15, 2015 at 04:41:18PM +0100, Suzuki K. Poulose wrote: > From: Ard Biesheuvel > > This patch adds the page size to the arm64 kernel image header > so that one can infer the PAGESIZE used by the kernel. This will > be helpful to diagnose failures to boot the

Re: [edk2] KVM: MTRR: fix memory type handling if MTRR is completely disabled

2015-10-10 Thread Xiao Guangrong
On 10/02/2015 10:38 PM, Janusz wrote: W dniu 01.10.2015 o 16:18, Paolo Bonzini pisze: On 01/10/2015 16:12, Janusz wrote: Now, I can also add, that the problem is only when I allow VM to use more than one core, so with option for example: -smp 8,cores=4,threads=2,sockets=1 and other

Re: [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

Good Day

2015-10-10 Thread mw7
I need your help for this transaction Regards, Mr. LEUNG Cheung -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

[PATCH] KVM: VMX: enable LBR virtualization

2015-10-10 Thread Jian Zhou
Using vmx msr store/load mechanism and msr intercept bitmap to implement LBR virtualization. Signed-off-by: Jian Zhou Signed-off-by: Stephen He diff --git a/arch/x86/include/asm/kvm_host.h b/arch/x86/include/asm/kvm_host.h index