Re: [Qemu-devel] [PATCH for-1.4 0/2] fix migration failure from 1.3 due to SeaBIOS size change

2013-02-06 Thread Gerd Hoffmann
1) When I compile seabios 1.7.2 locally I end up with a 128KB binary. So do I on Fedora 18. Unless someone has a reason why this is a bad thing, I'll commit a 128kb binary and we can avoid this problem for 1.4. Seems to be a toolchain issue. Building on RHEL-6 (which I did for all seabios

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
Markus Armbruster arm...@redhat.com writes: Eric Blake ebl...@redhat.com writes: On 02/05/2013 09:22 AM, Markus Armbruster wrote: Command memchar-write takes data and size parameter. Begs the question what happens when data doesn't match size. With format base64, qmp_memchar_write()

Re: [Qemu-devel] [PATCH for-1.4 12/12] QAPI QMP HMP: Fix and improve memchar-read/-write docs

2013-02-06 Thread Markus Armbruster
Eric Blake ebl...@redhat.com writes: On 02/05/2013 09:22 AM, Markus Armbruster wrote: In particular, document the impact of our crappy UTF-8 handling on reading. Now the QMP examples even work. Signed-off-by: Markus Armbruster arm...@redhat.com --- hmp-commands.hx | 20

[Qemu-devel] [PATCH 0/2] Add some tracepoints for live migration

2013-02-06 Thread Kazuya Saito
This series adds tracepoints about state transition of VM to get information of live migration. We suggest that QEMU trace data will be able to be captured by users all the time for investigation on production server not for development. However, tracepoints in current QEMU are not enough to

Re: [Qemu-devel] [PATCH 1/5] qcow2: introduce check_refcounts_l1/l2() flags

2013-02-06 Thread Stefan Hajnoczi
On Tue, Feb 05, 2013 at 02:04:42PM -0700, Eric Blake wrote: On 02/05/2013 11:54 AM, Stefan Hajnoczi wrote: The check_refcounts_l1/l2() functions have a check_copied argument to check that the QCOW_O_COPIED flag is consistent with refcount == 1. This should be a bool, not an int.

Re: [Qemu-devel] [PATCH 2/5] qcow2: record fragmentation statistics during check

2013-02-06 Thread Stefan Hajnoczi
On Tue, Feb 05, 2013 at 02:36:08PM -0700, Eric Blake wrote: On 02/05/2013 11:54 AM, Stefan Hajnoczi wrote: @@ -963,6 +965,17 @@ static int check_refcounts_l2(BlockDriverState *bs, BdrvCheckResult *res, l2_entry = s-cluster_offset_mask; inc_refcounts(bs, res,

[Qemu-devel] [PATCH v3 00/20] Add Faraday A36x SoC platform support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com These patches introduce Faraday A36x SoC platform support. Faraday provides ARMv4/ARMv5TE compatible solutions, and focus on ASIC design service. Here are some public documents for your reference.

[Qemu-devel] [PATCH v3 02/20] arm: add Faraday a369 SoC platform support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The Faraday A369 EVB is a Faraday SoC platform evalution board used for Faraday IP functional verification based on the well-known ARM AMBA 2.0 architecture. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com --- hw/arm/Makefile.objs |1 +

[Qemu-devel] [PATCH v3 06/20] arm: add Faraday FTWDT010 watchdog timer support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTWDT010 is used to prevent system from infinite loop while software gets trapped in the deadlock. Under the normal operation, users should restart FTWDT010 at the regular intervals before counter counts down to 0. If the counter does reach 0,

[Qemu-devel] [PATCH v3 13/20] arm: add Faraday FTNANDC021 nand flash controller support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTNANDC021 is an integrated NAND flash controller which re-pack the NAND flash command set with a shorter built-in opcode. It also provides a register base interface for user to easily access the underlying NAND flash chips, and also supports HW ECC.

Re: [Qemu-devel] [PATCH 5/5] target-i386: fix kvm_default_features overwriting kvm_arch_get_supported_cpuid()

2013-02-06 Thread Igor Mammedov
On Tue, 5 Feb 2013 19:20:04 -0200 Eduardo Habkost ehabk...@redhat.com wrote: On Tue, Feb 05, 2013 at 08:47:29PM +0100, Igor Mammedov wrote: On Tue, 5 Feb 2013 17:04:26 -0200 Eduardo Habkost ehabk...@redhat.com wrote: On Tue, Feb 05, 2013 at 07:46:09PM +0100, Igor Mammedov wrote: On

[Qemu-devel] [PATCH v3 01/20] arm: add Faraday a360 SoC platform support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The Faraday A360 EVB is a Faraday SoC platform evaluation board used for Faraday IP functional verification based on the well-known ARM AMBA 2.0 architecture. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com --- hw/arm/Makefile.objs |1 +

[Qemu-devel] [PATCH v3 14/20] arm: add Faraday FTSSP010 multi-function controller support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTSSP010 is a multi-function synchronous serial port interface controller which supports SSP, SPI, I2S, AC97 and SPDIF. However only I2S and SPI protocol have been implemented in this patch. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com ---

[Qemu-devel] [PATCH v3 05/20] arm: add Faraday FTINTC020 interrupt controller support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTINTC020 interrupt controller supports both FIQ and IRQ signals to the microprocessor. It can handle up to 64 configurable IRQ sources and 64 FIQ sources. The output signals to the microprocessor can be configured as level-high/low active or

[Qemu-devel] [PATCH v3 17/20] arm: add Faraday FTLCDC200 LCD controller support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTLCDC200 Color LCD controller performs translation of pixel-coded data into the required formats and timings to drive a variety of single/dual mono and color LCDs. Depending on the LCD type and mode, the unpacked data can represent: 1. an actual

[Qemu-devel] [PATCH v3 16/20] arm: add Faraday FTGMAC100 1Gbps ethernet support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTGMAC100 Ethernet controller has a DMA engine which handles all data transfers between the system memory and on-chip memories. Its DMA engine supports both 16-bits and 32-bits alignment, and thus make it possible to support zero-copy transfer at

[Qemu-devel] [PATCH v3 09/20] arm: add Faraday FTRTC011 RTC timer support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com It provides separate second, minute, hour, and day counters. The second counter is toggled each second, the minute counter is toggled each minute, the hour counter is toggled each hour, and the day counter is toggled each day. The FTRTC011 provides a

[Qemu-devel] [PATCH v3 18/20] arm: add Faraday FTTSC010 touchscreen controller support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTTSC010 provides two operation modes to sample the analog input voltage. 1. The manual operation mode needs to program and control the panel drivers by software step-by-step for the x-y position measurement. 2. The auto-scan mode

[Qemu-devel] [PATCH v3 12/20] arm: add Faraday FTI2C010 I2C controller support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTI2C010 is an I2C master controller. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com --- hw/arm/Makefile.objs |1 + hw/arm/faraday_a360.c |6 ++ hw/arm/faraday_a369.c |6 ++ hw/arm/fti2c010.c | 206

Re: [Qemu-devel] [PATCH 4/5] qemu-img: add compressed clusters to BlockFragInfo

2013-02-06 Thread Stefan Hajnoczi
On Tue, Feb 05, 2013 at 03:27:10PM -0700, Eric Blake wrote: On 02/05/2013 11:54 AM, Stefan Hajnoczi wrote: Show how many clusters are compressed. This can be used to monitor how many compressed clusters remain and whether to recompress the image. Suggested-by: Cole Robinson

[Qemu-devel] [PATCH v3 03/20] arm: add Faraday FTAHBC020 support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com It's used to perform AHB remap and also QEMU RAM initialization when SDRAM is initialized before AHB remap process activated. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com --- hw/arm/Makefile.objs |1 + hw/arm/faraday_a369.c |6 ++

[Qemu-devel] [PATCH v3 04/20] arm: add Faraday FTDDRII030 support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTDDRII030 is a DDRII SDRAM controller which is responsible for SDRAM initialization. In QEMU we simply emualte the SDRAM enable function, neither timing parameter nor bank setup is handled. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com ---

Re: [Qemu-devel] Headsup: windows virtio networking does not work on current git

2013-02-06 Thread Vadim Rozenfeld
On Tue, 2013-02-05 at 13:58 +0200, Michael S. Tsirkin wrote: On Tue, Feb 05, 2013 at 03:45:38PM +0400, Michael Tokarev wrote: 05.02.2013 15:31, Vadim Rozenfeld wrote: On Mon, 2013-02-04 at 08:41 -0600, Anthony Liguori wrote: Vadim Rozenfeld vroze...@redhat.com writes:

[Qemu-devel] [PATCH v3 11/20] arm: add Faraday FTAPBBRG020 APB DMA support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTAPBBRG020 supports the DMA functions for the AHB-to-AHB, AHB-to-APB, APB-to-AHB, and APB-to-APB transactions. The DMA engine can support up to 4 DMA channels (A, B, C, and D) and 15 handshaking channels. A DMA channel granted by the arbiter block

Re: [Qemu-devel] [PATCH v2] block/raw-posix: detect readonly Linux block devices using BLKROGET

2013-02-06 Thread Kevin Wolf
Am 05.02.2013 16:12, schrieb Markus Armbruster: Stefan Hajnoczi stefa...@redhat.com writes: Linux block devices can be set read-only with blockdev --setro device. The same thing can be done for LVM volumes using lvchange --permission r volume. This read-only setting is independent of

Re: [Qemu-devel] [PATCH v3 05/10] slirp: switch to GPollFD

2013-02-06 Thread Stefan Hajnoczi
On Wed, Feb 06, 2013 at 01:59:25AM +0100, Laszlo Ersek wrote: comments in-line On 02/04/13 13:12, Stefan Hajnoczi wrote: @@ -475,15 +490,15 @@ void slirp_select_poll(fd_set *readfds, fd_set *writefds, fd_set *xfds, /* * Check for URG data

[Qemu-devel] [PATCH v3 07/20] arm: add Faraday FTTMR010 timer support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTTMR010 provides three independent sets of sub-timers. Two match registers are provided for each sub-timer, whenever the value of the match registers equals any one value of the sub-timers, the timer interrupt will be immediately triggered. And it

[Qemu-devel] [PATCH v3 15/20] arm: add Faraday FTMAC110 10/100Mbps ethernet support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTMAC110 is an Ethernet controller that provides AHB master capability and is in full compliance with the IEEE 802.3 10/100 Mbps specifications. Its DMA controller handles all data transfers between system memory and on-chip memories. It supports

[Qemu-devel] [PATCH 1/2] Add tracepoint for RunState transition

2013-02-06 Thread Kazuya Saito
This patch enables us to know RunState transition. We only added a trace function in runstate_set(). Signed-off-by: Kazuya Saito saito.kaz...@jp.fujitsu.com --- trace-events |1 + vl.c |2 +- 2 files changed, 2 insertions(+), 1 deletions(-) diff --git a/trace-events

[Qemu-devel] [PATCH v3 08/20] arm: add Faraday FTPWMTMR010 timer support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTPWMTMR010 is an APB device which provides up to 8 independent timers. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com --- hw/arm/Makefile.objs |1 + hw/arm/faraday_a369.c | 11 +++ hw/arm/ftpwmtmr010.c | 246

[Qemu-devel] [PATCH v3 10/20] arm: add Faraday FTDMAC020 AHB DMA support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The Faraday FTDMAC020 provides eight configurable channels for the memory-to-memory, memory-to-peripheral, peripheral-to-peripheral, and peripheral-to-memory transfers. Each DMA channel supports chain transfer and can be programmed to one of the 16

[Qemu-devel] [PATCH v3 19/20] arm: add Faraday FTSDC010 MMC/SD controller support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTSDC010 is a clone of Arm PrimeCell PL181. While they share lots of design concept, the implementation differ slightly. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com --- hw/arm/Makefile.objs |1 + hw/arm/faraday_a360.c |7 +

Re: [Qemu-devel] [PATCH 1/5] target-i386: Move cpu_x86_init()

2013-02-06 Thread Andreas Färber
Am 05.02.2013 17:39, schrieb Igor Mammedov: From: Andreas Färber afaer...@suse.de Consolidate CPU functions in cpu.c. Allows to make cpu_x86_register() static. No functional changes. Signed-off-by: Andreas Färber afaer...@suse.de Do we agree that this patch is okay? If you add a

[Qemu-devel] [PATCH v2 0/5] qcow2: add fragmentation and compression info support

2013-02-06 Thread Stefan Hajnoczi
This series adds fragmentation info support to qcow2 and then adds compression info. Previously only QED supported fragmentation info. Note that fragmentation info only covers the current image, internal snapshots are not included. The new BlockFragInfo.compressed field contains the number of

[Qemu-devel] [PATCH v2 1/5] qcow2: introduce check_refcounts_l1/l2() flags

2013-02-06 Thread Stefan Hajnoczi
The check_refcounts_l1/l2() functions have a check_copied argument to check that the QCOW_O_COPIED flag is consistent with refcount == 1. This should be a bool, not an int. However, the next patch introduces qcow2 fragmentation statistics and also needs to pass an option to

[Qemu-devel] [PATCH v2 2/5] qcow2: record fragmentation statistics during check

2013-02-06 Thread Stefan Hajnoczi
The qemu-img check command can display fragmentation statistics: * Total number of clusters in virtual disk * Number of allocated clusters * Number of fragmented clusters This patch adds fragmentation statistics support to qcow2. Compressed and normal clusters count as allocated. Zero

[Qemu-devel] [PATCH v2 3/5] qemu-img: avoid excessive BlockFragInfo line length

2013-02-06 Thread Stefan Hajnoczi
The qemu-img check printf() statement that shows BlockFragInfo results is poorly formatted. Introduce a local variable to shorten the lines and restore proper indentation. The next patch adds a field to BlockFragInfo so it is beneficial to straighten out this code before modifying it.

[Qemu-devel] [PATCH v2 4/5] qemu-img: add compressed clusters to BlockFragInfo

2013-02-06 Thread Stefan Hajnoczi
Show how many clusters are compressed. This can be used to monitor how many compressed clusters remain and whether to recompress the image. Suggested-by: Cole Robinson crobi...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- include/block/block.h| 1 + qemu-img.c

[Qemu-devel] [PATCH v2 5/5] qcow2: support compressed clusters in BlockFragInfo

2013-02-06 Thread Stefan Hajnoczi
Signed-off-by: Stefan Hajnoczi stefa...@redhat.com --- block/qcow2-refcount.c | 1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 73690f8..aca7ea8 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -968,6 +968,7 @@ static int

Re: [Qemu-devel] [PATCH 1/5] target-i386: Move cpu_x86_init()

2013-02-06 Thread Eduardo Habkost
On Tue, Feb 05, 2013 at 05:39:20PM +0100, Igor Mammedov wrote: From: Andreas Färber afaer...@suse.de Consolidate CPU functions in cpu.c. Allows to make cpu_x86_register() static. No functional changes. Signed-off-by: Andreas Färber afaer...@suse.de Reviewed-by: Eduardo Habkost

Re: [Qemu-devel] [PATCH] sandbox: Report error on forbidden system call

2013-02-06 Thread Michal Privoznik
On 05.02.2013 15:28, Corey Bryant wrote: On 02/05/2013 06:02 AM, Michal Privoznik wrote: Currently, it we call a not white listed system call, we get killed immediately without reporting any error. It would be far more useful, if we can at least shout something on stderr just before dying,

Re: [Qemu-devel] [PATCH 1/5] target-i386: Move cpu_x86_init()

2013-02-06 Thread Andreas Färber
Am 06.02.2013 12:07, schrieb Eduardo Habkost: On Tue, Feb 05, 2013 at 05:39:20PM +0100, Igor Mammedov wrote: From: Andreas Färber afaer...@suse.de Consolidate CPU functions in cpu.c. Allows to make cpu_x86_register() static. No functional changes. Signed-off-by: Andreas Färber

Re: [Qemu-devel] [PATCH] sandbox: Report error on forbidden system call

2013-02-06 Thread Daniel P. Berrange
On Tue, Feb 05, 2013 at 09:28:51AM -0500, Corey Bryant wrote: On 02/05/2013 06:02 AM, Michal Privoznik wrote: Currently, it we call a not white listed system call, we get killed immediately without reporting any error. It would be far more useful, if we can at least shout something on stderr

Re: [Qemu-devel] [PATCH v2 3/5] qemu-img: avoid excessive BlockFragInfo line length

2013-02-06 Thread Kevin Wolf
Am 06.02.2013 11:58, schrieb Stefan Hajnoczi: The qemu-img check printf() statement that shows BlockFragInfo results is poorly formatted. Introduce a local variable to shorten the lines and restore proper indentation. The next patch adds a field to BlockFragInfo so it is beneficial to

Re: [Qemu-devel] [PATCH 1/5] target-i386: Move cpu_x86_init()

2013-02-06 Thread Igor Mammedov
On Wed, 06 Feb 2013 11:58:26 +0100 Andreas Färber afaer...@suse.de wrote: Am 05.02.2013 17:39, schrieb Igor Mammedov: From: Andreas Färber afaer...@suse.de Consolidate CPU functions in cpu.c. Allows to make cpu_x86_register() static. No functional changes. Signed-off-by:

Re: [Qemu-devel] [PATCH 4/5] qemu-img: add compressed clusters to BlockFragInfo

2013-02-06 Thread Kevin Wolf
Am 05.02.2013 19:54, schrieb Stefan Hajnoczi: Show how many clusters are compressed. This can be used to monitor how many compressed clusters remain and whether to recompress the image. Suggested-by: Cole Robinson crobi...@redhat.com Signed-off-by: Stefan Hajnoczi stefa...@redhat.com diff

[Qemu-devel] [PATCH v3 20/20] arm: add Faraday FTSPI020 SPI flash controller support

2013-02-06 Thread Kuo-Jung Su
From: Kuo-Jung Su dant...@faraday-tech.com The FTSPI020 is an integrated SPI Flash controller which supports upto 4 flash chips. Signed-off-by: Kuo-Jung Su dant...@faraday-tech.com --- hw/arm/Makefile.objs |1 + hw/arm/faraday_a369.c | 12 ++ hw/arm/ftspi020.c | 345

Re: [Qemu-devel] [PATCH v2 for-1.4] tests/test-string-input-visitor: Handle errors provoked by fuzz test

2013-02-06 Thread Luiz Capitulino
On Tue, 5 Feb 2013 20:44:23 + Peter Maydell peter.mayd...@linaro.org wrote: It's OK and expected for visitors to return errors when presented with the fuzz test's random data. Since the fuzzer doesn't care about errors, we pass in NULL rather than an Error**. This fixes a bug in the

Re: [Qemu-devel] [PATCH v2] check-qjson: More thorough testing of UTF-8 in strings

2013-02-06 Thread Luiz Capitulino
On Tue, 5 Feb 2013 09:30:55 +0100 Markus Armbruster arm...@redhat.com wrote: Test cases are scraped from Markus Kuhn's UTF-8 decoder capability and stress test at http://www.cl.cam.ac.uk/~mgk25/ucs/examples/UTF-8-test.txt Unfortunately, both JSON parser and formatter misbehave right now.

[Qemu-devel] [RFC V6 00/33] QCOW2 deduplication core functionality

2013-02-06 Thread Benoît Canet
This patchset create the core infrastructure for deduplication and enable it. One can compile and install https://github.com/wernerd/Skein3Fish and use the --enable-skein-dedup configure option in order to use the faster skein HASH. Images must be created with -o dedup=[skein|sha256] in order to

[Qemu-devel] [RFC V6 03/33] qcow2: Add deduplication structures and fields.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2.h | 69 - 1 file changed, 68 insertions(+), 1 deletion(-) diff --git a/block/qcow2.h b/block/qcow2.h index 718b52b..c7b6860 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@

[Qemu-devel] [RFC V6 02/33] qmp: Add DedupStatus enum.

2013-02-06 Thread Benoît Canet
--- qapi-schema.json | 18 ++ 1 file changed, 18 insertions(+) diff --git a/qapi-schema.json b/qapi-schema.json index cdd8384..cf4e9d6 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -796,6 +796,24 @@ { 'command': 'query-block', 'returns': ['BlockInfo'] } ## +#

[Qemu-devel] [RFC V6 15/33] qcow2: Load and save deduplication table header extension.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2.c | 43 +++ 1 file changed, 43 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index ecbe352..7eeaeb9 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -53,9 +53,18 @@ typedef struct

[Qemu-devel] [RFC V6 18/33] qcow2: Extract qcow2_add_feature and qcow2_remove_feature.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2.c | 49 ++--- block/qcow2.h |4 ++-- 2 files changed, 32 insertions(+), 21 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index e48f0b0..ad202fa 100644 --- a/block/qcow2.c

[Qemu-devel] [RFC V6 20/33] qcow2: Add a deduplication boolean to update_refcount.

2013-02-06 Thread Benoît Canet
This is needed for next commit which handle the deduplication refcount overflow case. Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-dedup.c|2 +- block/qcow2-refcount.c | 20 +++- block/qcow2.h |2 +- 3 files changed, 13 insertions(+), 11

[Qemu-devel] [RFC V6 16/33] qcow2: Extract qcow2_do_table_init.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-refcount.c | 43 ++- block/qcow2.h |5 + 2 files changed, 35 insertions(+), 13 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index

[Qemu-devel] [RFC V6 21/33] qcow2: Drop hash for a given cluster when dedup makes refcount 2^16/2.

2013-02-06 Thread Benoît Canet
A new physical cluster with the same hash value will be used for further occurrence of this hash. Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-dedup.c| 32 block/qcow2-refcount.c |3 +++ block/qcow2.h |4 3 files

[Qemu-devel] [RFC V6 33/33] qcow2: Add qcow2_dedup_init and qcow2_dedup_close.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-dedup.c | 97 +++ block/qcow2.h |2 ++ 2 files changed, 99 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 9a44697..0679a68 100644 ---

[Qemu-devel] [RFC V2 14/16] qcow2: Add qcow2_dedup_update_metrics to compute dedup RAM usage.

2013-02-06 Thread Benoît Canet
--- block/qcow2-dedup.c | 11 +++ block/qcow2.h | 18 ++ 2 files changed, 29 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 308b4f6..72ce1d7 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -1311,3 +1311,14 @@ void

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
Luiz Capitulino lcapitul...@redhat.com writes: On Wed, 06 Feb 2013 10:06:03 +0100 Markus Armbruster arm...@redhat.com wrote: Markus Armbruster arm...@redhat.com writes: Eric Blake ebl...@redhat.com writes: On 02/05/2013 09:22 AM, Markus Armbruster wrote: Command memchar-write takes

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Luiz Capitulino
On Tue, 5 Feb 2013 17:22:04 +0100 Markus Armbruster arm...@redhat.com wrote: Command memchar-write takes data and size parameter. Begs the question what happens when data doesn't match size. With format base64, qmp_memchar_write() copies the full data argument, regardless of size

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Luiz Capitulino
On Wed, 06 Feb 2013 14:11:10 +0100 Markus Armbruster arm...@redhat.com wrote: Luiz Capitulino lcapitul...@redhat.com writes: On Wed, 06 Feb 2013 10:06:03 +0100 Markus Armbruster arm...@redhat.com wrote: Markus Armbruster arm...@redhat.com writes: Eric Blake ebl...@redhat.com

[Qemu-devel] [RFC V6 08/33] qcow2: Add qcow2_dedup_store_new_hashes.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-dedup.c | 325 ++- block/qcow2.h |5 + 2 files changed, 329 insertions(+), 1 deletion(-) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 5901749..a424af8 100644

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Peter Maydell
On 6 February 2013 09:06, Markus Armbruster arm...@redhat.com wrote: As far as I can tell, it never fails, but silently ignores characters outside the alphabet [A-Za-z0-9+/] This bit at least is required behaviour: see RFC2045 section 6.8: Any characters outside of the base64 alphabet are

[Qemu-devel] [RFC V6 25/33] qcow2: Serialize write requests when deduplication is activated.

2013-02-06 Thread Benoît Canet
This fix the sub cluster sized writes race conditions while waiting for a more faster solution. Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2.c | 14 +- block/qcow2.h |1 + 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/block/qcow2.c

Re: [Qemu-devel] [PATCH v2 3/5] qemu-img: avoid excessive BlockFragInfo line length

2013-02-06 Thread Eric Blake
On 02/06/2013 04:30 AM, Kevin Wolf wrote: -if (result.bfi.total_clusters != 0 result.bfi.allocated_clusters != 0) { -printf(% PRId64 /% PRId64 = %0.2f%% allocated, %0.2f%% fragmented\n, -result.bfi.allocated_clusters, result.bfi.total_clusters, -

Re: [Qemu-devel] [PATCH v2 0/5] qcow2: add fragmentation and compression info support

2013-02-06 Thread Eric Blake
On 02/06/2013 03:58 AM, Stefan Hajnoczi wrote: This series adds fragmentation info support to qcow2 and then adds compression info. Previously only QED supported fragmentation info. Note that fragmentation info only covers the current image, internal snapshots are not included. The new

[Qemu-devel] [RFC V6 01/33] qcow2: Add deduplication to the qcow2 specification.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- docs/specs/qcow2.txt | 105 +- 1 file changed, 103 insertions(+), 2 deletions(-) diff --git a/docs/specs/qcow2.txt b/docs/specs/qcow2.txt index 36a559d..8e52de1 100644 --- a/docs/specs/qcow2.txt

[Qemu-devel] [RFC V6 19/33] block: Add qcow2_dedup format and image creation code.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2.c | 188 + block/qcow2.h |2 + include/block/block_int.h |1 + 3 files changed, 178 insertions(+), 13 deletions(-) diff --git a/block/qcow2.c

Re: [Qemu-devel] [PATCH 4/5] qemu-img: add compressed clusters to BlockFragInfo

2013-02-06 Thread Eric Blake
On 02/06/2013 04:43 AM, Kevin Wolf wrote: Instead of getting a longer and longer output line for each new number we add, maybe we could use the chance to introduce multiline output: Total number of clusters: 1000 - allocated 427 (42.7%) - fragmented 71

[Qemu-devel] [RFC V2 10/16] qcow2: Count cluster deleted metric

2013-02-06 Thread Benoît Canet
--- block/qcow2-dedup.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index e96ab00..e159e77 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -991,6 +991,7 @@ void qcow2_dedup_refcount_zero_reached(BlockDriverState *bs, /*

[Qemu-devel] [RFC V2 03/16] qcow2: Add deduplication metrics structures.

2013-02-06 Thread Benoît Canet
--- block/qcow2.h |3 ++- include/block/block.h | 11 +++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/block/qcow2.h b/block/qcow2.h index 18e2974..fc393d5 100644 --- a/block/qcow2.h +++ b/block/qcow2.h @@ -234,9 +234,10 @@ typedef struct BDRVQcowState {

[Qemu-devel] [RFC V2 11/16] qcow2: Count deduplication refcount overflow metric.

2013-02-06 Thread Benoît Canet
--- block/qcow2-dedup.c |1 + 1 file changed, 1 insertion(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index e159e77..308b4f6 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -1024,6 +1024,7 @@ void qcow2_dedup_refcount_half_max_reached(BlockDriverState *bs,

[Qemu-devel] [RFC V2 05/16] qcow2: Collect unaligned writes missing data reads metric.

2013-02-06 Thread Benoît Canet
--- block/qcow2-dedup.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 868caec..708b62c 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -130,6 +130,7 @@ int qcow2_dedup_read_missing_and_concatenate(BlockDriverState *bs,

[Qemu-devel] [RFC V2 01/16] qcow2: Add qcow2_co_dedup_resume to restart deduplication.

2013-02-06 Thread Benoît Canet
--- block/qcow2-dedup.c | 180 +++ 1 file changed, 180 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 0679a68..cd08594 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -34,6 +34,7 @@ #include skeinApi.h

Re: [Qemu-devel] [PATCH for-1.4 02/12] qmp: Clean up design of memchar-read

2013-02-06 Thread Luiz Capitulino
On Tue, 5 Feb 2013 17:22:05 +0100 Markus Armbruster arm...@redhat.com wrote: The data returned has a well-defined size, which makes the size returned along with it redundant at best. Drop it. It was me who asked Lei to add it and the reasons were: 1. qemu-ga does it too, so it's good to be

[Qemu-devel] [RFC V6 12/33] qcow2: Makes qcow2_alloc_cluster_link_l2 mark to deduplicate clusters.

2013-02-06 Thread Benoît Canet
--- block/qcow2-cluster.c |8 ++-- block/qcow2-dedup.c |7 +++ block/qcow2.h |3 +++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index dbcb6d2..ef91216 100644 --- a/block/qcow2-cluster.c +++

[Qemu-devel] [RFC V2 07/16] qcow2: Collect undeduplicated cluster metric.

2013-02-06 Thread Benoît Canet
--- block/qcow2-dedup.c |2 ++ 1 file changed, 2 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 31988b6..454a94f 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -524,6 +524,7 @@ static int qcow2_count_next_non_dedupable_clusters(BlockDriverState

Re: [Qemu-devel] [PATCH v2 3/5] qemu-img: avoid excessive BlockFragInfo line length

2013-02-06 Thread Kevin Wolf
Am 06.02.2013 14:35, schrieb Eric Blake: On 02/06/2013 04:30 AM, Kevin Wolf wrote: -if (result.bfi.total_clusters != 0 result.bfi.allocated_clusters != 0) { -printf(% PRId64 /% PRId64 = %0.2f%% allocated, %0.2f%% fragmented\n, -result.bfi.allocated_clusters,

[Qemu-devel] [RFC V6 27/33] qcow2: Adapt checking of QCOW_OFLAG_COPIED for dedup.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-refcount.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index d7d9339..ee5de6b 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@

Re: [Qemu-devel] [PATCH 4/5] qemu-img: add compressed clusters to BlockFragInfo

2013-02-06 Thread Kevin Wolf
Am 06.02.2013 14:40, schrieb Eric Blake: On 02/06/2013 04:43 AM, Kevin Wolf wrote: Instead of getting a longer and longer output line for each new number we add, maybe we could use the chance to introduce multiline output: Total number of clusters: 1000 - allocated 427

[Qemu-devel] [RFC V2 15/16] qcow2: returns deduplication metrics and status via bdrv_get_info()

2013-02-06 Thread Benoît Canet
--- block/qcow2.c |4 1 file changed, 4 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 514811a..0ee5f4b 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -1864,6 +1864,10 @@ static int qcow2_get_info(BlockDriverState *bs, BlockDriverInfo *bdi) BDRVQcowState *s =

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
Luiz Capitulino lcapitul...@redhat.com writes: On Tue, 5 Feb 2013 17:22:04 +0100 Markus Armbruster arm...@redhat.com wrote: Command memchar-write takes data and size parameter. Begs the question what happens when data doesn't match size. With format base64, qmp_memchar_write() copies

[Qemu-devel] [RFC V6 22/33] qcow2: Remove hash when cluster is deleted.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-dedup.c| 26 ++ block/qcow2-refcount.c |3 +++ block/qcow2.h |2 ++ 3 files changed, 31 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 4819eb3..1ed219d 100644

Re: [Qemu-devel] [PATCH for-1.4 01/12] qmp: Fix design bug and read beyond buffer in memchar-write

2013-02-06 Thread Markus Armbruster
Peter Maydell peter.mayd...@linaro.org writes: On 6 February 2013 09:06, Markus Armbruster arm...@redhat.com wrote: As far as I can tell, it never fails, but silently ignores characters outside the alphabet [A-Za-z0-9+/] This bit at least is required behaviour: see RFC2045 section 6.8:

[Qemu-devel] [RFC V6 30/33] qcow2: Integrate SKEIN hash algorithm in deduplication.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-dedup.c | 14 ++ block/qcow2.c |5 + configure | 33 + 3 files changed, 52 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index

[Qemu-devel] [RFC V6 31/33] qcow: Set large dedup hash block size.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-refcount.c |4 ++-- block/qcow2.c |3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index 337fb65..d173c18 100644 --- a/block/qcow2-refcount.c +++

[Qemu-devel] [RFC V6 07/33] qcow2: Add qcow2_dedup and related functions

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-dedup.c | 436 +++ block/qcow2.h |5 + 2 files changed, 441 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 4e99eb1..5901749 100644 ---

[Qemu-devel] [RFC V6 06/33] qcow2: Create a way to link to l2 tables when deduplicating.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-cluster.c |8 ++-- block/qcow2.h |9 + 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index 56fccf9..63a7241 100644 --- a/block/qcow2-cluster.c

[Qemu-devel] [RFC V6 13/33] qcow2: make the deduplication forget a cluster hash when a cluster is to dedupe

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-cluster.c | 11 +-- block/qcow2-dedup.c |8 +++- block/qcow2.h |2 ++ 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/block/qcow2-cluster.c b/block/qcow2-cluster.c index ef91216..5b1d20d

[Qemu-devel] [RFC V2 02/16] qcow2: Enable the deduplication feature.

2013-02-06 Thread Benoît Canet
--- block/qcow2.c | 18 ++ 1 file changed, 18 insertions(+) diff --git a/block/qcow2.c b/block/qcow2.c index 9097e64..514811a 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@ -540,6 +540,13 @@ static int qcow2_open(BlockDriverState *bs, int flags) } } +if

Re: [Qemu-devel] [PATCH for-1.4 02/12] qmp: Clean up design of memchar-read

2013-02-06 Thread Luiz Capitulino
[Forgot to add Michael, re-sending] On Tue, 5 Feb 2013 17:22:05 +0100 Markus Armbruster arm...@redhat.com wrote: The data returned has a well-defined size, which makes the size returned along with it redundant at best. Drop it. It was me who asked Lei to add it and the reasons were: 1.

[Qemu-devel] [RFC V2 6/7] qcow2: Make dedup status persists.

2013-02-06 Thread Benoît Canet
--- block/qcow2-dedup.c |7 +++ block/qcow2.c |6 +- block/qcow2.h |1 + 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 66fb415..165aae9 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@

Re: [Qemu-devel] [PATCH] sandbox: Report error on forbidden system call

2013-02-06 Thread Corey Bryant
On 02/06/2013 06:13 AM, Michal Privoznik wrote: On 05.02.2013 15:28, Corey Bryant wrote: On 02/05/2013 06:02 AM, Michal Privoznik wrote: Currently, it we call a not white listed system call, we get killed immediately without reporting any error. It would be far more useful, if we can at

[Qemu-devel] [RFC V6 29/33] qcow2: Do not overwrite existing entries with QCOW_OFLAG_COPIED.

2013-02-06 Thread Benoît Canet
In the case of a race condition between two writes a l2 entry can be written without QCOW_OFLAG_COPIED before the first write fill it. This patch simply check if the l2 entry has the correct offset without QCOW_OFLAG_COPIED and do nothing. Signed-off-by: Benoit Canet ben...@irqsave.net ---

[Qemu-devel] [PATCH V2] get_tmp_filename: add explicit error message

2013-02-06 Thread Fabien Chouteau
Signed-off-by: Fabien Chouteau chout...@adacore.com --- block.c | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/block.c b/block.c index ba67c0d..79fe01b 100644 --- a/block.c +++ b/block.c @@ -428,9 +428,16 @@ int get_tmp_filename(char *filename, int size)

[Qemu-devel] [RFC V2 2/7] qcow2: Add code to deduplicate cluster flagged with QCOW_OFLAG_TO_DEDUP.

2013-02-06 Thread Benoît Canet
--- block/qcow2-dedup.c | 126 +++ 1 file changed, 126 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 72ce1d7..1ac 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -1166,6 +1166,130 @@ static int

[Qemu-devel] [RFC V6 23/33] qcow2: Add qcow2_dedup_is_running to probe if dedup is running.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-dedup.c |6 ++ block/qcow2.h |1 + 2 files changed, 7 insertions(+) diff --git a/block/qcow2-dedup.c b/block/qcow2-dedup.c index 1ed219d..197d04d 100644 --- a/block/qcow2-dedup.c +++ b/block/qcow2-dedup.c @@ -999,3

[Qemu-devel] [RFC V6 26/33] qcow2: Add verification of dedup table.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2-refcount.c |8 1 file changed, 8 insertions(+) diff --git a/block/qcow2-refcount.c b/block/qcow2-refcount.c index f6a80db..d7d9339 100644 --- a/block/qcow2-refcount.c +++ b/block/qcow2-refcount.c @@ -1154,6 +1154,14 @@

[Qemu-devel] [RFC V6 24/33] qcow2: Integrate deduplication in qcow2_co_writev loop.

2013-02-06 Thread Benoît Canet
Signed-off-by: Benoit Canet ben...@irqsave.net --- block/qcow2.c | 87 +++-- 1 file changed, 85 insertions(+), 2 deletions(-) diff --git a/block/qcow2.c b/block/qcow2.c index 9cbb2f0..f39b6d5 100644 --- a/block/qcow2.c +++ b/block/qcow2.c @@

  1   2   3   >