<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/block/qcow2-cache.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/block/qcow2-cache.c?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/block/qcow2-cache.c?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-07-12T10:14:55+00:00</updated>
<entry>
<title>block: Change bdrv_{pread,pwrite,pwrite_sync}() param order</title>
<updated>2022-07-12T10:14:55+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-06-09T15:27:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=32cc71def9e3885f9527af713e6d8dc7521ddc08'/>
<id>urn:sha1:32cc71def9e3885f9527af713e6d8dc7521ddc08</id>
<content type='text'>
Swap 'buf' and 'bytes' around for consistency with
bdrv_co_{pread,pwrite}(), and in preparation to implement these
functions using generated_co_wrapper.

Callers were updated using this Coccinelle script:

    @@ expression child, offset, buf, bytes, flags; @@
    - bdrv_pread(child, offset, buf, bytes, flags)
    + bdrv_pread(child, offset, bytes, buf, flags)

    @@ expression child, offset, buf, bytes, flags; @@
    - bdrv_pwrite(child, offset, buf, bytes, flags)
    + bdrv_pwrite(child, offset, bytes, buf, flags)

    @@ expression child, offset, buf, bytes, flags; @@
    - bdrv_pwrite_sync(child, offset, buf, bytes, flags)
    + bdrv_pwrite_sync(child, offset, bytes, buf, flags)

Resulting overly-long lines were then fixed by hand.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
Message-Id: &lt;20220609152744.3891847-3-afaria@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: Add a 'flags' param to bdrv_{pread,pwrite,pwrite_sync}()</title>
<updated>2022-07-12T10:14:55+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-06-09T15:27:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=53fb7844f03241a0e6de2c342c9e1b89df12da4d'/>
<id>urn:sha1:53fb7844f03241a0e6de2c342c9e1b89df12da4d</id>
<content type='text'>
For consistency with other I/O functions, and in preparation to
implement them using generated_co_wrapper.

Callers were updated using this Coccinelle script:

    @@ expression child, offset, buf, bytes; @@
    - bdrv_pread(child, offset, buf, bytes)
    + bdrv_pread(child, offset, buf, bytes, 0)

    @@ expression child, offset, buf, bytes; @@
    - bdrv_pwrite(child, offset, buf, bytes)
    + bdrv_pwrite(child, offset, buf, bytes, 0)

    @@ expression child, offset, buf, bytes; @@
    - bdrv_pwrite_sync(child, offset, buf, bytes)
    + bdrv_pwrite_sync(child, offset, buf, bytes, 0)

Resulting overly-long lines were then fixed by hand.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Reviewed-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Reviewed-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
Message-Id: &lt;20220609152744.3891847-2-afaria@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>Replace qemu_real_host_page variables with inlined functions</title>
<updated>2022-04-06T08:50:38+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2022-03-23T15:57:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=8e3b0cbb7212a1e5707ed2d4c26b4e3d2483768d'/>
<id>urn:sha1:8e3b0cbb7212a1e5707ed2d4c26b4e3d2483768d</id>
<content type='text'>
Replace the global variables with inlined helper functions. getpagesize() is very
likely annotated with a "const" function attribute (at least with glibc), and thus
optimization should apply even better.

This avoids the need for a constructor initialization too.

Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20220323155743.1585078-12-marcandre.lureau@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>osdep: Move memalign-related functions to their own header</title>
<updated>2022-03-07T13:16:49+00:00</updated>
<author>
<name>Peter Maydell</name>
</author>
<published>2022-02-26T18:07:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=5df022cf2e5e24910a7d579d5780ae78bc24f247'/>
<id>urn:sha1:5df022cf2e5e24910a7d579d5780ae78bc24f247</id>
<content type='text'>
Move the various memalign-related functions out of osdep.h and into
their own header, which we include only where they are used.
While we're doing this, add some brief documentation comments.

Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Reviewed-by: Richard Henderson &lt;richard.henderson@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Message-id: 20220226180723.1706285-10-peter.maydell@linaro.org
</content>
</entry>
<entry>
<title>core: replace getpagesize() with qemu_real_host_page_size</title>
<updated>2019-10-26T13:38:06+00:00</updated>
<author>
<name>Wei Yang</name>
</author>
<published>2019-10-13T02:11:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=038adc2f5850e32019bda06c559d0301be436eae'/>
<id>urn:sha1:038adc2f5850e32019bda06c559d0301be436eae</id>
<content type='text'>
There are three page size in qemu:

  real host page size
  host page size
  target page size

All of them have dedicate variable to represent. For the last two, we
use the same form in the whole qemu project, while for the first one we
use two forms: qemu_real_host_page_size and getpagesize().

qemu_real_host_page_size is defined to be a replacement of
getpagesize(), so let it serve the role.

[Note] Not fully tested for some arch or device.

Signed-off-by: Wei Yang &lt;richardw.yang@linux.intel.com&gt;
Message-Id: &lt;20191013021145.16011-3-richardw.yang@linux.intel.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>Include qemu-common.h exactly where needed</title>
<updated>2019-06-12T11:20:20+00:00</updated>
<author>
<name>Markus Armbruster</name>
</author>
<published>2019-05-23T14:35:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a8d2532645cf5ce4f75981f81dfe363efc35d05c'/>
<id>urn:sha1:a8d2532645cf5ce4f75981f81dfe363efc35d05c</id>
<content type='text'>
No header includes qemu-common.h after this commit, as prescribed by
qemu-common.h's file comment.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Message-Id: &lt;20190523143508.25387-5-armbru@redhat.com&gt;
[Rebased with conflicts resolved automatically, except for
include/hw/arm/xlnx-zynqmp.h hw/arm/nrf51_soc.c hw/arm/msf2-soc.c
block/qcow2-refcount.c block/qcow2-cluster.c block/qcow2-cache.c
target/arm/cpu.h target/lm32/cpu.h target/m68k/cpu.h target/mips/cpu.h
target/moxie/cpu.h target/nios2/cpu.h target/openrisc/cpu.h
target/riscv/cpu.h target/tilegx/cpu.h target/tricore/cpu.h
target/unicore32/cpu.h target/xtensa/cpu.h; bsd-user/main.c and
net/tap-bsd.c fixed up]
</content>
</entry>
<entry>
<title>qcow2.h: add missing include</title>
<updated>2019-05-28T18:30:55+00:00</updated>
<author>
<name>Vladimir Sementsov-Ogievskiy</name>
</author>
<published>2019-05-06T14:27:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=9353db47c5e2f849bc1130e5ed6b40ce97798289'/>
<id>urn:sha1:9353db47c5e2f849bc1130e5ed6b40ce97798289</id>
<content type='text'>
qcow2.h depends on block_int.h. Compilation isn't broken currently only
due to block_int.h always included before qcow2.h. Though, it seems
better to directly include block_int.h in qcow2.h.

Signed-off-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@virtuozzo.com&gt;
Reviewed-by: Alberto Garcia &lt;berto@igalia.com&gt;
Reviewed-by: Max Reitz &lt;mreitz@redhat.com&gt;
Message-id: 20190506142741.41731-2-vsementsov@virtuozzo.com
Signed-off-by: Max Reitz &lt;mreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>qcow2: External file I/O</title>
<updated>2019-03-08T11:26:46+00:00</updated>
<author>
<name>Kevin Wolf</name>
</author>
<published>2019-01-15T19:39:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=966b000f49c3f44d2853d691f6bbc2a4e1f2d0b0'/>
<id>urn:sha1:966b000f49c3f44d2853d691f6bbc2a4e1f2d0b0</id>
<content type='text'>
This changes the qcow2 implementation to direct all guest data I/O to
s-&gt;data_file rather than bs-&gt;file, while metadata I/O still uses
bs-&gt;file. At the moment, this is still always the same, but soon we'll
add options to set s-&gt;data_file to an external data file.

Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>qcow2: Allow configuring the L2 slice size</title>
<updated>2018-02-13T16:00:00+00:00</updated>
<author>
<name>Alberto Garcia</name>
</author>
<published>2018-02-05T14:33:36+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=1221fe6f636754ab5f2c1c87caa77633e9123622'/>
<id>urn:sha1:1221fe6f636754ab5f2c1c87caa77633e9123622</id>
<content type='text'>
Now that the code is ready to handle L2 slices we can finally add an
option to allow configuring their size.

An L2 slice is the portion of an L2 table that is read by the qcow2
cache. Until now the cache was always reading full L2 tables, and
since the L2 table size is equal to the cluster size this was not very
efficient with large clusters. Here's a more detailed explanation of
why it makes sense to have smaller cache entries in order to load L2
data:

   https://lists.gnu.org/archive/html/qemu-block/2017-09/msg00635.html

This patch introduces a new command-line option to the qcow2 driver
named l2-cache-entry-size (cf. l2-cache-size). The cache entry size
has the same restrictions as the cluster size: it must be a power of
two and it has the same range of allowed values, with the additional
requirement that it must not be larger than the cluster size.

The L2 cache entry size (L2 slice size) remains equal to the cluster
size for now by default, so this feature must be explicitly enabled.
Although my tests show that 4KB slices consistently improve
performance and give the best results, let's wait and make more tests
with different cluster sizes before deciding on an optimal default.

Now that the cache entry size is not necessarily equal to the cluster
size we need to reflect that in the MIN_L2_CACHE_SIZE documentation.
That minimum value is a requirement of the COW algorithm: we need to
read two L2 slices (and not two L2 tables) in order to do COW, see
l2_allocate() for the actual code.

Signed-off-by: Alberto Garcia &lt;berto@igalia.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Max Reitz &lt;mreitz@redhat.com&gt;
Message-id: c73e5611ff4a9ec5d20de68a6c289553a13d2354.1517840877.git.berto@igalia.com
Signed-off-by: Max Reitz &lt;mreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>qcow2: Remove BDS parameter from qcow2_cache_is_table_offset()</title>
<updated>2018-02-13T15:59:59+00:00</updated>
<author>
<name>Alberto Garcia</name>
</author>
<published>2018-02-05T14:33:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=6e6fa7605e8a7c08d873dba9e1688f93aac20fc5'/>
<id>urn:sha1:6e6fa7605e8a7c08d873dba9e1688f93aac20fc5</id>
<content type='text'>
This function was only using the BlockDriverState parameter to pass it
to qcow2_cache_get_table_addr(). This is no longer necessary so this
parameter can be removed.

Signed-off-by: Alberto Garcia &lt;berto@igalia.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Max Reitz &lt;mreitz@redhat.com&gt;
Message-id: eb0ed90affcf302e5a954bafb5931b5215483d3a.1517840877.git.berto@igalia.com
Signed-off-by: Max Reitz &lt;mreitz@redhat.com&gt;
</content>
</entry>
</feed>
