[Qemu-devel] [PATCH v2] ui/cocoa.m: Adds console items to the View menu

2015-02-13 Thread Programmingkid
Adds these items to the View menu: VGA Monitor Serial Parallel Signed-off-by: John Arbuckle --- Implemented new function that gives you the index for a given console name. Moved View menu code to its own function. Console menu items are now checked before being adding to the View menu. includ

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Peter Maydell
On 14 February 2015 at 03:37, Chris Metcalf wrote: > I'm not sure whether Tilera can simply re-release the tilegx-specific stuff > from binutils as a separate tarball with GPL v2 licensing. Hopefully we can > avoid having to figure that out. :-) I believe it is theoretically possible (the usual

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Chris Metcalf
On 2/13/2015 10:08 PM, Chen Gang S wrote: On 2/14/15 08:26, Peter Maydell wrote: On 13 February 2015 at 23:50, Chen Gang S wrote: On 2/13/15 05:15, Chen Gang S wrote: It almost likes a template for adding an architecture target. Signed-off-by: Chen Gang --- configure

[Qemu-devel] [PATCH 4/5] tcg: Change generator-side labels to a pointer

2015-02-13 Thread Richard Henderson
This is less about improved type checking than enabling a subsequent change to the representation of labels. Cc: Claudio Fontana Cc: Andrzej Zaborowski Cc: Peter Maydell Cc: Aurelien Jarno Cc: Blue Swirl Cc: Stefan Weil Signed-off-by: Richard Henderson --- I've only been able to test aarch6

[Qemu-devel] [PATCH 3/5] tcg: Change translator-side labels to a pointer

2015-02-13 Thread Richard Henderson
This is improved type checking for the translators -- it's no longer possible to accidentally swap arguments to the branch functions. Note that the code generating backends still manipulate labels as int. With notable exceptions, the scope of the change is just a few lines for each target, so it'

[Qemu-devel] [PATCH 5/5] tcg: Use tcg_malloc to allocate TCGLabel

2015-02-13 Thread Richard Henderson
Pre-allocating 512 of them per TB is a waste. Signed-off-by: Richard Henderson --- tcg/tcg.c | 31 ++- tcg/tcg.h | 16 +--- 2 files changed, 23 insertions(+), 24 deletions(-) diff --git a/tcg/tcg.c b/tcg/tcg.c index 97aa512..f1558b7 100644 --- a/tcg/tcg.c

[Qemu-devel] [PATCH 1/5] tcg: Use tcg_malloc to allocate TCGLabelQemuLdst

2015-02-13 Thread Richard Henderson
Pre-allocating 640 of them per TB is a waste. Signed-off-by: Richard Henderson --- tcg/tcg-be-ldst.h | 26 -- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/tcg/tcg-be-ldst.h b/tcg/tcg-be-ldst.h index 429cba2..4a45102 100644 --- a/tcg/tcg-be-ldst.h +++ b/

[Qemu-devel] [PATCH 0/5] Use tcg_malloc more

2015-02-13 Thread Richard Henderson
We have several statically sized arrays attached to the TCGContext structure. For the most part, these arrays are sized unreasonably large -- there are rarely more than 3 labels in a TB, or more than a few dozen memory operations. We already have tcg_malloc, which manages a pooled allocator attac

[Qemu-devel] [PATCH 2/5] tcg-ia64: Use tcg_malloc to allocate TCGLabelQemuLdst

2015-02-13 Thread Richard Henderson
Signed-off-by: Richard Henderson --- tcg/ia64/tcg-target.c | 19 --- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tcg/ia64/tcg-target.c b/tcg/ia64/tcg-target.c index 6bc9924..1c01fd9 100644 --- a/tcg/ia64/tcg-target.c +++ b/tcg/ia64/tcg-target.c @@ -1550,34 +1550

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Peter Maydell
On 14 February 2015 at 03:08, Chen Gang S wrote: > Yeah, I shall add disassembler firstly, before generate tcg code: > > - binutils tilegx disassembler is easy to be integrated into qemu. > > - I shall reuse part of the tilegx disassembler code for generating tcg >code. > > - For me, dumpin

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Chen Gang S
On 2/14/15 10:40, Richard Henderson wrote: > On 02/13/2015 04:26 PM, Peter Maydell wrote: >>> Oh, it needs to use "TARGET_ARCH=tilegx" instead of "TARGET_ARCH=tile", >>> or can not put "CONFIG_TILE_DIS=y" to config-all-disas.mak, below (when >>> I am adding "disas/tilegx.c", I meet it). >> >> You n

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Chen Gang S
On 2/14/15 08:26, Peter Maydell wrote: > On 13 February 2015 at 23:50, Chen Gang S wrote: >> >> On 2/13/15 05:15, Chen Gang S wrote: >>> It almost likes a template for adding an architecture target. >>> >>> Signed-off-by: Chen Gang >>> --- >>> configure | 7 ++ >>>

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Richard Henderson
On 02/13/2015 04:26 PM, Peter Maydell wrote: >> Oh, it needs to use "TARGET_ARCH=tilegx" instead of "TARGET_ARCH=tile", >> or can not put "CONFIG_TILE_DIS=y" to config-all-disas.mak, below (when >> I am adding "disas/tilegx.c", I meet it). > > You need to make up your mind about what your architec

Re: [Qemu-devel] [PATCH v3] ui/cocoa.m: Machine menu patch for Mac OS X

2015-02-13 Thread Peter Maydell
On 14 February 2015 at 01:43, Programmingkid wrote: > Added features: > Menu items to switch floppy and CD image files. > Menu items to eject floppy and CD image files. > Menu item to use /dev/cdrom. > Verifies with the user before quitting QEMU by displaying a dialog box. > > Signed-off-by: John

Re: [Qemu-devel] [PATCH] block:Fix FIXED base vpc be probed to raw format

2015-02-13 Thread Xiaodong Gong
On Wed, Feb 11, 2015 at 9:39 PM, Stefan Hajnoczi wrote: > On Tue, Feb 10, 2015 at 11:04:31PM +0800, Xiaodong Gong wrote: > > On Mon, Feb 9, 2015 at 10:54 PM, Stefan Hajnoczi > wrote: > > > > > On Sun, Feb 08, 2015 at 08:39:52PM +0800, Xiaodong Gong wrote: > > > > When open the vpc snapshot based

[Qemu-devel] [PATCH v3] ui/cocoa.m: Machine menu patch for Mac OS X

2015-02-13 Thread Programmingkid
Added features: Menu items to switch floppy and CD image files. Menu items to eject floppy and CD image files. Menu item to use /dev/cdrom. Verifies with the user before quitting QEMU by displaying a dialog box. Signed-off-by: John Arbuckle --- Added yellow background to the pause label. Removed

Re: [Qemu-devel] [PULL 00/65] Block patches

2015-02-13 Thread Peter Maydell
On 13 February 2015 at 16:23, Stefan Hajnoczi wrote: > The following changes since commit 449008f86418583a1f0fb946cf91ee7b4797317d: > > Merge remote-tracking branch 'remotes/awilliam/tags/vfio-update-20150210.0' > into staging (2015-02-11 05:14:41 +) > > are available in the git repository

[Qemu-devel] Enum String Generator

2015-02-13 Thread John Snow
Just a stupid question: We don't have a macro facility in the current codebase that generates both an enum and string table / lookup function simultaneously, do we? Some things really do just wind up looking grossly inelegant in C, and this is one of them. --js

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Peter Maydell
On 13 February 2015 at 23:50, Chen Gang S wrote: > > On 2/13/15 05:15, Chen Gang S wrote: >> It almost likes a template for adding an architecture target. >> >> Signed-off-by: Chen Gang >> --- >> configure | 7 ++ >> default-configs/tilegx-linux-user.mak | 1 + >>

Re: [Qemu-devel] [PATCH 1/5] target-tile: Firstly add to qemu with minimized features

2015-02-13 Thread Chen Gang S
On 2/13/15 05:15, Chen Gang S wrote: > It almost likes a template for adding an architecture target. > > Signed-off-by: Chen Gang > --- > configure | 7 ++ > default-configs/tilegx-linux-user.mak | 1 + > target-tile/Makefile.objs | 1 + > target-ti

Re: [Qemu-devel] [PULL 06/37] target-ppc: VXSQRT Should Not Be Set for NaNs

2015-02-13 Thread Alexander Graf
On 12.02.15 23:21, Maciej W. Rozycki wrote: > On Wed, 7 Jan 2015, Alexander Graf wrote: > >> diff --git a/target-ppc/fpu_helper.c b/target-ppc/fpu_helper.c >> index 7f74466..81db60f 100644 >> --- a/target-ppc/fpu_helper.c >> +++ b/target-ppc/fpu_helper.c >> @@ -920,14 +923,16 @@ uint64_t helper_

Re: [Qemu-devel] HEAD is failing virt-test on migration tests

2015-02-13 Thread Alexander Graf
On 13.02.15 12:23, Lucas Meneghel Rodrigues wrote: > > > On Fri, Feb 13, 2015 at 9:18 AM, Alexander Graf wrote: >> >> >> On 13.02.15 10:04, Dr. David Alan Gilbert wrote: >>> * Alexander Graf (ag...@suse.de) wrote: On 13.02.15 01:29, Lucas Meneghel Rodrigues wrote: > Copyi

Re: [Qemu-devel] [PATCH v2 07/22] block: Add bdrv_close_all() handlers

2015-02-13 Thread Max Reitz
On 2015-02-09 at 13:38, Max Reitz wrote: Every time a reference to a BlockBackend is taken, a notifier for bdrv_close_all() has to be deposited so the reference holder can relinquish its reference when bdrv_close_all() is called. That notifier should be revoked on a bdrv_unref() call. Add a Noti

Re: [Qemu-devel] Did we lose monitor commands pci_add, pci_del?

2015-02-13 Thread David Gibson
On Fri, Feb 13, 2015 at 05:51:26PM +0100, Markus Armbruster wrote: > Commit 79ca616 "pci: Cleanup configuration for pci-hotplug.c" (June > 2013, released in v1.6.0) made linking pci-hotplug-old.o conditional on > make variable CONFIG_PCI_HOTPLUG_OLD, and the actual monitor commands > conditional on

Re: [Qemu-devel] [PATCH v12 02/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-02-13 Thread John Snow
Missed you by several seconds, I submitted a v13 fixup to cover Max's comments and had wrongly assumed I wouldn't be hearing anything else at 5PM on a Friday :) On 02/13/2015 05:24 PM, Eric Blake wrote: On 02/09/2015 06:35 PM, John Snow wrote: The new command pair is added to manage user crea

Re: [Qemu-devel] [PATCH v12 02/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-02-13 Thread Eric Blake
On 02/09/2015 06:35 PM, John Snow wrote: > The new command pair is added to manage user created dirty bitmap. The > dirty bitmap's name is mandatory and must be unique for the same device, > but different devices can have bitmaps with the same names. I haven't been following this series closely (I

[Qemu-devel] [PATCH v13 17/17] iotests: add incremental backup failure recovery test

2015-02-13 Thread John Snow
To test the failure case, we modify iotests.py to allow us to specify that we'd like to allow failures when we wait for block job events. Signed-off-by: John Snow --- tests/qemu-iotests/112| 57 ++- tests/qemu-iotests/112.out| 4 +-- tests/qem

[Qemu-devel] [PATCH v13 14/17] iotests: add invalid input incremental backup tests

2015-02-13 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Max Reitz --- tests/qemu-iotests/112 | 89 ++ tests/qemu-iotests/112.out | 5 +++ tests/qemu-iotests/group | 1 + 3 files changed, 95 insertions(+) create mode 100644 tests/qemu-iotests/112 create mode 10

[Qemu-devel] [PATCH v13 13/17] block: Ensure consistent bitmap function prototypes

2015-02-13 Thread John Snow
We often don't need the BlockDriverState for functions that operate on bitmaps. Remove it. Signed-off-by: John Snow Reviewed-by: Max Reitz --- block.c | 13 ++--- block/backup.c| 2 +- block/mirror.c| 26 ++ blockdev.c|

[Qemu-devel] [PATCH v13 16/17] iotests: add transactional incremental backup test

2015-02-13 Thread John Snow
Reviewed-by: Max Reitz Signed-off-by: John Snow --- tests/qemu-iotests/112 | 49 ++ tests/qemu-iotests/112.out | 4 ++-- 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/112 b/tests/qemu-iotests/112 index da8f0e0.

[Qemu-devel] [PATCH v13 15/17] iotests: add simple incremental backup case

2015-02-13 Thread John Snow
Signed-off-by: John Snow --- tests/qemu-iotests/112 | 122 + tests/qemu-iotests/112.out | 4 +- 2 files changed, 124 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/112 b/tests/qemu-iotests/112 index 7985cd1..da8f0e0 100644 --- a/te

[Qemu-devel] [PATCH v13 03/17] qmp: Add block-dirty-bitmap-add and block-dirty-bitmap-remove

2015-02-13 Thread John Snow
The new command pair is added to manage user created dirty bitmap. The dirty bitmap's name is mandatory and must be unique for the same device, but different devices can have bitmaps with the same names. The granularity is an optional field. If it is not specified, we will choose a default granula

[Qemu-devel] [PATCH v13 10/17] qapi: Add transaction support to block-dirty-bitmap operations

2015-02-13 Thread John Snow
This adds four qmp commands to transactions. Users can stop a dirty bitmap, start backup of it, and start another dirty bitmap atomically, so that the dirty bitmap is tracked incrementally and we don't miss any write. For starting a new incremental backup chain, users can also chain together a bi

[Qemu-devel] [PATCH v13 09/17] qmp: add block-dirty-bitmap-clear

2015-02-13 Thread John Snow
Add bdrv_clear_dirty_bitmap and a matching QMP command, qmp_block_dirty_bitmap_clear that enables a user to reset the bitmap attached to a drive. This allows us to reset a bitmap in the event of a full drive backup. Signed-off-by: John Snow --- block.c | 8 blockdev.c

[Qemu-devel] [PATCH v13 07/17] block: Add bitmap successors

2015-02-13 Thread John Snow
A bitmap successor is an anonymous BdrvDirtyBitmap that is intended to be created just prior to a sensitive operation (e.g. Incremental Backup) that can either succeed or fail, but during the course of which we still want a bitmap tracking writes. On creating a successor, we "freeze" the parent bi

[Qemu-devel] [PATCH v13 11/17] qmp: Add dirty bitmap status fields in query-block

2015-02-13 Thread John Snow
Adds the "disabled" and "frozen" status booleans. Signed-off-by: Fam Zheng Signed-off-by: John Snow Reviewed-by: Max Reitz --- block.c | 2 ++ qapi/block-core.json | 7 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/block.c b/block.c index e2da4cb..a7f56f4 1

[Qemu-devel] [PATCH v13 12/17] block: add BdrvDirtyBitmap documentation

2015-02-13 Thread John Snow
Signed-off-by: John Snow Reviewed-by: Max Reitz --- block.c | 10 +- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/block.c b/block.c index a7f56f4..c1c11aa 100644 --- a/block.c +++ b/block.c @@ -60,11 +60,11 @@ * or enabled. A frozen bitmap can only abdicate() or re

[Qemu-devel] [PATCH v13 01/17] qapi: Add optional field "name" to block dirty bitmap

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

[Qemu-devel] [PATCH v13 08/17] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-02-13 Thread John Snow
For "dirty-bitmap" sync mode, the block job will iterate through the given dirty bitmap to decide if a sector needs backup (backup all the dirty clusters and skip clean ones), just as allocation conditions of "top" sync mode. Signed-off-by: Fam Zheng Signed-off-by: John Snow --- block.c

[Qemu-devel] [PATCH v13 05/17] hbitmap: add hbitmap_merge

2015-02-13 Thread John Snow
We add a bitmap merge operation to assist in error cases where we wish to combine two bitmaps together. This is algorithmically O(bits) provided HBITMAP_LEVELS remains constant. For a full bitmap on a 64bit machine: sum(bits/64^k, k, 0, HBITMAP_LEVELS) ~= 1.01587 * bits We may be able to improve

[Qemu-devel] [PATCH v13 06/17] qmp: Add block-dirty-bitmap-enable and block-dirty-bitmap-disable

2015-02-13 Thread John Snow
This allows to put the dirty bitmap into a disabled state where it is read only. A disabled bitmap will ignore any attempts to set or reset any of its bits, but can otherwise be renamed, deleted, or re-enabled. It will be used before backup or writing to persistent file. Signed-off-by: Fam Zheng

[Qemu-devel] [PATCH v13 04/17] block: Introduce bdrv_dirty_bitmap_granularity()

2015-02-13 Thread John Snow
This returns the granularity (in bytes) of dirty bitmap, which matches the QMP interface and the existing query interface. Small adjustments are made to ensure that granularity (in bytes) is handled consistently as a uint32_t throughout the code. Signed-off-by: John Snow --- block.c

[Qemu-devel] [PATCH v13 02/17] qmp: Ensure consistent granularity type

2015-02-13 Thread John Snow
We treat this field with a variety of different types everywhere in the code. Now it's just uint32_t. Signed-off-by: John Snow --- block.c | 11 ++- block/mirror.c| 4 ++-- include/block/block.h | 2 +- include/block/block_int.h | 2 +- qapi/block-cor

[Qemu-devel] [PATCH v13 00/17] block: incremental backup series

2015-02-13 Thread John Snow
This series requires: [PATCH v3] blkdebug: fix "once" rule Welcome to the "incremental backup" newsletter, where we discuss exciting developments in non-redundant backup technology. This issue is called the "Max Reitz Fixup" issue. This patchset enables the in-memory part of the incremental backu

Re: [Qemu-devel] [PATCH] virtio: validate the existence of handle_output before calling it

2015-02-13 Thread Paolo Bonzini
On 12/02/2015 04:05, Jason Wang wrote: > We don't validate the existence of handle_output which may let a buggy > guest to trigger a SIGSEV easily. Fix this by validate its existence > before. > > Cc: qemu-sta...@nongnu.org > Cc: Anthony Liguori > Cc: Michael S. Tsirkin > Signed-off-by: Jason

Re: [Qemu-devel] [RFC PATCH 01/14] docs: block replication's description

2015-02-13 Thread John Snow
On 02/13/2015 02:01 AM, Fam Zheng wrote: On Fri, 02/13 13:09, Wen Congyang wrote: What is image fleecing? It's the name of the feature which enables the built-in NBD server to exporting a thin point-in-time snapshot created via drive-backup sync=none. It's for host side data scanning tool

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

2015-02-13 Thread Eric Blake
On 01/12/2015 05:53 AM, Gerd Hoffmann wrote: > 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 | 15 --- > 2 files changed, 16 insertion

Re: [Qemu-devel] [PATCH RFC v2 8/8] migration: add migration/dirty-bitmap.c

2015-02-13 Thread John Snow
On 02/13/2015 03:19 AM, Vladimir Sementsov-Ogievskiy wrote: On 11.02.2015 00:33, John Snow wrote: Peter Maydell: What's the right way to license a file as copied from a previous version? See below, please; Max, Markus: ctrl+f "bdrv_get_device_name" and let me know what you think, if you would

Re: [Qemu-devel] [PATCH] virtio: validate the existence of handle_output before calling it

2015-02-13 Thread Don Koch
On Thu, 12 Feb 2015 11:05:17 +0800 Jason Wang wrote: > We don't validate the existence of handle_output which may let a buggy > guest to trigger a SIGSEV easily. Fix this by validate its existence > before. > > Cc: qemu-sta...@nongnu.org > Cc: Anthony Liguori > Cc: Michael S. Tsirkin > Signed-

Re: [Qemu-devel] [PATCH 09/10] monitor: add query-vnc-servers command

2015-02-13 Thread Eric Blake
On 01/12/2015 05:53 AM, Gerd Hoffmann wrote: > Add new query vnc qmp command, for the lack of better ideas just name it > "query-vnc-servers". 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

Re: [Qemu-devel] [PATCH v12 07/17] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-02-13 Thread John Snow
On 02/13/2015 12:33 PM, Vladimir Sementsov-Ogievskiy wrote: On 10.02.2015 04:35, John Snow wrote: .. @@ -278,28 +305,61 @@ static void coroutine_fn backup_run(void *opaque) qemu_coroutine_yield(); job->common.busy = true; } +} else if (job->sync_mo

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

2015-02-13 Thread Markus Armbruster
One more question... Gerd Hoffmann writes: > 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 |

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

2015-02-13 Thread Markus Armbruster
Gerd Hoffmann writes: > 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 I'm afraid this broke monitor command change vnc. Reproducer Terminal 1: $ qemu -nodefaults -S -display

Re: [Qemu-devel] [PATCH RFC v2 8/8] migration: add migration/dirty-bitmap.c

2015-02-13 Thread Vladimir Sementsov-Ogievskiy
On 13.02.2015 20:32, John Snow wrote: On 02/13/2015 04:06 AM, Vladimir Sementsov-Ogievskiy wrote: + +blk_mig_reset_dirty_cursor(); +dirty_phase(f, false); + +QSIMPLEQ_FOREACH(dbms, &dirty_bitmap_mig_state.dbms_list, entry) { +uint8_t flags = DIRTY_BITMAP_MIG_FLAG_DEVICE

Re: [Qemu-devel] [PATCH v12 07/17] qmp: Add support of "dirty-bitmap" sync mode for drive-backup

2015-02-13 Thread Vladimir Sementsov-Ogievskiy
On 10.02.2015 04:35, John Snow wrote: .. @@ -278,28 +305,61 @@ static void coroutine_fn backup_run(void *opaque) qemu_coroutine_yield(); job->common.busy = true; } +} else if (job->sync_mode == MIRROR_SYNC_MODE_DIRTY_BITMAP) { +/* Dirty Bi

Re: [Qemu-devel] [PATCH RFC v2 8/8] migration: add migration/dirty-bitmap.c

2015-02-13 Thread John Snow
On 02/13/2015 04:06 AM, Vladimir Sementsov-Ogievskiy wrote: + +blk_mig_reset_dirty_cursor(); +dirty_phase(f, false); + +QSIMPLEQ_FOREACH(dbms, &dirty_bitmap_mig_state.dbms_list, entry) { +uint8_t flags = DIRTY_BITMAP_MIG_FLAG_DEVICE_NAME | +DIRTY_BI

[Qemu-devel] [PULL 08/65] libqos: add alloc_init_flags

2015-02-13 Thread Stefan Hajnoczi
From: John Snow Allow a generic interface to alloc_init_flags, not just through pc_alloc_init_flags. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-id: 1421698563-6977-6-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/libqos/malloc-pc.c | 4 +--- tests/l

[Qemu-devel] [PULL 15/65] libqos/ahci: Functional register helpers

2015-02-13 Thread Stefan Hajnoczi
From: John Snow Introduce a set of "static inline" register helpers that are intended to replace the current set of macros with more functional versions that are better suited to inclusion in libqos than porcelain macros. As a stopgap measure before eliminating the porcelain macros, define them

[Qemu-devel] [PULL 16/65] qtest/ahci: remove getter/setter macros

2015-02-13 Thread Stefan Hajnoczi
From: John Snow These macros were a bad idea: They relied upon certain arguments being present locally with a specific name. With the endgoal being to factor out AHCI helper functions outside of the test file itself, these have to be replaced by more explicit helper setter/getter functions. Sig

[Qemu-devel] [PULL 54/65] blockdev: Use blk_new_open() in blockdev_init()

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Due to different error propagation, this breaks tests 051 and 087; fix their output. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 1423162705-32065-6-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- blockdev.c | 92 +++

[Qemu-devel] [PULL 18/65] libqos/ahci: create libqos/ahci.c

2015-02-13 Thread Stefan Hajnoczi
From: John Snow With global state removed, code responsible for booting up, verifying, and initializing the AHCI HBA is extracted and inserted into libqos/ahci.c, which would allow for other qtests in the future to quickly grab a meaningfully initialized reference to an AHCI HBA. Even without ot

[Qemu-devel] Did we lose monitor commands pci_add, pci_del?

2015-02-13 Thread Markus Armbruster
Commit 79ca616 "pci: Cleanup configuration for pci-hotplug.c" (June 2013, released in v1.6.0) made linking pci-hotplug-old.o conditional on make variable CONFIG_PCI_HOTPLUG_OLD, and the actual monitor commands conditional on preprocessor macro CONFIG_PCI_HOTPLUG_OLD. Where is that macro defined?

Re: [Qemu-devel] [PATCH v4 00/16] block: Remove "growable", add blk_new_open()

2015-02-13 Thread Stefan Hajnoczi
On Thu, Feb 05, 2015 at 01:58:09PM -0500, Max Reitz wrote: > This series removes the "growable" field from the BlockDriverState > object. Its use was to clamp guest requests against the limits of the > BDS; however, this can now be done more easily by moving those checks > into the BlockBackend fun

Re: [Qemu-devel] [PATCH 0/4] s390x/kvm: add support to change the IPL device in guest

2015-02-13 Thread Christian Borntraeger
Am 12.02.2015 um 18:02 schrieb Jens Freimann: > Cornelia, Alex, Christian, > > these patches add support to chane the IPL device from within the guest. > > Jens > > > Fan Zhang (4): > s390x/ipl: always load the bios for ccw machine > s390x/ipl: support diagnose 308 subcodes 5 and 6 > s390

Re: [Qemu-devel] [PATCH 2/3] pci: split shpc_cleanup and shpc_free

2015-02-13 Thread Matthew Rosato
On 02/13/2015 09:57 AM, Paolo Bonzini wrote: > object_unparent should not be called until the parent device is going to be > destroyed. Only remove the capability and do memory_region_del_subregion > at unrealize time. Freeing the data structures is left in shpc_free, to > be called from the inst

Re: [Qemu-devel] [PATCH 3/3] docs: clarify memory region lifecycle

2015-02-13 Thread Matthew Rosato
On 02/13/2015 09:57 AM, Paolo Bonzini wrote: > Now that objects actually obey the rules, document them. > > Signed-off-by: Paolo Bonzini Reviewed-by: Matthew Rosato > --- > docs/memory.txt | 74 > - > 1 file changed, 58 insertions(+), 1

[Qemu-devel] [PULL 61/65] qemu-io: Remove "growable" option

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Remove "growable" option from the "open" command and from the qemu-io command line. qemu-io is about to be converted to BlockBackend which will make sure that no request exceeds the image size, so the only way to keep "growable" would be to use BlockBackend if it is not given and

[Qemu-devel] [PULL 65/65] block: Keep bdrv_check*_request()'s return value

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Do not throw away the value returned by bdrv_check_request() and bdrv_check_byte_request(). Fix up some coding style issues in the proximity of the affected hunks. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-id: 1423162705-32065-17-git-sen

[Qemu-devel] [PULL 57/65] qemu-img: Use blk_new_open() in img_rebase()

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 1423162705-32065-9-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- qemu-img.c | 49 +++-- 1 file changed, 23 insertions(+), 26 deletions(-) diff --git

[Qemu-devel] [PULL 62/65] qemu-io: Use BlockBackend

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz qemu-io should behave like a guest, therefore it should use BlockBackend to access the block layer. There are a couple of places where that is infeasible: First, the bdrv_debug_* functions could theoretically be mirrored in the BlockBackend, but since these are functions internal

[Qemu-devel] [PULL 63/65] block: Clamp BlockBackend requests

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz BlockBackend is used as the interface between the block layer and guest devices. It should therefore assure that all requests are clamped to the image size. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Reviewed-by: Kevin Wolf Message-id: 1423162705-32065-15-git-send-email-

[Qemu-devel] [PULL 64/65] block: Remove "growable" from BDS

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Now that request clamping is done in the BlockBackend, the "growable" field can be removed from the BlockDriverState. All BDSs are now treated as being "growable" (that is, they are allowed to grow; they are not necessarily actually able to). Signed-off-by: Max Reitz Reviewed-by

[Qemu-devel] [PULL 59/65] qemu-nbd: Use blk_new_open() in main()

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Kevin Wolf Message-id: 1423162705-32065-11-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- qemu-nbd.c | 25 + 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/qemu-nbd.c b/qemu-nbd.

[Qemu-devel] [PULL 60/65] qemu-io: Use blk_new_open() in openfile()

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 1423162705-32065-12-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- qemu-io.c | 30 -- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/qemu-io.c b/qemu-

[Qemu-devel] [PULL 49/65] iotests: Add test for qemu-img convert to NBD

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 1423666727-20777-3-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/123 | 62 ++ tests/qemu-iotests/123.out | 9 +++ tests/qe

[Qemu-devel] [PULL 53/65] iotests: Add test for driver=qcow2, format=qcow2

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz While specifying a different driver and format is obviously invalid, specifying the same driver once through driver and once through format is invalid as well. Add a test for it. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 1423162705-32065-5-git-send-email-mre.

[Qemu-devel] [PULL 35/65] libqos/ahci: add ahci_io

2015-02-13 Thread Stefan Hajnoczi
From: John Snow ahci_io is a wrapper around ahci_guest_io that takes a pointer to host memory instead, and will create a guest memory buffer and copy the data to/from as needed and as appropriate for a read/write command, such that after a read, the guest data will be in a host buffer, and for a

[Qemu-devel] [PULL 47/65] qemu-iotests: Add 093 for IO throttling

2015-02-13 Thread Stefan Hajnoczi
From: Fam Zheng This case utilizes qemu-io command "aio_{read,write} -q" to verify the effectiveness of IO throttling options. It's implemented by driving the vm timer from qtest protocol, so the throttling timers are signaled with determinied time duration. Then we verify the completed IO reque

[Qemu-devel] [PULL 56/65] qemu-img: Use blk_new_open() in img_open()

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 1423162705-32065-8-git-send-email-mre...@redhat.com Signed-off-by: Stefan Hajnoczi --- qemu-img.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/qemu-img.c b/qemu-img.c inde

[Qemu-devel] [PULL 51/65] block: Add blk_new_open()

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz blk_new_with_bs() creates a BlockBackend with an empty BlockDriverState attached to it. Empty BDSs are not nice, therefore add an alternative function which combines blk_new_with_bs() with bdrv_open(). Note: In contrast to bdrv_open() which takes a BlockDriver parameter, blk_new_

[Qemu-devel] [PULL 30/65] libqos/ahci: Add ide cmd properties

2015-02-13 Thread Stefan Hajnoczi
From: John Snow Add a structure that defines some properties of various IDE commands. These will be used to simplify the interface to the libqos AHCI calls, lessening the redundancy of specifying and respecifying properties of commands to various helper functions. Reviewed-by: Stefan Hajnoczi S

[Qemu-devel] [PULL 50/65] block: Lift some BDS functions to the BlockBackend

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Create the blk_* counterparts for the following bdrv_* functions (which make sense to call on the BlockBackend level): - bdrv_co_write_zeroes() - bdrv_write_compressed() - bdrv_truncate() - bdrv_nb_sectors() - bdrv_discard() - bdrv_load_vmstate() - bdrv_save_vmstate() Signed-off-

[Qemu-devel] [PULL 52/65] block: Add Error parameter to bdrv_find_protocol()

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz The argument given to bdrv_find_protocol() is just a file name, which makes it difficult for the caller to reconstruct what protocol bdrv_find_protocol() was hoping to find. This patch adds an Error parameter to that function to solve this issue. Suggested-by: Eric Blake Signed-

[Qemu-devel] [PULL 48/65] qemu-img: Fix qemu-img convert -n

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz If -n is specified, it does not matter whether the output format and protocol support image creation; building the creation options should simply be skipped. Signed-off-by: Max Reitz Reviewed-by: Eric Blake Message-id: 1423666727-20777-2-git-send-email-mre...@redhat.com Signed-

[Qemu-devel] [PULL 28/65] qtest/ahci: Demagic ahci tests.

2015-02-13 Thread Stefan Hajnoczi
From: John Snow Add human-readable command names and other miscellaneous #defines to help make the code more readable. Some of these definitions are not yet used in this current series, but for convenience and sanity they have been lumped together here, as it's more trouble than it is worth in a

[Qemu-devel] [PULL 22/65] qtest/ahci: rename 'Command' to 'CommandHeader'

2015-02-13 Thread Stefan Hajnoczi
From: John Snow The structure name is a bit of a misnomer; the structure currently named command is actually the commandheader. A future patch in this series will add an actual "Command" structure, so we'll rename it now before the rest of the functions in this series try to use it. In addition,

[Qemu-devel] [PULL 42/65] qtest: Fix deadloop by running main loop AIO context's timers

2015-02-13 Thread Stefan Hajnoczi
From: Fam Zheng qemu_clock_run_timers() only takes care of main_loop_tlg, we shouldn't forget aio timer list groups. Currently, the qemu_clock_deadline_ns_all (a few lines above) counts all the timergroups of this clock type, including aio tlg, but we don't fire them, so they are never cleared,

[Qemu-devel] [PULL 55/65] block/xen: Use blk_new_open() in blk_connect()

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz As part of the required changes, this fixes a bug where specifying an invalid driver would result in the block layer probing the image format; now it will result in an error, unless "" is specified as the driver name. Fixing this would require further work on the xen_disk code whi

[Qemu-devel] [PULL 44/65] qtest: Add scripts/qtest.py

2015-02-13 Thread Stefan Hajnoczi
From: Fam Zheng This adds scripts/qtest.py as a python library for qtest protocol. This is a skeleton with a basic "cmd" method to execute a command, reading and parsing of qtest output could be added later on demand. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1422586186-9925

[Qemu-devel] [PULL 24/65] libqos/ahci: Add ahci_port_check_error helper

2015-02-13 Thread Stefan Hajnoczi
From: John Snow ahci_port_check_error checks a given port's error registers and asserts that everything from the port-level view is still OK. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-id: 1423158090-25580-6-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi ---

[Qemu-devel] [PULL 43/65] qemu-io: Account IO by aio_read and aio_write

2015-02-13 Thread Stefan Hajnoczi
From: Fam Zheng This will enable accounting of aio requests issued from qemu-io aio read/write commands. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1422586186-9925-2-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- qemu-io-cmds.c | 11 +++ 1 file cha

[Qemu-devel] [PULL 58/65] qemu-img: Use BlockBackend as far as possible

2015-02-13 Thread Stefan Hajnoczi
From: Max Reitz Although qemu-img already creates BlockBackends, it does not do accesses to the images through them. This patch converts all of the bdrv_* calls for which this is currently possible to blk_* calls. Most of the remaining calls will probably stay bdrv_* calls because they really do

[Qemu-devel] [PULL 39/65] nbd: fix the co_queue multi-adding bug

2015-02-13 Thread Stefan Hajnoczi
From: Bin Wu When we tested the VM migartion between different hosts with NBD devices, we found if we sent a cancel command after the drive_mirror was just started, a coroutine re-enter error would occur. The stack was as follow: (gdb) bt 00) 0x7fdfc744d885 in raise () from /lib64/libc.so.6

[Qemu-devel] [PULL 40/65] savevm: Improve error message for blocked migration

2015-02-13 Thread Stefan Hajnoczi
From: Kevin Wolf If an internal snapshot can't be saved because migration is blocked (most commonly probably because of AHCI), we had a really bad error message: $ echo -e "savevm foo\nquit" | qemu -M q35 /tmp/test.qcow2 -monitor stdio QEMU 2.2.50 monitor - type 'help' for more information (qemu

[Qemu-devel] [PULL 19/65] dataplane: endianness-aware accesses

2015-02-13 Thread Stefan Hajnoczi
From: Cornelia Huck The vring.c code currently assumes that guest and host endianness match, which is not true for a number of cases: - emulating targets with a different endianness than the host - bi-endian targets, where the correct endianness depends on the virtio device - upcoming support

[Qemu-devel] [PULL 46/65] qemu-iotests: Allow caller to disable underscore convertion for qmp

2015-02-13 Thread Stefan Hajnoczi
From: Fam Zheng QMP command "block_set_io_throttle" expects underscores in parameters instead of dashes: {iops,bps}_{rd,wr,max}. Add optional argument conv_keys (defaults to True, backward compatible), it will be used in IO throttling test case. Reviewed-by: Benoit Canet Signed-off-by: Fam Zhe

[Qemu-devel] [PULL 32/65] libqos/ahci: add ahci command verify

2015-02-13 Thread Stefan Hajnoczi
From: John Snow Helps to verify that a command completed successfully. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-id: 1423158090-25580-14-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/ahci-test.c | 16 ++-- tests/libqos/ahci.c | 15 ++

[Qemu-devel] [PULL 45/65] qemu-iotests: Add VM method qtest() to iotests.py

2015-02-13 Thread Stefan Hajnoczi
From: Fam Zheng This will allow test cases to run command in qtest protocol. It's write-only for now. Signed-off-by: Fam Zheng Reviewed-by: Max Reitz Message-id: 1422586186-9925-4-git-send-email-f...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/qemu-iotests/iotests.py | 16 +++

[Qemu-devel] [PULL 37/65] qtest/ahci: Assert sector size in identify test

2015-02-13 Thread Stefan Hajnoczi
From: John Snow A minor sanity check to assert that the sector size is 512. The current block layer code deeply assumes that the IDE sector size will be 512 bytes, so we carry forward that assumption here. This is useful for the DMA tests, which currently assume that a sector will always be 512

[Qemu-devel] [PULL 20/65] libqos/ahci: Add ahci_port_select helper

2015-02-13 Thread Stefan Hajnoczi
From: John Snow This helper identifies which port of the AHCI HBA has a device we may run tests on. Signed-off-by: John Snow Reviewed-by: Paolo Bonzini Message-id: 1423158090-25580-2-git-send-email-js...@redhat.com Signed-off-by: Stefan Hajnoczi --- tests/ahci-test.c | 19 ++---

  1   2   3   >