<feed xmlns='http://www.w3.org/2005/Atom'>
<title>bwlp/qemu.git/hw/block/fdc.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/block/fdc.c?h=spice_video_codecs</id>
<link rel='self' href='https://git.openslx.org/bwlp/qemu.git/atom/hw/block/fdc.c?h=spice_video_codecs'/>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/'/>
<updated>2022-07-12T10:14:56+00:00</updated>
<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/block/fdc: Prevent end-of-track overrun (CVE-2021-3507)</title>
<updated>2022-05-12T10:31:08+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-11-18T11:57:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=defac5e2fbddf8423a354ff0454283a2115e1367'/>
<id>urn:sha1:defac5e2fbddf8423a354ff0454283a2115e1367</id>
<content type='text'>
Per the 82078 datasheet, if the end-of-track (EOT byte in
the FIFO) is more than the number of sectors per side, the
command is terminated unsuccessfully:

* 5.2.5 DATA TRANSFER TERMINATION

  The 82078 supports terminal count explicitly through
  the TC pin and implicitly through the underrun/over-
  run and end-of-track (EOT) functions. For full sector
  transfers, the EOT parameter can define the last
  sector to be transferred in a single or multisector
  transfer. If the last sector to be transferred is a par-
  tial sector, the host can stop transferring the data in
  mid-sector, and the 82078 will continue to complete
  the sector as if a hardware TC was received. The
  only difference between these implicit functions and
  TC is that they return "abnormal termination" result
  status. Such status indications can be ignored if they
  were expected.

* 6.1.3 READ TRACK

  This command terminates when the EOT specified
  number of sectors have been read. If the 82078
  does not find an I D Address Mark on the diskette
  after the second· occurrence of a pulse on the
  INDX# pin, then it sets the IC code in Status Regis-
  ter 0 to "01" (Abnormal termination), sets the MA bit
  in Status Register 1 to "1", and terminates the com-
  mand.

* 6.1.6 VERIFY

  Refer to Table 6-6 and Table 6-7 for information
  concerning the values of MT and EC versus SC and
  EOT value.

* Table 6·6. Result Phase Table

* Table 6-7. Verify Command Result Phase Table

Fix by aborting the transfer when EOT &gt; # Sectors Per Side.

Cc: qemu-stable@nongnu.org
Cc: Hervé Poussineau &lt;hpoussin@reactos.org&gt;
Fixes: baca51faff0 ("floppy driver: disk geometry auto detect")
Reported-by: Alexander Bulekov &lt;alxndr@bu.edu&gt;
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/339
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-Id: &lt;20211118115733.4038610-2-philmd@redhat.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@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>hw/block/fdc: Kludge missing floppy drive to fix CVE-2021-20196</title>
<updated>2021-12-02T06:09:38+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-11-24T16:15:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=1ab95af033a419e7a64e2d58e67dd96b20af5233'/>
<id>urn:sha1:1ab95af033a419e7a64e2d58e67dd96b20af5233</id>
<content type='text'>
Guest might select another drive on the bus by setting the
DRIVE_SEL bit of the DIGITAL OUTPUT REGISTER (DOR).
The current controller model doesn't expect a BlockBackend
to be NULL. A simple way to fix CVE-2021-20196 is to create
an empty BlockBackend when it is missing. All further
accesses will be safely handled, and the controller state
machines keep behaving correctly.

Cc: qemu-stable@nongnu.org
Fixes: CVE-2021-20196
Reported-by: Gaoning Pan (Ant Security Light-Year Lab) &lt;pgn@zju.edu.cn&gt;
Reviewed-by: Darren Kenny &lt;darren.kenny@oracle.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20211124161536.631563-3-philmd@redhat.com
BugLink: https://bugs.launchpad.net/qemu/+bug/1912780
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/338
Reviewed-by: Darren Kenny &lt;darren.kenny@oracle.com&gt;
Reviewed-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/block/fdc: Extract blk_create_empty_drive()</title>
<updated>2021-12-02T06:09:38+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-11-24T16:15:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=b154791e7b6d4ca5cdcd54443484d97360bd7ad2'/>
<id>urn:sha1:b154791e7b6d4ca5cdcd54443484d97360bd7ad2</id>
<content type='text'>
We are going to re-use this code in the next commit,
so extract it as a new blk_create_empty_drive() function.

Inspired-by: Hanna Reitz &lt;hreitz@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20211124161536.631563-2-philmd@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<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>hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c</title>
<updated>2021-06-25T12:53:28+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-06-14T19:32:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=1430759ec3e4cb92da224d739c914a0e8d78d786'/>
<id>urn:sha1:1430759ec3e4cb92da224d739c914a0e8d78d786</id>
<content type='text'>
Some machines use floppy controllers via the SysBus interface,
and don't need to pull in all the SysBus code.
Extract the SysBus specific code to a new unit: fdc-sysbus.c,
and add a new Kconfig symbol: "FDC_SYSBUS".

Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Acked-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Reviewed-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20210614193220.2007159-6-philmd@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/block/fdc: Extract ISA floppy controllers to fdc-isa.c</title>
<updated>2021-06-25T12:53:28+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-06-14T19:32:18+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=72ea60e4114272f3030455c214e86bcf1c8a1a9e'/>
<id>urn:sha1:72ea60e4114272f3030455c214e86bcf1c8a1a9e</id>
<content type='text'>
Some machines use floppy controllers via the SysBus interface,
and don't need to pull in all the ISA code.
Extract the ISA specific code to a new unit: fdc-isa.c, and
add a new Kconfig symbol: "FDC_ISA".
This allows us to remove the FIXME from commit dd0ff8191ab
("isa: express SuperIO dependencies with Kconfig").

Reviewed-by: John Snow &lt;jsnow@redhat.com&gt;
Acked-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Reviewed-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20210614193220.2007159-5-philmd@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/block/fdc: Declare shared prototypes in fdc-internal.h</title>
<updated>2021-06-25T12:53:28+00:00</updated>
<author>
<name>Philippe Mathieu-Daudé</name>
</author>
<published>2021-06-14T19:32:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.openslx.org/bwlp/qemu.git/commit/?id=5a5d2f3d260a5c3a2f00675c90744c0903fed116'/>
<id>urn:sha1:5a5d2f3d260a5c3a2f00675c90744c0903fed116</id>
<content type='text'>
We want to extract ISA/SysBus code from the generic fdc.c file.
First, declare the prototypes we will access from the new units
into a new local header: "fdc-internal.h".

Acked-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Reviewed-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Acked-by: Paolo Bonzini &lt;pbonzini@redhat.com&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;philmd@redhat.com&gt;
Message-id: 20210614193220.2007159-4-philmd@redhat.com
Signed-off-by: John Snow &lt;jsnow@redhat.com&gt;
</content>
</entry>
</feed>
