<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/hw/cpu, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/hw/cpu?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/hw/cpu?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2021-04-09T20:05:16+00:00</updated>
<entry>
<title>cpu/core: Fix "help" of CPU core device types</title>
<updated>2021-04-09T20:05:16+00:00</updated>
<author>
<name>Greg Kurz</name>
</author>
<published>2021-04-09T16:03:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=0b47ec4b95ad1952e55e639711d442f8ec6e1345'/>
<id>urn:sha1:0b47ec4b95ad1952e55e639711d442f8ec6e1345</id>
<content type='text'>
Calling qdev_get_machine() from a QOM instance_init function is
fragile because we can't be sure the machine object actually
exists. And this happens to break when passing ",help" on the
command line to get the list of properties for a CPU core
device types :

$ ./qemu-system-ppc64 -device power8_v2.0-spapr-cpu-core,help
qemu-system-ppc64: ../../hw/core/machine.c:1290:
 qdev_get_machine: Assertion `machine != NULL' failed.
Aborted (core dumped)

This used to work before QEMU 5.0, but commit 3df261b6676b
unwillingly introduced a subtle regression : the above command
line needs to create an instance but the instance_init function
of the base class calls qdev_get_machine() before
qemu_create_machine() has been called, which is a programming bug.

Use current_machine instead. It is okay to skip the setting of
nr_thread in this case since only its type is displayed.

Fixes: 3df261b6676b ("softmmu/vl.c: Handle '-cpu help' and '-device help' before 'no default machine'")
Reported-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Greg Kurz &lt;groug@kaod.org&gt;
Cc: peter.maydell@linaro.org
Message-Id: &lt;20210409160339.500167-3-groug@kaod.org&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
<entry>
<title>cpu/core: Register core-id and nr-threads as class properties</title>
<updated>2020-09-22T20:48:29+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2020-09-21T22:10:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=2decc51f19421ad9b12a620b82debf9139270520'/>
<id>urn:sha1:2decc51f19421ad9b12a620b82debf9139270520</id>
<content type='text'>
Class properties make QOM introspection simpler and easier, as
they don't require an object to be instantiated.

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Reviewed-by: Igor Mammedov &lt;imammedo@redhat.com&gt;
Message-Id: &lt;20200921221045.699690-18-ehabkost@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
<entry>
<title>qom: simplify object_find_property / object_class_find_property</title>
<updated>2020-09-22T20:45:16+00:00</updated>
<author>
<name>Daniel P. Berrangé</name>
</author>
<published>2020-09-14T13:56:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=efba15959cdb1ca7beeed8d6188ab0905b468f90'/>
<id>urn:sha1:efba15959cdb1ca7beeed8d6188ab0905b468f90</id>
<content type='text'>
When debugging QEMU it is often useful to put a breakpoint on the
error_setg_internal method impl.

Unfortunately the object_property_add / object_class_property_add
methods call object_property_find / object_class_property_find methods
to check if a property exists already before adding the new property.

As a result there are a huge number of calls to error_setg_internal
on startup of most QEMU commands, making it very painful to set a
breakpoint on this method.

Most callers of object_find_property and object_class_find_property,
however, pass in a NULL for the Error parameter. This simplifies the
methods to remove the Error parameter entirely, and then adds some
new wrapper methods that are able to raise an Error when needed.

Signed-off-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-Id: &lt;20200914135617.1493072-1-berrange@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
<entry>
<title>Use OBJECT_DECLARE_SIMPLE_TYPE when possible</title>
<updated>2020-09-18T18:12:32+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2020-09-16T18:25:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8063396bf3459a810d24e3efd6110b8480f0de5b'/>
<id>urn:sha1:8063396bf3459a810d24e3efd6110b8480f0de5b</id>
<content type='text'>
This converts existing DECLARE_INSTANCE_CHECKER usage to
OBJECT_DECLARE_SIMPLE_TYPE when possible.

$ ./scripts/codeconverter/converter.py -i \
  --pattern=AddObjectDeclareSimpleType $(git grep -l '' -- '*.[ch]')

Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Acked-by: Paul Durrant &lt;paul@xen.org&gt;
Message-Id: &lt;20200916182519.415636-6-ehabkost@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
<entry>
<title>Use DECLARE_*CHECKER* macros</title>
<updated>2020-09-09T13:27:09+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2020-08-31T21:07:33+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8110fa1d94f2997badc2af39231a1d279c5bb1ee'/>
<id>urn:sha1:8110fa1d94f2997badc2af39231a1d279c5bb1ee</id>
<content type='text'>
Generated using:

 $ ./scripts/codeconverter/converter.py -i \
   --pattern=TypeCheckMacro $(git grep -l '' -- '*.[ch]')

Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Message-Id: &lt;20200831210740.126168-12-ehabkost@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Message-Id: &lt;20200831210740.126168-13-ehabkost@redhat.com&gt;
Message-Id: &lt;20200831210740.126168-14-ehabkost@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
<entry>
<title>Move QOM typedefs and add missing includes</title>
<updated>2020-09-09T13:26:43+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2020-09-03T20:43:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=db1015e92e04835c9eb50c29625fe566d1202dbd'/>
<id>urn:sha1:db1015e92e04835c9eb50c29625fe566d1202dbd</id>
<content type='text'>
Some typedefs and macros are defined after the type check macros.
This makes it difficult to automatically replace their
definitions with OBJECT_DECLARE_TYPE.

Patch generated using:

 $ ./scripts/codeconverter/converter.py -i \
   --pattern=QOMStructTypedefSplit $(git grep -l '' -- '*.[ch]')

which will split "typdef struct { ... } TypedefName"
declarations.

Followed by:

 $ ./scripts/codeconverter/converter.py -i --pattern=MoveSymbols \
    $(git grep -l '' -- '*.[ch]')

which will:
- move the typedefs and #defines above the type check macros
- add missing #include "qom/object.h" lines if necessary

Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Message-Id: &lt;20200831210740.126168-9-ehabkost@redhat.com&gt;
Reviewed-by: Juan Quintela &lt;quintela@redhat.com&gt;
Message-Id: &lt;20200831210740.126168-10-ehabkost@redhat.com&gt;
Message-Id: &lt;20200831210740.126168-11-ehabkost@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/cpu/a9mpcore: Verify the machine use Cortex-A9 cores</title>
<updated>2020-08-24T09:01:40+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2020-07-09T15:23:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8cbd4616226aaf0f64599c64162062f0ecc0fe9b'/>
<id>urn:sha1:8cbd4616226aaf0f64599c64162062f0ecc0fe9b</id>
<content type='text'>
The 'Cortex-A9MPCore internal peripheral' block can only be
used with Cortex A5 and A9 cores. As we don't model the A5
yet, simply check the machine cpu core is a Cortex A9. If
not return an error.

Signed-off-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Message-id: 20200709152337.15533-1-f4bug@amsat.org
Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
</content>
</entry>
<entry>
<title>meson: convert hw/cpu</title>
<updated>2020-08-21T10:30:31+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2019-08-17T07:21:13+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=cff3c5d2b4029f375b9ed077d99577b3d64e7e24'/>
<id>urn:sha1:cff3c5d2b4029f375b9ed077d99577b3d64e7e24</id>
<content type='text'>
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>error: Eliminate error_propagate() with Coccinelle, part 1</title>
<updated>2020-07-10T13:18:08+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2020-07-07T16:06:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=668f62ec621e4e2919fb7d4caa5d805764c5852d'/>
<id>urn:sha1:668f62ec621e4e2919fb7d4caa5d805764c5852d</id>
<content type='text'>
When all we do with an Error we receive into a local variable is
propagating to somewhere else, we can just as well receive it there
right away.  Convert

    if (!foo(..., &amp;err)) {
        ...
        error_propagate(errp, err);
        ...
        return ...
    }

to

    if (!foo(..., errp)) {
        ...
        ...
        return ...
    }

where nothing else needs @err.  Coccinelle script:

    @rule1 forall@
    identifier fun, err, errp, lbl;
    expression list args, args2;
    binary operator op;
    constant c1, c2;
    symbol false;
    @@
         if (
    (
    -        fun(args, &amp;err, args2)
    +        fun(args, errp, args2)
    |
    -        !fun(args, &amp;err, args2)
    +        !fun(args, errp, args2)
    |
    -        fun(args, &amp;err, args2) op c1
    +        fun(args, errp, args2) op c1
    )
            )
         {
             ... when != err
                 when != lbl:
                 when strict
    -        error_propagate(errp, err);
             ... when != err
    (
             return;
    |
             return c2;
    |
             return false;
    )
         }

    @rule2 forall@
    identifier fun, err, errp, lbl;
    expression list args, args2;
    expression var;
    binary operator op;
    constant c1, c2;
    symbol false;
    @@
    -    var = fun(args, &amp;err, args2);
    +    var = fun(args, errp, args2);
         ... when != err
         if (
    (
             var
    |
             !var
    |
             var op c1
    )
            )
         {
             ... when != err
                 when != lbl:
                 when strict
    -        error_propagate(errp, err);
             ... when != err
    (
             return;
    |
             return c2;
    |
             return false;
    |
             return var;
    )
         }

    @depends on rule1 || rule2@
    identifier err;
    @@
    -    Error *err = NULL;
         ... when != err

Not exactly elegant, I'm afraid.

The "when != lbl:" is necessary to avoid transforming

         if (fun(args, &amp;err)) {
             goto out
         }
         ...
     out:
         error_propagate(errp, err);

even though other paths to label out still need the error_propagate().
For an actual example, see sclp_realize().

Without the "when strict", Coccinelle transforms vfio_msix_setup(),
incorrectly.  I don't know what exactly "when strict" does, only that
it helps here.

The match of return is narrower than what I want, but I can't figure
out how to express "return where the operand doesn't use @err".  For
an example where it's too narrow, see vfio_intx_enable().

Silently fails to convert hw/arm/armsse.c, because Coccinelle gets
confused by ARMSSE being used both as typedef and function-like macro
there.  Converted manually.

Line breaks tidied up manually.  One nested declaration of @local_err
deleted manually.  Preexisting unwanted blank line dropped in
hw/riscv/sifive_e.c.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Message-Id: &lt;20200707160613.848843-35-armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>qapi: Use returned bool to check for failure, Coccinelle part</title>
<updated>2020-07-10T13:18:08+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2020-07-07T16:05:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=62a35aaa310807fa161ca041ddb0f308faeb582b'/>
<id>urn:sha1:62a35aaa310807fa161ca041ddb0f308faeb582b</id>
<content type='text'>
The previous commit enables conversion of

    visit_foo(..., &amp;err);
    if (err) {
        ...
    }

to

    if (!visit_foo(..., errp)) {
        ...
    }

for visitor functions that now return true / false on success / error.
Coccinelle script:

    @@
    identifier fun =~ "check_list|input_type_enum|lv_start_struct|lv_type_bool|lv_type_int64|lv_type_str|lv_type_uint64|output_type_enum|parse_type_bool|parse_type_int64|parse_type_null|parse_type_number|parse_type_size|parse_type_str|parse_type_uint64|print_type_bool|print_type_int64|print_type_null|print_type_number|print_type_size|print_type_str|print_type_uint64|qapi_clone_start_alternate|qapi_clone_start_list|qapi_clone_start_struct|qapi_clone_type_bool|qapi_clone_type_int64|qapi_clone_type_null|qapi_clone_type_number|qapi_clone_type_str|qapi_clone_type_uint64|qapi_dealloc_start_list|qapi_dealloc_start_struct|qapi_dealloc_type_anything|qapi_dealloc_type_bool|qapi_dealloc_type_int64|qapi_dealloc_type_null|qapi_dealloc_type_number|qapi_dealloc_type_str|qapi_dealloc_type_uint64|qobject_input_check_list|qobject_input_check_struct|qobject_input_start_alternate|qobject_input_start_list|qobject_input_start_struct|qobject_input_type_any|qobject_input_type_bool|qobject_input_type_bool_keyval|qobject_input_type_int64|qobject_input_type_int64_keyval|qobject_input_type_null|qobject_input_type_number|qobject_input_type_number_keyval|qobject_input_type_size_keyval|qobject_input_type_str|qobject_input_type_str_keyval|qobject_input_type_uint64|qobject_input_type_uint64_keyval|qobject_output_start_list|qobject_output_start_struct|qobject_output_type_any|qobject_output_type_bool|qobject_output_type_int64|qobject_output_type_null|qobject_output_type_number|qobject_output_type_str|qobject_output_type_uint64|start_list|visit_check_list|visit_check_struct|visit_start_alternate|visit_start_list|visit_start_struct|visit_type_.*";
    expression list args;
    typedef Error;
    Error *err;
    @@
    -    fun(args, &amp;err);
    -    if (err)
    +    if (!fun(args, &amp;err))
         {
             ...
         }

A few line breaks tidied up manually.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Message-Id: &lt;20200707160613.848843-19-armbru@redhat.com&gt;
</content>
</entry>
</feed>
