<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/dump, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/dump?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/dump?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-07-23T18:30:36Z</updated>
<entry>
<title>dump: make range overlap check more readable</title>
<updated>2024-07-23T18:30:36Z</updated>
<author>
<name>Yao Xingtao</name>
<email>yaoxt.fnst@fujitsu.com</email>
</author>
<published>2024-07-22T04:07:41Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=1aef44805df33f3f6e6302984660f4ea6b31fb3e'/>
<id>urn:sha1:1aef44805df33f3f6e6302984660f4ea6b31fb3e</id>
<content type='text'>
use ranges_overlap() instead of open-coding the overlap check to improve
the readability of the code.

Signed-off-by: Yao Xingtao &lt;yaoxt.fnst@fujitsu.com&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-ID: &lt;20240722040742.11513-13-yaoxt.fnst@fujitsu.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>dump/win_dump: Improve error messages on write error</title>
<updated>2024-05-27T10:42:12Z</updated>
<author>
<name>Markus Armbruster</name>
<email>armbru@redhat.com</email>
</author>
<published>2024-05-13T14:16:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=21c06f57808c7236cca68ccc7d8df845c22cd998'/>
<id>urn:sha1:21c06f57808c7236cca68ccc7d8df845c22cd998</id>
<content type='text'>
create_win_dump() and write_run report qemu_write_full() failure to
their callers as

    An IO error has occurred

The errno set by qemu_write_full() is lost.

Improve this to

    win-dump: failed to write header: &lt;description of errno&gt;

and

    win-dump: failed to save memory: &lt;description of errno&gt;

This matches how dump.c reports similar errors.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Message-ID: &lt;20240513141703.549874-3-armbru@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>dump: Fix HMP dump-guest-memory -z without -R</title>
<updated>2024-01-30T18:20:20Z</updated>
<author>
<name>Markus Armbruster</name>
<email>armbru@redhat.com</email>
</author>
<published>2023-12-22T09:38:27Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=e999bea8e688354a9dd790746bdae760c2953a2e'/>
<id>urn:sha1:e999bea8e688354a9dd790746bdae760c2953a2e</id>
<content type='text'>
-z without -R has no effect: the dump format remains @elf.  Fix the
logic error so it becomes @kdump-zlib.

Fixes: e6549197f7ed (dump: Add command interface for kdump-raw formats)
Fixes: CID 1523841
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Stephen Brennan &lt;stephen.s.brennan@oracle.com&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Signed-off-by: Michael Tokarev &lt;mjt@tls.msk.ru&gt;
</content>
</entry>
<entry>
<title>system/cpus: rename qemu_mutex_lock_iothread() to bql_lock()</title>
<updated>2024-01-08T15:45:43Z</updated>
<author>
<name>Stefan Hajnoczi</name>
<email>stefanha@redhat.com</email>
</author>
<published>2024-01-02T15:35:25Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=195801d700c008b6a8d8acfa299aa5f177446647'/>
<id>urn:sha1:195801d700c008b6a8d8acfa299aa5f177446647</id>
<content type='text'>
The Big QEMU Lock (BQL) has many names and they are confusing. The
actual QemuMutex variable is called qemu_global_mutex but it's commonly
referred to as the BQL in discussions and some code comments. The
locking APIs, however, are called qemu_mutex_lock_iothread() and
qemu_mutex_unlock_iothread().

The "iothread" name is historic and comes from when the main thread was
split into into KVM vcpu threads and the "iothread" (now called the main
loop thread). I have contributed to the confusion myself by introducing
a separate --object iothread, a separate concept unrelated to the BQL.

The "iothread" name is no longer appropriate for the BQL. Rename the
locking APIs to:
- void bql_lock(void)
- void bql_unlock(void)
- bool bql_locked(void)

There are more APIs with "iothread" in their names. Subsequent patches
will rename them. There are also comments and documentation that will be
updated in later patches.

Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Paul Durrant &lt;paul@xen.org&gt;
Acked-by: Fabiano Rosas &lt;farosas@suse.de&gt;
Acked-by: David Woodhouse &lt;dwmw@amazon.co.uk&gt;
Reviewed-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Acked-by: Peter Xu &lt;peterx@redhat.com&gt;
Acked-by: Eric Farman &lt;farman@linux.ibm.com&gt;
Reviewed-by: Harsh Prateek Bora &lt;harshpb@linux.ibm.com&gt;
Acked-by: Hyman Huang &lt;yong.huang@smartx.com&gt;
Reviewed-by: Akihiko Odaki &lt;akihiko.odaki@daynix.com&gt;
Message-id: 20240102153529.486531-2-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>dump: Add arch cleanup function</title>
<updated>2023-11-14T09:42:32Z</updated>
<author>
<name>Janosch Frank</name>
<email>frankja@linux.ibm.com</email>
</author>
<published>2023-11-09T12:04:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=e72629e5149aba6f44122ea6d2a803ef136a0c6b'/>
<id>urn:sha1:e72629e5149aba6f44122ea6d2a803ef136a0c6b</id>
<content type='text'>
Some architectures (s390x) need to cleanup after a failed dump to be
able to continue to run the vm. Add a cleanup function pointer and
call it if it's set.

Signed-off-by: Janosch Frank &lt;frankja@linux.ibm.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-ID: &lt;20231109120443.185979-3-frankja@linux.ibm.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>dump: Add close fd on error return to avoid resource leak</title>
<updated>2023-11-07T12:08:49Z</updated>
<author>
<name>Zongmin Zhou</name>
<email>min_halo@163.com</email>
</author>
<published>2023-11-07T02:44:17Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=95a40c44501b5e3b8d1922ea37f30142981b2b34'/>
<id>urn:sha1:95a40c44501b5e3b8d1922ea37f30142981b2b34</id>
<content type='text'>
Reported-by: Coverity CID 1523842 (RESOURCE_LEAK)
Fixes: e6549197f7 ("dump: Add command interface for kdump-raw formats")
Signed-off-by: Zongmin Zhou &lt;zhouzongmin@kylinos.cn&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-ID: &lt;20231107024417.585475-1-min_halo@163.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
</content>
</entry>
<entry>
<title>dump: Drop redundant check for empty dump</title>
<updated>2023-11-02T14:40:50Z</updated>
<author>
<name>Markus Armbruster</name>
<email>armbru@redhat.com</email>
</author>
<published>2023-10-31T10:45:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=4023839757b2c01e0350ce92902c6f74dce7d011'/>
<id>urn:sha1:4023839757b2c01e0350ce92902c6f74dce7d011</id>
<content type='text'>
dump_init() first computes the size of the dump, taking the filter
area into account, and fails if its zero.  It then looks for memory in
the filter area, and fails if there is none.

This is redundant: if the size of the dump is zero, there is no
memory, and vice versa.  Delete this check.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20231031104531.3169721-6-armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>dump: Improve some dump-guest-memory error messages</title>
<updated>2023-11-02T14:40:50Z</updated>
<author>
<name>Markus Armbruster</name>
<email>armbru@redhat.com</email>
</author>
<published>2023-10-31T10:45:30Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=28035bed1c565eace7db18971a7e960a8d1f7c44'/>
<id>urn:sha1:28035bed1c565eace7db18971a7e960a8d1f7c44</id>
<content type='text'>
Zero @length is rejected with "Invalid parameter 'length'".  Improve
to "parameter 'length' expects a non-zero length".

qemu_open_old() is a wrapper around qemu_open_internal() that throws
away error information.  Switch to the wrapper that doesn't:
qemu_create().  Example improvement:

    (qemu) dump-guest-memory /dev/fdset/x 0 1
    Error: Could not open '/dev/fdset/x': Invalid argument

becomes

    Error: Could not parse fdset /dev/fdset/x

@protocol values not starting with "fd:" or "file:" are rejected with
"Invalid parameter 'protocol'".  Improve to "parameter 'protocol' must
start with 'file:' or 'fd:'".

While there, make the conditional checking @protocol a little more
obvious.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20231031104531.3169721-5-armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>dump: Recognize "fd:" protocols on Windows hosts</title>
<updated>2023-11-02T14:40:50Z</updated>
<author>
<name>Markus Armbruster</name>
<email>armbru@redhat.com</email>
</author>
<published>2023-10-31T10:45:29Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=f8c49724cbe13fa30b5893eff33f9ccee7e4466a'/>
<id>urn:sha1:f8c49724cbe13fa30b5893eff33f9ccee7e4466a</id>
<content type='text'>
A few QMP command can work with named file descriptors.

The only way to create a named file descriptor used to be QMP command
getfd, which only works on POSIX hosts.  Thus, named file descriptors
were actually usable only there.

They became usable on Windows hosts when we added QMP command
get-win32-socket (commit 4cda177c601 "qmp: add 'get-win32-socket'").

Except in dump-guest-memory, because qmp_dump_guest_memory() compiles
its named file descriptor code only #if !defined(WIN32).

Compile it unconditionally, like we do for the other commands
supporting them.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20231031104531.3169721-4-armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>dump: Fix g_array_unref(NULL) in dump-guest-memory</title>
<updated>2023-11-02T14:40:50Z</updated>
<author>
<name>Markus Armbruster</name>
<email>armbru@redhat.com</email>
</author>
<published>2023-10-31T10:45:28Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=96afbc571c91b115ba51d9740352a0e45111edc9'/>
<id>urn:sha1:96afbc571c91b115ba51d9740352a0e45111edc9</id>
<content type='text'>
When dump_init()'s check for non-zero @length fails, dump_cleanup()
passes null s-&gt;string_table_buf to g_array_unref(), which spews "GLib:
g_array_unref: assertion 'array' failed" to stderr.

Guard the g_array_unref().

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20231031104531.3169721-3-armbru@redhat.com&gt;
</content>
</entry>
</feed>
