<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/hw/pcmcia/pxa2xx.c, 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/pcmcia/pxa2xx.c?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/hw/pcmcia/pxa2xx.c?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2020-08-27T18:04:55+00:00</updated>
<entry>
<title>pxa2xx: Move QOM macros to header</title>
<updated>2020-08-27T18:04:55+00:00</updated>
<author>
<name>Eduardo Habkost</name>
</author>
<published>2020-08-25T19:20:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=2d8eb5f85f054cbde8786dc7db56eb2c6feb0db3'/>
<id>urn:sha1:2d8eb5f85f054cbde8786dc7db56eb2c6feb0db3</id>
<content type='text'>
This will make future conversion to OBJECT_DECLARE* easier.

Reviewed-by: Daniel P. Berrangé &lt;berrange@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Tested-By: Roman Bolshakov &lt;r.bolshakov@yadro.com&gt;
Message-Id: &lt;20200825192110.3528606-40-ehabkost@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
<entry>
<title>sysbus: Convert to sysbus_realize() etc. with Coccinelle</title>
<updated>2020-06-15T20:05:28+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2020-06-10T05:32:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3c6ef471ee67bf5a22a9e0ecfdc45ca7d2393216'/>
<id>urn:sha1:3c6ef471ee67bf5a22a9e0ecfdc45ca7d2393216</id>
<content type='text'>
Convert from qdev_realize(), qdev_realize_and_unref() with null @bus
argument to sysbus_realize(), sysbus_realize_and_unref().

Coccinelle script:

    @@
    expression dev, errp;
    @@
    -    qdev_realize(DEVICE(dev), NULL, errp);
    +    sysbus_realize(SYS_BUS_DEVICE(dev), errp);

    @@
    expression sysbus_dev, dev, errp;
    @@
    +    sysbus_dev = SYS_BUS_DEVICE(dev);
    -    qdev_realize_and_unref(dev, NULL, errp);
    +    sysbus_realize_and_unref(sysbus_dev, errp);
    -    sysbus_dev = SYS_BUS_DEVICE(dev);

    @@
    expression sysbus_dev, dev, errp;
    expression expr;
    @@
         sysbus_dev = SYS_BUS_DEVICE(dev);
         ... when != dev = expr;
    -    qdev_realize_and_unref(dev, NULL, errp);
    +    sysbus_realize_and_unref(sysbus_dev, errp);

    @@
    expression dev, errp;
    @@
    -    qdev_realize_and_unref(DEVICE(dev), NULL, errp);
    +    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp);

    @@
    expression dev, errp;
    @@
    -    qdev_realize_and_unref(dev, NULL, errp);
    +    sysbus_realize_and_unref(SYS_BUS_DEVICE(dev), errp);

Whitespace changes minimized manually.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Acked-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20200610053247.1583243-46-armbru@redhat.com&gt;
[Conflicts in hw/misc/empty_slot.c and hw/sparc/leon3.c resolved]
</content>
</entry>
<entry>
<title>qdev: Convert uses of qdev_create() with Coccinelle</title>
<updated>2020-06-15T20:00:10+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2020-06-10T05:31:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3e80f6902c13f6edb6675c0f33edcbbf0163ec32'/>
<id>urn:sha1:3e80f6902c13f6edb6675c0f33edcbbf0163ec32</id>
<content type='text'>
This is the transformation explained in the commit before previous.
Takes care of just one pattern that needs conversion.  More to come in
this series.

Coccinelle script:

    @ depends on !(file in "hw/arm/highbank.c")@
    expression bus, type_name, dev, expr;
    @@
    -    dev = qdev_create(bus, type_name);
    +    dev = qdev_new(type_name);
         ... when != dev = expr
    -    qdev_init_nofail(dev);
    +    qdev_realize_and_unref(dev, bus, &amp;error_fatal);

    @@
    expression bus, type_name, dev, expr;
    identifier DOWN;
    @@
    -    dev = DOWN(qdev_create(bus, type_name));
    +    dev = DOWN(qdev_new(type_name));
         ... when != dev = expr
    -    qdev_init_nofail(DEVICE(dev));
    +    qdev_realize_and_unref(DEVICE(dev), bus, &amp;error_fatal);

    @@
    expression bus, type_name, expr;
    identifier dev;
    @@
    -    DeviceState *dev = qdev_create(bus, type_name);
    +    DeviceState *dev = qdev_new(type_name);
         ... when != dev = expr
    -    qdev_init_nofail(dev);
    +    qdev_realize_and_unref(dev, bus, &amp;error_fatal);

    @@
    expression bus, type_name, dev, expr, errp;
    symbol true;
    @@
    -    dev = qdev_create(bus, type_name);
    +    dev = qdev_new(type_name);
         ... when != dev = expr
    -    object_property_set_bool(OBJECT(dev), true, "realized", errp);
    +    qdev_realize_and_unref(dev, bus, errp);

    @@
    expression bus, type_name, expr, errp;
    identifier dev;
    symbol true;
    @@
    -    DeviceState *dev = qdev_create(bus, type_name);
    +    DeviceState *dev = qdev_new(type_name);
         ... when != dev = expr
    -    object_property_set_bool(OBJECT(dev), true, "realized", errp);
    +    qdev_realize_and_unref(dev, bus, errp);

The first rule exempts hw/arm/highbank.c, because it matches along two
control flow paths there, with different @type_name.  Covered by the
next commit's manual conversions.

Missing #include "qapi/error.h" added manually.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20200610053247.1583243-10-armbru@redhat.com&gt;
[Conflicts in hw/misc/empty_slot.c and hw/sparc/leon3.c resolved]
</content>
</entry>
<entry>
<title>qom: Drop parameter @errp of object_property_add() &amp; friends</title>
<updated>2020-05-15T05:07:58+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2020-05-05T15:29:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d2623129a7dec1d3041ad1221dda1ca49c667532'/>
<id>urn:sha1:d2623129a7dec1d3041ad1221dda1ca49c667532</id>
<content type='text'>
The only way object_property_add() can fail is when a property with
the same name already exists.  Since our property names are all
hardcoded, failure is a programming error, and the appropriate way to
handle it is passing &amp;error_abort.

Same for its variants, except for object_property_add_child(), which
additionally fails when the child already has a parent.  Parentage is
also under program control, so this is a programming error, too.

We have a bit over 500 callers.  Almost half of them pass
&amp;error_abort, slightly fewer ignore errors, one test case handles
errors, and the remaining few callers pass them to their own callers.

The previous few commits demonstrated once again that ignoring
programming errors is a bad idea.

Of the few ones that pass on errors, several violate the Error API.
The Error ** argument must be NULL, &amp;error_abort, &amp;error_fatal, or a
pointer to a variable containing NULL.  Passing an argument of the
latter kind twice without clearing it in between is wrong: if the
first call sets an error, it no longer points to NULL for the second
call.  ich9_pm_add_properties(), sparc32_ledma_realize(),
sparc32_dma_realize(), xilinx_axidma_realize(), xilinx_enet_realize()
are wrong that way.

When the one appropriate choice of argument is &amp;error_abort, letting
users pick the argument is a bad idea.

Drop parameter @errp and assert the preconditions instead.

There's one exception to "duplicate property name is a programming
error": the way object_property_add() implements the magic (and
undocumented) "automatic arrayification".  Don't drop @errp there.
Instead, rename object_property_add() to object_property_try_add(),
and add the obvious wrapper object_property_add().

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20200505152926.18877-15-armbru@redhat.com&gt;
[Two semantic rebase conflicts resolved]
</content>
</entry>
<entry>
<title>Include hw/hw.h exactly where needed</title>
<updated>2019-08-16T11:31:52+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2019-08-12T05:23:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=650d103d3ea959212f826acb9d3fe80cf30e347b'/>
<id>urn:sha1:650d103d3ea959212f826acb9d3fe80cf30e347b</id>
<content type='text'>
In my "build everything" tree, changing hw/hw.h triggers a recompile
of some 2600 out of 6600 objects (not counting tests and objects that
don't depend on qemu/osdep.h).

The previous commits have left only the declaration of hw_error() in
hw/hw.h.  This permits dropping most of its inclusions.  Touching it
now recompiles less than 200 objects.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Message-Id: &lt;20190812052359.30071-19-armbru@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Tested-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
</content>
</entry>
<entry>
<title>Include hw/irq.h a lot less</title>
<updated>2019-08-16T11:31:52+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2019-08-12T05:23:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=64552b6be4758d3a774f7787b294543ccebd5358'/>
<id>urn:sha1:64552b6be4758d3a774f7787b294543ccebd5358</id>
<content type='text'>
In my "build everything" tree, changing hw/irq.h triggers a recompile
of some 5400 out of 6600 objects (not counting tests and objects that
don't depend on qemu/osdep.h).

hw/hw.h supposedly includes it for convenience.  Several other headers
include it just to get qemu_irq and.or qemu_irq_handler.

Move the qemu_irq and qemu_irq_handler typedefs from hw/irq.h to
qemu/typedefs.h, and then include hw/irq.h only where it's still
needed.  Touching it now recompiles only some 500 objects.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Tested-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-Id: &lt;20190812052359.30071-13-armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>Include qemu/module.h where needed, drop it from qemu-common.h</title>
<updated>2019-06-12T11:18:33+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2019-05-23T14:35:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=0b8fa32f551e863bb548a11394239239270dd3dc'/>
<id>urn:sha1:0b8fa32f551e863bb548a11394239239270dd3dc</id>
<content type='text'>
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Message-Id: &lt;20190523143508.25387-4-armbru@redhat.com&gt;
[Rebased with conflicts resolved automatically, except for
hw/usb/dev-hub.c hw/misc/exynos4210_rng.c hw/misc/bcm2835_rng.c
hw/misc/aspeed_scu.c hw/display/virtio-vga.c hw/arm/stm32f205_soc.c;
ui/cocoa.m fixed up]
</content>
</entry>
<entry>
<title>arm: Clean up includes</title>
<updated>2016-01-29T15:07:23+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2016-01-26T18:17:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8ef94f0bc9167f246b41cb1188bf80dcd84b49fe'/>
<id>urn:sha1:8ef94f0bc9167f246b41cb1188bf80dcd84b49fe</id>
<content type='text'>
Clean up includes so that osdep.h is included first and headers
which it implies are not included manually.

This commit was created with scripts/clean-includes.

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Message-id: 1453832250-766-13-git-send-email-peter.maydell@linaro.org
</content>
</entry>
<entry>
<title>hw: do not pass NULL to memory_region_init from instance_init</title>
<updated>2015-10-09T13:25:56+00:00</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2015-10-01T08:59:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=81e0ab48dda611e9571dc2e166840205a4208567'/>
<id>urn:sha1:81e0ab48dda611e9571dc2e166840205a4208567</id>
<content type='text'>
This causes the region to outlive the object, because it attaches the
region to /machine.  This is not nice for the "realize" method, but
much worse for "instance_init" because it can cause dangling pointers
after a simple object_new/object_unref pair.

Reported-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Tested-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Message-Id: &lt;1443689999-12182-3-git-send-email-armbru@redhat.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>hmp: Remove "info pcmcia"</title>
<updated>2014-10-24T11:19:11+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2014-10-24T11:19:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=7797a73947d5c0e63dd5552b348cf66c384b4555'/>
<id>urn:sha1:7797a73947d5c0e63dd5552b348cf66c384b4555</id>
<content type='text'>
This command lists PCMCIA sockets and cards.  Only a few ARM boards
have sockets (akita, borzoi, connex, mainstone, spitz, terrier, tosa,
verdex, z2), the only card is the DSCM-1xxxx Hitachi Microdrive (qdev
"microdrive"), and it is only inserted during machine init, if ever.
So this command doesn't really tell anybody anything new so far.

Moreover, pcmcia_socket_unregister() has a use-after-free bug, flagged
by Coverity.  Has never been used, because there has never been code
to eject a PCMCIA card.

Not worth fixing &amp; converting to QMP.  Remove it.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Acked-by: Luiz Capitulino &lt;lcapitulino@redhat.com&gt;
Acked-by: Andreas Färber &lt;afaerber@suse.de&gt;
Message-id: 1411144812-22958-1-git-send-email-armbru@redhat.com
Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
</content>
</entry>
</feed>
