Re: [Qemu-devel] [PATCH] block: add 'backing' option to drive_add

2013-06-18 Thread Fam Zheng
On Tue, 06/18 08:37, Markus Armbruster wrote: > Fam Zheng writes: > > > On Mon, 06/17 17:12, Kevin Wolf wrote: > >> Am 17.06.2013 um 16:46 hat Paolo Bonzini geschrieben: > >> > Il 17/06/2013 16:26, Kevin Wolf ha scritto: > >> > > Am 17.06.2013 um 16:01 hat Paolo Bonzini geschrieben: > >> > >> Il

Re: [Qemu-devel] [PATCH] block: add 'backing' option to drive_add

2013-06-18 Thread Fam Zheng
On Tue, 06/18 08:32, Kevin Wolf wrote: > Am 18.06.2013 um 05:58 hat Fam Zheng geschrieben: > > On Mon, 06/17 17:12, Kevin Wolf wrote: > > > Am 17.06.2013 um 16:46 hat Paolo Bonzini geschrieben: > > > > Il 17/06/2013 16:26, Kevin Wolf ha scritto: > > > > > Am 17.06.2013 um 16:01 hat Paolo Bonzini ge

Re: [Qemu-devel] [PATCH] block: add 'backing' option to drive_add

2013-06-18 Thread Kevin Wolf
Am 18.06.2013 um 09:00 hat Fam Zheng geschrieben: > On Tue, 06/18 08:32, Kevin Wolf wrote: > > Am 18.06.2013 um 05:58 hat Fam Zheng geschrieben: > > > On Mon, 06/17 17:12, Kevin Wolf wrote: > > > > Am 17.06.2013 um 16:46 hat Paolo Bonzini geschrieben: > > > > > Il 17/06/2013 16:26, Kevin Wolf ha sc

Re: [Qemu-devel] [PATCH v2 0/5] Xilinx Intc Fixes

2013-06-18 Thread Edgar E. Iglesias
On Tue, Jun 11, 2013 at 10:56:55AM +1000, peter.crosthwa...@xilinx.com wrote: > From: Peter Crosthwaite > > > Various fixups to the Xilinx Interrupt controller following a review > against TRM and RTL descriptions. > > Tested as working for microblaze and microblazeel Linux. > > change from v1

[Qemu-devel] [PATCH] acl: acl_add can't insert before last list element, fix

2013-06-18 Thread Markus Armbruster
Watch this: $ upstream-qemu -nodefaults -S -vnc :0,acl,sasl -monitor stdio QEMU 1.5.50 monitor - type 'help' for more information (qemu) acl_add vnc.username drei allow acl: added rule at position 1 (qemu) acl_show vnc.username policy: deny 1: allow drei (qemu) acl_

Re: [Qemu-devel] [PATCH] block: add 'backing' option to drive_add

2013-06-18 Thread Fam Zheng
On Tue, 06/18 09:51, Kevin Wolf wrote: > Am 18.06.2013 um 09:00 hat Fam Zheng geschrieben: > > On Tue, 06/18 08:32, Kevin Wolf wrote: > > > Am 18.06.2013 um 05:58 hat Fam Zheng geschrieben: > > > > On Mon, 06/17 17:12, Kevin Wolf wrote: > > > > > Am 17.06.2013 um 16:46 hat Paolo Bonzini geschrieben

[Qemu-devel] [PATCH 4/7] NUMA: set guest numa nodes memory policy

2013-06-18 Thread Wanlong Gao
Set the guest numa nodes memory policies using the mbind(2) system call node by node. After this patch, we are able to set guest nodes memory policies through the QEMU options, this arms to solve the guest cross nodes memory access performance issue. And as you all know, if PCI-passthrough is used,

[Qemu-devel] [PATCH 5/7] NUMA: add qmp command set-mpol to set memory policy for NUMA node

2013-06-18 Thread Wanlong Gao
The QMP command let it be able to set node's memory policy through the QMP protocol. The qmp-shell command is like: set-mpol nodeid=0 mpol=membind nodemask=0-1 Signed-off-by: Wanlong Gao --- cpus.c | 61 + include/sysemu/sysemu

[Qemu-devel] [PATCH 0/7] Add support for binding guest numa nodes to host numa nodes

2013-06-18 Thread Wanlong Gao
As you know, QEMU can't direct it's memory allocation now, this may cause guest cross node access performance regression. And, the worse thing is that if PCI-passthrough is used, direct-attached-device uses DMA transfer between device and qemu process. All pages of the guest will be pinned by get_

[Qemu-devel] [PATCH 7/7] NUMA: show host memory policy info in info numa command

2013-06-18 Thread Wanlong Gao
Show host memory policy of nodes in the info numa monitor command. After this patch, the monitor command "info numa" will show the information like following if the host numa support is enabled: (qemu) info numa 2 nodes node 0 cpus: 0 node 0 size: 1024 MB node 0 mempolicy: memb

[Qemu-devel] [PATCH 2/7] Add Linux libnuma detection

2013-06-18 Thread 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 --- configure | 32 1 file changed,

[Qemu-devel] [PATCH 1/7] Add numa_info structure to contain numa nodes info

2013-06-18 Thread Wanlong Gao
Add the numa_info structure to contain the numa nodes memory, VCPUs information and the future added numa nodes host memory policies. Signed-off-by: Andre Przywara Signed-off-by: Wanlong Gao --- cpus.c | 2 +- hw/i386/pc.c| 4 ++-- include/sysemu/sysemu.h | 8 +++

[Qemu-devel] [PATCH 3/7] NUMA: parse guest numa nodes memory policy

2013-06-18 Thread Wanlong Gao
The memory policy setting format is like: {membind|interleave|preferred}=[+|!]{all|N-N} And we are adding this setting as a suboption of "-numa", the memory policy then can be set like following: -numa node,nodeid=0,mem=1024,cpus=0,membind=0-1 -numa node,nodeid=1,mem=1024,cpus=1,interleave=1 Sig

[Qemu-devel] [PATCH 6/7] NUMA: add hmp command set-mpol

2013-06-18 Thread Wanlong Gao
Add hmp command set-mpol to set host memory policy for a guest NUMA node. Then we can also set node's memory policy using the monitor command like: (qemu) set-mpol 0 membind 0-1 Signed-off-by: Wanlong Gao --- hmp-commands.hx | 16 hmp.c | 22 ++

[Qemu-devel] [PATCH 00/17] ide: Use ide_cmd_table function pointers for command execution

2013-06-18 Thread Kevin Wolf
The ATAPI code has been using a table of callback functions for each command for quite a while now, this series does the same for ATA commands (which already got the table, but no function pointers, just flags) The main advantage is that we get a more consistent behaviour of the commands because w

[Qemu-devel] [PATCH 01/17] ide: Add handler to ide_cmd_table

2013-06-18 Thread Kevin Wolf
As a preparation for moving all IDE commands into their own function like in the ATAPI code, introduce a 'handler' callback to ide_cmd_table. Commands using this new infrastructure get some things handled automatically: * The BSY flag is set before calling the handler (in order to avoid bugs li

[Qemu-devel] [PATCH 04/17] ide: Convert cmd_nop commands to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
cmd_nop handles all commands that don't really do anything in our implementation except setting status register flags. Signed-off-by: Kevin Wolf --- hw/ide/core.c | 48 +--- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git a/hw/ide/core.c

[Qemu-devel] [PATCH 16/17] ide: Convert SMART commands to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 325 +++--- 1 file changed, 174 insertions(+), 151 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index a563f6e..1c8f414 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1438,6 +1438,179

[Qemu-devel] [PATCH 02/17] ide: Convert WIN_DSM to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 29 - 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index cd9de14..567515e 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1004,6 +1004,21 @@ void ide_ioport_write(void *op

[Qemu-devel] [PATCH 03/17] ide: Convert WIN_IDENTIFY to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 40 +++- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 567515e..2df078b 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1019,6 +1019,28 @@ static bool cmd_dat

[Qemu-devel] [PATCH 07/17] ide: Convert PIO read/write commands to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 93 --- 1 file changed, 50 insertions(+), 43 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index e6cd7b8..86af4b0 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1110,6 +1110,48 @@

[Qemu-devel] [PATCH 09/17] ide: Convert READ NATIVE MAX ADDRESS to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 35 ++- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 2c8a0ff..3064e2e 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1184,6 +1184,22 @@ static bool cmd_write_dm

[Qemu-devel] [PATCH 08/17] ide: Convert DMA read/write commands to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 69 --- 1 file changed, 38 insertions(+), 31 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 86af4b0..2c8a0ff 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1152,6 +1152,38 @@

[Qemu-devel] [PATCH 05/17] ide: Convert verify commands to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 27 +-- 1 file changed, 13 insertions(+), 14 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 057662d..bf2007a 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1046,6 +1046,16 @@ static bool cmd_identify(IDEStat

[Qemu-devel] [PATCH 17/17] ide: Clean up ide_exec_cmd()

2013-06-18 Thread Kevin Wolf
All commands are now converted to ide_cmd_table handlers, so it can be unconditional now and the old switch block can go. Signed-off-by: Kevin Wolf --- hw/ide/core.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/

[Qemu-devel] [PATCH 10/17] ide: Convert CHECK POWER MDOE to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 17 - 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 3064e2e..a7f8445 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1200,6 +1200,12 @@ static bool cmd_read_native_max(IDEState *s,

[Qemu-devel] [PATCH 11/17] ide: Convert SET FEATURES to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 147 ++ 1 file changed, 75 insertions(+), 72 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index a7f8445..8789758 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1206,6 +1206,80 @@

[Qemu-devel] [PATCH 06/17] ide: Convert read/write multiple commands to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 119 +- 1 file changed, 60 insertions(+), 59 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index bf2007a..e6cd7b8 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1056,6 +1056,60 @@

[Qemu-devel] [PATCH 12/17] ide: Convert FLUSH CACHE to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 14 -- 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 8789758..83e86aa 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1184,6 +1184,12 @@ static bool cmd_write_dma(IDEState *s, uint8_t

[Qemu-devel] [PATCH 13/17] ide: Convert SEEK to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 13 +++-- 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 83e86aa..76a3fdf 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1190,6 +1190,12 @@ static bool cmd_flush_cache(IDEState *s, uint8_t

[Qemu-devel] [PATCH 14/17] ide: Convert ATAPI commands to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 100 +++--- 1 file changed, 61 insertions(+), 39 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index 76a3fdf..eebd5d9 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1292,6 +1292,63 @@

[Qemu-devel] [PATCH 15/17] ide: Convert CF-ATA commands to ide_cmd_table handler

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf --- hw/ide/core.c | 170 -- 1 file changed, 95 insertions(+), 75 deletions(-) diff --git a/hw/ide/core.c b/hw/ide/core.c index eebd5d9..a563f6e 100644 --- a/hw/ide/core.c +++ b/hw/ide/core.c @@ -1349,6 +1349,95 @@

Re: [Qemu-devel] [PATCH v2 1/2] add a header file for atomic operations

2013-06-18 Thread Paolo Bonzini
Il 17/06/2013 20:57, Richard Henderson ha scritto: > On 06/16/2013 04:21 AM, Liu Ping Fan wrote: >> +#if QEMU_GNUC_PREREQ(4, 8) >> +#ifndef __ATOMIC_RELAXED >> +#define __ATOMIC_RELAXED 0 >> +#endif > > Why all the ifdefs? If __atomic support is present, then __ATOMIC defines > will > exist. Th

Re: [Qemu-devel] [PATCH] block: add 'backing' option to drive_add

2013-06-18 Thread Paolo Bonzini
Il 18/06/2013 08:37, Markus Armbruster ha scritto: > >If not, can we try to detect such case on opening > Gee, what a nice swamp you found there! It is a huge swamp indeed. Since we stop all block jobs on media change already, what about just adding a command "block-job-attach" or someth

Re: [Qemu-devel] [PATCH v2 0/2] make AioContext's bh re-entrant

2013-06-18 Thread Paolo Bonzini
Il 18/06/2013 04:40, liu ping fan ha scritto: > On Mon, Jun 17, 2013 at 3:11 PM, Paolo Bonzini wrote: >> Il 16/06/2013 13:21, Liu Ping Fan ha scritto: >>> When trying out of QBL, we badly require more fine defined barrier and >>> atomic ops, so >>> I repost Paolo's atomic patch which fetched gith

Re: [Qemu-devel] [PULL 06/10] configure: dtc: Probe for libfdt_env.h

2013-06-18 Thread Peter Maydell
On 18 June 2013 01:46, Andreas Färber wrote: > $ make -j6 V=1 > make -I/home/andreas/QEMU/qemu-ppc/dtc > VPATH=/home/andreas/QEMU/qemu-ppc/dtc -C dtc V="1" > LIBFDT_srcdir=/home/andreas/QEMU/qemu-ppc/dtc/libfdt CFLAGS="-O2 > -D_FORTIFY_SOURCE=2 -g -Werror -fPIE -DPIE -m64 -D_GNU_SOURCE > -D_FILE

Re: [Qemu-devel] [PULL 06/10] configure: dtc: Probe for libfdt_env.h

2013-06-18 Thread Paolo Bonzini
Il 18/06/2013 03:22, Andreas Färber ha scritto: >> Yes, this is massively overdue. Bugfixes aside DTC has seen some >> significant feature development since 1.3.0. > > For the record, I came up with the following interim fix for openSUSE to > avoid submodule builds for all my repositories: > > ht

Re: [Qemu-devel] [PATCH] block: add 'backing' option to drive_add

2013-06-18 Thread Kevin Wolf
Am 18.06.2013 um 10:11 hat Fam Zheng geschrieben: > On Tue, 06/18 09:51, Kevin Wolf wrote: > > Am 18.06.2013 um 09:00 hat Fam Zheng geschrieben: > > > On Tue, 06/18 08:32, Kevin Wolf wrote: > > > > Am 18.06.2013 um 05:58 hat Fam Zheng geschrieben: > > > > > On Mon, 06/17 17:12, Kevin Wolf wrote: >

Re: [Qemu-devel] [PATCH] block: add 'backing' option to drive_add

2013-06-18 Thread Kevin Wolf
Am 18.06.2013 um 10:40 hat Paolo Bonzini geschrieben: > Il 18/06/2013 08:37, Markus Armbruster ha scritto: > > >If not, can we try to detect such case on opening > > Gee, what a nice swamp you found there! > > It is a huge swamp indeed. > > Since we stop all block jobs on media change al

Re: [Qemu-devel] [PATCH] kvmclock: clock should count only if vm is running

2013-06-18 Thread Paolo Bonzini
Hi Marcelo, sorry for the late review. Il 08/06/2013 04:00, Marcelo Tosatti ha scritto: > kvmclock should not count while vm is paused, because: > > 1) if the vm is paused for long periods, timekeeping > math can overflow while converting the (large) clocksource > delta to nanoseconds. > > 2)

Re: [Qemu-devel] [PATCH] block: add 'backing' option to drive_add

2013-06-18 Thread Paolo Bonzini
Il 18/06/2013 10:56, Kevin Wolf ha scritto: >> > >> > It is a huge swamp indeed. >> > >> > Since we stop all block jobs on media change already, what about just >> > adding a command "block-job-attach" or something like that which exposes >> > the target of the job as a blockdev (presumably so th

Re: [Qemu-devel] [PATCH] block: add 'backing' option to drive_add

2013-06-18 Thread Fam Zheng
On Tue, 06/18 10:40, Paolo Bonzini wrote: > Il 18/06/2013 08:37, Markus Armbruster ha scritto: > > >If not, can we try to detect such case on opening > > Gee, what a nice swamp you found there! > > It is a huge swamp indeed. > > Since we stop all block jobs on media change already, what

Re: [Qemu-devel] [PATCH RFC v2 0/7] coordinate cpu hotplug/unplug bewteen QEMU and kernel by EC

2013-06-18 Thread Igor Mammedov
On Tue, 18 Jun 2013 10:47:15 +0800 li guang wrote: > Hi, Igor and Micheal > > 在 2013-06-06四的 16:33 +0800,li guang写道: > > 在 2013-06-06四的 11:13 +0300,Michael S. Tsirkin写道: > > > On Thu, Jun 06, 2013 at 11:16:53AM +0800, liguang wrote: > > > > v2: > > > > 1.remove PIIX4_PROC_BASE operations for cp

Re: [Qemu-devel] [PATCH 3/7] NUMA: parse guest numa nodes memory policy

2013-06-18 Thread Paolo Bonzini
Il 18/06/2013 10:09, Wanlong Gao ha scritto: > +static unsigned int numa_node_parse_mpol(const char *str, unsigned long *bm) > +{ > +unsigned long long value, endvalue; > +char *endptr; > +unsigned int flags = 0; > + > +if (str[0] == '!') { > +flags |= 2; clear = true; > +

[Qemu-devel] [PATCH 1/2] s390/ipl: Fix boot order

2013-06-18 Thread Christian Borntraeger
The latest ipl code adaptions collided with some of the virtio refactoring rework. This resulted in always booting the first disk. Let's fix booting from a given ID. The new code also checks for command lines without bootindex to avoid random behaviour when accessing dev_st (==0). We need to get a

Re: [Qemu-devel] [PATCH 5/7] NUMA: add qmp command set-mpol to set memory policy for NUMA node

2013-06-18 Thread Paolo Bonzini
Il 18/06/2013 10:09, Wanlong Gao ha scritto: > The QMP command let it be able to set node's memory policy > through the QMP protocol. The qmp-shell command is like: > set-mpol nodeid=0 mpol=membind nodemask=0-1 > > Signed-off-by: Wanlong Gao How would this work with mem-path? Paolo > --- >

Re: [Qemu-devel] [PATCH 6/7] NUMA: add hmp command set-mpol

2013-06-18 Thread Paolo Bonzini
Il 18/06/2013 10:09, Wanlong Gao ha scritto: > Add hmp command set-mpol to set host memory policy for a guest > NUMA node. Then we can also set node's memory policy using > the monitor command like: > (qemu) set-mpol 0 membind 0-1 I suggest something similar to what chardev-add does: Just make

Re: [Qemu-devel] [RfC PATCH 2/2] console: add screendump-device qmp cmd

2013-06-18 Thread Gerd Hoffmann
On 06/17/13 16:50, Luiz Capitulino wrote: >>> > > +struct screendump_job { >>> > > +QEMUBH *bh; >>> > > +QemuConsole *con; >>> > > +char *filename; >>> > > +}; >> > >> > We have a job API in the block layer. Would it make sense to have a >> > QMP-level job interface? > I'd agree with

[Qemu-devel] [PATCH v1 1/1] qom: Fix class cast of NULL classes

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite Its clear from the implementation that class casting is supposed to work with a NULL class argument. Guard all dereferences of the class argument against NULL accordingly. Signed-off-by: Peter Crosthwaite --- qom/object.c | 6 +++--- 1 file changed, 3 insertions(+), 3

Re: [Qemu-devel] [RFC 08/13] block: drop bdrv_get_aio_context()

2013-06-18 Thread Stefan Hajnoczi
On Mon, Jun 17, 2013 at 05:03:12PM +0200, Paolo Bonzini wrote: > Il 17/06/2013 16:57, Stefan Hajnoczi ha scritto: > > On Fri, Jun 14, 2013 at 10:12:00AM -0400, Paolo Bonzini wrote: > >> Il 14/06/2013 05:48, Stefan Hajnoczi ha scritto: > > I guess then > > it comes down to robustness if a hung NFS m

Re: [Qemu-devel] [PATCH v2 2/2] QEMUBH: make AioContext's bh re-entrant

2013-06-18 Thread Stefan Hajnoczi
On Tue, Jun 18, 2013 at 10:19:40AM +0800, liu ping fan wrote: > On Mon, Jun 17, 2013 at 11:28 PM, Stefan Hajnoczi wrote: > > On Sun, Jun 16, 2013 at 07:21:21PM +0800, Liu Ping Fan wrote: > > Why lock bh_lock before assigning bh->next? Could you lock the mutex > > here and then drop the smp_wmb()

[Qemu-devel] [PATCH V16 4/7] Create some QemuOpts functons

2013-06-18 Thread Dong Xu Wang
These functions will be used in next commit. qemu_opt_get_(*)_del functions are used to make sure we have the same behaviors as before: in block layer, after parsing a parameter value, parameter list will delete it to avoid parsing it twice. Signed-off-by: Dong Xu Wang --- v13->v14: 1) rewrite c

[Qemu-devel] [PATCH V16 3/7] Create four QemuOptsList related functions

2013-06-18 Thread Dong Xu Wang
This patch creates 4 functions, count_opts_list, qemu_opts_append, qemu_opts_free and qemu_opts_print_help, they are used in following commits. Signed-off-by: Dong Xu Wang --- v16->v17: 1) discard double-initialization. 2) use pointer directly, not g_strdup. v12->v13: 1) simply assert that nei

[Qemu-devel] [PATCH V16 1/7] add def_value_str in QemuOptDesc struct and rewrite qemu_opts_print

2013-06-18 Thread Dong Xu Wang
qemu_opts_print has no user now, so can re-write the function safely. qemu_opts_print is used while using "qemu-img create", it produces the same output as previous code. The behavior of this function has changed: 1. Print every possible option, whether a value has been set or not. 2. Option des

[Qemu-devel] [PATCH V16 7/7] remove QEMUOptionParameter related functions and struct

2013-06-18 Thread Dong Xu Wang
Signed-off-by: Dong Xu Wang --- include/qemu/option.h | 39 --- util/qemu-option.c| 285 -- 2 files changed, 324 deletions(-) diff --git a/include/qemu/option.h b/include/qemu/option.h index d63e447..d2d3f16 100644 --- a/include/qemu/opti

[Qemu-devel] [PATCH V16 2/7] avoid duplication of default value in QemuOpts

2013-06-18 Thread Dong Xu Wang
This patch moves the default value entirely to QemuOptDesc. When getting the value of an option that hasn't been set, and QemuOptDesc has a default value, return that. Else, behave as before. Example: qemu_opt_get_number(opts, "foo", 42) If "foo" has been set in opts, return its value. E

[Qemu-devel] [PATCH V16 0/7] replace QEMUOptionParameter with QemuOpts parser

2013-06-18 Thread Dong Xu Wang
These patches will replace QEMUOptionParameter with QemuOpts. Change logs please go to each patch's commit message. Dong Xu Wang (7): add def_value_str in QemuOptDesc struct and rewrite qemu_opts_print avoid duplication of default value in QemuOpts Create four QemuOptsList related functions

[Qemu-devel] [PATCH V16 6/7] query-command-line-options outputs def_value_str

2013-06-18 Thread Dong Xu Wang
QMP command query-command-line-options shows details information of parameters, since added def_value_str, also output it in the QMP command. Signed-off-by: Dong Xu Wang --- qapi-schema.json | 5 - qmp-commands.hx| 2 ++ util/qemu-config.c | 4 3 files changed, 10 insertions(+), 1

Re: [Qemu-devel] [Bug 1191606] Re: qemu crashes with iscsi initiator (libiscsi) when using virtio

2013-06-18 Thread Stefan Hajnoczi
On Mon, Jun 17, 2013 at 05:37:57PM -, Klaus Hochlehnert wrote: > Without debug information I just can provide this (on that server I > can't recompile qemu with debugging information): > > warning: no loadable sections found in added symbol-file system-supplied DSO > at 0x7fffe67fe000 > 0x000

Re: [Qemu-devel] [PATCH qom-cpu v2 02/29] kvm: Change cpu_synchronize_state() argument to CPUState

2013-06-18 Thread Igor Mammedov
On Sun, 16 Jun 2013 17:57:22 +0200 Andreas Färber wrote: > Change Monitor::mon_cpu to CPUState as well. > In cpu_synchronize_all_states() use qemu_for_each_cpu() now. > > Reviewed-by: liguang > Signed-off-by: Andreas Färber > --- > cpus.c | 8 > gdbstub.c

Re: [Qemu-devel] [PATCH 1/2] qemu-socket: allow hostnames starting with a digit

2013-06-18 Thread Paolo Bonzini
Il 03/06/2013 17:54, Ján Tomko ha scritto: > According to RFC 1123 [1], hostnames can start with a digit too. > > [1] http://tools.ietf.org/html/rfc1123#page-13 > > Signed-off-by: Ján Tomko > --- > util/qemu-sockets.c | 13 - > 1 file changed, 4 insertions(+), 9 deletions(-) > > di

Re: [Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains.

2013-06-18 Thread Igor Mammedov
On Mon, 17 Jun 2013 13:36:36 +0100 Paul Durrant wrote: > Xen HVM domains normally spawn QEMU with a dedicated xenfv machine type. The > initialization code for this machine type can easily be pulled into the > generic pc initialization code and guarded with a test for whether the xen > accelerato

Re: [Qemu-devel] [PATCH 5/7] NUMA: add qmp command set-mpol to set memory policy for NUMA node

2013-06-18 Thread Wanlong Gao
On 06/18/2013 05:21 PM, Paolo Bonzini wrote: > Il 18/06/2013 10:09, Wanlong Gao ha scritto: >> The QMP command let it be able to set node's memory policy >> through the QMP protocol. The qmp-shell command is like: >> set-mpol nodeid=0 mpol=membind nodemask=0-1 >> >> Signed-off-by: Wanlong Gao

Re: [Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains.

2013-06-18 Thread Paul Durrant
> -Original Message- > From: Igor Mammedov [mailto:imamm...@redhat.com] > Sent: 18 June 2013 10:44 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; xen-de...@lists.xen.org > Subject: Re: [Qemu-devel] [PATCH 1/2] Allow use of pc machine type > (accel=xen) for Xen HVM domains. > > On Mon, 17

[Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite This series enables QOM super class access and demostrates some usages. Replaces the save->override->call via FooClass technique, to reduce some of the boiler plate in recently fully QOMified devices. Applied the change to ARM CPU, MB CPU and some of Andreas's recently Q

[Qemu-devel] [RFC PATCH v1 1/7] target-arm/cpu.c: delete un-needed instance/class sizes

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite QOM automatically inherits class and instance size from the parent class. No need to redefine as the same value as the parent. CC: qemu-triv...@nongnu.org Signed-off-by: Peter Crosthwaite --- target-arm/cpu.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/target

Re: [Qemu-devel] [PATCH 6/7] NUMA: add hmp command set-mpol

2013-06-18 Thread Wanlong Gao
On 06/18/2013 05:23 PM, Paolo Bonzini wrote: > Il 18/06/2013 10:09, Wanlong Gao ha scritto: >> Add hmp command set-mpol to set host memory policy for a guest >> NUMA node. Then we can also set node's memory policy using >> the monitor command like: >> (qemu) set-mpol 0 membind 0-1 > > I sugges

[Qemu-devel] [RFC PATCH v1 3/7] qdev-core: Introduce DEVICE super class cast macros

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite Add macros DEVICE_SUPER_CLASS and DEVICE_GET_SUPER_CLASS. These are the similar to their respective non SUPER versions, except instead of returning the class object for the concrete class, they return their parent classes implementation (usually some form of abstract class

[Qemu-devel] [RFC PATCH v1 2/7] qom: Add super class accessor

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite Add a function that allows obtaining a super class implementation of a given class. The super classing is done relative to a specified level. See added documentation comment for details. Signed-off-by: Peter Crosthwaite --- include/qom/object.h | 18 ++

[Qemu-devel] [RFC PATCH v1 4/7] qom/cpu: Introduce CPU super class cast macros

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite Add macros CPU_SUPER_CLASS and CPU_GET_SUPER_CLASS. These are the similar to their respective non SUPER versions, except instead of returning the class object for the concrete class, they return their parent classes implementation (usually some form of abstract class). Si

[Qemu-devel] [RFC PATCH v1 5/7] target-arm: Remove ARMCPUClass

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite ARMCPUClass is only needed for super-class abstract function access. Just use Super classes for reset and realize access and remove ARMCPUClass completely. Signed-off-by: Peter Crosthwaite --- target-arm/cpu-qom.h | 20 target-arm/cpu.c | 14 ++

[Qemu-devel] [RFC PATCH v1 7/7] i8254: Remove [KVM]PITClass

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite [KVM]PITClass is only needed for super-class realize function access. Just use Super classes for realize access and remove [KVM]PITClass completely. Signed-off-by: Peter Crosthwaite --- hw/i386/kvm/i8254.c | 17 ++--- hw/timer/i8254.c| 16 ++

Re: [Qemu-devel] [PATCH v1 1/1] qom: Fix class cast of NULL classes

2013-06-18 Thread Paolo Bonzini
Il 18/06/2013 11:18, peter.crosthwa...@xilinx.com ha scritto: > From: Peter Crosthwaite > > Its clear from the implementation that class casting is supposed to work > with a NULL class argument. Guard all dereferences of the class argument > against NULL accordingly. > > Signed-off-by: Peter Cro

[Qemu-devel] [RFC PATCH v1 6/7] target-microblaze: Remove MicroblazeCPUClass

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite MicroblazeCPUClass is only needed for super-class abstract function access. Just use Super classes for reset and realize access and remove MicroblazeCPUClass completely. Signed-off-by: Peter Crosthwaite --- target-microblaze/cpu-qom.h | 20 target-

Re: [Qemu-devel] [PATCH 3/7] NUMA: parse guest numa nodes memory policy

2013-06-18 Thread Wanlong Gao
On 06/18/2013 05:20 PM, Paolo Bonzini wrote: > Il 18/06/2013 10:09, Wanlong Gao ha scritto: >> +static unsigned int numa_node_parse_mpol(const char *str, unsigned long *bm) >> +{ >> +unsigned long long value, endvalue; >> +char *endptr; >> +unsigned int flags = 0; >> + >> +if (str[0

Re: [Qemu-devel] [PATCH RFT 2/5] virtio: Convert VirtioDevice to QOM realize/unrealize

2013-06-18 Thread Peter Crosthwaite
Hi All, On Wed, Jun 12, 2013 at 7:15 PM, Andreas Färber wrote: > Am 10.06.2013 04:08, schrieb Anthony Liguori: >> Peter Crosthwaite writes: >> >> What's weird about this is that you aren't necessarily calling >> Device::realize() here, you're really calling super()::realize(). > > We can certain

Re: [Qemu-devel] [PATCH 5/7] NUMA: add qmp command set-mpol to set memory policy for NUMA node

2013-06-18 Thread Paolo Bonzini
Il 18/06/2013 11:44, Wanlong Gao ha scritto: > On 06/18/2013 05:21 PM, Paolo Bonzini wrote: >> Il 18/06/2013 10:09, Wanlong Gao ha scritto: >>> The QMP command let it be able to set node's memory policy >>> through the QMP protocol. The qmp-shell command is like: >>> set-mpol nodeid=0 mpol=memb

Re: [Qemu-devel] [RFC PATCH v1 1/7] target-arm/cpu.c: delete un-needed instance/class sizes

2013-06-18 Thread Andreas Färber
Am 18.06.2013 11:44, schrieb peter.crosthwa...@xilinx.com: > From: Peter Crosthwaite > > QOM automatically inherits class and instance size from the parent > class. No need to redefine as the same value as the parent. It would be fair to mention since which commit because that was originally not

[Qemu-devel] [PATCH 2/2] Move hardcoded initialization of xen-platform device.

2013-06-18 Thread Paul Durrant
Creation of the xen-platform device is currently hardcoded into machine type pc's initialization code, guarded by a test for the whether the xen accelerator is enabled. This patch moves the creation of xen-platform into the initialization code of the xenfv machine type. This maintains backwards com

[Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains.

2013-06-18 Thread Paul Durrant
Xen HVM domains normally spawn QEMU with a dedicated xenfv machine type. The initialization code for this machine type can easily be pulled into the generic pc initialization code and guarded with a test for whether the xen accelerator options is specified, which is more consistent with the way oth

[Qemu-devel] [PATCH 0/2] Remove hardcoded xen-platform device initialization (v3)

2013-06-18 Thread Paul Durrant
Because of concerns over backwards compatibility and a suggestion that xenfv should be retired in favour of using the pc machine type I have re- worked my original patch into 2 patches: [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM [PATCH 2/2] Move hardcoded initialization of xe

Re: [Qemu-devel] [RFC PATCH v1 3/7] qdev-core: Introduce DEVICE super class cast macros

2013-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2013 at 07:45:36PM +1000, peter.crosthwa...@xilinx.com wrote: > From: Peter Crosthwaite > > Add macros DEVICE_SUPER_CLASS and DEVICE_GET_SUPER_CLASS. These are the > similar to their respective non SUPER versions, except instead of > returning the class object for the concrete cla

Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread Andreas Färber
Hi Peter, Am 18.06.2013 11:43, schrieb peter.crosthwa...@xilinx.com: > From: Peter Crosthwaite > > > This series enables QOM super class access and demostrates some usages. > Replaces the save->override->call via FooClass technique, to reduce > some of the boiler plate in recently fully QOMifie

Re: [Qemu-devel] [PATCH V2] build: remove compile warning

2013-06-18 Thread Paolo Bonzini
Il 07/06/2013 14:17, Markus Armbruster ha scritto: >> diff --git a/util/iov.c b/util/iov.c >> index cc6e837..b91cfb9 100644 >> --- a/util/iov.c >> +++ b/util/iov.c >> @@ -146,7 +146,7 @@ ssize_t iov_send_recv(int sockfd, struct iovec *iov, >> unsigned iov_cnt, >> { >> ssize_t total = 0; >>

Re: [Qemu-devel] [PATCH V2] build: remove compile warning

2013-06-18 Thread Paolo Bonzini
Il 08/06/2013 04:04, Wenchao Xia ha scritto: > I insist to remove compile warning since I want gcc check my code with > strict rule. What is your version of GCC? Paolo

[Qemu-devel] [PATCH] cadence_uart: Handle backend tx errors

2013-06-18 Thread edgar . iglesias
From: "Edgar E. Iglesias" Signed-off-by: Edgar E. Iglesias --- hw/char/cadence_uart.c |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/hw/char/cadence_uart.c b/hw/char/cadence_uart.c index c2a7834..2219a0e 100644 --- a/hw/char/cadence_uart.c +++ b/hw/char/cadence_uar

Re: [Qemu-devel] [RFC PATCH] vga: Start supporting resolution not multiple of 16 correctly.

2013-06-18 Thread Frediano Ziglio
Modern notebook support 1366x768 resolution. The resolution width is not multiple of 16 causing some problems. QEMU VGA emulation requires width resolution to be multiple of 8. VNC implementation requires width resolution to be multiple of 16. Signed-off-by: Frediano Ziglio --- hw/display/vga.

Re: [Qemu-devel] [PATCH v4 01/10] configure: Support configuring c++ compiler

2013-06-18 Thread Paolo Bonzini
Il 06/06/2013 17:06, Tomoki Sekiyama ha scritto: > Add configuration for c++ compiler (${cross_prefix}g++ as default) in > configure and Makefiles. > > Currently, usage of c++ language is only for access to Windows VSS > using COM+ services in qemu-guest-agent for Windows. > > Signed-off-by: Tomo

Re: [Qemu-devel] [PATCH v4 10/10] QMP/qemu-ga-client: make timeout longer for guest-fsfreeze-freeze command

2013-06-18 Thread Paolo Bonzini
Il 06/06/2013 17:07, Tomoki Sekiyama ha scritto: > guest-fsfreeze-freeze command can take longer than 3 seconds when heavy > disk I/O is running. To avoid unexpected timeout, this changes the timeout > to 60 seconds (timeout of pre-commit phase of VSS). > > Signed-off-by: Tomoki Sekiyama > --- >

Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread Peter Crosthwaite
Hi Andreas, On Tue, Jun 18, 2013 at 8:12 PM, Andreas Färber wrote: > Hi Peter, > > Am 18.06.2013 11:43, schrieb peter.crosthwa...@xilinx.com: >> From: Peter Crosthwaite >> >> >> This series enables QOM super class access and demostrates some usages. >> Replaces the save->override->call via FooCl

Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2013 at 07:43:11PM +1000, peter.crosthwa...@xilinx.com wrote: > From: Peter Crosthwaite > > > This series enables QOM super class access and demostrates some usages. > Replaces the save->override->call via FooClass technique, to reduce > some of the boiler plate in recently fully

Re: [Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains.

2013-06-18 Thread Andreas Färber
Am 18.06.2013 11:59, schrieb Paul Durrant: > Xen HVM domains normally spawn QEMU with a dedicated xenfv machine type. The > initialization code for this machine type can easily be pulled into the > generic pc initialization code and guarded with a test for whether the xen > accelerator options is s

Re: [Qemu-devel] [PATCH 2/2] Move hardcoded initialization of xen-platform device.

2013-06-18 Thread Andreas Färber
Am 18.06.2013 11:59, schrieb Paul Durrant: > Creation of the xen-platform device is currently hardcoded into machine > type pc's initialization code, guarded by a test for the whether the xen > accelerator is enabled. This patch moves the creation of xen-platform into > the initialization code of t

Re: [Qemu-devel] [PATCH 1/2] Allow use of pc machine type (accel=xen) for Xen HVM domains.

2013-06-18 Thread Paul Durrant
> -Original Message- > From: Andreas Färber [mailto:afaer...@suse.de] > Sent: 18 June 2013 11:29 > To: Paul Durrant > Cc: qemu-devel@nongnu.org; xen-de...@lists.xen.org; Paolo Bonzini > Subject: Re: [Qemu-devel] [PATCH 1/2] Allow use of pc machine type > (accel=xen) for Xen HVM domains. >

Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread Peter Crosthwaite
Hi Michael, On Tue, Jun 18, 2013 at 8:23 PM, Michael S. Tsirkin wrote: > On Tue, Jun 18, 2013 at 07:43:11PM +1000, peter.crosthwa...@xilinx.com wrote: >> From: Peter Crosthwaite >> >> >> This series enables QOM super class access and demostrates some usages. >> Replaces the save->override->call

Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2013 at 08:35:22PM +1000, Peter Crosthwaite wrote: > Hi Michael, > > On Tue, Jun 18, 2013 at 8:23 PM, Michael S. Tsirkin wrote: > > On Tue, Jun 18, 2013 at 07:43:11PM +1000, peter.crosthwa...@xilinx.com > > wrote: > >> From: Peter Crosthwaite > >> > >> > >> This series enables Q

Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread Andreas Färber
Am 18.06.2013 12:23, schrieb Michael S. Tsirkin: > On Tue, Jun 18, 2013 at 07:43:11PM +1000, peter.crosthwa...@xilinx.com wrote: >> From: Peter Crosthwaite >> >> >> This series enables QOM super class access and demostrates some usages. >> Replaces the save->override->call via FooClass technique,

Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread Peter Crosthwaite
HI Michael, On Tue, Jun 18, 2013 at 8:39 PM, Michael S. Tsirkin wrote: > On Tue, Jun 18, 2013 at 08:35:22PM +1000, Peter Crosthwaite wrote: >> Hi Michael, >> >> On Tue, Jun 18, 2013 at 8:23 PM, Michael S. Tsirkin wrote: >> > On Tue, Jun 18, 2013 at 07:43:11PM +1000, peter.crosthwa...@xilinx.com

Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread Andreas Färber
Am 18.06.2013 12:39, schrieb Michael S. Tsirkin: > On Tue, Jun 18, 2013 at 08:35:22PM +1000, Peter Crosthwaite wrote: >> Hi Michael, >> >> On Tue, Jun 18, 2013 at 8:23 PM, Michael S. Tsirkin wrote: >>> On Tue, Jun 18, 2013 at 07:43:11PM +1000, peter.crosthwa...@xilinx.com >>> wrote: From: Pe

Re: [Qemu-devel] [RFC PATCH v1 0/7] QOM Super class access

2013-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2013 at 12:41:29PM +0200, Andreas Färber wrote: > Am 18.06.2013 12:23, schrieb Michael S. Tsirkin: > > On Tue, Jun 18, 2013 at 07:43:11PM +1000, peter.crosthwa...@xilinx.com > > wrote: > >> From: Peter Crosthwaite > >> > >> > >> This series enables QOM super class access and demos

  1   2   3   >