<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/scripts/coccinelle, branch spice_video_codecs</title>
<subtitle>Experimental fork of QEMU with video encoding patches</subtitle>
<id>https://git.openslx.org/bwlp/qemu.git/atom/scripts/coccinelle?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/scripts/coccinelle?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-03-21T14:44:44+00:00</updated>
<entry>
<title>scripts/coccinelle: New use-g_new-etc.cocci</title>
<updated>2022-03-21T14:44:44+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2022-03-15T14:41:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=15ba4a9f7ba592f2f1a0eb50b20f0ebd4412ab6e'/>
<id>urn:sha1:15ba4a9f7ba592f2f1a0eb50b20f0ebd4412ab6e</id>
<content type='text'>
This is the semantic patch from commit b45c03f585 "arm: Use g_new() &amp;
friends where that makes obvious sense".

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Reviewed-by: Alex Bennée &lt;alex.bennee@linaro.org&gt;
Message-Id: &lt;20220315144156.1595462-2-armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>softmmu/memory: Pass ram_flags to memory_region_init_ram_shared_nomigrate()</title>
<updated>2021-06-15T18:27:38+00:00</updated>
<author>
<name>David Hildenbrand</name>
</author>
<published>2021-05-10T11:43:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=7f863cba4d8d35adacd513cba634dc0dd08d7904'/>
<id>urn:sha1:7f863cba4d8d35adacd513cba634dc0dd08d7904</id>
<content type='text'>
Let's forward ram_flags instead, renaming
memory_region_init_ram_shared_nomigrate() into
memory_region_init_ram_flags_nomigrate().

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Peter Xu &lt;peterx@redhat.com&gt;
Acked-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt; for memory backend and machine core
Signed-off-by: David Hildenbrand &lt;david@redhat.com&gt;
Message-Id: &lt;20210510114328.21835-6-david@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>scripts/coccinelle: New script to remove unnecessary timer_del() calls</title>
<updated>2021-01-08T15:13:38+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2020-12-15T15:41:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=01b3e68bb18d1a37f013ffac41423faa7c00958f'/>
<id>urn:sha1:01b3e68bb18d1a37f013ffac41423faa7c00958f</id>
<content type='text'>
Now that timer_free() implicitly calls timer_del(), sequences
  timer_del(mytimer);
  timer_free(mytimer);

can be simplified to just
  timer_free(mytimer);

Add a Coccinelle script to do this transformation.

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Message-id: 20201215154107.3255-3-peter.maydell@linaro.org
</content>
</entry>
<entry>
<title>qom: fix objects with improper parent type</title>
<updated>2020-10-12T15:50:22+00:00</updated>
<author>
<name>Paolo Bonzini</name>
</author>
<published>2020-10-07T16:23:56+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=22fb6eb571387172f41878866f4438b6bae21f0e'/>
<id>urn:sha1:22fb6eb571387172f41878866f4438b6bae21f0e</id>
<content type='text'>
Some objects accidentally inherit ObjectClass instead of Object.
They compile silently but may crash after downcasting.

In this patch, we introduce a coccinelle script to find broken
declarations and fix them manually with proper base type.

Signed-off-by: Sergey Nizovtsev &lt;snizovtsev@gmail.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>coccinelle/err-bad-newline: Fix for Python 3, and add patterns</title>
<updated>2020-07-24T10:56:44+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2020-07-22T08:40:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=cb3fa1e4c05a4ad2563b39cdb1146e617f3b5424'/>
<id>urn:sha1:cb3fa1e4c05a4ad2563b39cdb1146e617f3b5424</id>
<content type='text'>
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Message-Id: &lt;20200722084048.1726105-2-armbru@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
</content>
</entry>
<entry>
<title>scripts: Coccinelle script to use ERRP_GUARD()</title>
<updated>2020-07-10T13:18:09+00:00</updated>
<author>
<name>Vladimir Sementsov-Ogievskiy</name>
</author>
<published>2020-07-07T16:50:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8220f3ac74a4698b0734aa882e74c5d9337e3d99'/>
<id>urn:sha1:8220f3ac74a4698b0734aa882e74c5d9337e3d99</id>
<content type='text'>
Script adds ERRP_GUARD() macro invocations where appropriate and
does corresponding changes in code (look for details in
include/qapi/error.h)

Usage example:
spatch --sp-file scripts/coccinelle/errp-guard.cocci \
 --macro-file scripts/cocci-macro-file.h --in-place --no-show-diff \
 --max-width 80 FILES...

Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Reviewed-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Message-Id: &lt;20200707165037.1026246-3-armbru@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
[ERRP_AUTO_PROPAGATE() renamed to ERRP_GUARD(), and
auto-propagated-errp.cocci to errp-guard.cocci]
</content>
</entry>
<entry>
<title>scripts/coccinelle: add error-use-after-free.cocci</title>
<updated>2020-04-04T12:14:09+00:00</updated>
<author>
<name>Vladimir Sementsov-Ogievskiy</name>
</author>
<published>2020-03-24T15:36:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=d1d3a99795006d81f10c98927b0c2ad270bc78fd'/>
<id>urn:sha1:d1d3a99795006d81f10c98927b0c2ad270bc78fd</id>
<content type='text'>
Add script to find and fix trivial use-after-free of Error objects.
How to use:
spatch --sp-file scripts/coccinelle/error-use-after-free.cocci \
 --macro-file scripts/cocci-macro-file.h --in-place \
 --no-show-diff ( FILES... | --use-gitgrep . )

Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Message-Id: &lt;20200324153630.11882-2-vsementsov@virtuozzo.com&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Reviewed-by: Markus Armbruster &lt;armbru@redhat.com&gt;
[Pastos in commit message and comment fixed, globbing in MAINTAINERS
expanded]
Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>cpu: Use DeviceClass reset instead of a special CPUClass reset</title>
<updated>2020-03-17T23:48:10+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2020-03-03T10:05:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=781c67ca5585b38a29076093ecdff4f273db5a35'/>
<id>urn:sha1:781c67ca5585b38a29076093ecdff4f273db5a35</id>
<content type='text'>
The CPUClass has a 'reset' method.  This is a legacy from when
TYPE_CPU used not to inherit from TYPE_DEVICE.  We don't need it any
more, as we can simply use the TYPE_DEVICE reset.  The 'cpu_reset()'
function is kept as the API which most places use to reset a CPU; it
is now a wrapper which calls device_cold_reset() and then the
tracepoint function.

This change should not cause CPU objects to be reset more often
than they are at the moment, because:
 * nobody is directly calling device_cold_reset() or
   qdev_reset_all() on CPU objects
 * no CPU object is on a qbus, so they will not be reset either
   by somebody calling qbus_reset_all()/bus_cold_reset(), or
   by the main "reset sysbus and everything in the qbus tree"
   reset that most devices are reset by

Note that this does not change the need for each machine or whatever
to use qemu_register_reset() to arrange to call cpu_reset() -- that
is necessary because CPU objects are not on any qbus, so they don't
get reset when the qbus tree rooted at the sysbus bus is reset, and
this isn't being changed here.

All the changes to the files under target/ were made using the
included Coccinelle script, except:

(1) the deletion of the now-inaccurate and not terribly useful
"CPUClass::reset" comments was done with a perl one-liner afterwards:
  perl -n -i -e '/ CPUClass::reset/ or print' target/*/*.c

(2) this bit of the s390 change was done by hand, because the
Coccinelle script is not sophisticated enough to handle the
parent_reset call being inside another function:

| @@ -96,8 +96,9 @@ static void s390_cpu_reset(CPUState *s, cpu_reset_type type)
|     S390CPU *cpu = S390_CPU(s);
|     S390CPUClass *scc = S390_CPU_GET_CLASS(cpu);
|     CPUS390XState *env = &amp;cpu-&gt;env;
|+    DeviceState *dev = DEVICE(s);
|
|-    scc-&gt;parent_reset(s);
|+    scc-&gt;parent_reset(dev);
|     cpu-&gt;env.sigp_order = 0;
|     s390_cpu_set_state(S390_CPU_STATE_STOPPED, cpu);

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Message-Id: &lt;20200303100511.5498-1-peter.maydell@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Tested-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Signed-off-by: Eduardo Habkost &lt;ehabkost@redhat.com&gt;
</content>
</entry>
<entry>
<title>scripts/cocci: Patch to let devices own their MemoryRegions</title>
<updated>2020-03-17T14:18:48+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2020-02-21T15:05:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=84969111e656eb594ac123a23aa120ff5e157ee4'/>
<id>urn:sha1:84969111e656eb594ac123a23aa120ff5e157ee4</id>
<content type='text'>
When a device creates a MemoryRegion without setting its ownership,
the MemoryRegion is added to the machine "/unattached" container in
the QOM tree.

Example with the Samsung SMDKC210 board:

  $ arm-softmmu/qemu-system-arm -M smdkc210 -S -monitor stdio
  (qemu) info qom-tree
  /machine (smdkc210-machine)
    /unattached (container)
      /io[0] (qemu:memory-region)
      /exynos4210.dram0[0] (qemu:memory-region)
      /exynos4210.irom[0] (qemu:memory-region)
      /exynos4210.iram[0] (qemu:memory-region)
      /exynos4210.chipid[0] (qemu:memory-region)
      ...
      /device[26] (exynos4210.uart)
        /exynos4210.uart[0] (qemu:memory-region)
    /soc (exynos4210)
      ^
       \__ [*]

The irom/iram/chipid regions should go under 'soc' at [*].

Add a semantic patch to let the device own the memory region.

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
</content>
</entry>
<entry>
<title>scripts/cocci: Patch to remove unnecessary memory_region_set_readonly()</title>
<updated>2020-03-17T14:18:48+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2020-02-24T18:55:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=bb2f4e8d77c4b39ffc04614e0bbd71b3b3c3b340'/>
<id>urn:sha1:bb2f4e8d77c4b39ffc04614e0bbd71b3b3c3b340</id>
<content type='text'>
Add a semantic patch to remove memory_region_set_readonly() calls
on ROM memory regions.

Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
</content>
</entry>
</feed>
