Re: [Qemu-devel] [PATCH v9 05/10] block: Add bdrv_copy_dirty_bitmap and bdrv_reset_dirty_bitmap

2014-12-10 Thread Vladimir Sementsov-Ogievskiy
about naming: We will need functions for set/unset a subregion of BdrvDirtyBitmap, to fix migration and mirror (accordingly to my "[PATCH v2] block: fix spoiling all dirty bitmaps by mirror and migration"). Having the function 'bdrv_reset_dirty_bitmap' from this patch, we'll have to add funct

Re: [Qemu-devel] [Qemu-trivial] [PATCH 0/2] acpi-build: trivial fixes

2014-12-10 Thread Michael Tokarev
13.11.2014 05:59, arei.gong...@huawei.com wrote: > Gonglei (2): > acpi-build: adjust indention 8 -> 4 spaces > acpi-build: Make DPRINTF working for acpi-build Applied both to -trivial, thank you! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] virtio-bus: avoid breaking build when open DEBUG switch

2014-12-10 Thread Michael Tokarev
Applied to -trivial as is, for now, since the fixes are necessary anyway. Good suggestion by Stefan, to turn it into constant-depending always-compilable code stands, but it is not a show-stopper for the actual fix. Thanks, /mnt

Re: [Qemu-devel] [v2 2/2] migration: Implement multiple compression threads

2014-12-10 Thread Li, Liang Z
>>> ## >>> { 'enum': 'MigrationCapability', >>> - 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] >>> } >>> + 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks', >>>+ 'compress'] } >>> >> >>I'll repeat what I said on v1 (but this time, with some links to back

Re: [Qemu-devel] [Qemu-trivial] [PATCH] usb: delete redundant brackets in usb_host_handle_control()

2014-12-10 Thread Michael Tokarev
19.11.2014 10:09, Fam Zheng wrote: > On Wed, 11/19 14:57, Jun Li wrote: >> When see usb codes, find there are redundant brackets >> !((udev->port->speedmask >> & USB_SPEED_MASK_SUPER)) here. So delete it. Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Drop superfluous conditionals around qemu_opts_del()

2014-12-10 Thread Michael Tokarev
Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] Drop superfluous conditionals around g_strdup()

2014-12-10 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH 0/3] util: Trivial cleanups around g_malloc()

2014-12-10 Thread Michael Tokarev
04.12.2014 17:00, Markus Armbruster wrote: > Markus Armbruster (3): > util: Drop superfluous conditionals around g_free() > Fuse g_malloc(); memset() into g_new0() > util: Use g_new() & friends where that makes obvious sense Applied to trivial (fixing 2/3 subject prefix), thank you! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH for-2.3] configure: Replace which(1) with "has"

2014-12-10 Thread Michael Tokarev
04.12.2014 09:18, Fam Zheng wrote: > Using "has" is more slick because which(1) is not always there. Applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [PATCH 4/4] virtio-blk: introduce multiread

2014-12-10 Thread Fam Zheng
On Tue, 12/09 17:26, Peter Lieven wrote: > diff --git a/include/hw/virtio/virtio-blk.h b/include/hw/virtio/virtio-blk.h > index 3f2652f..0ee9582 100644 > --- a/include/hw/virtio/virtio-blk.h > +++ b/include/hw/virtio/virtio-blk.h > @@ -134,13 +134,6 @@ typedef struct VirtIOBlock { > struct Vir

[Qemu-devel] [PATCH v7 0/7] Netduino 2 Machine Model

2014-12-10 Thread Alistair Francis
This patch series adds the Netduino 2 Machine to QEMU Information on the board is avalible at: http://www.netduino.com/netduino2/specs.htm The git tree can be found at: https://github.com/alistair23/qemu/tree/netduino2.7 This patch series makes some changes to the armv7m_init function that allow

[Qemu-devel] [PATCH v7 2/7] stm32f2xx_USART: Add the stm32f2xx USART Controller

2014-12-10 Thread Alistair Francis
This patch adds the stm32f2xx USART controller (UART also uses the same controller). Signed-off-by: Alistair Francis --- V6: - Rename to STM32F2XX - Fix up unimplemented printing - Add a qemu_chr_accept() V3: - Update debug printing V2: - Drop charecters if the device is not enabled - Th

[Qemu-devel] [PATCH v7 3/7] stm32f2xx_SYSCFG: Add the stm32f2xx SYSCFG

2014-12-10 Thread Alistair Francis
This patch adds the stm32f2xx System Configuration Controller. This is used to configure what memory is mapped at address 0 (although that is not supported) as well as configure how the EXTI interrupts work (also not supported at the moment). This device is not required for basic examples, but mor

[Qemu-devel] [PATCH v7 7/7] netduino2: Add the Netduino 2 Machine

2014-12-10 Thread Alistair Francis
This patch adds the Netduino 2 Machine. This is a Cortex-M3 based machine. Information can be found at: http://www.netduino.com/netduino2/specs.htm Signed-off-by: Alistair Francis --- hw/arm/Makefile.objs | 1 + hw/arm/netduino2.c | 54 2

[Qemu-devel] [PATCH v7 1/7] stm32f2xx_timer: Add the stm32f2xx Timer

2014-12-10 Thread Alistair Francis
This patch adds the stm32f2xx timers: TIM2, TIM3, TIM4 and TIM5 to QEMU. Signed-off-by: Alistair Francis --- V6: - Rename to STM32F2XX - Change the timer calculations to use ns - Update the value to timer_mod to ensure it is in ns - Account for reloadable/resetable timer - Thanks to Peter

[Qemu-devel] [PATCH v7 5/7] target_arm: Parameterise the irq lines for armv7m_init

2014-12-10 Thread Alistair Francis
This patch allows the board to specifiy the number of NVIC interrupt lines when using armv7m_init. Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite --- hw/arm/armv7m.c | 7 --- hw/arm/stellaris.c | 5 - include/hw/arm/arm.h | 2 +- 3 files changed, 9 insertions(+),

Re: [Qemu-devel] [Qemu-trivial] [PATCH] get_maintainer.pl: Remove the --git-chief-penguins option

2014-12-10 Thread Michael Tokarev
04.12.2014 14:59, Thomas Huth wrote: >> >> Ping? > > Ping again Thomas, we was in freeze trying to get 2.2 out of the door. During this time I didn't process -trivial patches, to not pollute incoming changes stream even further. Your patch for some reason does not apply to current state of get_m

[Qemu-devel] [PATCH v7 4/7] target_arm: Remove memory region init from armv7m_init

2014-12-10 Thread Alistair Francis
This patch moves the memory region init code from the armv7m_init function to the stellaris_init function Signed-off-by: Alistair Francis Reviewed-by: Peter Crosthwaite --- V3: - Rename the flash_size argument to mem_size - Remove the sram_size and related code - Thanks to Peter C V2: - C

[Qemu-devel] [PATCH v7 6/7] stm32f205: Add the stm32f205 SoC

2014-12-10 Thread Alistair Francis
This patch adds the stm32f205 SoC. This will be used by the Netduino 2 to create a machine. Signed-off-by: Alistair Francis --- V6: - Correct the number of USART/UART devices - Use macros to define how many devices are inited - Update the memory regions name from netduino.* to STM32F205.*

Re: [Qemu-devel] [Qemu-trivial] [PATCH] fw_cfg: remove superfluous blank line

2014-12-10 Thread Michael Tokarev
Applied to trivial. However, I think this patch is too trivial even for trivial-patches queue... ;) As in, don't bother fixing things like this unless there's other code around being changed too. Thanks, /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] virtio: remove useless declaration of virtio_net_init()

2014-12-10 Thread Michael Tokarev
applied to -trivial, thank you! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH] qapi-schema: fix typo about change-vnc-password

2014-12-10 Thread Michael Tokarev
Applied to -trivial, thanks! /mjt

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] vt82c686: fix coverity warning about out-of-bounds write

2014-12-10 Thread Michael Tokarev
09.12.2014 10:15, zhanghailiang wrote: > Refactor superio_ioport_writeb to fix the out of bounds write warning. Is it just a warning, or real oob write? >From the code it looks like it's just a warning... [] > + > +} > +if (can_write == true) { 09.12.2014 17:08, Paolo Bonzini wro

Re: [Qemu-devel] migration from qemu2.1.2 to qemu2.2

2014-12-10 Thread Dr. David Alan Gilbert
* William Dauchy (will...@gandi.net) wrote: > Hi David, > > Thank you for the quick answer. > > On Dec09 18:55, Dr. David Alan Gilbert wrote: > > You don't tell us what that command line is! > > If you're using -M pc or -M q35 that's expected; if you're not > > it's probably a bug - please show

Re: [Qemu-devel] [Qemu-trivial] [PATCH] pflash_cfi02.c: associate "cfi.pflash02" to "Storage devices" category

2014-12-10 Thread Michael Tokarev
07.12.2014 21:20, Antony Pavlov wrote: > Signed-off-by: Antony Pavlov > --- > hw/block/pflash_cfi02.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c > index 8513a17..389b4aa 100644 > --- a/hw/block/pflash_cfi02.c > +++ b/hw/block/pflash

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] vt82c686: fix coverity warning about out-of-bounds write

2014-12-10 Thread Paolo Bonzini
On 10/12/2014 09:57, Michael Tokarev wrote: > 09.12.2014 10:15, zhanghailiang wrote: >> Refactor superio_ioport_writeb to fix the out of bounds write warning. > > Is it just a warning, or real oob write? > From the code it looks like it's just a warning... It's a bug. The simpler patch would h

[Qemu-devel] [PATCH] vt82c686: avoid out-of-bounds read

2014-12-10 Thread Paolo Bonzini
superio_ioport_readb can read the 256th element of the array. Coverity reports an out-of-bounds write in superio_ioport_writeb, but it does not show the corresponding out-of-bounds read because it cannot prove that it can happen. Fix the root cause of the problem (zhanghailang's patch instead fixe

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] vt82c686: fix coverity warning about out-of-bounds write

2014-12-10 Thread zhanghailiang
On 2014/12/10 16:57, Michael Tokarev wrote: 09.12.2014 10:15, zhanghailiang wrote: Refactor superio_ioport_writeb to fix the out of bounds write warning. Is it just a warning, or real oob write? From the code it looks like it's just a warning... Er, i don't know when input 'data' will be

[Qemu-devel] [PULL 0/2] vnc patch queue

2014-12-10 Thread Gerd Hoffmann
45e1611de8be0eae55967694dd6e627c2dc354f2: Update version for v2.2.0 release (2014-12-09 12:13:37 +) are available in the git repository at: git://git.kraxel.org/qemu tags/pull-vnc-20141210-1 for you to fetch changes up to 43948386bb109b97b3de0bb48573f317bdcb5008: keymaps: correct keymaps.c following Qemu coding style

[Qemu-devel] [PULL 1/2] vnc-enc-tight: fix Arguments in wrong order

2014-12-10 Thread Gerd Hoffmann
From: Gonglei Arguments in wrong order (SWAPPED_ARGUMENTS) The positions of arguments in the call to tight_fill_palette do not match the ordering of the parameters: &fg is passed to bg &bg is passed to fg Cc: Gerd Hoffmann Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- ui/vnc-enc-

[Qemu-devel] [PULL 2/2] keymaps: correct keymaps.c following Qemu coding style

2014-12-10 Thread Gerd Hoffmann
From: Gonglei It's hard to read because of the confused coding style in this file. Let's correct it following Qemu coding style. Signed-off-by: Gonglei Signed-off-by: Gerd Hoffmann --- ui/keymaps.c | 196 --- 1 file changed, 108 insertio

Re: [Qemu-devel] [PATCH] vt82c686: avoid out-of-bounds read

2014-12-10 Thread zhanghailiang
Hi paolo, Will this change affects the migration? I noticed that there is a member 'SuperIOConfig superio_conf' in VT82C686BState. vt82c686 seems only to be used in mips64el target, Do we support migration for mips target? Thanks, zhanghailiang On 2014/12/10 17:17, Paolo Bonzini wrote: super

[Qemu-devel] [PATCH v2 00/10] vnc: add support for multiple vnc displays

2014-12-10 Thread Gerd Hoffmann
Hi, New version of the series after a logn break. No major changes in the existing patches, added some new patches though: Patch #3 to add the vnc display name to the acls, and patches 8-10 adding a new monitor command to query vnc server information. please review, Gerd Gerd Hoffmann (10)

[Qemu-devel] [PATCH v2 01/10] vnc: remove vnc_display global

2014-12-10 Thread Gerd Hoffmann
Replace with a vnc_displays list, so we can have multiple vnc server instances. Add vnc_server_find function to lookup a display by id. With no id supplied return the first vnc server, for backward compatibility reasons. It is not possible (yet) to actually create mutiple vnc server instances. S

[Qemu-devel] [PATCH v2 10/10] monitor: add vnc websockets

2014-12-10 Thread Gerd Hoffmann
Add websockets bool to VncBasicInfo, report websocket server sockets, flag websocket client connections. Signed-off-by: Gerd Hoffmann --- qapi-schema.json | 5 - ui/vnc.c | 14 -- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/qapi-schema.json b/qapi-sch

[Qemu-devel] [PATCH v2 04/10] vnc: switch to QemuOpts, allow multiple servers

2014-12-10 Thread Gerd Hoffmann
This patch switches vnc over to QemuOpts, and it (more or less as side effect) allows multiple vnc server instances. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 4 +- qmp.c| 15 ++- ui/vnc.c | 271 --- vl.

[Qemu-devel] [PATCH v2 06/10] vnc: update docs/multiseat.txt

2014-12-10 Thread Gerd Hoffmann
vnc joins the party ;) Also some s/head/seat/ to clarify. Signed-off-by: Gerd Hoffmann --- docs/multiseat.txt | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/multiseat.txt b/docs/multiseat.txt index 67151e0..b963665 100644 --- a/docs/multiseat.txt +++

[Qemu-devel] [PATCH v2 07/10] vnc: track & limit connections

2014-12-10 Thread Gerd Hoffmann
Also track the number of connections in "connecting" and "shared" state (in addition to the "exclusive" state). Apply a configurable limit to these connections. The logic to apply the limit to connections in "shared" state is pretty simple: When the limit is reached no new connections are allowe

[Qemu-devel] [PATCH v2 09/10] monitor: add query-vnc2 command

2014-12-10 Thread Gerd Hoffmann
Add new query vnc qmp command, for the lack of better ideas just name it "query-vnc2". Changes over query-vnc: * It returns a list of vnc servers, so multiple vnc server instances are covered. * Each vnc server returns a list of server sockets. Followup patch will use that to also report

[Qemu-devel] [PATCH v2 05/10] vnc: allow binding servers to qemu consoles

2014-12-10 Thread Gerd Hoffmann
This patch adds a display= parameter to the vnc options. This allows to bind a vnc server instance to a specific display, allowing to create a multiseat setup with a vnc server for each seat. Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 50 +++--- 1 fi

[Qemu-devel] [PATCH v2 03/10] vnc: add display id to acl names

2014-12-10 Thread Gerd Hoffmann
In case the display id is "default" (which is the one you get if you don't explicitly assign one) we keep the old name scheme, without display, for backward compatibility reasons. Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 22 -- 1 file changed, 20 insertions(+), 2 deletions

[Qemu-devel] [PATCH v2 08/10] vnc: factor out qmp_query_client_list

2014-12-10 Thread Gerd Hoffmann
so we can reuse it for the new vnc query command. Signed-off-by: Gerd Hoffmann --- ui/vnc.c | 30 +++--- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/ui/vnc.c b/ui/vnc.c index 8d189e7..d04802c 100644 --- a/ui/vnc.c +++ b/ui/vnc.c @@ -385,6 +385,20 @@ st

Re: [Qemu-devel] [PATCH] vt82c686: avoid out-of-bounds read

2014-12-10 Thread Paolo Bonzini
On 10/12/2014 10:31, zhanghailiang wrote: > Hi paolo, > > Will this change affects the migration? > I noticed that there is a member 'SuperIOConfig superio_conf' in > VT82C686BState. > > vt82c686 seems only to be used in mips64el target, Do we support > migration for mips target? No, there is

Re: [Qemu-devel] [Qemu-trivial] [PATCH v2] vt82c686: fix coverity warning about out-of-bounds write

2014-12-10 Thread Paolo Bonzini
On 10/12/2014 09:57, Michael Tokarev wrote: > 09.12.2014 10:15, zhanghailiang wrote: >> Refactor superio_ioport_writeb to fix the out of bounds write warning. > > Is it just a warning, or real oob write? > From the code it looks like it's just a warning... > > [] >> + >> +} >> +

Re: [Qemu-devel] [Qemu-trivial] [PATCH] pflash_cfi02.c: associate "cfi.pflash02" to "Storage devices" category

2014-12-10 Thread Paolo Bonzini
On 10/12/2014 10:11, Michael Tokarev wrote: > 07.12.2014 21:20, Antony Pavlov wrote: >> Signed-off-by: Antony Pavlov >> --- >> hw/block/pflash_cfi02.c | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/hw/block/pflash_cfi02.c b/hw/block/pflash_cfi02.c >> index 8513a17..389b4aa 100644 >

Re: [Qemu-devel] [PATCH] block: fix big write

2014-12-10 Thread Paolo Bonzini
On 10/12/2014 02:41, Ming Lei wrote: > On Wed, Dec 10, 2014 at 1:45 AM, Paolo Bonzini wrote: >> >> >> On 08/12/2014 08:19, Ming Lei wrote: > > Alternatively, I'd accept a SCSI patch setting max_ws_blocks and friends > to 2GB - 1 block. >>> It should be better to not introduce the lim

[Qemu-devel] [Bug 1385934] Re: USB with passthrougth guest cannot enumerate USB host

2014-12-10 Thread Leen Keus
Can you check if the same error messages appear in /var/log/syslog and /var/log/libvirt/qemu/.log as I described in bug #1392504? Because I think it is apparmor related. -- You received this bug notification because you are a member of qemu- devel-ml, which is subscribed to QEMU. https://bugs.lau

[Qemu-devel] [Bug 1392504] Re: USB Passthrough is not working anymore

2014-12-10 Thread Leen Keus
Found the following lines in /var/log/libvirt/qemu/.log libusbx: error [_get_usbfs_fd] libusbx couldn't open USB device /dev/bus/usb/001/004: Permission denied libusbx: error [_get_usbfs_fd] libusbx requires write access to USB device nodes. libusbx: error [_get_usbfs_fd] libusbx couldn't open US

Re: [Qemu-devel] [PATCH RESEND for 2.3 4/6] xbzrle: check 8 bytes at a time after an concurrency scene

2014-12-10 Thread Amit Shah
On (Wed) 10 Dec 2014 [11:55:49], ChenLiang wrote: > On 2014/12/10 11:18, Amit Shah wrote: > > > On (Mon) 24 Nov 2014 [19:55:50], arei.gong...@huawei.com wrote: > >> From: ChenLiang > >> > >> The logic of old code is correct. But Checking byte by byte will > >> consume time after an concurrency sc

Re: [Qemu-devel] [PATCH RESEND for 2.3 0/6] xbzrle: optimize the xbzrle

2014-12-10 Thread Amit Shah
On (Wed) 10 Dec 2014 [08:03:33], Amit Shah wrote: > On (Mon) 24 Nov 2014 [19:55:46], arei.gong...@huawei.com wrote: > > From: ChenLiang > > > > Hi, > > > > This set of patches rebase on > > https://lists.nongnu.org/archive/html/qemu-devel/2014-04/msg04956.html, > > > > Those patches have been r

[Qemu-devel] [PATCH v2 02/10] vnc: remove unused DisplayState parameter, add id instead.

2014-12-10 Thread Gerd Hoffmann
DisplayState isn't used anywhere, drop it. Add the vnc server ID as parameter instead, so it is possible to specify the server instance. Signed-off-by: Gerd Hoffmann --- include/ui/console.h | 16 ui/vnc.c | 29 ++--- vl.c |

[Qemu-devel] [PATCH] scsi-disk: provide maximum transfer length

2014-12-10 Thread Paolo Bonzini
The QEMU block layer has a limit of INT_MAX bytes per transfer. Expose it in the block limits VPD page for both regular transfers and WRITE SAME. Reported-by: Ming Lei Signed-off-by: Paolo Bonzini --- hw/scsi/scsi-disk.c | 27 +++ 1 file changed, 27 insertions(+) diff

[Qemu-devel] [PULL 06/73] chardev: Add -qmp-pretty

2014-12-10 Thread Kevin Wolf
From: Max Reitz Add a command line option for adding a QMP monitor using pretty JSON formatting. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- qemu-options.hx | 8 vl.c| 15 ++- 2 files changed, 18 insertions(+), 5 deletions(

[Qemu-devel] [PULL 01/73] block: Add bdrv_next_node

2014-12-10 Thread Kevin Wolf
From: Fam Zheng Similar to bdrv_next, this traverses through graph_bdrv_states. Will be useful to enumerate all the named nodes. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block.c | 8

[Qemu-devel] [PULL 09/73] blockdev: acquire AioContext in blockdev-snapshot-delete-internal-sync

2014-12-10 Thread Kevin Wolf
From: Stefan Hajnoczi Add dataplane support to the blockdev-snapshot-delete-internal-sync QMP command. By acquiring the AioContext we avoid race conditions with the dataplane thread which may also be accessing the BlockDriverState. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-

[Qemu-devel] [PULL 07/73] iotests: _filter_qmp for pretty JSON output

2014-12-10 Thread Kevin Wolf
From: Max Reitz _filter_qmp should be able to correctly filter out the QMP version object for pretty JSON output. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Kevin Wolf --- tests/qemu-iotests/common.filter | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --g

[Qemu-devel] [PULL 15/73] block/hmp: Allow info = NULL in print_block_info()

2014-12-10 Thread Kevin Wolf
This allows printing infos of BlockDriverStates that aren't at the root of the graph (and logically implementing a BlockBackend). Signed-off-by: Kevin Wolf --- hmp.c | 34 +- 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/hmp.c b/hmp.c index 2e2b91

[Qemu-devel] [PULL 02/73] block: Add bdrv_get_node_name

2014-12-10 Thread Kevin Wolf
From: Fam Zheng This returns the node name of a BDS. Remove the TODO comment and expect the callers to be explicit. Signed-off-by: Fam Zheng Reviewed-by: Eric Blake Reviewed-by: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block.c | 5 + include/block/

[Qemu-devel] [PULL 03/73] block: Include "node-name" if present in query-blockstats

2014-12-10 Thread Kevin Wolf
From: Fam Zheng Node name is a better identifier of BDS. We will want to query statistics of a BDS node buried in the BDS graph, so reporting the node's name if there is one will do the trick. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Reviewed-by: Eric Blake Signed-off-by: Max Reitz S

[Qemu-devel] [PULL 11/73] blockdev: acquire AioContext in eject, change, and block_passwd

2014-12-10 Thread Kevin Wolf
From: Stefan Hajnoczi By acquiring the AioContext we avoid race conditions with the dataplane thread which may also be accessing the BlockDriverState. Fix up eject, change, and block_passwd in a single patch because qmp_eject() and qmp_change_blockdev() both call eject_device(). Also fix block_

[Qemu-devel] [PULL 10/73] blockdev: check for BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE

2014-12-10 Thread Kevin Wolf
From: Stefan Hajnoczi The BLOCK_OP_TYPE_INTERNAL_SNAPSHOT_DELETE op blocker exists but was never used! Let's fix that so snapshot delete can be blocked. Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- blockdev.c | 4 1 file

[Qemu-devel] [PULL 13/73] block/qapi: Add cache information to query-block

2014-12-10 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Eric Blake --- block/qapi.c | 7 +++ hmp.c | 8 qapi/block-core.json | 20 +++- tests/qemu-iotests/051.out | 1 + tests/qemu-iotests/067.out | 25 + 5 files cha

[Qemu-devel] [PULL 17/73] monitor: Fix HMP tab completion

2014-12-10 Thread Kevin Wolf
Commands with multiple boolean flag options (like 'info block') didn't provide correct completion because only the first one was skipped. Signed-off-by: Kevin Wolf --- monitor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/monitor.c b/monitor.c index f63a3aa..b37ddda 10064

[Qemu-devel] [PULL 23/73] block: Add AioContextNotifier functions to BB

2014-12-10 Thread Kevin Wolf
From: Max Reitz Because all BlockDriverStates behind a single BlockBackend reside in a single AioContext, it is fine to just pass these functions (blk_add_aio_context_notifier() and blk_remove_aio_context_notifier()) through to the root BlockDriverState. Signed-off-by: Max Reitz Reviewed-by: Pa

[Qemu-devel] [PULL 14/73] block/hmp: Factor out print_block_info()

2014-12-10 Thread Kevin Wolf
The new function prints the info for a single BlockDriverState. Signed-off-by: Kevin Wolf --- hmp.c | 192 +- 1 file changed, 97 insertions(+), 95 deletions(-) diff --git a/hmp.c b/hmp.c index 05c3730..2e2b91b 100644 --- a/hmp.c ++

[Qemu-devel] [PULL 16/73] block/hmp: Allow node-name in 'info block'

2014-12-10 Thread Kevin Wolf
The optional parameter specifying a block device allows now to use a node-name instead of a drive name (and therefore to inspect any node in the graph). The new -n options allows listing all named nodes instead of BlockBackends. Signed-off-by: Kevin Wolf --- hmp.c | 31 ++

[Qemu-devel] [PULL 24/73] block: Add blk_add_close_notifier() for BB

2014-12-10 Thread Kevin Wolf
From: Max Reitz Adding something like a "delete notifier" to a BlockBackend would not make much sense, because whoever is interested in registering there will probably hold a reference to that BlockBackend; therefore, the notifier will never be called (or only when the notifiee already relinquish

[Qemu-devel] [PULL 21/73] ahci: replace SATA FIS type magic numbers with constants

2014-12-10 Thread Kevin Wolf
From: Stefan Hajnoczi SATA 3.0 "10.3.1 FIS Type values" defines the constants used to differentiate between FIS types. Signed-off-by: Stefan Hajnoczi Reviewed-by: John Snow Message-id: 1415874281-7371-3-git-send-email-stefa...@redhat.com Signed-off-by: Kevin Wolf --- hw/ide/ahci.c | 6 +++---

[Qemu-devel] [PULL 22/73] block: Lift more functions into BlockBackend

2014-12-10 Thread Kevin Wolf
From: Max Reitz There are already some blk_aio_* functions, so we might as well have blk_co_* functions (as far as we need them). This patch adds blk_co_flush(), blk_co_discard(), and also blk_invalidate_cache() (which is not a blk_co_* function but is needed nonetheless). Signed-off-by: Max Rei

[Qemu-devel] [PULL 20/73] ahci: avoid #ifdef DEBUG_AHCI bitrot

2014-12-10 Thread Kevin Wolf
From: Stefan Hajnoczi Debug code using #ifdef is susceptible to bitrot because the compiler never checks the debug code. This is easy to avoid, change the DPRINTF() macro to use if (DEBUG_AHCI) and always give it a 0 or 1 value. This also allows us to drop an #ifdef DEBUG_AHCI in ahci_start_dma

[Qemu-devel] [PULL 19/73] iotests: Plain blkdebug filename generation

2014-12-10 Thread Kevin Wolf
From: Max Reitz Add one test whether blkdebug is able to generate a plain filename if given a configuration file and a file to be tested only; and add another test whether blkdebug is able to do the same without being given a configuration file. Signed-off-by: Max Reitz Reviewed-by: Eric Blake

[Qemu-devel] [PULL 28/73] tests: Use "command -v" instead of which(1) in shell scripts

2014-12-10 Thread Kevin Wolf
From: Fam Zheng When which(1) is not installed, we would complain "perl not found" because it's the first set_prog_path check. The error message is wrong. Fix it by using "command -v", a native way to query the existence of a command. Suggested-by: Eric Blake Signed-off-by: Fam Zheng Reviewed

[Qemu-devel] [PULL 25/73] nbd: Change external interface to BlockBackend

2014-12-10 Thread Kevin Wolf
From: Max Reitz Substitute BlockDriverState by BlockBackend in every globally visible function provided by nbd. Signed-off-by: Max Reitz Reviewed-by: Paolo Bonzini Message-id: 1416309679-333-5-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- bloc

[Qemu-devel] [PULL 31/73] qemu-iotests: Add qemu-io format option in Python tests

2014-12-10 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Reviewed-by: Max Reitz Message-id: 1416497234-29880-4-git-send-email-kw...@redhat.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/qemu-iotests/030 | 22 +++--- tests/qemu-iotests/040 | 32 +++

[Qemu-devel] [PULL 30/73] qemu-iotests: Use qemu-io -f $IMGFMT

2014-12-10 Thread Kevin Wolf
This patch changes $QEMU_IO so that all tests by default pass a format argument to qemu-io. There are a few cases where -f $IMGFMT is not wanted because it selects the wrong driver or json: filenames including a driver are used. They are changed to use $QEMU_IO_PROG, which doesn't include any opti

[Qemu-devel] [PULL 26/73] nbd: Use BlockBackend internally

2014-12-10 Thread Kevin Wolf
From: Max Reitz With all externally visible functions changed to use BlockBackend, this patch makes nbd use BlockBackend for everything internally as well. While touching them, substitute 512 by BDRV_SECTOR_SIZE in the calls to blk_read(), blk_write() and blk_co_discard(). Signed-off-by: Max Re

[Qemu-devel] [PULL 29/73] qemu-io: Allow explicitly specifying format

2014-12-10 Thread Kevin Wolf
This adds a -f option to qemu-io which allows to explicitly specify the block driver to use for the given image. Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Reviewed-by: Eric Blake Reviewed-by: Max Reitz Message-id: 1416497234-29880-2-git-send-email-kw...@redhat.com Signed-off-by: S

[Qemu-devel] [PULL 27/73] qemu-nbd: Use BlockBackend where reasonable

2014-12-10 Thread Kevin Wolf
From: Max Reitz Because qemu-nbd creates the BlockBackend by itself, it should create the according BlockDriverState tree by itself as well; that means, it has call bdrv_open() on its own. This is one of the places where qemu-nbd still needs to use a BlockDriverState directly (the root BDS below

[Qemu-devel] [PULL 32/73] qtests: Specify image format explicitly

2014-12-10 Thread Kevin Wolf
Signed-off-by: Kevin Wolf Reviewed-by: Stefan Hajnoczi Reviewed-by: Max Reitz Message-id: 1416497234-29880-5-git-send-email-kw...@redhat.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/ahci-test.c | 3 ++- tests/bios-tables-test.c | 2 +- tests/drive_del-test.c

[Qemu-devel] [PULL 36/73] qemu-iotests: Fix stderr handling in common.qemu

2014-12-10 Thread Kevin Wolf
The original intention was to pipe stderr of qemu into $fifo_out. However, the redirections were specified in the wrong order for this. This patch fixes it. Now qemu's output on stderr can be retrieved with _send_qemu_cmd, which applies several useful filters on the output that were missing before

[Qemu-devel] [PULL 38/73] blockdev: update outdated qmp_transaction() comments

2014-12-10 Thread Kevin Wolf
From: Stefan Hajnoczi Originally the transaction QMP command was just for taking snapshots. The command became more general when drive-backup and abort were added. It is more accurate to say the command is about performing operations on an atomic group than to say it is about snapshots. Signed-

[Qemu-devel] [PULL 34/73] block: Read only one sector for format probing

2014-12-10 Thread Kevin Wolf
The only image format driver that even potentially accesses anything after 512 bytes in its bdrv_probe() implementation is VMDK, which reads a plain-text descriptor file. In practice, the field it's looking for seems to come first and will be well within the first 512 bytes, too. Signed-off-by: Ke

[Qemu-devel] [PULL 35/73] raw: Prohibit dangerous writes for probed images

2014-12-10 Thread Kevin Wolf
If the user neglects to specify the image format, QEMU probes the image to guess it automatically, for convenience. Relying on format probing is insecure for raw images (CVE-2008-2004). If the guest writes a suitable header to the device, the next probe will recognize a format chosen by the guest.

[Qemu-devel] [PULL 37/73] qemu-iotests: Test writing non-raw image headers to raw image

2014-12-10 Thread Kevin Wolf
This is forbidden if the raw driver was probed. Signed-off-by: Kevin Wolf Reviewed-by: Max Reitz Message-id: 1416497234-29880-10-git-send-email-kw...@redhat.com Signed-off-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- tests/qemu-iotests/109| 132 +

[Qemu-devel] [PULL 40/73] blockdev: acquire AioContext in QMP 'transaction' actions

2014-12-10 Thread Kevin Wolf
From: Stefan Hajnoczi The transaction QMP command performs operations atomically on a group of drives. This command needs to acquire AioContext in order to work safely when virtio-blk dataplane IOThreads are accessing drives. The transactional nature of the command means that actions are split

[Qemu-devel] [PULL 39/73] blockdev: drop unnecessary DriveBackupState field assignment

2014-12-10 Thread Kevin Wolf
From: Stefan Hajnoczi drive_backup_prepare() assigns DriveBackupState fields to NULL in the error path. This is unnecessary because the DriveBackupState is allocated using g_malloc0() and other functions like external_snapshot_prepare() already rely on this. Do not explicitly assign fields to N

[Qemu-devel] [PULL 49/73] ide: Check validity of logical block size

2014-12-10 Thread Kevin Wolf
Our IDE emulation can't handle logical block sizes other than 512. Check for it. The original assumption was that other values would silently be ignored (which is bad enough), but it's not quite true: The physical block size is exposed in IDENTIFY DEVICE as a multiple of the logical block size. Se

[Qemu-devel] [PULL 41/73] blockdev: check for BLOCK_OP_TYPE_INTERNAL_SNAPSHOT

2014-12-10 Thread Kevin Wolf
From: Stefan Hajnoczi The BLOCK_OP_TYPE_INTERNAL_SNAPSHOT op blocker exists but was never used! Let's fix that so internal snapshots can be blocked. [Fixed s/external/internal/ typo as pointed out by Paolo Bonzini and Max Reitz. --Stefan] Signed-off-by: Stefan Hajnoczi Reviewed-by: Max Reitz

[Qemu-devel] [PULL 42/73] qcow2: Fix header extension size check

2014-12-10 Thread Kevin Wolf
After reading the extension header, offset is incremented, but not checked against end_offset any more. This way an integer overflow could happen when checking whether the extension end is within the allowed range, effectively disabling the check. This patch adds the missing check and a test case

[Qemu-devel] [PULL 44/73] block: Don't probe for unknown backing file format

2014-12-10 Thread Kevin Wolf
If a qcow2 image specifies a backing file format that doesn't correspond to any format driver that qemu knows, we shouldn't fall back to probing, but simply error out. Not looking up the backing file driver in bdrv_open_backing_file(), but just filling in the "driver" option if it isn't there move

[Qemu-devel] [PULL 51/73] block: Make essential BlockDriver objects public

2014-12-10 Thread Kevin Wolf
From: Max Reitz There are some block drivers which are essential to QEMU and may not be removed: These are raw, file and qcow2 (as the default non-raw format). Make their BlockDriver objects public so they can be directly referenced throughout the block layer without needing to call bdrv_find_for

[Qemu-devel] [PULL 45/73] block: do not use get_clock()

2014-12-10 Thread Kevin Wolf
From: Paolo Bonzini Use the external qemu-timer API instead. No one else should be calling cpu_get_clock(), get_clock() and get_clock_realtime() directly; they are internal functions and they should be confined to qemu-timer.c and cpus.c (where the icount implementation resides). All accesses s

[Qemu-devel] [PULL 55/73] block: Check create_opts before image creation

2014-12-10 Thread Kevin Wolf
From: Max Reitz If a driver supports image creation, it needs to set the .create_opts field. We can use that to make sure .create_opts for both drivers involved is not NULL in bdrv_img_create(), which is important so that the create_opts pointer in that function is not NULL after the qemu_opts_ap

[Qemu-devel] [PULL 46/73] qemu-iotests: 060: Filter the real disk size

2014-12-10 Thread Kevin Wolf
The real on-disk size of an image depends on things like the host filesystem. _img_info already filters it out, use the function in 060. Signed-off-by: Kevin Wolf Reviewed-by: Michael Mueller Reviewed-by: Max Reitz --- tests/qemu-iotests/060 | 2 +- tests/qemu-iotests/060.out | 5 ++-

[Qemu-devel] [PULL 48/73] nvme: 64kB page size fixes

2014-12-10 Thread Kevin Wolf
From: Anton Blanchard Initialise our maximum page size capability to 64kB and increase the page_size variable from 16 to 32 bits. Signed-off-by: Anton Blanchard Reviewed-by: Stefan Hajnoczi Signed-off-by: Kevin Wolf --- hw/block/nvme.c | 1 + hw/block/nvme.h | 2 +- 2 files changed, 2 insert

[Qemu-devel] [PULL 52/73] block: Omit bdrv_find_format for essential drivers

2014-12-10 Thread Kevin Wolf
From: Max Reitz We can always assume raw, file and qcow2 being available; so do not use bdrv_find_format() to locate their BlockDriver objects but statically reference the respective objects. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz Signed-off-by: Kevin Wolf --- block.c | 17

[Qemu-devel] [PULL 53/73] block/vvfat: qcow driver may not be found

2014-12-10 Thread Kevin Wolf
From: Max Reitz Although virtually impossible right now, bdrv_find_format("qcow") may fail. The vvfat block driver should heed that case. Cc: qemu-sta...@nongnu.org Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Signed-off-by: Kevin Wolf --- block/vvfat.c | 6 ++ 1 file changed, 6 inse

[Qemu-devel] [PULL 47/73] qemu-iotests: 082: Filter the real disk size

2014-12-10 Thread Kevin Wolf
From: Michael Mueller The real on-disk size of an image depends on things like the host filesystem. _img_info already filters it out, use the function in 082. Signed-off-by: Michael Mueller Reviewed-by: Max Reitz Signed-off-by: Kevin Wolf --- tests/qemu-iotests/082 | 14 ++--- te

[Qemu-devel] [PULL 56/73] qemu-img: Check create_opts before image creation

2014-12-10 Thread Kevin Wolf
From: Max Reitz If a driver supports image creation, it needs to set the .create_opts field. We can use that to make sure .create_opts for both drivers involved is not NULL for the target image in qemu-img convert, which is important so that the create_opts pointer in img_convert() is not NULL af

[Qemu-devel] [PULL 54/73] block/nfs: Add create_opts

2014-12-10 Thread Kevin Wolf
From: Max Reitz The nfs protocol driver is capable of creating images, but did not specify any creation options. Fix it. A way to test this issue is the following: $ qemu-img create -f nfs nfs://127.0.0.1/foo.qcow2 64M Without this patch, it segfaults. With this patch, it does not. However, th

  1   2   3   4   >