<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/migration, branch master</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/migration?h=master</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/migration?h=master'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-11-21T10:58:10+00:00</updated>
<entry>
<title>migration: Block migration comment or code is wrong</title>
<updated>2022-11-21T10:58:10+00:00</updated>
<author>
<name>Juan Quintela</name>
</author>
<published>2022-10-03T03:15:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=b5280437a7f49cf617cdd99bbbe2c7bd1652408b'/>
<id>urn:sha1:b5280437a7f49cf617cdd99bbbe2c7bd1652408b</id>
<content type='text'>
And it appears that what is wrong is the code. During bulk stage we
need to make sure that some block is dirty, but no games with
max_size at all.

Signed-off-by: Juan Quintela &lt;quintela@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration: Disable multifd explicitly with compression</title>
<updated>2022-11-21T10:58:10+00:00</updated>
<author>
<name>Peter Xu</name>
</author>
<published>2022-10-04T18:24:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=6f39c90b86b9d3772779f873ed88aaa75a220aba'/>
<id>urn:sha1:6f39c90b86b9d3772779f873ed88aaa75a220aba</id>
<content type='text'>
Multifd thread model does not work for compression, explicitly disable it.

Note that previuosly even we can enable both of them, nothing will go
wrong, because the compression code has higher priority so multifd feature
will just be ignored.  Now we'll fail even earlier at config time so the
user should be aware of the consequence better.

Note that there can be a slight chance of breaking existing users, but
let's assume they're not majority and not serious users, or they should
have found that multifd is not working already.

With that, we can safely drop the check in ram_save_target_page() for using
multifd, because when multifd=on then compression=off, then the removed
check on save_page_use_compression() will also always return false too.

Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
Reviewed-by: Dr. David Alan Gilbert &lt;dgilbert@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Signed-off-by: Juan Quintela &lt;quintela@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration: Disallow postcopy preempt to be used with compress</title>
<updated>2022-11-21T10:58:10+00:00</updated>
<author>
<name>Peter Xu</name>
</author>
<published>2022-10-04T18:24:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=afed4273b5c9438dfbaa0b4762d0433f295ccdc1'/>
<id>urn:sha1:afed4273b5c9438dfbaa0b4762d0433f295ccdc1</id>
<content type='text'>
The preempt mode requires the capability to assign channel for each of the
page, while the compression logic will currently assign pages to different
compress thread/local-channel so potentially they're incompatible.

Reviewed-by: Dr. David Alan Gilbert &lt;dgilbert@redhat.com&gt;
Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Signed-off-by: Juan Quintela &lt;quintela@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration: Fix race on qemu_file_shutdown()</title>
<updated>2022-11-21T10:58:10+00:00</updated>
<author>
<name>Peter Xu</name>
</author>
<published>2022-10-04T18:24:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=f5816b5c86ed399c99ce8662a4ed96aab32c5eef'/>
<id>urn:sha1:f5816b5c86ed399c99ce8662a4ed96aab32c5eef</id>
<content type='text'>
In qemu_file_shutdown(), there's a possible race if with current order of
operation.  There're two major things to do:

  (1) Do real shutdown() (e.g. shutdown() syscall on socket)
  (2) Update qemufile's last_error

We must do (2) before (1) otherwise there can be a race condition like:

      page receiver                     other thread
      -------------                     ------------
      qemu_get_buffer()
                                        do shutdown()
        returns 0 (buffer all zero)
        (meanwhile we didn't check this retcode)
      try to detect IO error
        last_error==NULL, IO okay
      install ALL-ZERO page
                                        set last_error
      --&gt; guest crash!

To fix this, we can also check retval of qemu_get_buffer(), but not all
APIs can be properly checked and ultimately we still need to go back to
qemu_file_get_error().  E.g. qemu_get_byte() doesn't return error.

Maybe some day a rework of qemufile API is really needed, but for now keep
using qemu_file_get_error() and fix it by not allowing that race condition
to happen.  Here shutdown() is indeed special because the last_error was
emulated.  For real -EIO errors it'll always be set when e.g. sendmsg()
error triggers so we won't miss those ones, only shutdown() is a bit tricky
here.

Cc: Daniel P. Berrange &lt;berrange@redhat.com&gt;
Reviewed-by: Dr. David Alan Gilbert &lt;dgilbert@redhat.com&gt;
Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Signed-off-by: Juan Quintela &lt;quintela@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration: Fix possible infinite loop of ram save process</title>
<updated>2022-11-21T10:58:10+00:00</updated>
<author>
<name>Peter Xu</name>
</author>
<published>2022-10-04T18:24:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=4934a5dd7c68f5ab15f17498db4fc20ed6db9578'/>
<id>urn:sha1:4934a5dd7c68f5ab15f17498db4fc20ed6db9578</id>
<content type='text'>
When starting ram saving procedure (especially at the completion phase),
always set last_seen_block to non-NULL to make sure we can always correctly
detect the case where "we've migrated all the dirty pages".

Then we'll guarantee both last_seen_block and pss.block will be valid
always before the loop starts.

See the comment in the code for some details.

Reviewed-by: Dr. David Alan Gilbert &lt;dgilbert@redhat.com&gt;
Signed-off-by: Peter Xu &lt;peterx@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Signed-off-by: Juan Quintela &lt;quintela@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration/multifd/zero-copy: Create helper function for flushing</title>
<updated>2022-11-21T10:56:12+00:00</updated>
<author>
<name>Leonardo Bras</name>
</author>
<published>2022-10-25T04:47:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=4cc47b439594327b213f9b6a67803f1a503c2cb7'/>
<id>urn:sha1:4cc47b439594327b213f9b6a67803f1a503c2cb7</id>
<content type='text'>
Move flushing code from multifd_send_sync_main() to a new helper, and call
it in multifd_send_sync_main().

Signed-off-by: Leonardo Bras &lt;leobras@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Signed-off-by: Juan Quintela &lt;quintela@redhat.com&gt;
</content>
</entry>
<entry>
<title>migration/channel-block: fix return value for qio_channel_block_{readv,writev}</title>
<updated>2022-11-21T10:56:12+00:00</updated>
<author>
<name>Fiona Ebner</name>
</author>
<published>2022-10-13T08:41:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a216ec85b78ea96b51950665879524132f6e678c'/>
<id>urn:sha1:a216ec85b78ea96b51950665879524132f6e678c</id>
<content type='text'>
in the error case. The documentation in include/io/channel.h states
that -1 or QIO_CHANNEL_ERR_BLOCK should be returned upon error. Simply
passing along the return value from the bdrv-functions has the
potential to confuse the call sides. Non-blocking mode is not
implemented currently, so -1 it is.

Signed-off-by: Fiona Ebner &lt;f.ebner@proxmox.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Signed-off-by: Juan Quintela &lt;quintela@redhat.com&gt;
</content>
</entry>
<entry>
<title>reset: allow registering handlers that aren't called by snapshot loading</title>
<updated>2022-10-27T10:34:31+00:00</updated>
<author>
<name>Jason A. Donenfeld</name>
</author>
<published>2022-10-25T00:43:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=7966d70f6f6b188475e67c2c363f19eec3d28c96'/>
<id>urn:sha1:7966d70f6f6b188475e67c2c363f19eec3d28c96</id>
<content type='text'>
Snapshot loading only expects to call deterministic handlers, not
non-deterministic ones. So introduce a way of registering handlers that
won't be called when reseting for snapshots.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
Message-id: 20221025004327.568476-2-Jason@zx2c4.com
[PMM: updated json doc comment with Markus' text; fixed
 checkpatch style nit]
Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
</content>
</entry>
<entry>
<title>migration: add missing coroutine_fn annotations</title>
<updated>2022-10-07T10:11:41+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2022-09-22T08:49:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=38e8f9af08bc00939479131f38c95139d91ee126'/>
<id>urn:sha1:38e8f9af08bc00939479131f38c95139d91ee126</id>
<content type='text'>
Callers of coroutine_fn must be coroutine_fn themselves, or the call
must be within "if (qemu_in_coroutine())".  Apply coroutine_fn to
functions where this holds.

Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Alberto Faria &lt;afaria@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20220922084924.201610-26-pbonzini@redhat.com&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>Use g_new() &amp; friends where that makes obvious sense</title>
<updated>2022-10-03T22:10:11+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2022-09-23T08:42:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=c5e8d51824fe725d0693cd9f50171d34297c5cc0'/>
<id>urn:sha1:c5e8d51824fe725d0693cd9f50171d34297c5cc0</id>
<content type='text'>
g_new(T, n) is neater than g_malloc(sizeof(T) * n).  It's also safer,
for two reasons.  One, it catches multiplication overflowing size_t.
Two, it returns T * rather than void *, which lets the compiler catch
more type errors.

This commit only touches allocations with size arguments of the form
sizeof(T).

Patch created mechanically with:

    $ spatch --in-place --sp-file scripts/coccinelle/use-g_new-etc.cocci \
	     --macro-file scripts/cocci-macro-file.h FILES...

The previous iteration was commit a95942b50c.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-Id: &lt;20220923084254.4173111-1-armbru@redhat.com&gt;
Signed-off-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
</content>
</entry>
</feed>
