<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/hw/sd, 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/sd?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/hw/sd?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-11-21T11:45:12+00:00</updated>
<entry>
<title>hw/sd: Fix sun4i allwinner-sdhost for U-Boot</title>
<updated>2022-11-21T11:45:12+00:00</updated>
<author>
<name>Strahinja Jankovic</name>
</author>
<published>2022-11-21T11:45:12+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=93e2da36ed944d05e78905e95983a44624ed064c'/>
<id>urn:sha1:93e2da36ed944d05e78905e95983a44624ed064c</id>
<content type='text'>
Trying to run U-Boot for Cubieboard (Allwinner A10) fails because it cannot
access SD card. The problem is that FIFO register in current
allwinner-sdhost implementation is at the address corresponding to
Allwinner H3, but not A10.
Linux kernel is not affected since Linux driver uses DMA access and does
not use FIFO register for reading/writing.

This patch adds new class parameter `is_sun4i` and based on that
parameter uses register at offset 0x100 either as FIFO register (if
sun4i) or as threshold register (if not sun4i; in this case register at
0x200 is FIFO register).

Tested with U-Boot and Linux kernel image built for Cubieboard and
OrangePi PC.

Signed-off-by: Strahinja Jankovic &lt;strahinja.p.jankovic@gmail.com&gt;
Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Message-id: 20221112214900.24152-1-strahinja.p.jankovic@gmail.com
Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
</content>
</entry>
<entry>
<title>hw/sd/sdhci: Rename ESDHC_* defines to USDHC_*</title>
<updated>2022-10-28T16:26:20+00:00</updated>
<author>
<name>Bernhard Beschow</name>
</author>
<published>2022-10-18T21:01:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=1e76667f7adf48c6c3596aaa26b8886b57b8498d'/>
<id>urn:sha1:1e76667f7adf48c6c3596aaa26b8886b57b8498d</id>
<content type='text'>
The device model's functions start with "usdhc_", so rename the defines
accordingly for consistency.

Signed-off-by: Bernhard Beschow &lt;shentey@gmail.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Message-Id: &lt;20221018210146.193159-5-shentey@gmail.com&gt;
Signed-off-by: Daniel Henrique Barboza &lt;danielhb413@gmail.com&gt;
</content>
</entry>
<entry>
<title>hw/sd/sdhci-internal: Unexport ESDHC defines</title>
<updated>2022-10-28T16:26:20+00:00</updated>
<author>
<name>Bernhard Beschow</name>
</author>
<published>2022-10-18T21:01:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=c038e5745eca4851bb2ba515324f3e97c68f27ce'/>
<id>urn:sha1:c038e5745eca4851bb2ba515324f3e97c68f27ce</id>
<content type='text'>
These defines aren't used outside of sdhci.c, so can be defined there.

Signed-off-by: Bernhard Beschow &lt;shentey@gmail.com&gt;
Reviewed-by: Bin Meng &lt;bmeng.cn@gmail.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Message-Id: &lt;20221018210146.193159-4-shentey@gmail.com&gt;
Signed-off-by: Daniel Henrique Barboza &lt;danielhb413@gmail.com&gt;
</content>
</entry>
<entry>
<title>block: Change blk_{pread,pwrite}() param order</title>
<updated>2022-07-12T10:14:56+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-07-05T16:15:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=a9262f551eba44d4d0f9e396d7124c059a93e204'/>
<id>urn:sha1:a9262f551eba44d4d0f9e396d7124c059a93e204</id>
<content type='text'>
Swap 'buf' and 'bytes' around for consistency with
blk_co_{pread,pwrite}(), and in preparation to implement these functions
using generated_co_wrapper.

Callers were updated using this Coccinelle script:

    @@ expression blk, offset, buf, bytes, flags; @@
    - blk_pread(blk, offset, buf, bytes, flags)
    + blk_pread(blk, offset, bytes, buf, flags)

    @@ expression blk, offset, buf, bytes, flags; @@
    - blk_pwrite(blk, offset, buf, bytes, flags)
    + blk_pwrite(blk, offset, bytes, buf, flags)

It had no effect on hw/block/nand.c, presumably due to the #if, so that
file was updated manually.

Overly-long lines were then fixed by hand.

Signed-off-by: Alberto Faria &lt;afaria@redhat.com&gt;
Reviewed-by: Eric Blake &lt;eblake@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20220705161527.1054072-4-afaria@redhat.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: Add a 'flags' param to blk_pread()</title>
<updated>2022-07-12T10:14:56+00:00</updated>
<author>
<name>Alberto Faria</name>
</author>
<published>2022-07-05T16:15:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=3b35d4542c8537a9269f6372df531ced6c960084'/>
<id>urn:sha1:3b35d4542c8537a9269f6372df531ced6c960084</id>
<content type='text'>
For consistency with other I/O functions, and in preparation to
implement it using generated_co_wrapper.

Callers were updated using this Coccinelle script:

    @@ expression blk, offset, buf, bytes; @@
    - blk_pread(blk, offset, buf, bytes)
    + blk_pread(blk, offset, buf, bytes, 0)

It had no effect on hw/block/nand.c, presumably due to the #if, so that
file was updated manually.

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: Greg Kurz &lt;groug@kaod.org&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20220705161527.1054072-3-afaria@redhat.com&gt;
Signed-off-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/sd/allwinner-sdhost: report FIFO water level as 1 when data ready</title>
<updated>2022-05-30T11:34:46+00:00</updated>
<author>
<name>Icenowy Zheng</name>
</author>
<published>2022-05-20T12:42:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=fd71f258bc0d245b2223bf3032c0ebc82f8a3463'/>
<id>urn:sha1:fd71f258bc0d245b2223bf3032c0ebc82f8a3463</id>
<content type='text'>
U-Boot queries the FIFO water level to reduce checking status register
when doing PIO SD card operation.

Report a FIFO water level of 1 when data is ready, to prevent the code
from trying to read 0 words from the FIFO each time.

Signed-off-by: Icenowy Zheng &lt;uwu@icenowy.me&gt;
Message-id: 20220520124200.2112699-1-uwu@icenowy.me
Reviewed-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
</content>
</entry>
<entry>
<title>Remove qemu-common.h include from most units</title>
<updated>2022-04-06T12:31:55+00:00</updated>
<author>
<name>Marc-André Lureau</name>
</author>
<published>2022-03-23T15:57:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=0f9668e0c197ab6de95f61a906703a1d127c11f8'/>
<id>urn:sha1:0f9668e0c197ab6de95f61a906703a1d127c11f8</id>
<content type='text'>
Signed-off-by: Marc-André Lureau &lt;marcandre.lureau@redhat.com&gt;
Message-Id: &lt;20220323155743.1585078-33-marcandre.lureau@redhat.com&gt;
Signed-off-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/sd/sdhci: Prohibit DMA accesses to devices</title>
<updated>2022-03-21T09:25:21+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-12-15T20:56:55+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=799f7f0104a3f2e0fea06ee7b31a1c293cd7c948'/>
<id>urn:sha1:799f7f0104a3f2e0fea06ee7b31a1c293cd7c948</id>
<content type='text'>
The issue reported by OSS-Fuzz produces the following backtrace:

  ==447470==ERROR: AddressSanitizer: heap-buffer-overflow
  READ of size 1 at 0x61500002a080 thread T0
      #0 0x71766d47 in sdhci_read_dataport hw/sd/sdhci.c:474:18
      #1 0x7175f139 in sdhci_read hw/sd/sdhci.c:1022:19
      #2 0x721b937b in memory_region_read_accessor softmmu/memory.c:440:11
      #3 0x72171e51 in access_with_adjusted_size softmmu/memory.c:554:18
      #4 0x7216f47c in memory_region_dispatch_read1 softmmu/memory.c:1424:16
      #5 0x7216ebb9 in memory_region_dispatch_read softmmu/memory.c:1452:9
      #6 0x7212db5d in flatview_read_continue softmmu/physmem.c:2879:23
      #7 0x7212f958 in flatview_read softmmu/physmem.c:2921:12
      #8 0x7212f418 in address_space_read_full softmmu/physmem.c:2934:18
      #9 0x721305a9 in address_space_rw softmmu/physmem.c:2962:16
      #10 0x7175a392 in dma_memory_rw_relaxed include/sysemu/dma.h:89:12
      #11 0x7175a0ea in dma_memory_rw include/sysemu/dma.h:132:12
      #12 0x71759684 in dma_memory_read include/sysemu/dma.h:152:12
      #13 0x7175518c in sdhci_do_adma hw/sd/sdhci.c:823:27
      #14 0x7174bf69 in sdhci_data_transfer hw/sd/sdhci.c:935:13
      #15 0x7176aaa7 in sdhci_send_command hw/sd/sdhci.c:376:9
      #16 0x717629ee in sdhci_write hw/sd/sdhci.c:1212:9
      #17 0x72172513 in memory_region_write_accessor softmmu/memory.c:492:5
      #18 0x72171e51 in access_with_adjusted_size softmmu/memory.c:554:18
      #19 0x72170766 in memory_region_dispatch_write softmmu/memory.c:1504:16
      #20 0x721419ee in flatview_write_continue softmmu/physmem.c:2812:23
      #21 0x721301eb in flatview_write softmmu/physmem.c:2854:12
      #22 0x7212fca8 in address_space_write softmmu/physmem.c:2950:18
      #23 0x721d9a53 in qtest_process_command softmmu/qtest.c:727:9

A DMA descriptor is previously filled in RAM. An I/O access to the
device (frames #22 to #16) start the DMA engine (frame #13). The
engine fetch the descriptor and execute the request, which itself
accesses the SDHCI I/O registers (frame #1 and #0), triggering a
re-entrancy issue.

Fix by prohibit transactions from the DMA to devices. The DMA engine
is thus restricted to memories.

Reported-by: OSS-Fuzz (Issue 36391)
Signed-off-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/451
Message-Id: &lt;20211215205656.488940-3-philmd@redhat.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/sd/sdhci: Honor failed DMA transactions</title>
<updated>2022-03-21T09:25:21+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-12-15T20:56:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=78e619cbd5d5a30f0a849c183391b8f87f8099e6'/>
<id>urn:sha1:78e619cbd5d5a30f0a849c183391b8f87f8099e6</id>
<content type='text'>
DMA transactions might fail. The DMA API returns a MemTxResult,
indicating such failures. Do not ignore it. On failure, raise
the ADMA error flag and eventually triggering an IRQ (see spec
chapter 1.13.5: "ADMA2 States").

Signed-off-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Message-Id: &lt;20211215205656.488940-2-philmd@redhat.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>Mark remaining global TypeInfo instances as const</title>
<updated>2022-02-21T13:30:20+00:00</updated>
<author>
<name>Bernhard Beschow</name>
</author>
<published>2022-01-17T14:58:04+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=5e78c98b7cc98619d2740c7c5030aa56fb22e79f'/>
<id>urn:sha1:5e78c98b7cc98619d2740c7c5030aa56fb22e79f</id>
<content type='text'>
More than 1k of TypeInfo instances are already marked as const. Mark the
remaining ones, too.

This commit was created with:
  git grep -z -l 'static TypeInfo' -- '*.c' | \
  xargs -0 sed -i 's/static TypeInfo/static const TypeInfo/'

Signed-off-by: Bernhard Beschow &lt;shentey@gmail.com&gt;
Reviewed-by: Alistair Francis &lt;alistair.francis@wdc.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Cédric Le Goater &lt;clg@kaod.org&gt;
Reviewed-by: Igor Mammedov &lt;imammedo@redhat.com&gt;
Acked-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Message-id: 20220117145805.173070-2-shentey@gmail.com
Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
</content>
</entry>
</feed>
