<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/util, branch master</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/util?h=master</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/util?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: Use non-atomic ops for clear log bitmap</title>
<updated>2022-11-21T10:58:10+00:00</updated>
<author>
<name>Peter Xu</name>
</author>
<published>2022-10-04T18:24:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=cedb70eafb4fd51d9c714981509d97b9f4055be5'/>
<id>urn:sha1:cedb70eafb4fd51d9c714981509d97b9f4055be5</id>
<content type='text'>
Since we already have bitmap_mutex to protect either the dirty bitmap or
the clear log bitmap, we don't need atomic operations to set/clear/test on
the clear log bitmap.  Switching all ops from atomic to non-atomic
versions, meanwhile touch up the comments to show which lock is in charge.

Introduced non-atomic version of bitmap_test_and_clear_atomic(), mostly the
same as the atomic version but simplified a few places, e.g. dropped the
"old_bits" variable, and also the explicit memory barriers.

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>qga: Allow building of the guest agent without system emulators or tools</title>
<updated>2022-11-11T08:17:45+00:00</updated>
<author>
<name>Thomas Huth</name>
</author>
<published>2022-11-10T08:36:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e0091133e3367265c08345afe2950c0c22e93d12'/>
<id>urn:sha1:e0091133e3367265c08345afe2950c0c22e93d12</id>
<content type='text'>
If configuring with "--disable-system --disable-user --enable-guest-agent"
the linking currently fails with:

qga/qemu-ga.p/commands.c.o: In function `qmp_command_info':
build/../../home/thuth/devel/qemu/qga/commands.c:70: undefined reference to `qmp_command_name'
build/../../home/thuth/devel/qemu/qga/commands.c:71: undefined reference to `qmp_command_is_enabled'
build/../../home/thuth/devel/qemu/qga/commands.c:72: undefined reference to `qmp_has_success_response'
qga/qemu-ga.p/commands.c.o: In function `qmp_guest_info':
build/../../home/thuth/devel/qemu/qga/commands.c:82: undefined reference to `qmp_for_each_command'
qga/qemu-ga.p/commands.c.o: In function `qmp_guest_exec':
build/../../home/thuth/devel/qemu/qga/commands.c:410: undefined reference to `qbase64_decode'
qga/qemu-ga.p/channel-posix.c.o: In function `ga_channel_open':
build/../../home/thuth/devel/qemu/qga/channel-posix.c:214: undefined reference to `unix_listen'
build/../../home/thuth/devel/qemu/qga/channel-posix.c:228: undefined reference to `socket_parse'
build/../../home/thuth/devel/qemu/qga/channel-posix.c:234: undefined reference to `socket_listen'
qga/qemu-ga.p/commands-posix.c.o: In function `qmp_guest_file_write':
build/../../home/thuth/devel/qemu/qga/commands-posix.c:527: undefined reference to `qbase64_decode'

Let's make sure that we also compile and link the required files if
the system emulators have not been enabled.

Message-Id: &lt;20221110083626.31899-1-thuth@redhat.com&gt;
Tested-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>Revert "s390x/s390-virtio-ccw: add zpcii-disable machine property"</title>
<updated>2022-11-08T09:10:57+00:00</updated>
<author>
<name>Cédric Le Goater</name>
</author>
<published>2022-11-07T16:13:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=57702891376d4636b5eab4a89145152a0342c987'/>
<id>urn:sha1:57702891376d4636b5eab4a89145152a0342c987</id>
<content type='text'>
This reverts commit 59d1ce44396e3ad2330dc3261ff3da7ad3a16184.

The "zpcii-disable" machine property is redundant with the "interpret"
zPCI device property. Remove it for clarification.

Signed-off-by: Cédric Le Goater &lt;clg@redhat.com&gt;
Message-Id: &lt;20221107161349.1032730-2-clg@kaod.org&gt;
Reviewed-by: Matthew Rosato &lt;mjrosato@linux.ibm.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>util/log: Ignore per-thread flag if global file already there</title>
<updated>2022-11-07T21:00:02+00:00</updated>
<author>
<name>Greg Kurz</name>
</author>
<published>2022-11-04T12:00:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=524fc737431d240f9d9f10aaf381003092868bac'/>
<id>urn:sha1:524fc737431d240f9d9f10aaf381003092868bac</id>
<content type='text'>
If QEMU is started with `-D qemu.log.%d` without any `-d` option,
doing `log all` in the monitor fails with:

Filename template with '%d' required for 'tid'

It is confusing since '%d' was actually passed.

This happens because QEMU caches the log file name with %d converted
to getpid() since `tid` wasn't required. This name isn't suitable
for a subsequent enablement of per-thread logs. There's little cause
to change the behavior as `-d tid` is mostly used at user-only startup.

Drop the per-thread from the requested flags in this case : `log all`
will thus enable everything except `tid` instead of failing. This is
preferable over forcing the user to enable each log item individually.

With this patch, `tid` is now truely immutable : it can only be set
or unset from the command line and never changed afterwards.

Fixes: 4e51069d6793 ("util/log: Support per-thread log files")
Cc: richard.henderson@linaro.org
Signed-off-by: Greg Kurz &lt;groug@kaod.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-id: 20221104120059.678470-3-groug@kaod.org
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>util/log: Make the per-thread flag immutable</title>
<updated>2022-11-07T21:00:02+00:00</updated>
<author>
<name>Greg Kurz</name>
</author>
<published>2022-11-04T12:00:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=479b350ebf08248eb7729a02a07ddfe7a7c65e44'/>
<id>urn:sha1:479b350ebf08248eb7729a02a07ddfe7a7c65e44</id>
<content type='text'>
Per-thread logging was implemented under the assumption that once
enabled, it is not possible to switch back to single file logging.
This isn't enforced though and it is possible to go through the
global file opening sequence in per-thread mode. The code isn't
ready for this and produces unexpected results as detailed below.

Start QEMU in system emulation mode with `-D ./qemu.log.%d -d tid`
and then change the log level from the monitor to something that
doesn't have tid, e.g. `log cpu_reset`. The value of log_flags
is zero and per_thread is set to false : the rest of the code
then assumes it is running in the global log case and opens a
file named `qemu.log.%d`, which is obviously not an expected
behavior.

Enforce the immutability of the flag early in qemu_set_log_internal()
so that its value is correct for all subsequent users.

Fixes: 4e51069d6793 ("util/log: Support per-thread log files")
Cc: richard.henderson@linaro.org
Signed-off-by: Greg Kurz &lt;groug@kaod.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-id: 20221104120059.678470-2-groug@kaod.org
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>module: add Error arguments to module_load and module_load_qom</title>
<updated>2022-11-06T08:48:50+00:00</updated>
<author>
<name>Claudio Fontana</name>
</author>
<published>2022-09-29T09:30:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=c551fb0b53db5d9a1f0116e8cce12f994605c9ea'/>
<id>urn:sha1:c551fb0b53db5d9a1f0116e8cce12f994605c9ea</id>
<content type='text'>
improve error handling during module load, by changing:

bool module_load(const char *prefix, const char *lib_name);
void module_load_qom(const char *type);

to:

int module_load(const char *prefix, const char *name, Error **errp);
int module_load_qom(const char *type, Error **errp);

where the return value is:

 -1 on module load error, and errp is set with the error
  0 on module or one of its dependencies are not installed
  1 on module load success
  2 on module load success (module already loaded or built-in)

module_load_qom_one has been introduced in:

commit 28457744c345 ("module: qom module support"), which built on top of
module_load_one, but discarded the bool return value. Restore it.

Adapt all callers to emit errors, or ignore them, or fail hard,
as appropriate in each context.

Replace the previous emission of errors via fprintf in _some_ error
conditions with Error and error_report, so as to emit to the appropriate
target.

A memory leak is also fixed as part of the module_load changes.

audio: when attempting to load an audio module, report module load errors.
Note that still for some callers, a single issue may generate multiple
error reports, and this could be improved further.
Regarding the audio code itself, audio_add() seems to ignore errors,
and this should probably be improved.

block: when attempting to load a block module, report module load errors.
For the code paths that already use the Error API, take advantage of those
to report module load errors into the Error parameter.
For the other code paths, we currently emit the error, but this could be
improved further by adding Error parameters to all possible code paths.

console: when attempting to load a display module, report module load errors.

qdev: when creating a new qdev Device object (DeviceState), report load errors.
      If a module cannot be loaded to create that device, now abort execution
      (if no CONFIG_MODULE) or exit (if CONFIG_MODULE).

qom/object.c: when initializing a QOM object, or looking up class_by_name,
              report module load errors.

qtest: when processing the "module_load" qtest command, report errors
       in the load of the module.

Signed-off-by: Claudio Fontana &lt;cfontana@suse.de&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20220929093035.4231-4-cfontana@suse.de&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>module: rename module_load_one to module_load</title>
<updated>2022-11-06T08:48:50+00:00</updated>
<author>
<name>Claudio Fontana</name>
</author>
<published>2022-09-29T09:30:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=dbc0e80553c067f56cb236d9de2cd0d50f3c6131'/>
<id>urn:sha1:dbc0e80553c067f56cb236d9de2cd0d50f3c6131</id>
<content type='text'>
Signed-off-by: Claudio Fontana &lt;cfontana@suse.de&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-Id: &lt;20220929093035.4231-3-cfontana@suse.de&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>module: removed unused function argument "mayfail"</title>
<updated>2022-11-06T08:48:50+00:00</updated>
<author>
<name>Claudio Fontana</name>
</author>
<published>2022-09-29T09:30:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=2106106d80489fb9b10cd3ccfaec811988e797cb'/>
<id>urn:sha1:2106106d80489fb9b10cd3ccfaec811988e797cb</id>
<content type='text'>
mayfail is always passed as false for every invocation throughout the program.
It controls whether to printf or not to printf an error on
g_module_open failure.

Remove this unused argument.

Signed-off-by: Claudio Fontana &lt;cfontana@suse.de&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Message-Id: &lt;20220929093035.4231-2-cfontana@suse.de&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>util/aio-win32: Correct the event array size in aio_poll()</title>
<updated>2022-11-06T08:48:26+00:00</updated>
<author>
<name>Bin Meng</name>
</author>
<published>2022-10-19T10:20:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=e0d034bb243cf0bac2416e00af810c4ca7821762'/>
<id>urn:sha1:e0d034bb243cf0bac2416e00af810c4ca7821762</id>
<content type='text'>
WaitForMultipleObjects() can only wait for MAXIMUM_WAIT_OBJECTS
object handles. Correct the event array size in aio_poll() and
add a assert() to ensure it does not cause out of bound access.

Signed-off-by: Bin Meng &lt;bin.meng@windriver.com&gt;
Reviewed-by: Stefan Weil &lt;sw@weilnetz.de&gt;
Reviewed-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Message-Id: &lt;20221019102015.2441622-3-bmeng.cn@gmail.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>util/main-loop: Avoid adding the same HANDLE twice</title>
<updated>2022-11-06T08:48:26+00:00</updated>
<author>
<name>Bin Meng</name>
</author>
<published>2022-10-19T10:20:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d393b0a176068c41cc08f41c245721ed9ca91d30'/>
<id>urn:sha1:d393b0a176068c41cc08f41c245721ed9ca91d30</id>
<content type='text'>
Fix the logic in qemu_add_wait_object() to avoid adding the same
HANDLE twice, as the behavior is undefined when passing an array
that contains same HANDLEs to WaitForMultipleObjects() API.

Signed-off-by: Bin Meng &lt;bin.meng@windriver.com&gt;
Message-Id: &lt;20221019102015.2441622-2-bmeng.cn@gmail.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
</feed>
