Re: [Qemu-devel] [PATCH 0/7 RFC] Localhost live migration

2013-06-18 Thread Lei Li
On 06/17/2013 08:57 PM, Stefan Hajnoczi wrote: On Sun, Jun 16, 2013 at 11:37:26PM +0800, Lei Li wrote: 2) Use different mechanism than current live migration. The very basic work flow like: qemu on the source (the source and destination are both on localhost) |

Re: [Qemu-devel] [PATCH 0/7 RFC] Localhost live migration

2013-06-18 Thread Lei Li
On 06/17/2013 12:01 AM, Anthony Liguori wrote: Lei Li li...@linux.vnet.ibm.com writes: Hi, This patch series tries to add localhost live migration support to Qemu. It is just a draft version which is far from completing and I am still working on, send it out to have your suggestions and make

Re: [Qemu-devel] [PATCH 1/7] migration: export MIG_STATE_xxx flags

2013-06-18 Thread Lei Li
On 06/17/2013 12:01 AM, Anthony Liguori wrote: Lei Li li...@linux.vnet.ibm.com writes: Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- include/migration/migration.h |8 migration.c |8 2 files changed, 8 insertions(+), 8 deletions(-) diff

Re: [Qemu-devel] [PATCH 2/7] savevm: export qemu_save_device_state()

2013-06-18 Thread Lei Li
On 06/17/2013 12:02 AM, Anthony Liguori wrote: Lei Li li...@linux.vnet.ibm.com writes: Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- include/sysemu/sysemu.h |1 + savevm.c|2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git

Re: [Qemu-devel] [PATCH 3/7] arch_init: add ram_madvise_free()

2013-06-18 Thread Lei Li
On 06/17/2013 12:04 AM, Anthony Liguori wrote: Lei Li li...@linux.vnet.ibm.com writes: Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- arch_init.c | 13 + include/migration/migration.h |3 +++ 2 files changed, 16 insertions(+), 0 deletions(-) diff

Re: [Qemu-devel] [PATCH 2/2] extend the macaddr space to 0xffffffff

2013-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2013 at 09:51:44AM +0800, Amos Kong wrote: On Mon, Jun 17, 2013 at 05:04:03PM +0300, Michael S. Tsirkin wrote: On Mon, Jun 17, 2013 at 09:35:11PM +0800, Amos Kong wrote: Currently we only support to allocate 0xff mac-addresses, if we start guest by

Re: [Qemu-devel] [PATCH 0/5] qcow2: Discard freed clusters

2013-06-18 Thread Kevin Wolf
Am 18.06.2013 um 05:03 hat Wenchao Xia geschrieben: Hi, Kevin In normal case, qcow2 is based on raw-posix file which don't support discard operation It does, see raw_aio_discard(). , so this serial doesn't change much in this case, still real space is not freed in snapshot delete, and it

Re: [Qemu-devel] [PATCH v2 2/2] block: move the bdrv_dev_change_media_cb()

2013-06-18 Thread Pavel Hrdina
On 17.6.2013 17:16, Kevin Wolf wrote: Am 17.06.2013 um 16:59 hat Luiz Capitulino geschrieben: On Mon, 17 Jun 2013 16:49:11 +0200 Kevin Wolf kw...@redhat.com wrote: Am 17.06.2013 um 15:51 hat Luiz Capitulino geschrieben: On Mon, 17 Jun 2013 15:46:52 +0200 Kevin Wolf kw...@redhat.com wrote:

Re: [Qemu-devel] [PATCH 4/7] migration-local: implementation of outgoing part

2013-06-18 Thread Lei Li
On 06/17/2013 12:07 AM, Anthony Liguori wrote: Lei Li li...@linux.vnet.ibm.com writes: Signed-off-by: Lei Li li...@linux.vnet.ibm.com --- Makefile.objs |1 + include/migration/migration.h | 15 + migration-local.c | 116

Re: [Qemu-devel] [PATCH 1/2] avoid to allcate used macaddr to to new nic

2013-06-18 Thread Michael S. Tsirkin
On Tue, Jun 18, 2013 at 10:05:58AM +0800, Fam Zheng wrote: On Mon, 06/17 17:00, Michael S. Tsirkin wrote: On Mon, Jun 17, 2013 at 09:35:10PM +0800, Amos Kong wrote: QEMU allocates macaddr to nic if user doesn't assigne macaddr. But we didn't check if the allocated macaddr is used, it

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

2013-06-18 Thread Kevin Wolf
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 geschrieben: Il 17/06/2013 15:52, Kevin Wolf ha scritto:

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

2013-06-18 Thread Markus Armbruster
Fam Zheng f...@redhat.com 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 17/06/2013 15:52, Kevin Wolf ha scritto: It's not a new

Re: [Qemu-devel] [Qemu-stable] [PATCH v2 0/6] Some -smbios work

2013-06-18 Thread Markus Armbruster
mdroth mdr...@linux.vnet.ibm.com writes: On Mon, Jun 17, 2013 at 01:36:04PM +0200, Markus Armbruster wrote: Would this make sense for -stable? Impact is modest: fix a rather obscure feature of x86 targets on bigendian hosts, and improve error messages around it). On the other hand, the

[Qemu-devel] can qemu emulate pci e1000e support for arrm processor.

2013-06-18 Thread Santosh Shukla
Hi folks, I like to know that - can qemu able to emulate pci e1000 card for arm processor? I see that qemu support emulated model for pci-nic card, so Is it possible one enable them in qemu source (or minimal port) for other architecture like arm? did anyone tried similar exercise in past?

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 f...@redhat.com 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 geschrieben:

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 scritto:

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 peter.crosthwa...@xilinx.com Various fixups to the Xilinx Interrupt controller following a review against TRM and RTL descriptions. Tested as working for microblaze and microblazeel

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

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: Il

[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

[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 gaowanl...@cn.fujitsu.com --- cpus.c | 61

[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

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

[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 andre.przyw...@amd.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- configure | 32

[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 andre.przyw...@amd.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- cpus.c | 2 +- hw/i386/pc.c

[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

[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 gaowanl...@cn.fujitsu.com --- hmp-commands.hx | 16 hmp.c |

[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

[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

[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 kw...@redhat.com --- hw/ide/core.c | 48 +--- 1 file changed, 17 insertions(+), 31 deletions(-) diff --git

[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 kw...@redhat.com --- 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 @@

[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 kw...@redhat.com --- 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

[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 kw...@redhat.com --- 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 @@

[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 kw...@redhat.com --- 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 @@

[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 kw...@redhat.com --- 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

[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 kw...@redhat.com --- 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 @@

[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 kw...@redhat.com --- 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

[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 kw...@redhat.com --- hw/ide/core.c | 36 1 file changed, 12 insertions(+), 24 deletions(-) diff --git

[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 kw...@redhat.com --- 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

[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 kw...@redhat.com --- 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 @@

[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 kw...@redhat.com --- 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 @@

[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 kw...@redhat.com --- 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

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

2013-06-18 Thread Kevin Wolf
Signed-off-by: Kevin Wolf kw...@redhat.com --- 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

[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 kw...@redhat.com --- 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 @@

[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 kw...@redhat.com --- 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 @@

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. Then I can

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 something

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 pbonz...@redhat.com 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

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 afaer...@suse.de 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

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:

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: Am

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

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) Users

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 that you can then add

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 about

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 lig.f...@cn.fujitsu.com 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

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

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 gaowanl...@cn.fujitsu.com How would this work with

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 it

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 this. Something like the attached

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

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite peter.crosthwa...@xilinx.com 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 peter.crosthwa...@xilinx.com ---

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 mount can

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 stefa...@gmail.com 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

[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 wdon...@linux.vnet.ibm.com

[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 wdon...@linux.vnet.ibm.com --- v16-v17: 1) discard double-initialization. 2) use pointer directly, not g_strdup. v12-v13:

[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

[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 wdon...@linux.vnet.ibm.com --- 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

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

[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 wdon...@linux.vnet.ibm.com --- qapi-schema.json | 5 - qmp-commands.hx| 2 ++ util/qemu-config.c | 4 3 files

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

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 afaer...@suse.de wrote: Change Monitor::mon_cpu to CPUState as well. In cpu_synchronize_all_states() use qemu_for_each_cpu() now. Reviewed-by: liguang lig.f...@cn.fujitsu.com Signed-off-by: Andreas Färber afaer...@suse.de --- cpus.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 jto...@redhat.com --- util/qemu-sockets.c | 13 - 1 file changed, 4 insertions(+), 9

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 paul.durr...@citrix.com 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

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 Jun 2013

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

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite peter.crosthwa...@xilinx.com 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

[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 peter.crosthwa...@xilinx.com 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 peter.crosthwa...@xilinx.com --- target-arm/cpu.c |

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 suggest

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

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite peter.crosthwa...@xilinx.com 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

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

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite peter.crosthwa...@xilinx.com 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

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

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite peter.crosthwa...@xilinx.com 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

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

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite peter.crosthwa...@xilinx.com 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 peter.crosthwa...@xilinx.com ---

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

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite peter.crosthwa...@xilinx.com [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 peter.crosthwa...@xilinx.com --- hw/i386/kvm/i8254.c | 17

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 peter.crosthwa...@xilinx.com 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.

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

2013-06-18 Thread peter . crosthwaite
From: Peter Crosthwaite peter.crosthwa...@xilinx.com 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 peter.crosthwa...@xilinx.com ---

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 afaer...@suse.de wrote: Am 10.06.2013 04:08, schrieb Anthony Liguori: Peter Crosthwaite peter.crosthwa...@xilinx.com writes: What's weird about this is that you aren't necessarily calling Device::realize() here, you're really calling

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=membind

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 peter.crosthwa...@xilinx.com 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

[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

[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

[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

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 peter.crosthwa...@xilinx.com 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

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 peter.crosthwa...@xilinx.com 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

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; ssize_t ret;

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 edgar.igles...@gmail.com Signed-off-by: Edgar E. Iglesias edgar.igles...@gmail.com --- 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 ---

  1   2   3   >