Re: [Qemu-devel] [PATCH v7 for 2.0 3/4] raw-posix: Add full image preallocation option

2014-03-27 Thread hu...@cn.fujitsu.com
On Thu, Mar 20, 2014 at 02:22:19PM +0100, Kevin Wolf wrote: > Am 17.03.2014 um 07:53 hat Hu Tao geschrieben: > > This patch adds a new option preallocation for raw format, and implements > > full preallocation. > > > > Signed-off-by: Hu Tao > > --- > > block/raw-posix.c | 43

[Qemu-devel] [PATCH v3 33/34] qmp: add query-memdev

2014-03-26 Thread hu...@cn.fujitsu.com
Add qmp command query-memdev to query for information of memory devices Signed-off-by: Hu Tao --- numa.c | 72 qapi-schema.json | 34 ++ qmp-commands.hx | 32 + 3 files changed, 13

[Qemu-devel] [PATCH v3 17/34] memory: move mem_path handling to memory_region_allocate_system_memory

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Like the previous patch did in exec.c, split memory_region_init_ram and memory_region_init_ram_from_file, and push mem_path one step further up. Other RAM regions than system memory will now be backed by regular RAM. Also, boards that do not use memory_region_allocate_system_

[Qemu-devel] [PATCH v3 27/34] hostmem: add properties for NUMA memory policy

2014-03-26 Thread hu...@cn.fujitsu.com
Signed-off-by: Hu Tao [Raise errors on setting properties if !CONFIG_NUMA. Add BUILD_BUG_ON checks. - Paolo] Signed-off-by: Paolo Bonzini --- backends/hostmem.c | 109 ++- include/sysemu/hostmem.h | 4 ++ qapi-schema.json | 20 ++

[Qemu-devel] [PATCH v3 07/34] qemu-option: introduce qemu_find_opts_singleton

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Reviewed-by: Laszlo Ersek Reviewed-by: Andreas Faerber Signed-off-by: Paolo Bonzini --- include/qemu/config-file.h | 2 ++ util/qemu-config.c | 14 ++ vl.c | 11 +-- 3 files changed, 17 insertions(+), 10 deletions(-) diff

[Qemu-devel] [PATCH v3 13/34] numa: introduce memory_region_allocate_system_memory

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Signed-off-by: Paolo Bonzini Signed-off-by: Hu Tao --- hw/i386/pc.c| 4 +--- include/hw/boards.h | 6 +- include/sysemu/sysemu.h | 1 + numa.c | 9 + 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/hw/i386/pc.c b/

[Qemu-devel] [PATCH v3 30/34] qapi: make string input visitor parse int list

2014-03-26 Thread hu...@cn.fujitsu.com
Signed-off-by: Hu Tao --- qapi/string-input-visitor.c | 158 -- tests/test-string-input-visitor.c | 34 2 files changed, 184 insertions(+), 8 deletions(-) diff --git a/qapi/string-input-visitor.c b/qapi/string-input-visitor.c index 793548a..ab9

[Qemu-devel] [PATCH v3 04/34] NUMA: convert -numa option to use OptsVisitor

2014-03-26 Thread hu...@cn.fujitsu.com
From: Wanlong Gao Signed-off-by: Wanlong Gao Signed-off-by: Igor Mammedov Tested-by: Eduardo Habkost Reviewed-by: Eduardo Habkost Signed-off-by: Paolo Bonzini --- include/sysemu/sysemu.h | 3 +- numa.c | 145 +++- qapi-schema.js

[Qemu-devel] [PATCH v3 10/34] qmp: allow object-add completion handler to get canonical path

2014-03-26 Thread hu...@cn.fujitsu.com
From: Igor Mammedov Add object to /objects before calling user_creatable_complete() handler, so that object might be able to call object_get_canonical_path() in its completion handler. Signed-off-by: Igor Mammedov Signed-off-by: Paolo Bonzini --- qmp.c | 8 +--- 1 file changed, 5 insertio

[Qemu-devel] [PATCH v3 18/34] memory: add error propagation to file-based RAM allocation

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Right now, -mem-path will fall back to RAM-based allocation in some cases. This should never happen with "-object memory-file", prepare the code by adding correct error propagation. Signed-off-by: Paolo Bonzini --- exec.c | 36 -

[Qemu-devel] [PATCH v3 16/34] memory: reorganize file-based allocation

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Split the internal interface in exec.c to a separate function, and push the check on mem_path up to memory_region_init_ram. Signed-off-by: Paolo Bonzini --- exec.c | 105 +--- include/exec/cpu-all.h | 3 -- inc

[Qemu-devel] [PATCH v3 28/34] hw: switch all boards to use memory_region_allocate_system_memory

2014-03-26 Thread hu...@cn.fujitsu.com
Signed-off-by: Hu Tao --- hw/alpha/typhoon.c | 4 ++-- hw/arm/cubieboard.c | 5 +++-- hw/arm/digic_boards.c| 3 +-- hw/arm/exynos4210.c | 18 +-- hw/arm/highbank.c| 3 ++- h

[Qemu-devel] [PATCH v3 00/34] NUMA series v3

2014-03-26 Thread hu...@cn.fujitsu.com
changes to v2.1: - switch all boards to memory_region_allocate_system_memory - make string input/output visitor parse int list - add hmp info memdev - tweaks to get pass of checkpatch.pl. You can search `Current state of NUMA series, and hostmem improvements' for the link of v2.1. Sorry f

[Qemu-devel] [PATCH v3 06/34] man: improve -numa doc

2014-03-26 Thread hu...@cn.fujitsu.com
From: Luiz Capitulino The -numa option documentation in qemu's manpage lacks the command-line options and some information regarding how it relates to options -m and -smp. This commit fills in the missing text. Signed-off-by: Luiz Capitulino Signed-off-by: Paolo Bonzini --- qemu-options.hx |

[Qemu-devel] [PATCH v3 05/34] NUMA: expand MAX_NODES from 64 to 128

2014-03-26 Thread hu...@cn.fujitsu.com
From: Wanlong Gao libnuma choosed 128 for MAX_NODES, so we follow libnuma here. Signed-off-by: Wanlong Gao Reviewed-by: Eduardo Habkost Signed-off-by: Paolo Bonzini --- include/sysemu/sysemu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/sysemu/sysemu.h b/inclu

[Qemu-devel] [PATCH v3 11/34] qmp: improve error reporting for -object and object-add

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Use QERR_INVALID_PARAMETER_VALUE for consistency. Signed-off-by: Paolo Bonzini --- qmp.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qmp.c b/qmp.c index 54b95ba..440f3ab 100644 --- a/qmp.c +++ b/qmp.c @@ -544,7 +544,8 @@ void object_add(const char

[Qemu-devel] [PATCH v3 29/34] Introduce signed range.

2014-03-26 Thread hu...@cn.fujitsu.com
Signed-off-by: Hu Tao --- include/qemu/range.h | 119 +++ 1 file changed, 119 insertions(+) diff --git a/include/qemu/range.h b/include/qemu/range.h index aae9720..d2dd49d 100644 --- a/include/qemu/range.h +++ b/include/qemu/range.h @@ -3,6 +3,7 @@

[Qemu-devel] [PATCH v3 19/34] memory: move preallocation code out of exec.c

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini So that backends can use it. Signed-off-by: Paolo Bonzini --- exec.c | 44 +-- include/qemu/osdep.h | 2 ++ util/oslib-posix.c | 73 3 files changed, 76 insertions(+), 43 delet

[Qemu-devel] [PATCH v3 31/34] qapi: make string output visitor parse int list

2014-03-26 Thread hu...@cn.fujitsu.com
Signed-off-by: Hu Tao --- qapi/string-output-visitor.c | 236 +++-- tests/test-string-output-visitor.c | 35 ++ 2 files changed, 260 insertions(+), 11 deletions(-) diff --git a/qapi/string-output-visitor.c b/qapi/string-output-visitor.c index fb1d2e8..e

[Qemu-devel] [PATCH v3 34/34] hmp: add info memdev

2014-03-26 Thread hu...@cn.fujitsu.com
This is the hmp counterpart of qmp query-memdev. Signed-off-by: Hu Tao --- hmp.c | 36 hmp.h | 1 + monitor.c | 7 +++ 3 files changed, 44 insertions(+) diff --git a/hmp.c b/hmp.c index 2f279c4..b500856 100644 --- a/hmp.c +++ b/hmp.c @@ -22,6 +

[Qemu-devel] [PATCH v3 23/34] hostmem: add merge and dump properties

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Signed-off-by: Paolo Bonzini --- backends/hostmem.c | 85 +++- include/qemu/osdep.h | 10 ++ include/sysemu/hostmem.h | 1 + 3 files changed, 95 insertions(+), 1 deletion(-) diff --git a/backends/hostmem.c b/backend

[Qemu-devel] [PATCH v3 24/34] hostmem: allow preallocation of any memory region

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini And allow preallocation of file-based memory even without -mem-prealloc. Some care is necessary because -mem-prealloc does not allow disabling preallocation for hostmem-file. Signed-off-by: Paolo Bonzini --- backends/hostmem-file.c | 3 +++ backends/hostmem.c | 42 +

[Qemu-devel] [PATCH v3 26/34] configure: add Linux libnuma detection

2014-03-26 Thread hu...@cn.fujitsu.com
From: Wanlong Gao Add detection of libnuma (mostly contained in the numactl package) to the configure script. Can be enabled or disabled on the command line, default is use if available. Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao Signed-off-by: Paolo Bonzini --- configure | 33

[Qemu-devel] [PATCH v3 22/34] hostmem: separate allocation from UserCreatable complete method

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini This allows the superclass to set various policies on the memory region that the subclass creates. Signed-off-by: Paolo Bonzini --- backends/hostmem-file.c | 9 - backends/hostmem-ram.c | 8 +++- backends/hostmem.c | 12 ++-- include/sysemu/ho

[Qemu-devel] [PATCH v3 01/34] NUMA: move numa related code to new file numa.c

2014-03-26 Thread hu...@cn.fujitsu.com
From: Wanlong Gao Signed-off-by: Wanlong Gao Reviewed-by: Eduardo Habkost Signed-off-by: Paolo Bonzini --- Makefile.target | 2 +- cpus.c| 14 include/exec/cpu-all.h| 2 - include/exec/cpu-common.h | 2 + include/sysemu/cpus.h | 1 - include

[Qemu-devel] [PATCH v3 32/34] qom: introduce object_property_get_enum and object_property_get_uint16List

2014-03-26 Thread hu...@cn.fujitsu.com
Signed-off-by: Hu Tao --- include/qom/object.h | 18 ++ qom/object.c | 35 +++ 2 files changed, 53 insertions(+) diff --git a/include/qom/object.h b/include/qom/object.h index a641dcd..2e488f1 100644 --- a/include/qom/object.h +++ b/include

[Qemu-devel] [PATCH v3 25/34] hostmem: add property to map memory with MAP_SHARED

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini A new "share" property can be used with the "memory-file" backend to map memory with MAP_SHARED instead of MAP_PRIVATE. Signed-off-by: Paolo Bonzini --- backends/hostmem-file.c | 26 +- exec.c | 18 ++ include/exec/me

[Qemu-devel] [PATCH v3 21/34] hostmem: add file-based HostMemoryBackend

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Signed-off-by: Paolo Bonzini --- backends/Makefile.objs | 1 + backends/hostmem-file.c | 108 2 files changed, 109 insertions(+) create mode 100644 backends/hostmem-file.c diff --git a/backends/Makefile.objs b/backends/Ma

[Qemu-devel] [PATCH v3 20/34] memory: move RAM_PREALLOC_MASK to exec.c, rename

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Prepare for adding more flags. The "_MASK" suffix is unique, kill it. Signed-off-by: Paolo Bonzini --- exec.c | 9 ++--- include/exec/cpu-all.h | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/exec.c b/exec.c index 710e025..691d21

[Qemu-devel] [PATCH v3 09/34] vl: redo -object parsing

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Follow the lines of the HMP implementation, using OptsVisitor to parse the options. This gives access to OptsVisitor's rich parsing of integer lists. Signed-off-by: Paolo Bonzini --- vl.c | 87 +++- 1 file cha

[Qemu-devel] [PATCH v3 14/34] add memdev backend infrastructure

2014-03-26 Thread hu...@cn.fujitsu.com
From: Igor Mammedov Provides framework for splitting host RAM allocation/ policies into a separate backend that could be used by devices. Initially only legacy RAM backend is provided, which uses memory_region_init_ram() allocator and compatible with every CLI option that affects memory_region_i

[Qemu-devel] [PATCH v3 08/34] vl: convert -m to QemuOpts

2014-03-26 Thread hu...@cn.fujitsu.com
From: Igor Mammedov Adds option to -m "size" - startup memory amount For compatibility with legacy CLI if suffix-less number is passed, it assumes amount in Mb. Otherwise user is free to use suffixed number using suffixes b,k/K,M,G Signed-off-by: Igor Mammedov Signed-off-by: Paolo Bonzini R

[Qemu-devel] [PATCH v3 12/34] pc: pass QEMUMachineInitArgs to pc_memory_init

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini Signed-off-by: Paolo Bonzini --- hw/i386/pc.c | 11 +-- hw/i386/pc_piix.c| 8 +++- hw/i386/pc_q35.c | 4 +--- include/hw/i386/pc.h | 7 +++ 4 files changed, 12 insertions(+), 18 deletions(-) diff --git a/hw/i386/pc.c b/hw/i386/pc.c index 2

[Qemu-devel] [PATCH v3 15/34] numa: add -numa node,memdev= option

2014-03-26 Thread hu...@cn.fujitsu.com
From: Paolo Bonzini This option provides the infrastructure for binding guest NUMA nodes to host NUMA nodes. For example: -object memory-ram,size=1024M,policy=bind,host-nodes=0,id=ram-node0 \ -numa node,nodeid=0,cpus=0,memdev=ram-node0 \ -object memory-ram,size=1024M,policy=interleave,host-n

[Qemu-devel] [PATCH v3 02/34] NUMA: check if the total numa memory size is equal to ram_size

2014-03-26 Thread hu...@cn.fujitsu.com
From: Wanlong Gao If the total number of the assigned numa nodes memory is not equal to the assigned ram size, it will write the wrong data to ACPI table, then the guest will ignore the wrong ACPI table and recognize all memory to one node. It's buggy, we should check it to ensure that we write t

[Qemu-devel] [PATCH v3 03/34] NUMA: Add numa_info structure to contain numa nodes info

2014-03-26 Thread hu...@cn.fujitsu.com
From: Wanlong Gao Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Reviewed-by: Eduardo Habkost Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao [Fix hw/ppc/spapr.c - Paolo] Signed-off-by: Paolo Bonzi