[Qemu-devel] RFC: [PATCH 0/4] xics: in-kernel support

2013-07-17 Thread Alexey Kardashevskiy
This is rework of in-kernel XICS on top of [PATCH 00/11] pseries: migration and QOM support + compile fix patch + XICS migration fix patch. Migration from XICS to XICS-KVM and vice versa works. In this series, XICS-KVM inherits from XICS. I do not really see the point of adding one more

[Qemu-devel] [PATCH 1/4] target-ppc: Add helper for KVM_PPC_RTAS_DEFINE_TOKEN

2013-07-17 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au Recent PowerKVM allows the kernel to intercept some RTAS calls from the guest directly. This is used to implement the more efficient in-kernel XICS for example. qemu is still responsible for assigning the RTAS token numbers however, and needs to

[Qemu-devel] [PATCH 2/4] xics: add pre_save/post_load/cpu_setup dispatchers

2013-07-17 Thread Alexey Kardashevskiy
The upcoming support of in-kernel XICS will redefine migration callbacks for both ICS and ICP so classes and callback pointers are added. This adds a cpu_setup callback to the XICS device class (as XICS-KVM will do it different) and xics_dispatch_cpu_setup(). This also moves the place where

[Qemu-devel] [PATCH 3/4] xics: rework initialization

2013-07-17 Thread Alexey Kardashevskiy
Currently RTAS and hypercalls are registered in the XICS class init function. The upcoming XICS-KVM will inherit from XICS but will use another API to register RTAS tokens with KVM so registration has to move from the class init function (common for both XICS and XICS-KVM) to the _realize function

[Qemu-devel] [PATCH 4/4] xics: Support for in-kernel XICS interrupt controller

2013-07-17 Thread Alexey Kardashevskiy
From: David Gibson da...@gibson.dropbear.id.au Recent (host) kernels support emulating the PAPR defined XICS interrupt controller system within KVM. This patch allows qemu to initialize and configure the in-kernel XICS, and keep its state in sync with qemu's XICS state as necessary. This should

Re: [Qemu-devel] [PATCH v2] gtk: Fix accelerator filtering

2013-07-17 Thread Jan Kiszka
On 2013-05-08 00:42, Jan Kiszka wrote: On 2013-05-07 23:03, Jordan Justen wrote: On Sun, Mar 24, 2013 at 11:06 AM, Jan Kiszka jan.kis...@web.de wrote: On 2013-02-25 16:44, Jan Kiszka wrote: On 2013-02-25 16:39, Anthony Liguori wrote: Jan Kiszka jan.kis...@siemens.com writes: This is in fact

Re: [Qemu-devel] [PATCH 05/11] spapr-tce: make sPAPRTCETable a proper device

2013-07-17 Thread Alexey Kardashevskiy
On 07/16/2013 01:11 AM, Anthony Liguori wrote: Model TCE tables as a device that's hooked up as a child object to the owner. Besides the code cleanup, we get a few nice benefits: 1) free actually works now (it was dead code before) 2) the TCE information is visible in the device tree

[Qemu-devel] [PATCH] block: fix vvfat s-qcow leak on error

2013-07-17 Thread Fam Zheng
s-qcow is allocated but not freed if bdrv_open fails. Fix the possible leak, remove unnecessary check for bdrv_new(), honor error code of bdrv_create(). Signed-off-by: Fam Zheng f...@redhat.com --- block/vvfat.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves

2013-07-17 Thread Kevin Wolf
Am 16.07.2013 um 18:55 hat Paolo Bonzini geschrieben: But I wouldn't introduce a new one-off concept (almost as much of a hack as idle BHs), I would rather reuse as much code as possible from QEMUTimer/QEMUClock. I must admit I don't have a clear idea of how the API would look like.

Re: [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves

2013-07-17 Thread Alex Bligh
Stefan, --On 17 July 2013 11:02:30 +0800 Stefan Hajnoczi stefa...@gmail.com wrote: The steps to achieving this: 1. Drop alarm timers from qemu-timer.c and calculate g_poll() timeout instead for the main loop. 2. Introduce a per-AioContext aio_ctx_clock that can be used with

Re: [Qemu-devel] [PATCH] fix guest physical bits to match host, to go beyond 1TB guests

2013-07-17 Thread Paolo Bonzini
Il 16/07/2013 21:42, Eduardo Habkost ha scritto: On Tue, Jul 16, 2013 at 09:24:30PM +0200, Paolo Bonzini wrote: Il 16/07/2013 20:11, Eduardo Habkost ha scritto: For physical bit size, what about extending it in a backwards-compatible way? Something like this: *eax = 0x0003000; /* 48 bits

[Qemu-devel] [PATCH 1/2][RESENT] Add GDB qAttached support

2013-07-17 Thread Jan Kiszka
With this patch QEMU handles qAttached request from gdb. When QEMU replies 1, GDB sends a detach command at the end of a debugging session otherwise GDB sends kill. The default value for qAttached is 1 on system emulation and 0 on user emulation. Based on original version by Fabien Chouteau.

[Qemu-devel] [PATCH 2/2][RESENT] Revert gdbstub: Do not kill target in system emulation mode

2013-07-17 Thread Jan Kiszka
The requirements described in this patch are implemented by Add GDB qAttached support. This reverts commit 00e94dbc7fd0110b0555d59592b004333adfb4b8. Signed-off-by: Fabien Chouteau chout...@adacore.com --- gdbstub.c |2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git

Re: [Qemu-devel] [PATCH] block: fix vvfat s-qcow leak on error

2013-07-17 Thread Laszlo Ersek
On 07/17/13 09:12, Fam Zheng wrote: s-qcow is allocated but not freed if bdrv_open fails. Fix the possible leak, remove unnecessary check for bdrv_new(), honor error code of bdrv_create(). Signed-off-by: Fam Zheng f...@redhat.com --- block/vvfat.c | 12 ++-- 1 file changed, 6

Re: [Qemu-devel] [PATCH] [RFC] aio/async: Add timed bottom-halves

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 10:07, Alex Bligh ha scritto: Stefan, --On 17 July 2013 11:02:30 +0800 Stefan Hajnoczi stefa...@gmail.com wrote: The steps to achieving this: 1. Drop alarm timers from qemu-timer.c and calculate g_poll() timeout instead for the main loop. 2. Introduce a per-AioContext

Re: [Qemu-devel] [RFC V8 01/24] qcow2: Add journal specification.

2013-07-17 Thread Kevin Wolf
Am 17.07.2013 um 00:45 hat BenoƮt Canet geschrieben: Simple is good. Even for deduplication alone, I think data integrity is critical - otherwise we risk stale dedup metadata pointing to clusters that are unallocated or do not contain the right data. So the journal will probably need

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] Add Enhanced Three-Speed Ethernet Controller (eTSEC)

2013-07-17 Thread Fabien Chouteau
On 07/16/2013 06:54 PM, Scott Wood wrote: On 07/16/2013 11:15:51 AM, Fabien Chouteau wrote: On 07/16/2013 05:37 PM, Alexander Graf wrote: On 07/16/2013 05:28 PM, Fabien Chouteau wrote: On 07/16/2013 04:06 AM, Scott Wood wrote: On 07/10/2013 12:10:02 PM, Fabien Chouteau wrote: This

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] Add Enhanced Three-Speed Ethernet Controller (eTSEC)

2013-07-17 Thread Alexander Graf
Am 17.07.2013 um 10:24 schrieb Fabien Chouteau chout...@adacore.com: On 07/16/2013 06:54 PM, Scott Wood wrote: On 07/16/2013 11:15:51 AM, Fabien Chouteau wrote: On 07/16/2013 05:37 PM, Alexander Graf wrote: On 07/16/2013 05:28 PM, Fabien Chouteau wrote: On 07/16/2013 04:06 AM, Scott Wood

Re: [Qemu-devel] [Qemu-trivial] [PATCH] slirp: reorder include to fix FreeBSD build failure

2013-07-17 Thread Jan Kiszka
On 2013-07-14 00:35, Ed Maste wrote: On 13 July 2013 05:12, Michael Tokarev m...@tls.msk.rumailto:m...@tls.msk.ru wrote: Remaining: struct mbuf { union M_dat { charm_dat_[1]; /* ANSI don't like 0 sized arrays */ char*m_ext_; }

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Kevin Wolf
Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben: if a destination has has_zero_init = 0, but it supports discard zeroes use discard to convert the target into an all zero device. Signed-off-by: Peter Lieven p...@kamp.de Wouldn't it be better to use bdrv_write_zeroes() and extend the

Re: [Qemu-devel] [Qemu-trivial] [PATCH] slirp: reorder include to fix FreeBSD build failure

2013-07-17 Thread Michael Tokarev
17.07.2013 12:32, Jan Kiszka wrote: No problem, as Peter already said. Please provide an according patch. http://thread.gmane.org/gmane.comp.emulators.qemu/221949/focus=221975 (an attachtment there) http://git.corpit.ru/?p=qemu.git;a=commitdiff;h=2915c3b20260b1a653fced3b584d0c2b012880dc

Re: [Qemu-devel] [PATCH 14/17] PPC: dbdma: Support unaligned DMA access

2013-07-17 Thread Kevin Wolf
Am 01.07.2013 um 02:13 hat Alexander Graf geschrieben: The DBDMA engine really just reads bytes from a producing device (IDE in our case) and shoves these bytes into memory. It doesn't care whether any alignment takes place or not. Our code today however assumes that block accesses always

Re: [Qemu-devel] [PATCH v2 00/13] dataplane: use block layer

2013-07-17 Thread Stefan Hajnoczi
On Mon, Jul 15, 2013 at 07:05:50PM +0200, Paolo Bonzini wrote: Il 15/07/2013 16:42, Stefan Hajnoczi ha scritto: v2: * Rebased onto qemu.git/master * Added comment explaining how the dataplane thread is restarted after draining [pbonzini] This series adds image format, QMP

Re: [Qemu-devel] [PATCH 0/8] Add virtio-mmio and use it in vexpress

2013-07-17 Thread Christoffer Dall
On Wed, Jul 10, 2013 at 12:56:31PM +0200, Alexander Graf wrote: On 08.07.2013, at 23:06, Anthony Liguori wrote: Alexander Graf ag...@suse.de writes: On 08.07.2013, at 22:08, Anthony Liguori wrote: I think we're trying to fit a square peg into a round hole. virtio-mmio is a

[Qemu-devel] [PATCH V17 0/9] replace QEMUOptionParameter with QemuOpts parser

2013-07-17 Thread Dong Xu Wang
These patches will replace QEMUOptionParameter with QemuOpts. Change logs please go to each patch's commit message. Dong Xu Wang (9): qemu-option: add def_value_str in QemuOptDesc struct and rewrite qemu_opts_print qemu-option: avoid duplication of default value in QemuOpts qemu-option:

[Qemu-devel] [PATCH V17 3/9] qemu-option: create four QemuOptsList related functions

2013-07-17 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) fix indentation. 2) fix typo. v15-v16: 1) discard double-initialization. 2) use

[Qemu-devel] [PATCH V17 1/9] qemu-option: add def_value_str in QemuOptDesc struct and rewrite qemu_opts_print

2013-07-17 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 V5 11/12] NUMA: add qmp command query-numa

2013-07-17 Thread Wanlong Gao
Add qmp command query-numa to show guest NUMA information. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- numa.c | 78 qapi-schema.json | 34 qmp-commands.hx | 49

[Qemu-devel] [PATCH V5 00/12] Add support for binding guest numa nodes to host numa nodes

2013-07-17 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 V5 07/12] NUMA: split out the common range parser

2013-07-17 Thread Wanlong Gao
Since cpus parser and hostnode parser have the common range parser part, split it out to the common range parser to avoid the duplicate code. Reviewed-by: Bandan Das b...@redhat.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- numa.c | 86

[Qemu-devel] [PATCH V5 06/12] NUMA: parse guest numa nodes memory policy

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

[Qemu-devel] [PATCH V5 03/12] NUMA: move numa related code to numa.c

2013-07-17 Thread Wanlong Gao
Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- cpus.c | 14 include/sysemu/cpus.h | 1 - include/sysemu/sysemu.h | 1 + numa.c | 59 + vl.c| 43

[Qemu-devel] [PATCH V5 04/12] NUMA: Add numa_info structure to contain numa nodes info

2013-07-17 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. Reviewed-by: Eduardo Habkost ehabk...@redhat.com Signed-off-by: Andre Przywara andre.przyw...@amd.com Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com ---

[Qemu-devel] [PATCH V17 9/9] qemu-option: use qemu_opts_del without judging NULL

2013-07-17 Thread Dong Xu Wang
Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- block.c| 8 ++-- hw/core/qdev.c | 4 +--- qemu-char.c| 4 +--- qemu-img.c | 4 +--- 4 files changed, 5 insertions(+), 15 deletions(-) diff --git a/block.c b/block.c index e1d1c3d..e700593 100644 --- a/block.c +++

[Qemu-devel] [PATCH V5 05/12] NUMA: Add Linux libnuma detection

2013-07-17 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 V5 08/12] NUMA: set guest numa nodes memory policy

2013-07-17 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

Re: [Qemu-devel] [PATCH 0/8] Add virtio-mmio and use it in vexpress

2013-07-17 Thread Peter Maydell
On 17 July 2013 10:30, Christoffer Dall christoffer.d...@linaro.org wrote: I'm not familiar enough with QEMU internals to intelligently comment on this discussion, but I do have two observations: (1) It would be tremendously beneficial to have this patch series merged, so people can actually

[Qemu-devel] [PATCH 3/3] dataplane: enable virtio-blk x-data-plane=on live migration

2013-07-17 Thread Stefan Hajnoczi
Although the dataplane thread does not cooperate with dirty memory logging yet it's fairly easy to temporarily disable dataplane during live migration. This way virtio-blk can live migrate when x-data-plane=on. The dataplane thread will restart after migration is cancelled or if the guest

[Qemu-devel] [PATCH V5 09/12] NUMA: add qmp command set-mem-policy to set memory policy for NUMA node

2013-07-17 Thread Wanlong Gao
This QMP command allows user set guest node's memory policy through the QMP protocol. The qmp-shell command is like: set-mem-policy nodeid=0 policy=membind host-nodes=0-1 Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- numa.c | 55

[Qemu-devel] [PATCH V5 12/12] NUMA: convert hmp command info_numa to use qmp command query_numa

2013-07-17 Thread Wanlong Gao
Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- hmp.c | 34 ++ hmp.h | 1 + monitor.c | 21 + 3 files changed, 36 insertions(+), 20 deletions(-) diff --git a/hmp.c b/hmp.c index 7798339..66c2fef 100644 --- a/hmp.c +++ b/hmp.c

[Qemu-devel] [PATCH 2/3] migration: notify migration state before starting thread

2013-07-17 Thread Stefan Hajnoczi
The migration thread runs outside the QEMU global mutex when possible. Therefore we must notify migration state change *before* starting the migration thread. This allows registered listeners to act before live migration iterations begin. Therefore they can get into a state that allows for live

[Qemu-devel] [PATCH V5 10/12] NUMA: add hmp command set-mem-policy

2013-07-17 Thread Wanlong Gao
Add hmp command set-mem-policy 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-mem-policy 0 policy=membind,host-nodes=0-1 Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- hmp-commands.hx | 16

[Qemu-devel] [PATCH V17 4/9] qemu-option: create some QemuOpts functons

2013-07-17 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 V17 7/9] qemu-option: remove QEMUOptionParameter related functions and struct

2013-07-17 Thread Dong Xu Wang
Reviewed-by: Eric Blake ebl...@redhat.com 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

[Qemu-devel] [PATCH 0/3] dataplane: virtio-blk live migration with x-data-plane=on

2013-07-17 Thread Stefan Hajnoczi
These patches add live migration support to -device virtio-blk-pci,x-data-plane=on. Patch 1 has already been posted and merged into the block tree. I have included it for convenience. Patches 2 3 implement a switch from dataplane mode back to regular virtio-blk mode when migration starts.

[Qemu-devel] [PATCH V17 2/9] qemu-option: avoid duplication of default value in QemuOpts

2013-07-17 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 v2 01/11] block: replace in_use with refcnt_soft and refcnt_hard

2013-07-17 Thread Fam Zheng
Introduce refcnt_soft (soft reference) and refcnt_hard (hard reference) to BlockDriverState, since in_use mechanism cannot provide proper management of lifecycle when a BDS is referenced in multiple places (e.g. pointed to by another bs's backing_hd while also used as a block job device, in the

[Qemu-devel] [PATCH V17 6/9] qapi: query-command-line-options outputs def_value_str

2013-07-17 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 --- v16-v17: 1) add Since 1.6 tag. 2) rename def_str_value to default. qapi-schema.json | 8

[Qemu-devel] [PATCH v2 02/11] block: use refcnt for bs-backing_hd and bs-file

2013-07-17 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 18 ++ block/blkdebug.c | 1 + block/blkverify.c | 1 + block/snapshot.c | 2 +- block/stream.c| 2 +- block/vvfat.c | 1 + 6 files changed, 19 insertions(+), 6 deletions(-) diff --git a/block.c

[Qemu-devel] [PATCH v2 05/11] migration: omit drive ref as we have bdrv_ref now

2013-07-17 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- block-migration.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/block-migration.c b/block-migration.c index d558410..d14f4eb 100644 --- a/block-migration.c +++ b/block-migration.c @@ -320,7 +320,6 @@ static void init_blk_migration_it(void

[Qemu-devel] [PATCH v2 04/11] block: use refcnt for device attach/detach

2013-07-17 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block.c b/block.c index 7b46669..57a3876 100644 --- a/block.c +++ b/block.c @@ -1622,6 +1622,7 @@ int bdrv_attach_dev(BlockDriverState *bs, void *dev) return -EBUSY; }

[Qemu-devel] [PATCH v2 06/11] xen_disk: simplify blk_disconnect with refcnt

2013-07-17 Thread Fam Zheng
We call bdrv_attach_dev when initializing whether or not bs is created locally, so call bdrv_detach_dev and let the refcnt handle the lifecycle. Signed-off-by: Fam Zheng f...@redhat.com --- hw/block/xen_disk.c | 7 +-- 1 file changed, 1 insertion(+), 6 deletions(-) diff --git

[Qemu-devel] [PATCH v2 00/11] Point-in-time snapshot exporting over NBD

2013-07-17 Thread Fam Zheng
This series adds for point-in-time snapshot NBD exporting based on blockdev-backup (variant of drive-backup with existing device as target). This patch is built on top of imain's sync mode patches for drive-backup. We get a thin point-in-time snapshot by COW mechanism of drive-backup, and export

[Qemu-devel] [PATCH v2 10/11] block: add option 'backing' to -drive options

2013-07-17 Thread Fam Zheng
This option allows overriding backing hd of drive. If the target drive exists, it's referenced as the backing file and refcount incremented. Example: qemu-system-x86_64 -drive \ file.filename=foo.qcow2,if=none,id=foo \ -drive file=bar.qcow2,backing=foo Signed-off-by: Fam

[Qemu-devel] [PATCH v2 03/11] block: use refcnt for drive_init/drive_uninit

2013-07-17 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/blockdev.c b/blockdev.c index c5abd65..bb986a1 100644 --- a/blockdev.c +++ b/blockdev.c @@ -212,7 +212,7 @@ static void bdrv_format_print(void *opaque, const char

[Qemu-devel] [PATCH v2 09/11] block: add assertion to check refcount before deleting

2013-07-17 Thread Fam Zheng
If BDS is managed with refcnt, we should not call bdrv_delete() directly, instead bdrv_unref() should be used. Adding assertion to ensure this. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/block.c b/block.c index 499de22..147a448

[Qemu-devel] [PATCH 1/3] dataplane: sync virtio.c and vring.c virtqueue state

2013-07-17 Thread Stefan Hajnoczi
Load the virtio.c state into vring.c when we start dataplane mode and vice versa when stopping dataplane mode. This patch makes it possible to start and stop dataplane any time while the guest is running. This is very useful since it will allow us to go back to QEMU main loop for

[Qemu-devel] [PULL 0/5] pci,net,pc enhancements

2013-07-17 Thread Michael S. Tsirkin
From: Michael S. Tsirkin m...@redhat.com The following changes since commit 7588e2b0559ae72d3c2952c7807fc05c03099970: pci: Fold host_buses list into PCIHostState functionality (2013-07-07 23:10:57 +0300) are available in the git repository at:

[Qemu-devel] [PATCH v2 11/11] qmp: add command 'blockdev-backup'

2013-07-17 Thread Fam Zheng
Similar to drive-backup, but this command uses a device id as target instead of creating/opening an image file. Signed-off-by: Fam Zheng f...@redhat.com --- blockdev.c | 71 qapi-schema.json | 49

[Qemu-devel] [PATCH v2 07/11] block: hold hard reference for backup/mirror target

2013-07-17 Thread Fam Zheng
Signed-off-by: Fam Zheng f...@redhat.com --- block/backup.c | 3 ++- block/mirror.c | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/block/backup.c b/block/backup.c index 16105d4..b82f601 100644 --- a/block/backup.c +++ b/block/backup.c @@ -294,7 +294,7 @@ static void

[Qemu-devel] [PULL 1/5] pci-bridge: update mappings for migration/restore

2013-07-17 Thread Michael S. Tsirkin
From: Don Koch dk...@verizon.com Fix for LP#1187529: Devices on PCI bridge stop working when live-migrated. Update bridge mappings for all PCI bridge devices in get_pci_config_device(). Signed-off-by: Don Koch dk...@verizon.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci/pci.c

[Qemu-devel] [PULL 3/5] net: add support of mac-programming over macvtap in QEMU side

2013-07-17 Thread Michael S. Tsirkin
From: Amos Kong ak...@redhat.com Currently macvtap based macvlan device is working in promiscuous mode, we want to implement mac-programming over macvtap through Libvirt for better performance. Design: QEMU notifies Libvirt when rx-filter config is changed in guest, then Libvirt query the

[Qemu-devel] [PATCH v2 08/11] block: simplify bdrv_drop_intermediate

2013-07-17 Thread Fam Zheng
bdrv_drop_intermediate used a local list to iterate through backing chain and delete each BDS. It is simplified while adopting to refcount mechanism. Signed-off-by: Fam Zheng f...@redhat.com --- block.c | 71 ++--- 1 file changed, 11

[Qemu-devel] [PULL 4/5] virtio-net: add feature bit for any header s/g

2013-07-17 Thread Michael S. Tsirkin
Old qemu versions required that 1st s/g entry is the header. Since QEMU 1.5, patchset titled virtio-net: iovec handling cleanup removed this limitation but a feature bit is needed so guests know it's safe to lay out header differently. This patch applies on top and adds such a feature bit to

[Qemu-devel] [PATCH] RFC: hcd-ohci: add dma error handling

2013-07-17 Thread Alexey Kardashevskiy
From: Benjamin Herrenschmidt b...@kernel.crashing.org Current hcd-ohci does not handle DMA errors which can actually happen. However it is not clear what approach should be used here - for example, get_dwords returns positive number saying that there is no error as all the callers consider the

[Qemu-devel] [PULL 5/5] pc: don't access fw cfg if NULL

2013-07-17 Thread Michael S. Tsirkin
commit f8c457b88d72a48989f190bc3d7b79f4f3b7d11c pc: pass PCI hole ranges to Guests broke Xen as it has no fw_cfg. Check for this configuration and boil out. Signed-off-by: Michael S. Tsirkin m...@redhat.com Tested-by: Stefano Stabellini stefano.stabell...@eu.citrix.com --- hw/i386/pc.c | 2

[Qemu-devel] [PATCH V17 8/9] qemu-option: make qemu_opts_del accept opts being NULL

2013-07-17 Thread Dong Xu Wang
Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- util/qemu-option.c | 4 1 file changed, 4 insertions(+) diff --git a/util/qemu-option.c b/util/qemu-option.c index 7545486..f4a0282 100644 --- a/util/qemu-option.c +++ b/util/qemu-option.c @@ -656,6 +656,10 @@ void

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Markus Armbruster
Richard Henderson r...@twiddle.net writes: Honor the implementation maximum access size, and at least check the minimum access size. Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Richard Henderson r...@twiddle.net Fails for me: qemu-system-x86_64:

Re: [Qemu-devel] [PATCH V17 8/9] qemu-option: make qemu_opts_del accept opts being NULL

2013-07-17 Thread Dong Xu Wang
Please ignore patch 8 and patch9, it won't work and I will re-send them seperately. Sorry for the inconvenience. On Wed, Jul 17, 2013 at 5:29 PM, Dong Xu Wang wdon...@linux.vnet.ibm.com wrote: Signed-off-by: Dong Xu Wang wdon...@linux.vnet.ibm.com --- util/qemu-option.c | 4 1 file

Re: [Qemu-devel] [PATCH v2 00/13] dataplane: use block layer

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 11:22, Stefan Hajnoczi ha scritto: Stopping the dataplane event loop is not really necessary for correctness; that only requires stopping the ioeventfd, and indeed this series already includes patches for this. So you definitely have my approval (in quotes because you're the

[Qemu-devel] [PATCH v2] block: fix vvfat error path for enable_write_target

2013-07-17 Thread Fam Zheng
s-qcow and s-qcow_filename are allocated but not freed on error. Fix the possible leaks, remove unnecessary check for bdrv_new(), propagate ret code of bdrv_create() and also the one of enable_write_target(). Signed-off-by: Fam Zheng f...@redhat.com --- v2: Fix leak of s-qcow_filename, propagate

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 10:46, Kevin Wolf ha scritto: Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben: if a destination has has_zero_init = 0, but it supports discard zeroes use discard to convert the target into an all zero device. Signed-off-by: Peter Lieven p...@kamp.de Wouldn't it be better

[Qemu-devel] [PATCH V5 01/12] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-07-17 Thread Wanlong Gao
Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- qapi-schema.json | 44 1 file changed, 44 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 7b9fef1..f753a35 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -3679,3

[Qemu-devel] [PULL 2/5] pci: fix BRDIGE typo

2013-07-17 Thread Michael S. Tsirkin
From: Don Koch dk...@verizon.com Fix typo in macro name: PCI_CLASS_BRDIGE_PCI_INF_SUB. Signed-off-by: Don Koch dk...@verizon.com Signed-off-by: Michael S. Tsirkin m...@redhat.com --- hw/pci-bridge/i82801b11.c | 2 +- include/hw/pci/pci_ids.h | 2 +- 2 files changed, 2 insertions(+), 2

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] Add Enhanced Three-Speed Ethernet Controller (eTSEC)

2013-07-17 Thread Fabien Chouteau
On 07/16/2013 07:50 PM, Scott Wood wrote: On 07/16/2013 10:28:28 AM, Fabien Chouteau wrote: On 07/16/2013 04:06 AM, Scott Wood wrote: On 07/10/2013 12:10:02 PM, Fabien Chouteau wrote: +obj-$(CONFIG_ETSEC) += etsec.o etsec_registers.o etsec_rings.o etsec_miim.o Maybe an fsl_etsec

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
Am 17.07.2013 um 11:58 schrieb Paolo Bonzini pbonz...@redhat.com: Il 17/07/2013 10:46, Kevin Wolf ha scritto: Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben: if a destination has has_zero_init = 0, but it supports discard zeroes use discard to convert the target into an all zero

Re: [Qemu-devel] [PATCH v2] block: fix vvfat error path for enable_write_target

2013-07-17 Thread Laszlo Ersek
On 07/17/13 11:57, Fam Zheng wrote: s-qcow and s-qcow_filename are allocated but not freed on error. Fix the possible leaks, remove unnecessary check for bdrv_new(), propagate ret code of bdrv_create() and also the one of enable_write_target(). Signed-off-by: Fam Zheng f...@redhat.com ---

Re: [Qemu-devel] [PATCH 2/3] migration: notify migration state before starting thread

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 11:35, Stefan Hajnoczi ha scritto: The migration thread runs outside the QEMU global mutex when possible. Therefore we must notify migration state change *before* starting the migration thread. This allows registered listeners to act before live migration iterations begin.

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] Add Enhanced Three-Speed Ethernet Controller (eTSEC)

2013-07-17 Thread Alexander Graf
On 17.07.2013, at 12:17, Fabien Chouteau wrote: On 07/16/2013 07:50 PM, Scott Wood wrote: On 07/16/2013 10:28:28 AM, Fabien Chouteau wrote: On 07/16/2013 04:06 AM, Scott Wood wrote: On 07/10/2013 12:10:02 PM, Fabien Chouteau wrote: +obj-$(CONFIG_ETSEC) += etsec.o etsec_registers.o

Re: [Qemu-devel] [PATCH 0/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
Am 16.07.2013 um 13:55 schrieb Paolo Bonzini pbonz...@redhat.com: Il 16/07/2013 13:40, Peter Lieven ha scritto: The conflict with your block status patches can't be large. upstream/master has no iscsi_co_is_allocated yet, so there should be no trouble. Yes, whoever goes second has to

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
Am 17.07.2013 um 10:46 schrieb Kevin Wolf kw...@redhat.com: Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben: if a destination has has_zero_init = 0, but it supports discard zeroes use discard to convert the target into an all zero device. Signed-off-by: Peter Lieven p...@kamp.de

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Kevin Wolf
Am 17.07.2013 um 11:58 hat Paolo Bonzini geschrieben: Il 17/07/2013 10:46, Kevin Wolf ha scritto: Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben: if a destination has has_zero_init = 0, but it supports discard zeroes use discard to convert the target into an all zero device.

Re: [Qemu-devel] [PATCH 16/17] block: add default get_block_status implementation for protocols

2013-07-17 Thread Peter Lieven
Am 16.07.2013 um 09:19 schrieb Paolo Bonzini pbonz...@redhat.com: Il 16/07/2013 08:47, Peter Lieven ha scritto: @@ -2977,7 +2977,11 @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, if (!bs-drv-bdrv_co_get_block_status) { *pnum = nb_sectors; -

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Kevin Wolf
Am 17.07.2013 um 12:21 hat Peter Lieven geschrieben: Am 17.07.2013 um 11:58 schrieb Paolo Bonzini pbonz...@redhat.com: Il 17/07/2013 10:46, Kevin Wolf ha scritto: Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben: if a destination has has_zero_init = 0, but it supports discard

Re: [Qemu-devel] [PATCH 3/3] dataplane: enable virtio-blk x-data-plane=on live migration

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 11:35, Stefan Hajnoczi ha scritto: Although the dataplane thread does not cooperate with dirty memory logging yet it's fairly easy to temporarily disable dataplane during live migration. This way virtio-blk can live migrate when x-data-plane=on. The dataplane thread will

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] Add Enhanced Three-Speed Ethernet Controller (eTSEC)

2013-07-17 Thread Fabien Chouteau
On 07/17/2013 10:29 AM, Alexander Graf wrote: Am 17.07.2013 um 10:24 schrieb Fabien Chouteau chout...@adacore.com: On 07/16/2013 06:54 PM, Scott Wood wrote: On 07/16/2013 11:15:51 AM, Fabien Chouteau wrote: On 07/16/2013 05:37 PM, Alexander Graf wrote: On 07/16/2013 05:28 PM, Fabien

Re: [Qemu-devel] [PATCH 0/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 12:23, Peter Lieven ha scritto: Am 16.07.2013 um 13:55 schrieb Paolo Bonzini pbonz...@redhat.com: Il 16/07/2013 13:40, Peter Lieven ha scritto: The conflict with your block status patches can't be large. upstream/master has no iscsi_co_is_allocated yet, so there should be

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
Am 17.07.2013 um 12:27 schrieb Kevin Wolf kw...@redhat.com: Am 17.07.2013 um 12:21 hat Peter Lieven geschrieben: Am 17.07.2013 um 11:58 schrieb Paolo Bonzini pbonz...@redhat.com: Il 17/07/2013 10:46, Kevin Wolf ha scritto: Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben: if a

Re: [Qemu-devel] [PATCH V5 01/12] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-07-17 Thread Laszlo Ersek
comments below On 07/17/13 11:29, Wanlong Gao wrote: Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- qapi-schema.json | 44 1 file changed, 44 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index 7b9fef1..f753a35

[Qemu-devel] [PATCH V5 02/12] NUMA: split -numa option

2013-07-17 Thread Wanlong Gao
Change -numa option like following as Paolo suggested: -numa node,nodeid=0,cpus=0-1 \ -numa mem,nodeid=0,size=1G This new option will make later coming memory hotplug better. And this new option is implemented using OptsVisitor. Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com ---

Re: [Qemu-devel] [PATCH 16/17] block: add default get_block_status implementation for protocols

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 12:26, Peter Lieven ha scritto: Am 16.07.2013 um 09:19 schrieb Paolo Bonzini pbonz...@redhat.com: Il 16/07/2013 08:47, Peter Lieven ha scritto: @@ -2977,7 +2977,11 @@ static int64_t coroutine_fn bdrv_co_get_block_status(BlockDriverState *bs, if

Re: [Qemu-devel] [PATCH 0/2] changes related to monitor flow control

2013-07-17 Thread Amit Shah
On (Tue) 16 Jul 2013 [20:19:39], Laszlo Ersek wrote: When the IO thread calls monitor_flush() repeatedly quickly in succession, outside of callback context, many redundant G_IO_OUT watches are installed. (One such caller is the info tlb / tlb_info() HMP command which produces a lot of monitor

Re: [Qemu-devel] [PATCH 0/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Peter Lieven
Am 17.07.2013 um 12:28 schrieb Paolo Bonzini pbonz...@redhat.com: Il 17/07/2013 12:23, Peter Lieven ha scritto: Am 16.07.2013 um 13:55 schrieb Paolo Bonzini pbonz...@redhat.com: Il 16/07/2013 13:40, Peter Lieven ha scritto: The conflict with your block status patches can't be large.

Re: [Qemu-devel] [Qemu-ppc] [PATCH 2/2] Add Enhanced Three-Speed Ethernet Controller (eTSEC)

2013-07-17 Thread Fabien Chouteau
On 07/17/2013 12:22 PM, Alexander Graf wrote: On 17.07.2013, at 12:17, Fabien Chouteau wrote: On 07/16/2013 07:50 PM, Scott Wood wrote: On 07/16/2013 10:28:28 AM, Fabien Chouteau wrote: On 07/16/2013 04:06 AM, Scott Wood wrote: On 07/10/2013 12:10:02 PM, Fabien Chouteau wrote: +/*

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 12:21, Peter Lieven ha scritto: BTW, Peter and Ronnie: we were assuming that UNMAP with LBPRZ=1 always zeroes blocks, but is that true for unaligned operations? Good question, I will pass it to ronnie. My guess is that the command will fail with a check condition if it failed

Re: [Qemu-devel] [PATCH 4/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 12:27, Kevin Wolf ha scritto: Am 17.07.2013 um 12:21 hat Peter Lieven geschrieben: Am 17.07.2013 um 11:58 schrieb Paolo Bonzini pbonz...@redhat.com: Il 17/07/2013 10:46, Kevin Wolf ha scritto: Am 15.07.2013 um 12:49 hat Peter Lieven geschrieben: if a destination has

Re: [Qemu-devel] [PATCH 0/4] qemu-img: conditionally discard target on convert

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 12:40, Peter Lieven ha scritto: Am 17.07.2013 um 12:28 schrieb Paolo Bonzini pbonz...@redhat.com: Il 17/07/2013 12:23, Peter Lieven ha scritto: Am 16.07.2013 um 13:55 schrieb Paolo Bonzini pbonz...@redhat.com: Il 16/07/2013 13:40, Peter Lieven ha scritto: The conflict

Re: [Qemu-devel] [PATCH V5 02/12] NUMA: split -numa option

2013-07-17 Thread Laszlo Ersek
I'm reviewing this with respect to opts-visitor usage: On 07/17/13 11:29, Wanlong Gao wrote: Change -numa option like following as Paolo suggested: -numa node,nodeid=0,cpus=0-1 \ -numa mem,nodeid=0,size=1G This new option will make later coming memory hotplug better. And this new

Re: [Qemu-devel] [PULL 3/5] exec: Support 64-bit operations in address_space_rw

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 11:50, Markus Armbruster ha scritto: Richard Henderson r...@twiddle.net writes: Honor the implementation maximum access size, and at least check the minimum access size. Reviewed-by: Paolo Bonzini pbonz...@redhat.com Signed-off-by: Richard Henderson r...@twiddle.net Fails

Re: [Qemu-devel] [PATCH V5 01/12] NUMA: add NumaOptions, NumaNodeOptions and NumaMemOptions

2013-07-17 Thread Paolo Bonzini
Il 17/07/2013 12:35, Laszlo Ersek ha scritto: comments below On 07/17/13 11:29, Wanlong Gao wrote: Signed-off-by: Wanlong Gao gaowanl...@cn.fujitsu.com --- qapi-schema.json | 44 1 file changed, 44 insertions(+) diff --git a/qapi-schema.json

  1   2   3   >