<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/hw/ipack, 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/ipack?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/hw/ipack?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2021-09-30T12:42:10+00:00</updated>
<entry>
<title>qbus: Rename qbus_create_inplace() to qbus_init()</title>
<updated>2021-09-30T12:42:10+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2021-09-23T12:11:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d637e1dc6de0e171dca6fbb5384668c642aa5ab6'/>
<id>urn:sha1:d637e1dc6de0e171dca6fbb5384668c642aa5ab6</id>
<content type='text'>
Rename qbus_create_inplace() to qbus_init(); this is more in line
with our usual naming convention for functions that in-place
initialize objects.

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-id: 20210923121153.23754-5-peter.maydell@linaro.org
</content>
</entry>
<entry>
<title>ipack: Rename ipack_bus_new_inplace() to ipack_bus_init()</title>
<updated>2021-09-30T12:42:10+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2021-09-23T12:11:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=43417c0c27fd0851707a1f3bf50244d24aeeaf82'/>
<id>urn:sha1:43417c0c27fd0851707a1f3bf50244d24aeeaf82</id>
<content type='text'>
Rename ipack_bus_new_inplace() to ipack_bus_init(), to bring it in to
line with a "_init for in-place init, _new for allocate-and-return"
convention.  Drop the 'name' argument, because the only caller does
not pass in a name.  If a future caller does need to specify the bus
name, we should create an ipack_bus_init_named() function at that
point.

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Message-id: 20210923121153.23754-3-peter.maydell@linaro.org
</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>meson: convert hw/ipack</title>
<updated>2020-08-21T10:30:30+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2019-08-16T14:23:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=ae36d233d37ab80245ac23f1ce04e97b0df6805d'/>
<id>urn:sha1:ae36d233d37ab80245ac23f1ce04e97b0df6805d</id>
<content type='text'>
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>qdev: Unrealize must not fail</title>
<updated>2020-05-15T05:08:14+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2020-05-05T15:29:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=b69c3c21a5d11075d42100d5cfe0a736593fae6b'/>
<id>urn:sha1:b69c3c21a5d11075d42100d5cfe0a736593fae6b</id>
<content type='text'>
Devices may have component devices and buses.

Device realization may fail.  Realization is recursive: a device's
realize() method realizes its components, and device_set_realized()
realizes its buses (which should in turn realize the devices on that
bus, except bus_set_realized() doesn't implement that, yet).

When realization of a component or bus fails, we need to roll back:
unrealize everything we realized so far.  If any of these unrealizes
failed, the device would be left in an inconsistent state.  Must not
happen.

device_set_realized() lets it happen: it ignores errors in the roll
back code starting at label child_realize_fail.

Since realization is recursive, unrealization must be recursive, too.
But how could a partly failed unrealize be rolled back?  We'd have to
re-realize, which can fail.  This design is fundamentally broken.

device_set_realized() does not roll back at all.  Instead, it keeps
unrealizing, ignoring further errors.

It can screw up even for a device with no buses: if the lone
dc-&gt;unrealize() fails, it still unregisters vmstate, and calls
listeners' unrealize() callback.

bus_set_realized() does not roll back either.  Instead, it stops
unrealizing.

Fortunately, no unrealize method can fail, as we'll see below.

To fix the design error, drop parameter @errp from all the unrealize
methods.

Any unrealize method that uses @errp now needs an update.  This leads
us to unrealize() methods that can fail.  Merely passing it to another
unrealize method cannot cause failure, though.  Here are the ones that
do other things with @errp:

* virtio_serial_device_unrealize()

  Fails when qbus_set_hotplug_handler() fails, but still does all the
  other work.  On failure, the device would stay realized with its
  resources completely gone.  Oops.  Can't happen, because
  qbus_set_hotplug_handler() can't actually fail here.  Pass
  &amp;error_abort to qbus_set_hotplug_handler() instead.

* hw/ppc/spapr_drc.c's unrealize()

  Fails when object_property_del() fails, but all the other work is
  already done.  On failure, the device would stay realized with its
  vmstate registration gone.  Oops.  Can't happen, because
  object_property_del() can't actually fail here.  Pass &amp;error_abort
  to object_property_del() instead.

* spapr_phb_unrealize()

  Fails and bails out when remove_drcs() fails, but other work is
  already done.  On failure, the device would stay realized with some
  of its resources gone.  Oops.  remove_drcs() fails only when
  chassis_from_bus()'s object_property_get_uint() fails, and it can't
  here.  Pass &amp;error_abort to remove_drcs() instead.

Therefore, no unrealize method can fail before this patch.

device_set_realized()'s recursive unrealization via bus uses
object_property_set_bool().  Can't drop @errp there, so pass
&amp;error_abort.

We similarly unrealize with object_property_set_bool() elsewhere,
always ignoring errors.  Pass &amp;error_abort instead.

Several unrealize methods no longer handle errors from other unrealize
methods: virtio_9p_device_unrealize(),
virtio_input_device_unrealize(), scsi_qdev_unrealize(), ...
Much of the deleted error handling looks wrong anyway.

One unrealize methods no longer ignore such errors:
usb_ehci_pci_exit().

Several realize methods no longer ignore errors when rolling back:
v9fs_device_realize_common(), pci_qdev_unrealize(),
spapr_phb_realize(), usb_qdev_realize(), vfio_ccw_realize(),
virtio_device_realize().

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Message-Id: &lt;20200505152926.18877-17-armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>qdev: set properties with device_class_set_props()</title>
<updated>2020-01-24T19:59:15+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2020-01-10T15:30:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=4f67d30b5e74e060b8dbe10528829b47345cd6e8'/>
<id>urn:sha1:4f67d30b5e74e060b8dbe10528829b47345cd6e8</id>
<content type='text'>
The following patch will need to handle properties registration during
class_init time. Let's use a device_class_set_props() setter.

spatch --macro-file scripts/cocci-macro-file.h  --sp-file
./scripts/coccinelle/qdev-set-props.cocci --keep-comments --in-place
--dir .

@@
typedef DeviceClass;
DeviceClass *d;
expression val;
@@
- d-&gt;props = val
+ device_class_set_props(d, val)

Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20200110153039.1379601-20-marcandre.lureau@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Include hw/qdev-properties.h less</title>
<updated>2019-08-16T11:31:53+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2019-08-12T05:23:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a27bd6c779badb8d76e4430d810ef710a1b98f4e'/>
<id>urn:sha1:a27bd6c779badb8d76e4430d810ef710a1b98f4e</id>
<content type='text'>
In my "build everything" tree, changing hw/qdev-properties.h triggers
a recompile of some 2700 out of 6600 objects (not counting tests and
objects that don't depend on qemu/osdep.h).

Many places including hw/qdev-properties.h (directly or via hw/qdev.h)
actually need only hw/qdev-core.h.  Include hw/qdev-core.h there
instead.

hw/qdev.h is actually pointless: all it does is include hw/qdev-core.h
and hw/qdev-properties.h, which in turn includes hw/qdev-core.h.
Replace the remaining uses of hw/qdev.h by hw/qdev-properties.h.

While there, delete a few superfluous inclusions of hw/qdev-core.h.

Touching hw/qdev-properties.h now recompiles some 1200 objects.

Cc: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Cc: "Daniel P. Berrangé" &lt;berrange@redhat.com&gt;
Cc: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
Message-Id: &lt;20190812052359.30071-22-armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>Include migration/vmstate.h less</title>
<updated>2019-08-16T11:31:52+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2019-08-12T05:23:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d6454270575da1f16a8923c7cb240e46ef243f72'/>
<id>urn:sha1:d6454270575da1f16a8923c7cb240e46ef243f72</id>
<content type='text'>
In my "build everything" tree, changing migration/vmstate.h triggers a
recompile of some 2700 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 VMStateDescription.  The previous commit made
that unnecessary.

Include migration/vmstate.h only where it's still needed.  Touching it
now recompiles only some 1600 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-16-armbru@redhat.com&gt;
Tested-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
</content>
</entry>
</feed>
