Re: [Qemu-devel] [PATCH v22 03/25] improve some functions in qemu-option.c

2014-03-11 Thread Chunyan Liu
2014-03-11 5:21 GMT+08:00 Eric Blake : > On 03/10/2014 02:29 PM, Eric Blake wrote: > > >> +opt = qemu_opt_find(opts, name); > >> +if (opt) { > >> +g_free((char *)opt->str); > > > > ...which means the cast is pointless here. > > > > Hmm. This means that you are giving opt_set() the

[Qemu-devel] [PATCH v2 6/9] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap

2014-03-11 Thread Fam Zheng
Signed-off-by: Fam Zheng --- block.c | 30 -- include/block/block.h | 4 2 files changed, 32 insertions(+), 2 deletions(-) diff --git a/block.c b/block.c index 26a43eb..199a465 100644 --- a/block.c +++ b/block.c @@ -52,6 +52,8 @@ struct BdrvDirt

[Qemu-devel] [PATCH v2 8/9] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2014-03-11 Thread Fam Zheng
For "dirty-bitmap" sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of "top" sync mode. There are two bitmap use modes for sync=dirty-bitmap: - reset: backup

[Qemu-devel] [PATCH v2 4/9] block: Introduce bdrv_dirty_bitmap_granularity()

2014-03-11 Thread Fam Zheng
This returns the granularity (in sectors) of dirty bitmap. Signed-off-by: Fam Zheng --- block.c | 6 ++ include/block/block.h | 2 ++ 2 files changed, 8 insertions(+) diff --git a/block.c b/block.c index 9de1385..26a43eb 100644 --- a/block.c +++ b/block.c @@ -5143,6 +5143,12 @

Re: [Qemu-devel] [PATCH v22 04/25] improve assertion in qemu_opt_get functions

2014-03-11 Thread Chunyan Liu
2014-03-11 5:44 GMT+08:00 Eric Blake : > On 03/10/2014 01:31 AM, Chunyan Liu wrote: > > In qemu_opt_set functions, if desc doen't exist but opts_accepts_any is > true, it > > s/doen't/doesn't/ > > I mentioned the same problem against v20. It is very depressing when > review comments are not addre

[Qemu-devel] [PATCH v2 7/9] qmp: Add dirty-bitmap-enable and dirty-bitmap-disable

2014-03-11 Thread Fam Zheng
This allows to put the dirty bitmap into a disabled state where no more writes will be tracked. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng --- block.c | 15 +++ blockdev.c| 44 ++

[Qemu-devel] [PATCH v2 1/9] qapi: Add optional field "name" to block dirty bitmap

2014-03-11 Thread Fam Zheng
This field will be set for user created dirty bitmap. Also pass in an error pointer to bdrv_create_dirty_bitmap, so when a name is already taken on this BDS, it can report an error message. This is not global check, two BDSes can have dirty bitmap with a common name. Implemented bdrv_find_dirty_bi

[Qemu-devel] [PATCH v2 5/9] hbitmap: Add hbitmap_copy

2014-03-11 Thread Fam Zheng
This makes a deep copy of an HBitmap. Signed-off-by: Fam Zheng --- include/qemu/hbitmap.h | 8 util/hbitmap.c | 13 + 2 files changed, 21 insertions(+) diff --git a/include/qemu/hbitmap.h b/include/qemu/hbitmap.h index 550d7ce..b645cfc 100644 --- a/include/qemu/hbi

[Qemu-devel] [PATCH v2 9/9] qapi: Add transaction support to dirty-bitmap-{add, disable}

2014-03-11 Thread Fam Zheng
This adds dirty-bitmap-add and dirty-bitmap-disable to transactions. With this, user can stop a dirty bitmap, start backup of it, and start another dirty bitmap atomically, so that the dirty bitmap is tracked incrementally and we don't miss any write. Signed-off-by: Fam Zheng --- blockdev.c

[Qemu-devel] [PATCH v2 2/9] qmp: Add dirty-bitmap-add and dirty-bitmap-remove

2014-03-11 Thread Fam Zheng
The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps with the same names. Signed-off-by: Fam Zheng --- blockdev.c | 60 +

[Qemu-devel] [PATCH v2 0/9] QMP: Introduce incremental drive-backup with in-memory dirty bitmap

2014-03-11 Thread Fam Zheng
Introduction This implements incremental backup. A convenient option "bitmap-use-mode" for drive-backup is introduced since v1. Commands A new sync mode for drive-backup is introduced: drive-backup device=.. mode=.. sync=dirty-bitmap bitmap=bitmap0 bitmap-use-mode=re

[Qemu-devel] [PATCH v2 3/9] block: Handle error of bdrv_getlength in bdrv_create_dirty_bitmap

2014-03-11 Thread Fam Zheng
bdrv_getlength could fail, check the return value before using it. Signed-off-by: Fam Zheng --- block.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index ce48fff..9de1385 100644 --- a/block.c +++ b/block.c @@ -5083,7 +5083,12 @@ BdrvDirtyBitmap *b

Re: [Qemu-devel] [PATCH v22 07/25] change block layer to support both QemuOpts and QEMUOptionParamter

2014-03-11 Thread Chunyan Liu
2014-03-12 0:54 GMT+08:00 Eric Blake : > On 03/10/2014 01:31 AM, Chunyan Liu wrote: > > Change block layer to support both QemuOpts and QEMUOptionParameter. > > After this patch, it will change backend drivers one by one. At the end, > > QEMUOptionParameter will be removed and only QemuOpts is kep

Re: [Qemu-devel] [RFC v3 2/3] i386: use CpuTopoInfo instead apic_id as argument for pc_new_cpu()

2014-03-11 Thread Chen Fan
On Tue, 2014-03-11 at 15:00 -0300, Eduardo Habkost wrote: > On Tue, Mar 11, 2014 at 06:58:53PM +0800, chen.fan.fnst wrote: > > From: "chen.fan.fnst" > > > > Signed-off-by: Chen Fan > > --- > > hw/i386/pc.c | 12 > > target-i386/cpu.c | 2 -- > > target-i386/cpu.h | 3 +++ > >

[Qemu-devel] [PATCH v5 10/11] spapr-vfio: add spapr-pci-vfio-host-bridge to support vfio

2014-03-11 Thread Alexey Kardashevskiy
The patch adds a spapr-pci-vfio-host-bridge device type which is a PCI Host Bridge with VFIO support. The new device inherits from the spapr-pci-host-bridge device and adds the following properties: iommu - IOMMU group ID which represents a Partitionable Endpoint, QEMU/ppc64

[Qemu-devel] [PATCH v5 08/11] spapr-iommu: add SPAPR VFIO IOMMU device

2014-03-11 Thread Alexey Kardashevskiy
This adds SPAPR VFIO IOMMU device in order to support DMA operations for VFIO devices. Signed-off-by: Alexey Kardashevskiy --- Changes: v7: * fixed to adjust changes to support VFIO KVM device --- hw/ppc/spapr_iommu.c | 97 ++ include/hw/ppc/spap

[Qemu-devel] [PATCH v5 11/11] spapr-vfio: enable for spapr

2014-03-11 Thread Alexey Kardashevskiy
This turns the sPAPR support on and enables VFIO container use in the kernel. Signed-off-by: Alexey Kardashevskiy --- Changes: v5: * multiple returns converted to gotos v4: * fixed format string to use %m which is a glibc extension: "Print output of strerror(errno). No argument is required." ---

[Qemu-devel] [PATCH v5 02/11] int128: add int128_exts64()

2014-03-11 Thread Alexey Kardashevskiy
This adds macro to extend signed 64bit value to signed 128bit value. Signed-off-by: Alexey Kardashevskiy --- Changes: v2: * (.hi = (a >> 63) ? -1 : 0) changed to (.hi = (a < 0) ? -1 : 0) --- include/qemu/int128.h | 5 + 1 file changed, 5 insertions(+) diff --git a/include/qemu/int128.h b/in

[Qemu-devel] [PATCH v5 05/11] vfio: Introduce VFIO address spaces

2014-03-11 Thread Alexey Kardashevskiy
From: David Gibson The only model so far supported for VFIO passthrough devices is the model usually used on x86, where all of the guest's RAM is mapped into the (host) IOMMU and there is no IOMMU visible in the guest. This patch begins to relax this model, introducing the notion of a VFIOAddres

[Qemu-devel] [PATCH v5 03/11] vfio: Fix 128 bit handling

2014-03-11 Thread Alexey Kardashevskiy
Upcoming VFIO on SPAPR PPC64 support will initialize the IOMMU memory region with UINT64_MAX (2^64 bytes) size so int128_get64() will assert. The patch takes care of this check. The existing type1 IOMMU code is not expected to map all 64 bits of RAM so the patch does not touch that part. Signed-o

[Qemu-devel] [PATCH v5 00/11] vfio on spapr-ppc64

2014-03-11 Thread Alexey Kardashevskiy
Yet another try with VFIO on SPAPR (server PPC64). As the previous try was too long time ago, I did not bother with the change log much as all of this requires review again. Also, it depends on these 2 patchsets which I cannot get reviewed yet (keep pinging...): [PATCH] spapr-iommu: extend SPAPR_TC

[Qemu-devel] [PATCH v5 07/11] vfio: Add guest side IOMMU support

2014-03-11 Thread Alexey Kardashevskiy
From: David Gibson This patch uses the new IOMMU notifiers to allow VFIO pass through devices to work with guest side IOMMUs, as long as the host-side VFIO iommu has sufficient capability and granularity to match the guest side. This works by tracking all map and unmap operations on the guest IOM

[Qemu-devel] [PATCH v5 01/11] memory: Sanity check that no listeners remain on a destroyed AddressSpace

2014-03-11 Thread Alexey Kardashevskiy
From: David Gibson At the moment, most AddressSpace objects last as long as the guest system in practice, but that could well change in future. In addition, for VFIO we will be introducing some private per-AdressSpace information, which must be disposed of before the AddressSpace itself is destr

[Qemu-devel] [PATCH v5 06/11] vfio: Create VFIOAddressSpace objects as needed

2014-03-11 Thread Alexey Kardashevskiy
From: David Gibson So far, VFIO has a notion of different logical DMA address spaces, but only ever uses one (system memory). This patch extends this, creating new VFIOAddressSpace objects as necessary, according to the AddressSpace reported by the PCI subsystem for this device's DMAs. This isn

[Qemu-devel] [PATCH v5 04/11] vfio: rework to have error paths

2014-03-11 Thread Alexey Kardashevskiy
This reworks vfio_connect_container() and vfio_get_group() to have common exit path at the end of the function bodies. Signed-off-by: Alexey Kardashevskiy --- hw/misc/vfio.c | 60 -- 1 file changed, 33 insertions(+), 27 deletions(-) diff -

[Qemu-devel] [PATCH v5 09/11] spapr vfio: add vfio_container_spapr_get_info()

2014-03-11 Thread Alexey Kardashevskiy
As sPAPR platform supports DMA windows on a PCI bus, the information about their location and size should be passed into the guest via the device tree. The patch adds a helper to read this info from the container fd. Signed-off-by: Alexey Kardashevskiy --- Changes: v6: * added dup() to protect g

Re: [Qemu-devel] [PATCH] spapr-iommu: extend SPAPR_TCE_TABLE class

2014-03-11 Thread Alexey Kardashevskiy
On 12/20/2013 01:47 PM, Alexey Kardashevskiy wrote: > On 12/05/2013 08:39 PM, Alexey Kardashevskiy wrote: >> On 11/20/2013 04:39 PM, Alexey Kardashevskiy wrote: >>> This adds a put_tce() callback to the SPAPR TCE TABLE device class. >>> The new callback allows to have different IOMMU types such as

Re: [Qemu-devel] [PATCH 0/4] spapr-pci: prepare for vfio

2014-03-11 Thread Alexey Kardashevskiy
On 02/12/2014 10:44 PM, Alexey Kardashevskiy wrote: > On 01/15/2014 06:10 PM, Alexey Kardashevskiy wrote: >> On 12/20/2013 01:47 PM, Alexey Kardashevskiy wrote: >>> On 12/05/2013 08:39 PM, Alexey Kardashevskiy wrote: On 11/21/2013 03:08 PM, Alexey Kardashevskiy wrote: > Here are few rework

Re: [Qemu-devel] [PATCH v22 05/25] add some QemuOpts functions for replace work

2014-03-11 Thread Chunyan Liu
2014-03-11 19:59 GMT+08:00 Eric Blake : > On 03/10/2014 11:29 PM, Chunyan Liu wrote: > >> > >> Why are your later callers using a common helper function, but > >> qemu_opt_get_del() repeating a lot of the body of qemu_opt_get()? > >> Shouldn't qemu_opt_get() and qemu_opt_get_del() call into a comm

Re: [Qemu-devel] [PATCH v22 01/25] add def_value_str to QemuOptDesc

2014-03-11 Thread Chunyan Liu
2014-03-11 21:29 GMT+08:00 Stefan Hajnoczi : > On Mon, Mar 10, 2014 at 03:31:37PM +0800, Chunyan Liu wrote: > > Add def_value_str (default value) to QemuOptDesc, to replace function of > the > > default value in QEMUOptionParameter. And improved related functions. > > > > Signed-off-by: Dong Xu Wa

Re: [Qemu-devel] [PATCH 2/2] tests-ppc64: test for -device spapr-pci-host-bridge

2014-03-11 Thread Alexey Kardashevskiy
On 03/06/2014 12:59 PM, Alexey Kardashevskiy wrote: > On 03/06/2014 07:42 AM, Andreas Färber wrote: >> Am 14.02.2014 05:05, schrieb Alexey Kardashevskiy: >>> On 02/11/2014 02:48 AM, Andreas Färber wrote: Am 10.02.2014 04:52, schrieb Alexey Kardashevskiy: > This adds a test if SPAPR PHB can

Re: [Qemu-devel] [PATCH 2.1 17/28] memory: move mem_path handling to memory_region_allocate_system_memory

2014-03-11 Thread Marcelo Tosatti
On Tue, Mar 11, 2014 at 09:03:29AM +0100, Paolo Bonzini wrote: > Il 11/03/2014 04:50, Hu Tao ha scritto: > >On Tue, Mar 04, 2014 at 03:00:45PM +0100, Paolo Bonzini wrote: > >>Like the previous patch did in exec.c, split memory_region_init_ram and > >>memory_region_init_ram_from_file, and push mem_p

Re: [Qemu-devel] [PATCH] qom/cpu: Remove cpu->exit_request from reset state

2014-03-11 Thread Edgar E. Iglesias
On Wed, Mar 12, 2014 at 12:03:19AM +, Peter Maydell wrote: > On 11 March 2014 23:58, Andreas Färber wrote: > > Am 20.02.2014 16:58, schrieb Peter Maydell: > >> On 16 February 2014 02:07, Edgar E. Iglesias > >> wrote: > >>> On Sat, Feb 15, 2014 at 03:42:56PM +, Peter Maydell wrote: >

Re: [Qemu-devel] [PATCH qom-cpu v2 09/40] cpu: Turn cpu_handle_mmu_fault() into a CPUClass hook

2014-03-11 Thread Andreas Färber
Am 10.03.2014 08:52, schrieb Paolo Bonzini: > Il 10/03/2014 01:15, Andreas Färber ha scritto: >> Note that while such functions may exist both for *-user and softmmu, >> only *-user uses the CPUState hook, while softmmu reuses the prototype >> for calling it directly. > > I'm not sure I understand

Re: [Qemu-devel] [PATCH] qom/cpu: Remove cpu->exit_request from reset state

2014-03-11 Thread Peter Maydell
On 11 March 2014 23:58, Andreas Färber wrote: > Am 20.02.2014 16:58, schrieb Peter Maydell: >> On 16 February 2014 02:07, Edgar E. Iglesias >> wrote: >>> On Sat, Feb 15, 2014 at 03:42:56PM +, Peter Maydell wrote: On 13 February 2014 05:07, wrote: > From: "Edgar E. Iglesias" >

Re: [Qemu-devel] [PATCH] qom/cpu: Remove cpu->exit_request from reset state

2014-03-11 Thread Andreas Färber
Am 20.02.2014 16:58, schrieb Peter Maydell: > On 16 February 2014 02:07, Edgar E. Iglesias wrote: >> On Sat, Feb 15, 2014 at 03:42:56PM +, Peter Maydell wrote: >>> On 13 February 2014 05:07, wrote: From: "Edgar E. Iglesias" cpu->exit_request is part of the execution environme

Re: [Qemu-devel] [PATCH qom-cpu v2 22/40] translate-all: Change cpu_restore_state() argument to CPUState

2014-03-11 Thread Andreas Färber
Hi Max, Am 11.03.2014 16:02, schrieb Max Filippov: > Hi Andreas, > > On Mon, Mar 10, 2014 at 4:15 AM, Andreas Färber wrote: >> diff --git a/target-xtensa/op_helper.c b/target-xtensa/op_helper.c >> index 4265378..8641e5d 100644 >> --- a/target-xtensa/op_helper.c >> +++ b/target-xtensa/op_helper.c

[Qemu-devel] [PATCH 4/6] monitor: Remove unused monitor_print_filename

2014-03-11 Thread Cole Robinson
Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robinson --- include/monitor/monitor.h | 1 - monitor.c | 27 --- stubs/Makefile.objs| 1 - stubs/mon-print-filename.c | 6 -- 4 files changed, 35 deletions(-) delete mode 100

[Qemu-devel] [PATCH 2/6] vnc: Remove default_mon usage

2014-03-11 Thread Cole Robinson
These errors don't seem user initiated, so forcibly printing to the monitor doesn't seem right. Just print to stderr. Cc: Anthony Liguori Cc: Gerd Hoffmann Signed-off-by: Cole Robinson --- ui/vnc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c inde

[Qemu-devel] [PATCH 1/6] slirp: Remove default_mon usage

2014-03-11 Thread Cole Robinson
These errors don't seem user initiated, so forcibly printing to the monitor doesn't seem right. Just print to stderr. Drop lprint since it's now unused. Cc: Jan Kiszka Signed-off-by: Cole Robinson --- checkpatch flags some pre-existing tab issues, but I didn't retab. Should I? slirp/misc.c |

Re: [Qemu-devel] [PATCH v5 2/2] query-command-line-options: query all the options in qemu-options.hx

2014-03-11 Thread Eric Blake
On 03/06/2014 11:09 PM, Amos Kong wrote: > vm_config_groups[] only contains part of the options which have > parameters, and all options which have no parameter aren't added > to vm_config_groups[]. Current query-command-line-options only > checks options from vm_config_groups[], so some options wi

[Qemu-devel] [PATCH 5/6] error: Remove redundant error_printf_unless_qmp

2014-03-11 Thread Cole Robinson
error_printf is just a wrapper around monitor_printf, which already drops the requested output if cur_mon is qmp. Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robinson --- hw/usb/bus.c| 2 +- hw/usb/hcd-ehci.c | 4 ++-- include/qemu/error-report.h |

[Qemu-devel] [PATCH 3/6] error: Privatize error_print_loc

2014-03-11 Thread Cole Robinson
Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robinson --- include/qemu/error-report.h | 1 - util/qemu-error.c | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/qemu/error-report.h b/include/qemu/error-report.h index 3b098a9..000eae3 100644

[Qemu-devel] [PATCH 0/6] error: Misc cleanups and improvements

2014-03-11 Thread Cole Robinson
Minor error API cleanups, and one error reporting improvement when connected to qmp (patch #6) Cole Robinson (6): slirp: Remove default_mon usage vnc: Remove default_mon usage error: Privatize error_print_loc monitor: Remove unused monitor_print_filename error: Remove redundant error_pri

[Qemu-devel] [PATCH 6/6] error: Print error_report() to stderr if using qmp

2014-03-11 Thread Cole Robinson
monitor_printf will drop the requested output if cur_mon is qmp (for good reason). However these messages are often helpful for debugging issues with via libvirt. If we know the message won't hit the monitor, send it to stderr. Cc: Luiz Capitulino Cc: Markus Armbruster Signed-off-by: Cole Robin

Re: [Qemu-devel] [PATCH 05/10] migration: Fix the migrate auto converge process

2014-03-11 Thread Chegu Vinod
On 3/11/2014 1:48 PM, Juan Quintela wrote: wrote: From: ChenLiang It is inaccuracy and complex that using the transfer speed of migration thread to determine whether the convergence migration. The dirty page may be compressed by XBZRLE or ZERO_PAGE.The counter of updating dirty bitmap will be

Re: [Qemu-devel] [RFC PATCH v2 10/12] mc: expose tunable parameter for checkpointing frequency

2014-03-11 Thread Eric Blake
On 03/11/2014 04:15 PM, Juan Quintela wrote: > Eric Blake wrote: >> On 02/18/2014 01:50 AM, mrhi...@linux.vnet.ibm.com wrote: >>> From: "Michael R. Hines" > >> We're building up a LOT of migrate- tunable commands. Maybe it's time >> to think about building a more generic migrate-set-parameter,

Re: [Qemu-devel] [RFC PATCH v2 11/12] mc: introduce new capabilities to control micro-checkpointing

2014-03-11 Thread Eric Blake
On 03/11/2014 04:02 PM, Juan Quintela wrote: > mrhi...@linux.vnet.ibm.com wrote: >> From: "Michael R. Hines" >> >> +# @mc-net-disable: Deactivate network buffering against outbound network >> +# traffic while Micro-Checkpointing (@mc) is active. >> +# Enabled by default. Disabl

Re: [Qemu-devel] [PATCH qom-cpu v2 21/40] cpu-exec: Change cpu_loop_exit() argument to CPUState

2014-03-11 Thread Andreas Färber
Am 10.03.2014 01:15, schrieb Andreas Färber: > Signed-off-by: Andreas Färber Needs: diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index af8e1dc..f8e535e 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -240,7 +240,7 @@ void HELPER(wfe)(CPUARMState *env) *

Re: [Qemu-devel] [PATCH qom-cpu v2 16/40] cpu: Move exception_index field from CPU_COMMON to CPUState

2014-03-11 Thread Andreas Färber
Am 10.03.2014 01:15, schrieb Andreas Färber: > Signed-off-by: Andreas Färber Needs: diff --git a/target-arm/op_helper.c b/target-arm/op_helper.c index 8434f6e..931536e 100644 --- a/target-arm/op_helper.c +++ b/target-arm/op_helper.c @@ -232,10 +232,12 @@ void HELPER(wfi)(CPUARMState *env) void

Re: [Qemu-devel] [RFC PATCH v2 10/12] mc: expose tunable parameter for checkpointing frequency

2014-03-11 Thread Juan Quintela
Eric Blake wrote: > On 02/18/2014 01:50 AM, mrhi...@linux.vnet.ibm.com wrote: >> From: "Michael R. Hines" > We're building up a LOT of migrate- tunable commands. Maybe it's time > to think about building a more generic migrate-set-parameter, which > takes both the name of the parameter to set a

Re: [Qemu-devel] [PATCH 07/10] migraion: clear the death code

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > Clear the death code > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei Reviewed-by: Juan Quintela

Re: [Qemu-devel] [RFC PATCH v2 11/12] mc: introduce new capabilities to control micro-checkpointing

2014-03-11 Thread Juan Quintela
mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > New capabilities include the use of RDMA acceleration, > use of network buffering, and keepalive support, as documented > in patch #1. > > Signed-off-by: Michael R. Hines > --- > qapi-schema.json | 36 ++

Re: [Qemu-devel] [RFC PATCH v2 07/12] mc: introduce additional QMP statistics for micro-checkpointing

2014-03-11 Thread Juan Quintela
mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > MC provides a lot of new information, including the same RAM statistics > that ordinary migration does, so we centralize a lot of that printing > code into a common function so that the QMP printing statements don't > get duplicated

Re: [Qemu-devel] [RFC PATCH v2 11/12] mc: introduce new capabilities to control micro-checkpointing

2014-03-11 Thread Eric Blake
On 02/18/2014 01:50 AM, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > New capabilities include the use of RDMA acceleration, > use of network buffering, and keepalive support, as documented > in patch #1. > > Signed-off-by: Michael R. Hines > --- > qapi-schema.json | 36

Re: [Qemu-devel] [RFC PATCH v2 06/12] mc: introduce state machine changes for MC

2014-03-11 Thread Juan Quintela
mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > This patch sets up the initial changes to the migration state > machine and prototypes to be used by the checkpointing code > to interact with the state machine so that we can later handle > failure and recovery scenarios. > > Signed

[Qemu-devel] [PATCH V2 2/3] block: Add drive-mirror-replace command to repair quorum files.

2014-03-11 Thread Benoît Canet
When a quorum file is totally destroyed (broken NAS or SAN) the user can start a drive-mirror job on the quorum block backend and then replace the broken quorum file with drive-mirror-replace given it has a node-name. Signed-off-by: Benoit Canet --- block.c | 8 ++-- block/mi

[Qemu-devel] [PATCH V2 3/3] qemu-iotests: Add 088 new test for drive-mirror-replace.

2014-03-11 Thread Benoît Canet
Tests for drive-mirror-replace whose purpose is to enable quorum file mirroring and replacement after failure. Signed-off-by: Benoit Canet --- tests/qemu-iotests/041| 34 +-- tests/qemu-iotests/088| 221 ++ tests/qemu-iotests/088.out

[Qemu-devel] [PATCH V2 0/3] Quorum maintainance operations

2014-03-11 Thread Benoît Canet
Hello, This series for 2.1 add the missing maintainance feature for Quorum. The first patch allows quorum to correct corrupted reads by rewriting them. The second add the drive-mirror-replace command to be used on a drive-mirrored device to replace a target bs by the mirror. The series apply on

[Qemu-devel] [PATCH V2 1/3] quorum: Add the rewrite-corrupted parameter to quorum.

2014-03-11 Thread Benoît Canet
On read operations when this parameter is set and some replicas are corrupted while quorum can be reached quorum will proceed to rewrite the correct version of the data to fix the corrupted replicas. This will shine with SSD where the FTL will remap the same block at another place on rewrite. Sig

Re: [Qemu-devel] [RFC PATCH v2 10/12] mc: expose tunable parameter for checkpointing frequency

2014-03-11 Thread Eric Blake
On 02/18/2014 01:50 AM, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > This exposes a QMP command that allows the management software > or policy to control the frequency of micro-checkpointing. > > Signed-off-by: Michael R. Hines > --- > hmp-commands.hx | 16 +++

Re: [Qemu-devel] [RFC PATCH v2 07/12] mc: introduce additional QMP statistics for micro-checkpointing

2014-03-11 Thread Eric Blake
On 02/18/2014 01:50 AM, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > MC provides a lot of new information, including the same RAM statistics > that ordinary migration does, so we centralize a lot of that printing > code into a common function so that the QMP printing statement

Re: [Qemu-devel] [RFC PATCH v2 03/12] mc: introduce a 'checkpointing' status check into the VCPU states

2014-03-11 Thread Eric Blake
On 02/18/2014 01:50 AM, mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > During micro-checkpointing, the VCPUs get repeatedly paused and > resumed. We need to not freak out when the VM begins micro-checkpointing. > > Signed-off-by: Michael R. Hines > --- > cpus.c

Re: [Qemu-devel] [RFC PATCH v2 02/12] mc: timestamp migration_bitmap and KVM logdirty usage

2014-03-11 Thread Juan Quintela
mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > We also later export these statistics over QMP for better > monitoring of micro-checkpointing as the workload changes. > > Signed-off-by: Michael R. Hines > --- > arch_init.c | 34 -- > 1 file change

Re: [Qemu-devel] [RFC PATCH v2 03/12] mc: introduce a 'checkpointing' status check into the VCPU states

2014-03-11 Thread Juan Quintela
mrhi...@linux.vnet.ibm.com wrote: > From: "Michael R. Hines" > > During micro-checkpointing, the VCPUs get repeatedly paused and > resumed. We need to not freak out when the VM begins micro-checkpointing. > > Signed-off-by: Michael R. Hines > diff --git a/include/migration/migration.h b/include/m

Re: [Qemu-devel] [PATCH 2/3] block: Add drive-mirror-replace command to repair quorum files.

2014-03-11 Thread Benoît Canet
The Tuesday 11 Mar 2014 à 22:00:29 (+0100), Max Reitz wrote : > On 11.03.2014 17:36, Benoît Canet wrote: > >When a quorum file is totally destroyed (broken filer) the user can start a > > *file I really meant filer as in file server: I will write NAS instead. > > >drive-mirror job on the quorum

[Qemu-devel] [PATCH qom-next v2] qom-test: Test QOM properties

2014-03-11 Thread Andreas Färber
Recursively walk all properties under /machine and try to retrieve their value. This is a regression test for link<> properties and the DeviceState::hotpluggable property. Cf. be2f78b6b062eec5170e2612299fb8953046993f and 1a37eca107cece3ed454bae29eef0bd1fac4a244 Signed-off-by: Andreas Färber

Re: [Qemu-devel] [PULL 3/3] target-i386: bugfix of Intel MPX

2014-03-11 Thread Andreas Färber
Am 11.03.2014 11:50, schrieb Paolo Bonzini: > From: "Liu, Jinsong" > > The correct size of cpuid 0x0d sub-leaf 4 is 0x40, not 0x10. > This is confirmed by Anvin H Peter and Mallick Asit K. > > Signed-off-by: Liu Jinsong > Cc: H. Peter Anvin > Cc: Asit K Mallick > Signed-off-by: Paolo Bonzini

Re: [Qemu-devel] [PATCH 09/10] migration: expose the bitmap_sync_cnt to the end user

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > expose the counter that log the times of updating the dirty bitmap to > end user. > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei Once Eric problems are fixed, rest of the patch looks ok. Later, Juan.

Re: [Qemu-devel] [PATCH 10/10] XBZRLE: update the doc of XBZRLE

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > --- > docs/xbzrle.txt | 7 +++ > 1 file changed, 7 insertions(+) > > diff --git a/docs/xbzrle.txt b/docs/xbzrle.txt > index cc3a26a..cdf1e3e 100644 > --- a/docs/xbzrle.txt > +++ b/docs/xbzrle.txt > @@ -71,6 +7

Re: [Qemu-devel] [PATCH 08/10] migration: s/uint64_t/int64_t the definitions of it_age

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei You are changing teh types introduced in patch2, please fix them there? Anyways, why are you changing the age to int64_t? Not that I expect it to be so big, but I would expect it not to be negative? Later, Juan.

[Qemu-devel] [PATCH] qemu-kvm: use the proper CPU vendor if -cpu is specified with -enable-kvm

2014-03-11 Thread George Yunaev
Hello everyone, This patch fixes the issue when -cpu specification is partially ignored when -enable-kvm is specified. For example, |when running: qemu-system-x86_64 -cpu core2duo on AMD machine, the CPU vendor is properly identified as GenuineIntel. However when running: | |qemu-system-x86

Re: [Qemu-devel] [PATCH 08/10] migration: s/uint64_t/int64_t the definitions of it_age

2014-03-11 Thread Eric Blake
On 03/11/2014 06:53 AM, arei.gong...@huawei.com wrote: > From: ChenLiang > The subject line says what, but there is no WHY. The commit message should explain why you want a signed type. > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > --- > arch_init.c| 4 ++-- > in

Re: [Qemu-devel] [PATCH 2/3] block: Add drive-mirror-replace command to repair quorum files.

2014-03-11 Thread Max Reitz
On 11.03.2014 17:36, Benoît Canet wrote: When a quorum file is totally destroyed (broken filer) the user can start a *file drive-mirror job on the quorum block backend and then replace the broken quorum file with drive-mirror-replace given it has a node-name. Signed-off-by: Benoit Canet ---

Re: [Qemu-devel] [PATCH v22 03/25] improve some functions in qemu-option.c

2014-03-11 Thread Leandro Dorileo
Hi, On Tue, Mar 11, 2014 at 03:26:51PM +0800, Chunyan Liu wrote: > 2014-03-11 5:21 GMT+08:00 Eric Blake : > > > On 03/10/2014 02:29 PM, Eric Blake wrote: > > > > >> +opt = qemu_opt_find(opts, name); > > >> +if (opt) { > > >> +g_free((char *)opt->str); > > > > > > ...which means th

Re: [Qemu-devel] [PATCH 07/10] migraion: clear the death code

2014-03-11 Thread Eric Blake
On 03/11/2014 06:53 AM, arei.gong...@huawei.com wrote: > From: ChenLiang > > Clear the death code s/death/dead/ (twice) > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > --- > arch_init.c | 13 - > page_cache.c | 58

Re: [Qemu-devel] [PATCH 06/10] migraion: optimiztion xbzrle by reducing data copy

2014-03-11 Thread Eric Blake
On 03/11/2014 06:53 AM, arei.gong...@huawei.com wrote: > From: ChenLiang s/migraion/migration/ in the subject (here and in 7/10) s/optimiztion/optimize/ in the subject > +++ b/arch_init.c > @@ -381,11 +381,8 @@ static int save_xbzrle_page(QEMUFile *f, uint8_t > **current_data, > > prev_

Re: [Qemu-devel] [PATCH 06/10] migraion: optimiztion xbzrle by reducing data copy

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > Reducing data copy can reduce cpu overhead. > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 06/10] migraion: optimiztion xbzrle by reducing data copy

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > Reducing data copy can reduce cpu overhead. > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei Reviewed-by: Juan Quintela

Re: [Qemu-devel] [PATCH 05/10] migration: Fix the migrate auto converge process

2014-03-11 Thread Eric Blake
On 03/11/2014 02:48 PM, Juan Quintela wrote: > wrote: >> From: ChenLiang >> >> It is inaccuracy and complex that using the transfer speed of >> migration thread to determine whether the convergence migration. >> The dirty page may be compressed by XBZRLE or ZERO_PAGE.The counter >> of updating di

Re: [Qemu-devel] [PATCH 03/10] XBZRLE: optimize XBZRLE to decrease the cache missing

2014-03-11 Thread Eric Blake
On 03/11/2014 06:53 AM, arei.gong...@huawei.com wrote: > From: ChenLiang > > Avoid the hot pages being replaced by others to remarkable decrease cache s/the hot/hot/ s/remarkable/remarkably/ > missing. The counter of updating dirty bitmap is used to indicate the cached s/missing/misses/ > pag

Re: [Qemu-devel] [PATCH 05/10] migration: Fix the migrate auto converge process

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > It is inaccuracy and complex that using the transfer speed of > migration thread to determine whether the convergence migration. > The dirty page may be compressed by XBZRLE or ZERO_PAGE.The counter > of updating dirty bitmap will be increasing continuously if the > m

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Eric Blake
On 03/11/2014 02:35 PM, Michael S. Tsirkin wrote: >> If we put a command line >> argument on it then people will still be able to incorrectly >> rely on thread naming by using the command line option. > > > Where would you document this? > > The idea was that "debug" in name is a hint. Or even

Re: [Qemu-devel] [PATCH 04/10] XBZRLE: rebuild the cache_is_cached function

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > Rebuild the cache_is_cached function. Why? > +bool cache_is_cached(const PageCache *cache, uint64_t addr, > + uint64_t current_age) > +{ > +CacheItem *it = NULL; s/= NULL// Thanks, Juan. > + > +it = cache_get_by_addr(cache, addr); > +

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Michael S. Tsirkin
On Tue, Mar 11, 2014 at 08:27:58PM +, Peter Maydell wrote: > On 11 March 2014 20:03, Michael S. Tsirkin wrote: > > Because we don't want people to start relying on thread naming to > > manage the threads outside qemu. > > Then document that it isn't stable; anybody who relies > on it deserves

Re: [Qemu-devel] [PATCH 03/10] XBZRLE: optimize XBZRLE to decrease the cache missing

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > Avoid the hot pages being replaced by others to remarkable decrease cache > missing. The counter of updating dirty bitmap is used to indicate the cached > page age. > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > /** > * get_cached_data: Get the data ca

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Peter Maydell
On 11 March 2014 20:03, Michael S. Tsirkin wrote: > Because we don't want people to start relying on thread naming to > manage the threads outside qemu. Then document that it isn't stable; anybody who relies on it deserves what they get. If we put a command line argument on it then people will st

Re: [Qemu-devel] [PATCH 02/10] migration: Add counters of updating the dirty bitmap

2014-03-11 Thread Juan Quintela
"Gonglei (Arei)" wrote: >> On 03/11/2014 06:53 AM, arei.gong...@huawei.com wrote: >> > From: ChenLiang >> > >> > Add counters to log the times of updating the dirty bitmap. >> > >> > Signed-off-by: ChenLiang >> > Signed-off-by: Gonglei >> > Reviewed-by: Dr. David Alan Gilbert >> > Reviewed-by:

Re: [Qemu-devel] [PATCH 01/10] XBZRLE: Fix one XBZRLE corruption issues

2014-03-11 Thread Juan Quintela
wrote: > From: ChenLiang > > The page may not be inserted into cache after executing save_xbzrle_page. > In case of failure to insert, the original page should be sent rather > than the page in the cache. > > Signed-off-by: ChenLiang > Signed-off-by: Gonglei > Reviewed-by: Dr. David Alan Gilber

Re: [Qemu-devel] [PATCH 1/3] quorum: Add the rewrite-corrupted parameter to quorum.

2014-03-11 Thread Benoît Canet
The Tuesday 11 Mar 2014 à 20:58:06 (+0100), Max Reitz wrote : > On 11.03.2014 17:36, Benoît Canet wrote: > >On read operations when this parameter is set and some replicas are corrupted > >while quorum can be reached quorum will proceed to rewrite the correct > >version > >of the data to fix the c

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Dr. David Alan Gilbert
* Peter Maydell (peter.mayd...@linaro.org) wrote: > On 11 March 2014 19:46, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > >> Shouldn't we prevent the unsupported option from > >> appearing in qemu output though? > >> Otherwise how does user know whether it w

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Michael S. Tsirkin
On Tue, Mar 11, 2014 at 07:53:20PM +, Peter Maydell wrote: > On 11 March 2014 19:46, Dr. David Alan Gilbert wrote: > > * Michael S. Tsirkin (m...@redhat.com) wrote: > > > >> Shouldn't we prevent the unsupported option from > >> appearing in qemu output though? > >> Otherwise how does user know

Re: [Qemu-devel] Trying to get fstrim / discard=unmap to work

2014-03-11 Thread Richard W.M. Jones
Finally I tracked down the reason why my early test failed, but then it just started working "by magic". The reason is this: If you: - create an ext4 filesystem - mount it WITHOUT -o discard - create and remove some big files - unmount - mount -o discard - fstrim then the fstrim has no eff

Re: [Qemu-devel] [PATCH 1/3] quorum: Add the rewrite-corrupted parameter to quorum.

2014-03-11 Thread Max Reitz
On 11.03.2014 17:36, Benoît Canet wrote: On read operations when this parameter is set and some replicas are corrupted while quorum can be reached quorum will proceed to rewrite the correct version of the data to fix the corrupted replicas. This will shine with SSD where the FTL will remap the s

Re: [Qemu-devel] [PULL 0/3] KVM uq/master changes for 2013-03-14

2014-03-11 Thread Peter Maydell
On 11 March 2014 10:50, Paolo Bonzini wrote: > The following changes since commit 9fbee91a131a05e443d7108d7fbdf3ca91020290: > > Merge remote-tracking branch 'remotes/kvm/uq/master' into staging > (2014-02-27 16:00:31 +) > > are available in the git repository at: > > > git://git.kernel.or

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Peter Maydell
On 11 March 2014 19:46, Dr. David Alan Gilbert wrote: > * Michael S. Tsirkin (m...@redhat.com) wrote: > >> Shouldn't we prevent the unsupported option from >> appearing in qemu output though? >> Otherwise how does user know whether it works? > > I'll make it spit a warning if you try and enable it

Re: [Qemu-devel] [PATCH] qemu-thread-posix: Fix build against older glibc version

2014-03-11 Thread Dr. David Alan Gilbert
* Michael S. Tsirkin (m...@redhat.com) wrote: > Shouldn't we prevent the unsupported option from > appearing in qemu output though? > Otherwise how does user know whether it works? I'll make it spit a warning if you try and enable it on a platform that doesn't have a way of doing it; ifdef all th

Re: [Qemu-devel] [PATCH 0/3] tests/qdev-global-props: fixes due to machine conversion to QOM

2014-03-11 Thread Marcel Apfelbaum
On Tue, 2014-03-11 at 18:11 +0100, Andreas Färber wrote: > Hi Marcel, > > Am 11.03.2014 16:35, schrieb Marcel Apfelbaum: > > To be applied on top of: > > hw/boards: converted current_machine to be an instance of MachineClass > > Rebased for qom-next branch of Andrea's QOM tree. > > > > Patch

Re: [Qemu-devel] [PATCH v4 4/4] migration: add more traces

2014-03-11 Thread Juan Quintela
Alexey Kardashevskiy wrote: > This replaces DPRINTF macro with tracepoints. > > This moves some messages from migration.c to savevm.c. > > This adds tracepoint to signal about fileds failed to migrate. > > Signed-off-by: Alexey Kardashevskiy > --- > Changes: > v4: > * made use of new qemu_ether_n

Re: [Qemu-devel] [PATCH v4 3/4] migration: extend section_start/end traces

2014-03-11 Thread Juan Quintela
Alexey Kardashevskiy wrote: > This adds @idstr to savevm_section_start and savevm_section_end > tracepoints. > > Signed-off-by: Alexey Kardashevskiy Already in

  1   2   3   4   >