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

2013-02-06 Thread Peter Crosthwaite
On Thu, Feb 7, 2013 at 4:59 PM, Kuo-Jung Su wrote: > \ > > 2013/2/7 Peter Crosthwaite : >> Hi Kuo-Jung, >> >> On Wed, Feb 6, 2013 at 7:45 PM, Kuo-Jung Su wrote: >>> From: Kuo-Jung Su >>> >>> The FTSPI020 is an integrated SPI Flash controller >>> which supports upto 4 flash chips. >>> >>> Signed-

[Qemu-devel] [PATCH v9 2/3] vl.c: allow for repeated -sd arguments

2013-02-06 Thread Peter Crosthwaite
Allows for repeating of -sd arguments in the same way as -pflash and -mtdblock. Acked-by: Igor Mitsyanko Reviewed-by: Peter Maydell Signed-off-by: Peter Crosthwaite --- vl.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/vl.c b/vl.c index a8dc73d..a6cd940 100644 ---

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

2013-02-06 Thread Kuo-Jung Su
\ 2013/2/7 Peter Crosthwaite : > Hi Kuo-Jung, > > On Wed, Feb 6, 2013 at 7:45 PM, Kuo-Jung Su wrote: >> From: Kuo-Jung Su >> >> The FTSPI020 is an integrated SPI Flash controller >> which supports upto 4 flash chips. >> >> Signed-off-by: Kuo-Jung Su >> --- >> hw/arm/Makefile.objs |1 + >>

[Qemu-devel] [PATCH for-1.4] xilinx_zynq: Fix wrong IRQ number of the second EHCI controller

2013-02-06 Thread Peter Crosthwaite
From: Liming Wang The IRQ number of the second EHCI controller should be 76, not 75. Signed-off-by: Liming Wang Tested-by: Peter Crosthwaite --- hw/xilinx_zynq.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index 0ac33b5..311f79

[Qemu-devel] [PATCH v9 3/3] xilinx_zynq: Added SD controllers

2013-02-06 Thread Peter Crosthwaite
The Xilinx Zynq device has two SDHCI controllers. Added to the machine model. Reviewed-by: Peter Maydell Signed-off-by: Peter Crosthwaite --- hw/xilinx_zynq.c | 10 ++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/hw/xilinx_zynq.c b/hw/xilinx_zynq.c index 0ac33b5..3

[Qemu-devel] [PATCH v9 0/3] Standard SD host controller model

2013-02-06 Thread Peter Crosthwaite
[Original cover by Igor] First patch introduces standard SD host controller model. This is accumulated version of my previous patch I sent a while ago and a recent SDHCI patch by Peter A. G. Crosthwaite. Second patch introduces Exynos4210-specific SDHCI built on top of standard SDHCI model. Sec

[Qemu-devel] [PATCH v1 1/2] dtc: add submodule

2013-02-06 Thread Peter Crosthwaite
Add dtc submodule as a fallback for old distros. Picking version 1.3.0. as this is the most recently tagged stable version. Signed-off-by: Peter Crosthwaite --- .gitmodules |3 +++ dtc |1 + 2 files changed, 4 insertions(+), 0 deletions(-) create mode 16 dtc diff --git a/.g

Re: [Qemu-devel] [PATCH for-1.4] net: fix infinite loop on exit

2013-02-06 Thread Jason Wang
On 02/07/2013 08:25 AM, Michael Roth wrote: > 1ceef9f27359cbe92ef124bf74de6f792e71f6fb added handling for cleaning > up multiple queues in qemu_del_nic() for cases where multiqueue is in > use. To determine the number of queues it looks at nic->conf->queues, > then iterates through all the queues t

[Qemu-devel] [PATCH v1 2/2] configure/Make: Build libfdt from submodule DTC

2013-02-06 Thread Peter Crosthwaite
Configure to use the DTC submodule to build libfdt when no system libfdt is found. Prompt to install the DTC submodule if --enable-fdt is set but no DTC can be found. DTC has no out-of-tree build capability, so the configure will symlink the Makefile and scripts directory in the out of tree build

[Qemu-devel] [PATCH v1 0/2] DTC as submodule

2013-02-06 Thread Peter Crosthwaite
These two patches add and use dtc as a submodule as per the RFC: http://lists.gnu.org/archive/html/qemu-devel/2013-01/msg05000.html There is a remaining action item to mandate libfdt for arm/microblaze and PPC which is left as follow up work for after review of this series. Peter Crosthwaite (2

[Qemu-devel] [RFC PATCH v1] iov: Factor out hexdumper

2013-02-06 Thread Peter Crosthwaite
Factor out the hexdumper functionality from iov for all to use. Useful for creating verbose debug printfery that dumps packet data. Signed-off-by: Peter Crosthwaite --- See v9 of the pl330 series for example usage. include/qemu/hexdump.h |3 +++ util/Makefile.objs |1 + util/hexdump

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
mdroth writes: > On Wed, Feb 06, 2013 at 09:14:12PM +0100, Markus Armbruster wrote: >> mdroth writes: >> >> > On Wed, Feb 06, 2013 at 10:06:03AM +0100, Markus Armbruster wrote: [...] >> >> -- >> >> in : 1 >> >> out: >> >> b64: >> >> in : 1= >> >> out: >> >> b64: >> >> in : 1== >> >> out:

[Qemu-devel] [PATCH] m25p80.c: Use QOM classes for part differentiation

2013-02-06 Thread Peter Crosthwaite
Currently, M25P80 uses an object property to differentiate between flash parts. Changed this over to use QOM sub-classes - the actual names of the different parts are used to create a set of dynamic classes which passes the part info as class data. The object no longer needs to search the known_de

Re: [Qemu-devel] [seabios][PATCH 2/2] acpi: change numa data format from fw_cfg interface

2013-02-06 Thread Kevin O'Connor
On Mon, Feb 04, 2013 at 10:28:00AM +0800, liguang wrote: > the old numa format got form fw_cfg is: > number of nodes > node id of cpu (array) > node memory size (array) > > now, format it like array of: > apci_map, > memory_size, > > it has the advantage of simple and clear. With this change, wi

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

2013-02-06 Thread Rusty Russell
"Michael S. Tsirkin" writes: > Maybe we should ask for some centrally assigned vendor id? > We could ask IANA to keep the database. Or we could make it the task of the virtio spec. I don't think it's vital... Cheers, Rusty.

Re: [Qemu-devel] [seabios][PATCH 1/2] move all acpi-table related definitions to acpi.h

2013-02-06 Thread Kevin O'Connor
On Mon, Feb 04, 2013 at 10:27:59AM +0800, liguang wrote: > Signed-off-by: liguang Thanks. Some comments. [...] > --- a/src/acpi.h > +++ b/src/acpi.h [...] > +#include "acpi-dsdt.hex" Moving the acpi structure defines to the header is fine, but moving the DSDT code into the header is definitely

[Qemu-devel] [ANNOUNCE] QEMU 1.4.0-rc1 is now available

2013-02-06 Thread Anthony Liguori
Hi, On behalf of the QEMU Team, I'd like to announce the availability of the second release candidate for the QEMU 1.4 release. This release is meant for testing purposes and should not be used in a production environment. http://wiki.qemu.org/download/qemu-1.4.0-rc1.tar.bz2 You can help improv

Re: [Qemu-devel] [PATCH for-1.4 v2 00/13] Rework ring buffer chardev before API calcifies

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH for-1.4] linux-user: Restore cast to target type in get_user()

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH for-1.4] hmp: Disable chardev-add and chardev-remove

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH for-1.4 00/12] Fix memchar-read/-write before API gets released

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH V2 0/3] set config size using available features

2013-02-06 Thread Anthony Liguori
Jesse Larrew writes: > This patch set fixes an issue with virtio Windows drivers when multiqueue > is enabled. This is a narrow fix for 1.4, and I intend to generalize the > approach for all virtio devices in 1.5. I applied these for -rc1 because I like this better than hard coding the old confi

Re: [Qemu-devel] [PATCH for-1.4] hw/pxa2xx: Fix transposed crn/crm values for pxa2xx cp14 perf regs

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

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

2013-02-06 Thread Rusty Russell
Vadim Rozenfeld writes: > 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: >> Is it really >> > that bad that the config space size changed? Why it has this effect? > Because in this case it's hard to distinguish bet

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

2013-02-06 Thread Lucas Meneghel Rodrigues
On 02/05/2013 11:49 PM, Lucas Meneghel Rodrigues wrote: On 02/05/2013 09:58 AM, Michael S. Tsirkin wrote: Vadim, can you please describe in a bit more details what the actual issue here is, from the windows or windows driver point of view? Is it really that bad that the config space size change

[Qemu-devel] [PATCH for-1.4] net: fix infinite loop on exit

2013-02-06 Thread Michael Roth
1ceef9f27359cbe92ef124bf74de6f792e71f6fb added handling for cleaning up multiple queues in qemu_del_nic() for cases where multiqueue is in use. To determine the number of queues it looks at nic->conf->queues, then iterates through all the queues to cleanup the associated NetClientStates. If no queu

Re: [Qemu-devel] [PATCH V5] target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs

2013-02-06 Thread Marcelo Tosatti
On Wed, Feb 06, 2013 at 10:22:32PM +, Auld, Will wrote: > Marcelo, Hi, > > I have been watching for this patch in the upstream but have not seen it yet. > What version of QEMU should it be in? > > Thanks, > > Will Will, its in the GIT tree: https://github.com/qemu/qemu/commit/f28558d3d37ad

Re: [Qemu-devel] [PATCH] e1000: fix link down handling with auto negotiation

2013-02-06 Thread Amos Kong
On Tue, Feb 05, 2013 at 09:00:21PM +0200, Michael S. Tsirkin wrote: > Fixes a couple of regression bugs introduced by > b9d03e352cb6b31a66545763f6a1e20c9abf0c2c and related to > auto-negotiation: > - Auto-negotiation currently sets link up even if it was > forced down from the monitor. > -

Re: [Qemu-devel] [PATCH 2/2] qxl: change rom size to 8192

2013-02-06 Thread Cole Robinson
On 02/06/2013 05:52 PM, Cole Robinson wrote: > On 01/22/2013 05:09 AM, Gerd Hoffmann wrote: >> From: Alon Levy >> >> This is a simpler solution to 869981, where migration breaks since qxl's >> rom bar size has changed. Instead of ignoring fields in QXLRom, which is >> what has >> actually changed

Re: [Qemu-devel] [PATCH 2/2] qxl: change rom size to 8192

2013-02-06 Thread Cole Robinson
On 01/22/2013 05:09 AM, Gerd Hoffmann wrote: > From: Alon Levy > > This is a simpler solution to 869981, where migration breaks since qxl's > rom bar size has changed. Instead of ignoring fields in QXLRom, which is what > has > actually changed, we remove some of the modes, a mechanism already >

Re: [Qemu-devel] [PATCH v3] hw/m25p80.c: add WRSR(0x01) support

2013-02-06 Thread Peter Crosthwaite
On Mon, Feb 4, 2013 at 7:56 PM, Kuo-Jung Su wrote: > From: Kuo-Jung Su > > Atmel, SST and Intel/Numonyx serial flash tend to power up > with the software protection bits set. > And thus the new m25p80.c in linux kernel would always tries > to use WREN(0x06) + WRSR(0x01) to turn-off the protection

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

2013-02-06 Thread Peter Crosthwaite
Hi Kuo-Jung, On Wed, Feb 6, 2013 at 7:45 PM, Kuo-Jung Su wrote: > From: Kuo-Jung Su > > The FTSPI020 is an integrated SPI Flash controller > which supports upto 4 flash chips. > > Signed-off-by: Kuo-Jung Su > --- > hw/arm/Makefile.objs |1 + > hw/arm/faraday_a369.c | 12 ++ > hw/arm/fts

Re: [Qemu-devel] [PATCH V5] target-i386: Enabling IA32_TSC_ADJUST for QEMU KVM guest VMs

2013-02-06 Thread Auld, Will
Marcelo, Hi, I have been watching for this patch in the upstream but have not seen it yet. What version of QEMU should it be in? Thanks, Will > -Original Message- > From: Marcelo Tosatti [mailto:mtosa...@redhat.com] > Sent: Friday, November 30, 2012 12:40 PM > To: Auld, Will > Cc: qemu

Re: [Qemu-devel] [PATCH for-1.4 1/2] bswap: Fix width of swap in leul_to_cpu

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH v2] bswap: Fix width of swap in leul_to_cpu

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] configure: Fix build with XFree

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH 1/2] qemu/iovec: Don't assert if sbytes is zero

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

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

2013-02-06 Thread Markus Armbruster
The data returned has a well-defined size, which makes the size returned along with it redundant at best. Drop it. Signed-off-by: Markus Armbruster --- hmp.c| 11 --- qapi-schema.json | 18 ++ qemu-char.c | 21 + qmp-commands.hx | 2

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

2013-02-06 Thread mdroth
On Wed, Feb 06, 2013 at 09:14:12PM +0100, Markus Armbruster wrote: > mdroth writes: > > > On Wed, Feb 06, 2013 at 10:06:03AM +0100, Markus Armbruster wrote: > >> Markus Armbruster writes: > >> > >> > Eric Blake writes: > >> > > >> >> On 02/05/2013 09:22 AM, Markus Armbruster wrote: > >> >>> Co

[Qemu-devel] [PATCH 2/2] Add tracepoint for state of migration transition

2013-02-06 Thread Kazuya Saito
This patch enables us to know state of migration (MigrationState.state) transition. We added migstate_set() to make it easier to trace state transition, and added a tracepoint in this function. Signed-off-by: Kazuya Saito --- include/migration/migration.h |2 ++ migration.c

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

2013-02-06 Thread Markus Armbruster
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 argument. With format utf8, qmp_memchar_write() copies size bytes from data, happily reading

[Qemu-devel] [RFC V2 0/7] QCOW2 asynchronous deduplication

2013-02-06 Thread Benoît Canet
This patchset implements asynchronous deduplication in QCOW2 on top of the "QCOW2 deduplication metrics" V2 patchset. It's a work in progress posted so reviewers can see where the feature is heading. v2: Merge qmp-pause-dedup and qmp-resume-dedup qmp-dedup control. [Eric] Simplify error h

Re: [Qemu-devel] [PATCH] vnc: recognize Hungarian doubleacutes

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

Re: [Qemu-devel] [PATCH] e1000: fix link down handling with auto negotiation

2013-02-06 Thread Anthony Liguori
Applied. Thanks. Regards, Anthony Liguori

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

2013-02-06 Thread Stefan Hajnoczi
On Wed, Feb 06, 2013 at 01:31:41PM +0100, Benoît Canet wrote: > @@ -291,7 +297,11 @@ static int > qcow2_clear_l2_copied_flag_if_needed(BlockDriverState *bs, > /* remember that we dont't need to clear QCOW_OFLAG_COPIED again */ > hash_node->first_logical_sect &= first_logical_sect; > >

[Qemu-devel] [PATCH for-1.4 v2 10/13] qemu-char: General chardev "memory" code cleanup

2013-02-06 Thread Markus Armbruster
Inline trivial cirmem_chr_is_empty() into its only caller. Rename qemu_chr_cirmem_count() to cirmem_count(). Fast ring buffer index wraparound. Without this, there's no point in restricting size to a power two. qemu_is_chr(chr, "memory") returns *zero* when chr is a memory character device, whi

[Qemu-devel] [PATCH for-1.4 v2 13/13] hmp: make memchar-read escape ASCII control chars except \n and \t

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- hmp-commands.hx | 2 ++ hmp.c | 15 ++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/hmp-commands.hx b/hmp-commands.hx index 66ec716..4c100d7 100644 --- a/hmp-commands.hx +++ b/hmp-commands.hx @@ -869,6 +869,8 @@ STEXI

[Qemu-devel] [PATCH for-1.4 v2 00/13] Rework ring buffer chardev before API calcifies

2013-02-06 Thread Markus Armbruster
We have a serious design bug in memchar-write [PATCH 01], and a less serious one in memchar-read [PATCH 02]. I really, really want them fixed before the API gets calcified by the release. While discussing v1, I mentioned to Luiz how much I dislike the messy naming, and he encouraged me to fix it

[Qemu-devel] [PATCH for-1.4 v2 03/13] qmp: Use generic errors in memchar-read, memchar-write

2013-02-06 Thread Markus Armbruster
New errors should be generic unless there's a real use case for rich errors. Signed-off-by: Markus Armbruster --- qapi-schema.json | 2 -- qemu-char.c | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/qapi-schema.json b/qapi-schema.json index d8fa1c3..6f63791 100644 -

[Qemu-devel] [PATCH for-1.4 v2 05/13] qmp: Plug memory leaks in memchar-write, memchar-read

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 5 + 1 file changed, 5 insertions(+) diff --git a/qemu-char.c b/qemu-char.c index b1c6132..4dd01e6 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2782,6 +2782,10 @@ void qmp_memchar_write(const char *device, const char *data, ret =

Re: [Qemu-devel] [PATCH v3 10/10] aio: support G_IO_HUP and G_IO_ERR

2013-02-06 Thread Laszlo Ersek
On 02/04/13 13:12, Stefan Hajnoczi wrote: > aio-posix.c could not take advantage of G_IO_HUP and G_IO_ERR because > select(2) does not have equivalent events. Now that g_poll(3) is used > we can support G_IO_HUP and G_IO_ERR. > > Signed-off-by: Stefan Hajnoczi > --- > aio-posix.c | 12 ++---

[Qemu-devel] [PATCH for-1.4 v2 08/13] qemu-char: Fix chardev "memory" not to drop IAC characters

2013-02-06 Thread Markus Armbruster
Undocumented misfeature, get rid of it while we can. Signed-off-by: Markus Armbruster --- qemu-char.c | 5 - 1 file changed, 5 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index b0e4b41..2f59a61 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2678,11 +2678,6 @@ static int cirmem_chr_w

[Qemu-devel] [PATCH for-1.4 v2 12/13] qemu-char: Support suffixed ringbuf size arguments like "size=64K"

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 7 +++ 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 8a35403..a3ba021 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -98,7 +98,6 @@ #include "ui/qemu-spice.h" #define READ_BUF_LEN 4096 -#def

[Qemu-devel] [PATCH for-1.4 v2 06/13] qmp: Drop superfluous special case "empty" in qmp_memchar_read()

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 4 1 file changed, 4 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 4dd01e6..9d1c02c 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2818,10 +2818,6 @@ char *qmp_memchar_read(const char *device, int64_t size, } count

[Qemu-devel] [PATCH for-1.4 v2 04/13] qmp: Clean up type usage in qmp_memchar_write(), qmp_memchar_read()

2013-02-06 Thread Markus Armbruster
Const-correctness, consistently use standard C types instead of mixing them with GLib types. Signed-off-by: Markus Armbruster --- qemu-char.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 2bdd1bb..b1c6132 100644 --- a/qemu-char.c +++ b/

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

2013-02-06 Thread Stefan Hajnoczi
On Wed, Feb 06, 2013 at 01:31:40PM +0100, Benoît Canet wrote: > +/* Deduplicate all the cluster that can be deduplicated. > + * > + * Next it compute the number of non deduplicable sectors to come while > storing s/compute/computes/ > + * the hashes of these sectors in a linked list for later us

Re: [Qemu-devel] [PATCH for-1.4 v2 00/13] Rework ring buffer chardev before API calcifies

2013-02-06 Thread Eric Blake
On 02/06/2013 01:27 PM, Markus Armbruster wrote: > We have a serious design bug in memchar-write [PATCH 01], and a less > serious one in memchar-read [PATCH 02]. I really, really want them > fixed before the API gets calcified by the release. Series: Reviewed-by: Eric Blake -- Eric Blake ebl

[Qemu-devel] [RFC V2 1/7] block: Add BlockDriver function prototype to pause and resume deduplication.

2013-02-06 Thread Benoît Canet
--- include/block/block_int.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/include/block/block_int.h b/include/block/block_int.h index 62c72fc..69fbe8a 100644 --- a/include/block/block_int.h +++ b/include/block/block_int.h @@ -205,6 +205,9 @@ struct BlockDriver { */ int (*b

[Qemu-devel] [RFC V2 3/7] block: Add bdrv_has_dedup.

2013-02-06 Thread Benoît Canet
--- block.c | 15 +++ include/block/block.h |1 + 2 files changed, 16 insertions(+) diff --git a/block.c b/block.c index fec29f4..e9d7764 100644 --- a/block.c +++ b/block.c @@ -4291,6 +4291,21 @@ void bdrv_lock_medium(BlockDriverState *bs, bool locked) } }

Re: [Qemu-devel] [PATCH v3 09/10] aio: convert aio_poll() to g_poll(3)

2013-02-06 Thread Laszlo Ersek
comments in-line On 02/04/13 13:12, Stefan Hajnoczi wrote: > AioHandler already has a GPollFD so we can directly use its > events/revents. > > Add the int pollfds_idx field to AioContext so we can map g_poll(3) > results back to AioHandlers. > > Reuse aio_dispatch() to invoke handlers after g_poll

[Qemu-devel] [PATCH v2 4/5] tmp105: Add debug output

2013-02-06 Thread Andreas Färber
From: Andreas Färber Signed-off-by: Andreas Färber --- hw/tmp105.c | 27 +-- 1 Datei geändert, 25 Zeilen hinzugefügt(+), 2 Zeilen entfernt(-) diff --git a/hw/tmp105.c b/hw/tmp105.c index 3ad2d2f..5dafa37 100644 --- a/hw/tmp105.c +++ b/hw/tmp105.c @@ -23,6 +23,18 @@ #

[Qemu-devel] [PATCH for-1.4 v2 07/13] qmp: Drop wasteful zero-initialization in qmp_memchar_read()

2013-02-06 Thread Markus Armbruster
Signed-off-by: Markus Armbruster --- qemu-char.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/qemu-char.c b/qemu-char.c index 9d1c02c..b0e4b41 100644 --- a/qemu-char.c +++ b/qemu-char.c @@ -2819,7 +2819,7 @@ char *qmp_memchar_read(const char *device, int64_t size,

[Qemu-devel] [PATCH for-1.4 v2 11/13] qemu-char: Saner naming of memchar stuff & doc fixes

2013-02-06 Thread Markus Armbruster
New device, has never been released, so we can still improve things without worrying about compatibility. Naming is a mess. The code calls the device driver CirMemCharDriver, the public API calls it "memory", "memchardev", or "memchar", and the special commands are named like "memchar-FOO". "mem

[Qemu-devel] [PATCH for-1.4 v2 09/13] qemu-char: Drop undocumented chardev "memory" compatibility syntax

2013-02-06 Thread Markus Armbruster
This is a new device, so there's no compatibility to maintain, and its use case isn't common enough to justify shorthand syntax. Signed-off-by: Markus Armbruster --- qemu-char.c | 5 - 1 file changed, 5 deletions(-) diff --git a/qemu-char.c b/qemu-char.c index 2f59a61..cdbbafe 100644 --- a/

Re: [Qemu-devel] q35 machine type and libvirt.

2013-02-06 Thread Alex Williamson
On Wed, 2013-02-06 at 14:13 -0500, Laine Stump wrote: > Now that qemu is getting the q35 machine type, libvirt needs to > support it. > > As far as I understand, from libvirt's point of view, q35 is just > another x86_64 system, but with a different set of implicit devices, > and possibly some ext

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
mdroth writes: > On Wed, Feb 06, 2013 at 10:06:03AM +0100, Markus Armbruster wrote: >> Markus Armbruster writes: >> >> > Eric Blake writes: >> > >> >> On 02/05/2013 09:22 AM, Markus Armbruster wrote: >> >>> Command memchar-write takes data and size parameter. Begs the >> >>> question what hap

[Qemu-devel] [RFC V2 13/16] block: Add deduplication metrics to BlockDriverInfo.

2013-02-06 Thread Benoît Canet
--- include/block/block.h |3 +++ 1 file changed, 3 insertions(+) diff --git a/include/block/block.h b/include/block/block.h index 162f8a9..4d61ff4 100644 --- a/include/block/block.h +++ b/include/block/block.h @@ -29,6 +29,9 @@ typedef struct BlockDriverInfo { /* offset at which the VM

[Qemu-devel] [RFC for-1.4] Revert "block: fix block tray status"

2013-02-06 Thread Luiz Capitulino
This reverts commit 9ca111544c64b5abed2e79cf52e19a8f227b347b. That commit has added a weird side effect to QMP: on shutdown, QMP emits the DEVICE_TRAY_MOVED event for all empty drives that have closed trays. This happens because the tray state actually changes in the following code path: main

[Qemu-devel] q35 machine type and libvirt.

2013-02-06 Thread Laine Stump
Now that qemu is getting the q35 machine type, libvirt needs to support it. As far as I understand, from libvirt's point of view, q35 is just another x86_64 system, but with a different set of implicit devices, and possibly some extra rules limiting which devices can be plugged into which bus/sl

[Qemu-devel] [PATCH for-1.4 v2 2/5] libi2c-omap: Fix endianness dependency

2013-02-06 Thread Andreas Färber
From: Andreas Färber The libqos driver for omap_i2c currently does not work on Big Endian. Introduce helpers for reading from and writing to 16-bit armel registers. This fixes tmp105-test failures on ppc. To prepare for a QTest-level endianness solution, poison mem{read,write} and always use th

[Qemu-devel] [RFC v2 5/5] qtest: Add MMIO support

2013-02-06 Thread Andreas Färber
Introduce [qtest_]{read,write}[bwlq]() libqtest functions and corresponding QTest protocol commands to replace local versions in libi2c-omap.c. Signed-off-by: Andreas Färber --- qtest.c | 53 + tests/libi2c-omap.c | 23 -

[Qemu-devel] [PATCH for-1.4? v2 3/5] tmp105-test: Combine assertions of 16-bit responses

2013-02-06 Thread Andreas Färber
From: Andreas Färber Instead of comparing bytes individually, compare the full values. This aids spotting endianness issues. Signed-off-by: Andreas Färber --- tests/tmp105-test.c |8 1 Datei geändert, 4 Zeilen hinzugefügt(+), 4 Zeilen entfernt(-) diff --git a/tests/tmp105-test.c

[Qemu-devel] [PATCH for-1.4 v2 1/5] qtest: Use strtoull() for uint64_t

2013-02-06 Thread Andreas Färber
On 32-bit hosts, unsigned long may be uint32_t and uint64_t may be unsigned long long. Account for this by always using strtoull(). We were already using strtoll() for int64_t. Signed-off-by: Andreas Färber --- qtest.c |8 1 Datei geändert, 4 Zeilen hinzugefügt(+), 4 Zeilen entfernt

[Qemu-devel] [PATCH RFC v2 0/5] qtest: tmp105-test BE fix for 1.4 and MMIO support

2013-02-06 Thread Andreas Färber
Hello Anthony, Here's my enhanced attempt to resolve our QTest endianness crisis. :) Patch 1 fixes some minor type inconsistencies I noticed in qtest.c. Patch 2 uses helpers to fix libi2c-omap.c asserting on Big Endian hosts. Patch 3 improves the readability of assertions in tmp105-test.c. Patch

Re: [Qemu-devel] [RFC] configuring thin provisioning for drives

2013-02-06 Thread Kevin Wolf
Am 06.02.2013 17:39, schrieb Paolo Bonzini: > In order to finish the implementation of thin provisioning, we need to > add a -drive option to describe how guest discard requests are mapped to > host requests. > > We have three possibilities: > > - hide them and make them always succeed > - transl

Re: [Qemu-devel] [PATCH v3 08/10] aio: extract aio_dispatch() from aio_poll()

2013-02-06 Thread Laszlo Ersek
On 02/04/13 13:12, Stefan Hajnoczi wrote: > We will need to loop over AioHandlers calling ->io_read()/->io_write() > when aio_poll() is converted from select(2) to g_poll(2). > > Luckily the code for this already exists, extract it into the new > aio_dispatch() function. > > Two small changes: >

[Qemu-devel] [RFC V2 4/7] block: Add bdrv_dedup_control to start and stop deduplication.

2013-02-06 Thread Benoît Canet
--- block.c | 16 include/block/block.h |1 + 2 files changed, 17 insertions(+) diff --git a/block.c b/block.c index e9d7764..3f0bccc 100644 --- a/block.c +++ b/block.c @@ -4306,6 +4306,22 @@ bool bdrv_has_dedup(BlockDriverState *bs) return bdi.has_dedup;

Re: [Qemu-devel] [PATCH v3 07/10] main-loop: drop rfds/wfds/xfds for good

2013-02-06 Thread Laszlo Ersek
On 02/04/13 13:12, Stefan Hajnoczi wrote: > Now that all *_fill() and *_poll() functions use GPollFD we no longer > need rfds/wfds/xfds or pollfds_from_select()/pollfds_to_select(). > > From now on everything uses GPollFD. > > Signed-off-by: Stefan Hajnoczi > --- > main-loop.c | 77 > ++---

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

2013-02-06 Thread Benoît Canet
> > +/* > > + * Build a QCowHashNode from a given QCowHash and insert it into the tree > > + * > > + * @hash: the given QCowHash > > + */ > > +static void qcow2_build_and_insert_hash_node(BlockDriverState *bs, > > + QCowHash *hash) > > +{ > > +BDRVQco

Re: [Qemu-devel] [RFC V6 04/33] qcow2: Add qcow2_dedup_read_missing_and_concatenate

2013-02-06 Thread Eric Blake
On 02/06/2013 05:31 AM, Benoît Canet wrote: > This function is used to read missing data when unaligned writes are > done. This function also concatenate missing data with the given > qiov data in order to prepare a buffer used to look for duplicated > clusters. > > +/* > + * Prepare a buffer con

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

2013-02-06 Thread Eric Blake
On 02/06/2013 05:31 AM, Benoît Canet wrote: > Signed-off-by: Benoit Canet > --- > block/qcow2-dedup.c | 325 > ++- > block/qcow2.h |5 + > 2 files changed, 329 insertions(+), 1 deletion(-) > > + > +/* Remember that this QCowHashNod

Re: [Qemu-devel] [PATCH v3 06/10] iohandler: switch to GPollFD

2013-02-06 Thread Laszlo Ersek
On 02/04/13 13:12, Stefan Hajnoczi wrote: > Convert iohandler_select_fill() and iohandler_select_poll() to use > GPollFD instead of rfds/wfds/xfds. > > Signed-off-by: Stefan Hajnoczi > --- > include/qemu/main-loop.h | 4 ++-- > iohandler.c | 40 ++---

Re: [Qemu-devel] [RFC V6 05/33] qcow2: Make update_refcount public.

2013-02-06 Thread Eric Blake
On 02/06/2013 05:31 AM, Benoît Canet wrote: > Signed-off-by: Benoit Canet > --- > block/qcow2-refcount.c |6 +- > block/qcow2.h |2 ++ > 2 files changed, 3 insertions(+), 5 deletions(-) > > @@ -413,7 +409,7 @@ fail_block: > } > > /* XXX: cache several refcount block clus

Re: [Qemu-devel] [RFC V6 04/33] qcow2: Add qcow2_dedup_read_missing_and_concatenate

2013-02-06 Thread Stefan Hajnoczi
On Wed, Feb 06, 2013 at 01:31:37PM +0100, Benoît Canet wrote: > +/* > + * Prepare a buffer containing all the required data required to compute > cluster Easier to read this way: s/all the required data required/everything required/ > + * sized deduplication hashes. > + * If sector_num or nb_sec

Re: [Qemu-devel] QMP's chardev-add less capable than HMP's

2013-02-06 Thread Gerd Hoffmann
On 02/06/13 15:35, Markus Armbruster wrote: > As a general rule, HMP commands must be built on top of the QMP API. > Luiz and others have worked long & hard to make HMP conform to this > rule. > > However, a new command has crept in that violates it. > > QMP's chardev-add runs qmp_chardev_add(),

Re: [Qemu-devel] [PATCH] vnc: recognize Hungarian doubleacutes

2013-02-06 Thread Stefan Hajnoczi
On Mon, Feb 04, 2013 at 12:36:25AM +0400, Michael Tokarev wrote: > As reported in http://bugs.debian.org/697641 , some Hungarian keys > does not work with qemu when using vnc display. > > This is because while the Hungarian keymap mentions these symbols, > qemu know nothing about them. So add the

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

2013-02-06 Thread Stefan Hajnoczi
On Wed, Feb 06, 2013 at 01:31:40PM +0100, Benoît Canet wrote: > Signed-off-by: Benoit Canet > --- > block/qcow2-dedup.c | 436 > +++ > block/qcow2.h |5 + > 2 files changed, 441 insertions(+) > > diff --git a/block/qcow2-dedup.c b/block

[Qemu-devel] [RFC V2 12/16] qapi: Add support for deduplication infos in qapi-schema.json.

2013-02-06 Thread Benoît Canet
--- qapi-schema.json | 40 +++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/qapi-schema.json b/qapi-schema.json index cf4e9d6..ec61f6a 100644 --- a/qapi-schema.json +++ b/qapi-schema.json @@ -814,6 +814,40 @@

[Qemu-devel] [PATCH] target-mips: fix for incorrect multiplication with MULQ_S.PH

2013-02-06 Thread Petar Jovanovic
From: Petar Jovanovic The change corrects sign-related issue with MULQ_S.PH. It also includes extension to the already existing test which will trigger the issue. Signed-off-by: Petar Jovanovic --- target-mips/dsp_helper.c|2 +- tests/tcg/mips/mips32-dspr2/mulq_s_ph.c | 1

Re: [Qemu-devel] [Qemu-trivial] [PATCH] configure: Undefine _FORTIFY_SOURCE prior using it

2013-02-06 Thread Richard Henderson
On 2013-02-06 06:49, Stefan Hajnoczi wrote: $ echo "int main() {return 0;}" | gcc -D_FORTIFY_SOURCE=2 -x c - :0:0: warning: "_FORTIFY_SOURCE" redefined [enabled by default] :1:0: note: this is the location of the previous definition in which case we must undefine it. However, if the _FORTIFY_SOU

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

2013-02-06 Thread Stefan Hajnoczi
On Wed, Feb 06, 2013 at 01:31:39PM +0100, Benoît Canet wrote: > diff --git a/block/qcow2.h b/block/qcow2.h > index 8867091..95bf848 100644 > --- a/block/qcow2.h > +++ b/block/qcow2.h > @@ -63,6 +63,10 @@ > #define DEFAULT_CLUSTER_SIZE 65536 > > #define HASH_LENGTH 32 > +/* indicate that the has

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

2013-02-06 Thread Stefan Hajnoczi
On Wed, Feb 06, 2013 at 01:31:36PM +0100, Benoît Canet wrote: > diff --git a/block/qcow2.h b/block/qcow2.h > index 718b52b..c7b6860 100644 > --- a/block/qcow2.h > +++ b/block/qcow2.h > @@ -43,6 +43,10 @@ > #define QCOW_OFLAG_COPIED (1LL << 63) > /* indicate that the cluster is compressed (the

Re: [Qemu-devel] [RFC V6 05/33] qcow2: Make update_refcount public.

2013-02-06 Thread Stefan Hajnoczi
On Wed, Feb 06, 2013 at 01:31:38PM +0100, Benoît Canet wrote: > /* XXX: cache several refcount block clusters ? */ > -static int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, > +int QEMU_WARN_UNUSED_RESULT update_refcount(BlockDriverState *bs, Public functions are prefixed with qc

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

2013-02-06 Thread mdroth
On Wed, Feb 06, 2013 at 10:06:03AM +0100, Markus Armbruster wrote: > Markus Armbruster writes: > > > Eric Blake 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 mat

[Qemu-devel] [RFC] configuring thin provisioning for drives

2013-02-06 Thread Paolo Bonzini
In order to finish the implementation of thin provisioning, we need to add a -drive option to describe how guest discard requests are mapped to host requests. We have three possibilities: - hide them and make them always succeed - translate them to ANCHOR requests, i.e. mark the space as discarde

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

2013-02-06 Thread Eric Blake
On 02/06/2013 05:31 AM, Benoît Canet wrote: > Signed-off-by: Benoit Canet > --- > 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 >

Re: [Qemu-devel] [PATCH for-1.4 00/12] Fix memchar-read/-write before API gets released

2013-02-06 Thread Luiz Capitulino
On Tue, 5 Feb 2013 17:22:03 +0100 Markus Armbruster wrote: > We have a serious design bug in memchar-write [PATCH 01], and a less > serious one in memchar-read [PATCH 02]. I really, really want them > fixed before the API gets calcified by the release. Nice series, just minor comments from me.

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

2013-02-06 Thread Eric Blake
On 02/06/2013 05:31 AM, Benoît Canet wrote: > Signed-off-by: Benoit Canet > --- > 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..8

Re: [Qemu-devel] [PATCH for-1.4] hmp: Disable chardev-add and chardev-remove

2013-02-06 Thread Gerd Hoffmann
On 02/06/13 17:07, Markus Armbruster wrote: > Disable the HMP command for now, along with its chardev-remove buddy. qmp and hmp chardev-remove are identical Makes sense nevertheless for symmetry reasons. Acked-by: Gerd Hoffmann cheers, Gerd

Re: [Qemu-devel] [PATCH for-1.4 04/12] qmp: Plug memory leaks in memchar-write, memchar-read

2013-02-06 Thread Markus Armbruster
Luiz Capitulino writes: > On Tue, 5 Feb 2013 17:22:07 +0100 > Markus Armbruster wrote: > >> >> Signed-off-by: Markus Armbruster >> --- >> qemu-char.c | 5 + >> 1 file changed, 5 insertions(+) >> >> diff --git a/qemu-char.c b/qemu-char.c >> index 892d5bb..9bf53e0 100644 >> --- a/qemu-cha

  1   2   3   >