[Qemu-block] USB Device is not stable, Cannot use it with long time

2017-10-30 Thread Lying
First, I can running my qemu guest normally, And i can use keyboard and mouse in my VM, But i cannot use those after one day. And cannot find any useful log in my system. those message is my VM state( with qemu-monitor-command ): Device 0.1, Port 1, Speed 1.5 Mb/s, Product G100s Gaming

[Qemu-block] [PULL 11/12] nbd: Move nbd_read() to common header

2017-10-30 Thread Eric Blake
An upcoming change to block/nbd-client.c will want to read the tail of a structured reply chunk directly from the wire. Move this function to make it easier. Based on a patch from Vladimir Sementsov-Ogievskiy. Signed-off-by: Eric Blake Reviewed-by: Vladimir

[Qemu-block] [PULL 09/12] nbd/client: refactor nbd_receive_starttls

2017-10-30 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Split out nbd_request_simple_option to be reused for structured reply option. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake Message-Id:

[Qemu-block] [PULL 08/12] nbd/server: Include human-readable message in structured errors

2017-10-30 Thread Eric Blake
The NBD spec permits including a human-readable error string if structured replies are in force, so we might as well send the client the message that we logged on any error. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[Qemu-block] [PULL 10/12] nbd/client: prepare nbd_receive_reply for structured reply

2017-10-30 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy In following patch nbd_receive_reply will be used both for simple and structured reply header receiving. NBDReply is altered into union of simple reply header and structured reply chunk header, simple error translation moved to

[Qemu-block] [PULL 07/12] nbd: Minimal structured read for server

2017-10-30 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Minimal implementation of structured read: one structured reply chunk, no segmentation. Minimal structured error implementation: no text message. Support DF flag, but just ignore it, as there is no segmentation any way. Signed-off-by:

[Qemu-block] [PULL 05/12] nbd/server: Simplify nbd_negotiate_options loop

2017-10-30 Thread Eric Blake
Instead of making each caller check whether a transmission error occurred, we can sink a common error check to the end of the loop. Signed-off-by: Eric Blake Message-Id: <20171027104037.8319-6-ebl...@redhat.com> [eblake: squash in compiler warning fix] Reviewed-by: Vladimir

[Qemu-block] [PULL 04/12] nbd/server: Report error for write to read-only export

2017-10-30 Thread Eric Blake
When the server is read-only, we were already reporting an error message for NBD_CMD_WRITE_ZEROES, but failed to set errp for a similar NBD_CMD_WRITE. This will matter more once structured replies allow the server to propagate the errp information back to the client. While at it, use an error

[Qemu-block] [PULL 06/12] nbd/server: Refactor zero-length option check

2017-10-30 Thread Eric Blake
Consolidate the response for a non-zero-length option payload into a new function, nbd_reject_length(). This check will also be used when introducing support for structured replies. Note that STARTTLS response differs based on time: if the connection is still unencrypted, we set fatal to true (a

[Qemu-block] [PULL 03/12] nbd: Expose constants and structs for structured read

2017-10-30 Thread Eric Blake
Upcoming patches will implement the NBD structured reply extension [1] for both client and server roles. Declare the constants, structs, and lookup routines that will be valuable whether the server or client code is backported in isolation. This includes moving one constant from an internal

[Qemu-block] [PULL 02/12] nbd: Move nbd_errno_to_system_errno() to public header

2017-10-30 Thread Eric Blake
This is needed in preparation for structured reply handling, as we will be performing the translation from NBD error to system errno value higher in the stack at block/nbd-client.c. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy

[Qemu-block] [PULL 12/12] nbd: Minimal structured read for client

2017-10-30 Thread Eric Blake
From: Vladimir Sementsov-Ogievskiy Minimal implementation: for structured error only error_report error message. Note that test 83 is now more verbose, because the implementation prints more warnings about unexpected communication errors; perhaps future patches should

[Qemu-block] [PULL 01/12] nbd: Include error names in trace messages

2017-10-30 Thread Eric Blake
NBD errors were originally sent over the wire based on Linux errno values; but not all the world is Linux, and not all platforms share the same values. Since a number isn't very easy to decipher on all platforms, update the trace messages to include the name of NBD errors being sent/received over

Re: [Qemu-block] [PATCH v6 06/12] nbd/server: Refactor zero-length option check

2017-10-30 Thread Eric Blake
On 10/30/2017 09:11 PM, Eric Blake wrote: > On 10/30/2017 06:22 PM, Vladimir Sementsov-Ogievskiy wrote: >> 27.10.2017 13:40, Eric Blake wrote: >>> Consolidate the response for a non-zero-length option payload >>> into a new function, nbd_reject_length().  This check will >>> also be used when

Re: [Qemu-block] [PATCH v6 06/12] nbd/server: Refactor zero-length option check

2017-10-30 Thread Eric Blake
On 10/30/2017 06:22 PM, Vladimir Sementsov-Ogievskiy wrote: > 27.10.2017 13:40, Eric Blake wrote: >> Consolidate the response for a non-zero-length option payload >> into a new function, nbd_reject_length().  This check will >> also be used when introducing support for structured replies. >> >>

Re: [Qemu-block] [PATCH v8 00/14] Dirty bitmaps postcopy migration

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
30.10.2017 19:32, Vladimir Sementsov-Ogievskiy wrote: Hi all! There is a new version of dirty bitmap postcopy migration series. v8 clone: tag postcopy-v8 from https://src.openvz.org/scm/~vsementsov/qemu.git online: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=postcopy-v8

[Qemu-block] [PATCH v8.1 05/14] migration: introduce postcopy-only pending

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
There would be savevm states (dirty-bitmap) which can migrate only in postcopy stage. The corresponding pending is introduced here. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- 8.1: add new version for

Re: [Qemu-block] [PATCH v8 05/14] migration: introduce postcopy-only pending

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
30.10.2017 20:31, Dr. David Alan Gilbert wrote: * Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: There would be savevm states (dirty-bitmap) which can migrate only in postcopy stage. The corresponding pending is introduced here. Signed-off-by: Vladimir Sementsov-Ogievskiy

Re: [Qemu-block] [RFC PATCH v6 13/12] tweak test 83 verbosity

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
27.10.2017 13:45, Eric Blake wrote: Commenting these two lines is enough to avoid the change to 083.out in 12/12. That is evidence that we may want these two lines to be trace points rather than error messages; or maybe we really do like the extra verbosity in the case of an unexpected

Re: [Qemu-block] [PATCH v6 12/12] nbd: Minimal structured read for client

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
27.10.2017 13:40, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Minimal implementation: for structured error only error_report error message. Note that test 83 is now more verbose, because the implementation prints more warnings about unexpected communication

Re: [Qemu-block] [PATCH v6 09/12] nbd/client: refactor nbd_receive_starttls

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
27.10.2017 13:40, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Split out nbd_request_simple_option to be reused for structured reply option. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Eric Blake

Re: [Qemu-block] [PATCH v8 05/14] migration: introduce postcopy-only pending

2017-10-30 Thread Dr. David Alan Gilbert
* Vladimir Sementsov-Ogievskiy (vsement...@virtuozzo.com) wrote: > There would be savevm states (dirty-bitmap) which can migrate only in > postcopy stage. The corresponding pending is introduced here. > > Signed-off-by: Vladimir Sementsov-Ogievskiy > Reviewed-by: Juan

Re: [Qemu-block] [PATCH v6 07/12] nbd: Minimal structured read for server

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
27.10.2017 13:40, Eric Blake wrote: From: Vladimir Sementsov-Ogievskiy Minimal implementation of structured read: one structured reply chunk, no segmentation. Minimal structured error implementation: no text message. Support DF flag, but just ignore it, as there is no

Re: [Qemu-block] [PATCH v6 06/12] nbd/server: Refactor zero-length option check

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
27.10.2017 13:40, Eric Blake wrote: Consolidate the response for a non-zero-length option payload into a new function, nbd_reject_length(). This check will also be used when introducing support for structured replies. Note that STARTTLS response differs based on time: if the connection is

Re: [Qemu-block] [Qemu-devel] [PATCH v4] nvme: Add tracing

2017-10-30 Thread Philippe Mathieu-Daudé
Cc'ing Stefan and Trivial On 10/30/2017 01:07 PM, Doug Gale wrote: > From 0e27b5dca8f4f32a1b194e1b3544be77dd4f45d9 Mon Sep 17 00:00:00 2001 > From: Doug Gale > Date: Mon, 30 Oct 2017 09:28:43 -0400 > Subject: [PATCH] nvme: Add tracing > ^ to remove from commit description,

[Qemu-block] [PATCH v8 10/14] migration: add postcopy migration of dirty bitmaps

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Postcopy migration of dirty bitmaps. Only named dirty bitmaps, associated with root nodes and non-root named nodes are migrated. If destination qemu is already containing a dirty bitmap with the same name as a migrated bitmap (for the same node), then, if their granularities are the same the

[Qemu-block] [PATCH v8 02/14] block/dirty-bitmap: add locked version of bdrv_release_dirty_bitmap

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
It is needed to realize bdrv_dirty_bitmap_release_successor in the following patch. Signed-off-by: Vladimir Sementsov-Ogievskiy --- block/dirty-bitmap.c | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) diff --git a/block/dirty-bitmap.c

[Qemu-block] [PATCH v8 03/14] block/dirty-bitmap: add bdrv_dirty_bitmap_release_successor

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
To just release successor and unfreeze bitmap without any additional work. Signed-off-by: Vladimir Sementsov-Ogievskiy Signed-off-by: Denis V. Lunev --- include/block/dirty-bitmap.h | 2 ++ block/dirty-bitmap.c | 14 ++ 2 files

[Qemu-block] [PATCH v8 05/14] migration: introduce postcopy-only pending

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
There would be savevm states (dirty-bitmap) which can migrate only in postcopy stage. The corresponding pending is introduced here. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- include/migration/register.h | 17

[Qemu-block] [PATCH v8 00/14] Dirty bitmaps postcopy migration

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Hi all! There is a new version of dirty bitmap postcopy migration series. v8 clone: tag postcopy-v8 from https://src.openvz.org/scm/~vsementsov/qemu.git online: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=postcopy-v8 - rebased on master - patches 01-03 from v7 are already

[Qemu-block] [PATCH v8 13/14] iotests: add dirty bitmap postcopy test

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Test - start two vms (vm_a, vm_b) - in a - do writes from set A - do writes from set B - fix bitmap sha256 - clear bitmap - do writes from set A - start migration - than, in b - wait vm start (postcopy should start) - do writes from set B - check bitmap sha256

Re: [Qemu-block] [PATCH v6 05/12] nbd/server: Simplify nbd_negotiate_options loop

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
27.10.2017 13:40, Eric Blake wrote: Instead of making each caller check whether a transmission error occurred, we can sink a common error check to the end of the loop. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy -- Best

[Qemu-block] [PATCH v8 09/14] migration: add is_active_iterate handler

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Only-postcopy savevm states (dirty-bitmap) don't need live iteration, so to disable them and stop transporting empty sections there is a new savevm handler. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela ---

[Qemu-block] [PATCH v8 12/14] iotests: add dirty bitmap migration test

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
The test starts two vms (vm_a, vm_b), create dirty bitmap in the first one, do several writes to corresponding device and then migrate vm_a to vm_b with dirty bitmaps. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz ---

[Qemu-block] [PATCH v8 07/14] migration: include migrate_dirty_bitmaps in migrate_postcopy

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Enable postcopy if dirty bitmap migration is endabled. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Juan Quintela --- migration/migration.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/migration/migration.c

[Qemu-block] [PATCH v8 06/14] qapi: add dirty-bitmaps migration capability

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: John Snow Reviewed-by: Eric Blake Reviewed-by: Juan Quintela --- qapi/migration.json | 6 +- migration/migration.h | 1 + migration/migration.c |

[Qemu-block] [PATCH v8 14/14] iotests: add persistent bitmap migration test

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Test that persistent bitmap migrates and its persistance property migrates too. Signed-off-by: Vladimir Sementsov-Ogievskiy --- tests/qemu-iotests/169 | 21 ++--- tests/qemu-iotests/169.out | 4 ++-- 2 files changed, 20 insertions(+), 5

[Qemu-block] [PATCH v8 01/14] block/dirty-bitmap: add bdrv_dirty_bitmap_enable_successor()

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Enabling bitmap successor is necessary to enable successors of bitmaps being migrated before target vm start. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 1 + block/dirty-bitmap.c | 8 2 files changed, 9 insertions(+)

[Qemu-block] [PATCH v8 04/14] block/dirty-bitmap: add bdrv_dirty_bitmap_set_frozen

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Make it possible to set bitmap 'frozen' without a successor. This is needed to protect the bitmap during outgoing bitmap postcopy migration. Signed-off-by: Vladimir Sementsov-Ogievskiy --- include/block/dirty-bitmap.h | 1 + block/dirty-bitmap.c | 22

[Qemu-block] [PATCH v8 08/14] migration/qemu-file: add qemu_put_counted_string()

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Add function opposite to qemu_get_counted_string. qemu_put_counted_string puts one-byte length of the string (string should not be longer than 255 characters), and then it puts the string, without last zero byte. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by:

[Qemu-block] [PATCH v8 11/14] iotests: add default node-name

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
When testing migration, auto-generated by qemu node-names differs in source and destination qemu and migration fails. After this patch, auto-generated by iotest nodenames will be the same. Signed-off-by: Vladimir Sementsov-Ogievskiy Reviewed-by: Max Reitz

[Qemu-block] [PATCH v4] nvme: Add tracing

2017-10-30 Thread Doug Gale
>From 0e27b5dca8f4f32a1b194e1b3544be77dd4f45d9 Mon Sep 17 00:00:00 2001 From: Doug Gale Date: Mon, 30 Oct 2017 09:28:43 -0400 Subject: [PATCH] nvme: Add tracing Add trace output for commands, errors, and undefined behavior. Add guest error log output for undefined behavior.

Re: [Qemu-block] [PATCH] qemu-iotests: Use -nographic in 182

2017-10-30 Thread Jeff Cody
On Sun, Oct 29, 2017 at 01:53:38PM +0100, Kevin Wolf wrote: > This avoids that random UI frontend error messages end up in the output. > In particular, we were seeing this line in CI error logs: > > +Unable to init server: Could not connect: Connection refused > > Signed-off-by: Kevin Wolf

[Qemu-block] ping Re: loading bitmaps in invalidate_cache fails

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
Hi! Any ideas? 05.10.2017 12:41, Vladimir Sementsov-Ogievskiy wrote: 12.09.2017 12:46, Kevin Wolf wrote: Am 11.09.2017 um 18:51 hat Vladimir Sementsov-Ogievskiy geschrieben: Hi Kevin! I'm confused with relations of permissions and invalidation, can you please help? Now dirty bitmaps are

Re: [Qemu-block] [PATCH v6 09/25] block: Fix bdrv_find_backing_image()

2017-10-30 Thread Alberto Garcia
On Fri 29 Sep 2017 06:53:31 PM CEST, Max Reitz wrote: > @@ -4096,22 +4086,31 @@ BlockDriverState > *bdrv_find_backing_image(BlockDriverState *bs, > } else { > /* If not an absolute filename path, make it relative to the > current > * image's filename path */ >

Re: [Qemu-block] [PATCH v6 08/25] block: Add bdrv_make_absolute_filename()

2017-10-30 Thread Alberto Garcia
On Fri 29 Sep 2017 06:53:30 PM CEST, Max Reitz wrote: > This is a general function for making a filename that is relative to a > certain BDS absolute. > > It calls bdrv_get_full_backing_filename_from_filename() for now, but > that will be changed in a follow-up patch. > > Signed-off-by: Max Reitz

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: Use -nographic in 182

2017-10-30 Thread Kashyap Chamarthy
On Mon, Oct 30, 2017 at 11:13:21AM +0100, Kevin Wolf wrote: > Am 30.10.2017 um 09:39 hat Kashyap Chamarthy geschrieben: > > On Sun, Oct 29, 2017 at 01:53:38PM +0100, Kevin Wolf wrote: [...] > > > echo > > > echo "Starting a second QEMU using the same image should fail" > > > -echo 'quit' |

[Qemu-block] [PATCH v2 3/3] qemu-iotests: update unsupported image formats in 194

2017-10-30 Thread Jeff Cody
Test 194 checks for 'luks' to exclude as an unsupported format, However, most formats are unsupported, due to migration blockers. Rather than specifying a blacklist of unsupported formats, whitelist supported formats (specifically, qcow2, qed, raw, dmg). Signed-off-by: Jeff Cody

[Qemu-block] [PATCH v2 1/3] block/vhdx.c: Don't blindly update the header

2017-10-30 Thread Jeff Cody
The VHDX specification requires that before user data modification of the vhdx image, the VHDX header file and data GUIDs need to be updated. In vhdx_open(), if the image is set to RDWR, we go ahead and update the header. However, just because the image is set to RDWR does not mean we can go

[Qemu-block] [PATCH v2 2/3] block/parallals: Do not update header or truncate image when INMIGRATE

2017-10-30 Thread Jeff Cody
If we write or modify the image file while the QEMU run state is INMIGRATE, then the BDRV_O_INACTIVE BDS flag is set. This will cause an assert, since the image is marked inactive. Make sure we obey this flag. Signed-off-by: Jeff Cody --- block/parallels.c | 7 ++- 1

[Qemu-block] [PATCH v2 0/3] Don't write headers if BDS is INACTIVE

2017-10-30 Thread Jeff Cody
Changes from v1->v2: * Drop previous parallels patches, just check BDRV_O_INACTIVE now (Kevin) git-backport-diff -r qemu/master.. -u github/master Key: [] : patches are identical [] : number of functional differences between upstream/downstream patch [down] : patch is downstream-only

Re: [Qemu-block] [RFC PATCH v6 13/12] tweak test 83 verbosity

2017-10-30 Thread Eric Blake
On 10/30/2017 01:34 PM, Vladimir Sementsov-Ogievskiy wrote: > 27.10.2017 13:45, Eric Blake wrote: >> Commenting these two lines is enough to avoid the change to 083.out >> in 12/12.  That is evidence that we may want these two lines to be >> trace points rather than error messages; or maybe we

Re: [Qemu-block] [RFC PATCH v6 13/12] tweak test 83 verbosity

2017-10-30 Thread Vladimir Sementsov-Ogievskiy
27.10.2017 13:45, Eric Blake wrote: Commenting these two lines is enough to avoid the change to 083.out in 12/12. That is evidence that we may want these two lines to be trace points rather than error messages; or maybe we really do like the extra verbosity in the case of an unexpected

Re: [Qemu-block] [Qemu-devel] nvme: Add tracing v3

2017-10-30 Thread Philippe Mathieu-Daudé
Hi Doug, On 10/12/2017 04:07 PM, Doug Gale wrote: > From c7f12a5949458fdd195b5e0b52f158e8f114f203 Mon Sep 17 00:00:00 2001 > From: Doug Gale > Date: Thu, 12 Oct 2017 14:29:07 -0400 > Subject: [PATCH] nvme: Add tracing > > Add trace output for commands, errors, and undefined

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: Use -nographic in 182

2017-10-30 Thread Kevin Wolf
Am 30.10.2017 um 09:39 hat Kashyap Chamarthy geschrieben: > On Sun, Oct 29, 2017 at 01:53:38PM +0100, Kevin Wolf wrote: > > This avoids that random UI frontend error messages end up in the output. > > In particular, we were seeing this line in CI error logs: > > > > +Unable to init server: Could

Re: [Qemu-block] nvme: Add tracing v3

2017-10-30 Thread Doug Gale
On Fri, Oct 20, 2017 at 4:11 PM, Doug Gale wrote: > On Thu, Oct 12, 2017 at 3:07 PM, Doug Gale wrote: > >> From c7f12a5949458fdd195b5e0b52f158e8f114f203 Mon Sep 17 00:00:00 2001 >> From: Doug Gale >> Date: Thu, 12 Oct 2017 14:29:07 -0400

Re: [Qemu-block] [Qemu-devel] [PATCH] qemu-iotests: Use -nographic in 182

2017-10-30 Thread Kashyap Chamarthy
On Sun, Oct 29, 2017 at 01:53:38PM +0100, Kevin Wolf wrote: > This avoids that random UI frontend error messages end up in the output. > In particular, we were seeing this line in CI error logs: > > +Unable to init server: Could not connect: Connection refused > > Signed-off-by: Kevin Wolf