<feed xmlns='http://www.w3.org/2005/Atom'>
<title>qemu/include/hw/block, branch master</title>
<subtitle>QEMU development tree</subtitle>
<id>https://git.zx2c4.com/qemu/atom/include/hw/block?h=master</id>
<link rel='self' href='https://git.zx2c4.com/qemu/atom/include/hw/block?h=master'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/'/>
<updated>2024-03-19T10:58:15Z</updated>
<entry>
<title>aspeed/smc: Only wire flash devices at reset</title>
<updated>2024-03-19T10:58:15Z</updated>
<author>
<name>Cédric Le Goater</name>
<email>clg@redhat.com</email>
</author>
<published>2024-03-19T07:33:20Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=a7538ca0791880b6aeb2cc4cc8c00305e2d975f8'/>
<id>urn:sha1:a7538ca0791880b6aeb2cc4cc8c00305e2d975f8</id>
<content type='text'>
The Aspeed machines have many Static Memory Controllers (SMC), up to
8, which can only drive flash memory devices. Commit 27a2c66c92ec
("aspeed/smc: Wire CS lines at reset") tried to ease the definitions
of these devices by allowing flash devices from the command line to be
attached to a SSI bus. For that, the wiring of the CS lines of the
Aspeed SMC controller was moved at reset. Two assumptions are made
though, first that the device has a SSI_GPIO_CS GPIO line, which is
not always the case, and second that it is a flash device.

Correct this problem by ensuring that the devices attached to the bus
are of the correct flash type. This fixes a QEMU abort when devices
without a CS line, such as the max111x, are passed on the command
line.

While at it, export TYPE_M25P80 used in the Xilinx Versal Virtual
machine.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/2228
Fixes: 27a2c66c92ec ("aspeed/smc: Wire CS lines at reset")
Reported-by: Thomas Huth &lt;thuth@redhat.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Tested-by: Thomas Huth &lt;thuth@redhat.com&gt;
[ clg: minor fixes in the commit log ]
Signed-off-by: Cédric Le Goater &lt;clg@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/block/fdc-isa: Implement relocation and enabling/disabling for TYPE_ISA_FDC</title>
<updated>2024-02-14T11:09:32Z</updated>
<author>
<name>Bernhard Beschow</name>
<email>shentey@gmail.com</email>
</author>
<published>2024-01-14T12:39:07Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=8c4d239139e93268884f9d385a0966ef40db422f'/>
<id>urn:sha1:8c4d239139e93268884f9d385a0966ef40db422f</id>
<content type='text'>
The real SuperI/O chips emulated by QEMU allow for relocating and enabling or
disabling their SuperI/O functions via software. So far this is not implemented.
Prepare for that by adding isa_fdc_set_{enabled,iobase}.

Signed-off-by: Bernhard Beschow &lt;shentey@gmail.com&gt;
Message-Id: &lt;20240114123911.4877-8-shentey@gmail.com&gt;
Reviewed-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
Signed-off-by: Michael S. Tsirkin &lt;mst@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/block/block.c: improve confusing blk_check_size_and_read_all() error</title>
<updated>2024-01-30T21:19:00Z</updated>
<author>
<name>Manos Pitsidianakis</name>
<email>manos.pitsidianakis@linaro.org</email>
</author>
<published>2024-01-30T07:30:32Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=954b33daee83fe79293fd81c2f7371db48e7d6bd'/>
<id>urn:sha1:954b33daee83fe79293fd81c2f7371db48e7d6bd</id>
<content type='text'>
In cases where a device tries to read more bytes than the block device
contains, the error is vague: "device requires X bytes, block backend
provides Y bytes".

This patch changes the errors of this function to include the block
backend name, the device id and device type name where appropriate.

Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Signed-off-by: Manos Pitsidianakis &lt;manos.pitsidianakis@linaro.org&gt;
Message-id: 7260eadff22c08457740117c1bb7bd2b4353acb9.1706598705.git.manos.pitsidianakis@linaro.org
Signed-off-by: Stefan Hajnoczi &lt;stefanha@redhat.com&gt;
</content>
</entry>
<entry>
<title>swim: update IWM/ISM register block decoding</title>
<updated>2023-10-06T08:33:43Z</updated>
<author>
<name>Mark Cave-Ayland</name>
<email>mark.cave-ayland@ilande.co.uk</email>
</author>
<published>2023-10-04T08:37:59Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=994af0b2e020a91729a39f8c4af4a522ccd3a556'/>
<id>urn:sha1:994af0b2e020a91729a39f8c4af4a522ccd3a556</id>
<content type='text'>
Update the IWM/ISM register block decoding to match the description given in the
"SWIM Chip Users Reference". This allows us to validate the device response to
the guest OS which currently only does just enough to indicate that the floppy
drive is unavailable.

Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Reviewed-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
Message-ID: &lt;20231004083806.757242-14-mark.cave-ayland@ilande.co.uk&gt;
Signed-off-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
</content>
</entry>
<entry>
<title>swim: split into separate IWM and ISM register blocks</title>
<updated>2023-10-06T08:33:43Z</updated>
<author>
<name>Mark Cave-Ayland</name>
<email>mark.cave-ayland@ilande.co.uk</email>
</author>
<published>2023-10-04T08:37:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=57004204172b59de40bb8617a9082d882c60a2fd'/>
<id>urn:sha1:57004204172b59de40bb8617a9082d882c60a2fd</id>
<content type='text'>
The swim chip provides an implementation of both Apple's IWM and ISM floppy disk
controllers. Split the existing implementation into separate register banks for
each controller, whilst also switching the IWM registers from 16-bit to 8-bit
as implemented in real hardware.

Signed-off-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Reviewed-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
Message-ID: &lt;20231004083806.757242-13-mark.cave-ayland@ilande.co.uk&gt;
Signed-off-by: Laurent Vivier &lt;laurent@vivier.eu&gt;
</content>
</entry>
<entry>
<title>m25p80: Introduce an helper to retrieve the BlockBackend of a device</title>
<updated>2023-09-01T09:40:04Z</updated>
<author>
<name>Cédric Le Goater</name>
<email>clg@kaod.org</email>
</author>
<published>2023-06-07T04:39:40Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=9ab26b0eb14c818cf9d32e0881e99009df647076'/>
<id>urn:sha1:9ab26b0eb14c818cf9d32e0881e99009df647076</id>
<content type='text'>
It will help in getting rid of some drive_get(IF_MTD) calls by
retrieving the BlockBackend directly from the m25p80 device.

Cc: Alistair Francis &lt;alistair@alistair23.me&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Reviewed-by: Joel Stanley &lt;joel@jms.id.au&gt;
Signed-off-by: Cédric Le Goater &lt;clg@kaod.org&gt;
</content>
</entry>
<entry>
<title>hw/block: replace TABs with space</title>
<updated>2023-03-24T10:45:46Z</updated>
<author>
<name>Yeqi Fu</name>
<email>fufuyqqqqqq@gmail.com</email>
</author>
<published>2023-03-14T09:50:01Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=d091b5b442ea0b28bea2d108dad5dfe1ee2ac7cc'/>
<id>urn:sha1:d091b5b442ea0b28bea2d108dad5dfe1ee2ac7cc</id>
<content type='text'>
Bring the block files in line with the QEMU coding style, with spaces
for indentation. This patch partially resolves the issue 371.

Resolves: https://gitlab.com/qemu-project/qemu/-/issues/371
Signed-off-by: Yeqi Fu &lt;fufuyqqqqqq@gmail.com&gt;
Message-Id: &lt;20230314095001.13801-1-fufuyqqqqqq@gmail.com&gt;
Reviewed-by: Thomas Huth &lt;thuth@redhat.com&gt;
Signed-off-by: Thomas Huth &lt;thuth@redhat.com&gt;
</content>
</entry>
<entry>
<title>include/hw/block: Include hw/block/block.h where needed</title>
<updated>2023-01-20T06:25:06Z</updated>
<author>
<name>Markus Armbruster</name>
<email>armbru@redhat.com</email>
</author>
<published>2022-12-21T13:35:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=82651e8792344ccc526f505fdf1c8c56f0d18881'/>
<id>urn:sha1:82651e8792344ccc526f505fdf1c8c56f0d18881</id>
<content type='text'>
hw/block/swim.h needs BlockConf.

Signed-off-by: Markus Armbruster &lt;armbru@redhat.com&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;philmd@linaro.org&gt;
Message-Id: &lt;20221221133551.3967339-4-armbru@redhat.com&gt;
</content>
</entry>
<entry>
<title>block: add missed block_acct_setup with new block device init procedure</title>
<updated>2022-09-30T16:42:34Z</updated>
<author>
<name>Denis V. Lunev</name>
<email>den@openvz.org</email>
</author>
<published>2022-08-24T09:50:44Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=62a6c300f18a9f6994baf6d767985425d48de427'/>
<id>urn:sha1:62a6c300f18a9f6994baf6d767985425d48de427</id>
<content type='text'>
Commit 5f76a7aac156ca75680dad5df4a385fd0b58f6b1 is looking harmless from
the first glance, but it has changed things a lot. 'libvirt' uses it to
detect that it should follow new initialization way and this changes
things considerably. With this procedure followed, blockdev_init() is
not called anymore and thus block_acct_setup() helper is not called.

This means in particular that defaults for block accounting statistics
are changed and account_invalid/account_failed are actually initialized
as false instead of true originally.

This commit changes things to match original world. There are the following
constraints:
* new default value in block_acct_init() is set to true
* block_acct_setup() inside blockdev_init() is called before
  blkconf_apply_backend_options()
* thus newly created option in block device properties has precedence if
  specified

Signed-off-by: Denis V. Lunev &lt;den@openvz.org&gt;
Reviewed-by: Vladimir Sementsov-Ogievskiy &lt;vsementsov@yandex-team.ru&gt;
CC: Peter Krempa &lt;pkrempa@redhat.com&gt;
CC: Markus Armbruster &lt;armbru@redhat.com&gt;
CC: John Snow &lt;jsnow@redhat.com&gt;
CC: Kevin Wolf &lt;kwolf@redhat.com&gt;
CC: Hanna Reitz &lt;hreitz@redhat.com&gt;
Message-Id: &lt;20220824095044.166009-3-den@openvz.org&gt;
Reviewed-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
Signed-off-by: Kevin Wolf &lt;kwolf@redhat.com&gt;
</content>
</entry>
<entry>
<title>hw/block/fdc-sysbus: Always mark sysbus floppy controllers as not having DMA</title>
<updated>2022-06-11T09:36:14Z</updated>
<author>
<name>Peter Maydell</name>
<email>peter.maydell@linaro.org</email>
</author>
<published>2022-05-05T10:18:42Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/qemu/commit/?id=0c285e01280d9bccda36717bad369082356cf8f4'/>
<id>urn:sha1:0c285e01280d9bccda36717bad369082356cf8f4</id>
<content type='text'>
The sysbus floppy controllers (devices sysbus-fdc and sun-fdtwo)
don't support DMA.  The core floppy controller code expects this to
be indicated by setting FDCtrl::dma_chann to -1.  This used to be
done in the device instance_init functions sysbus_fdc_initfn() and
sun4m_fdc_initfn(), but in commit 1430759ec3e we refactored this code
and accidentally lost the setting of dma_chann.

For sysbus-fdc this has no ill effects because we were redundantly
also setting dma_chann in fdctrl_init_sysbus(), but for sun-fdtwo
this means that guests which try to enable DMA on the floppy
controller will cause QEMU to crash because FDCtrl::dma is NULL.

Set dma_chann to -1 in the common instance init, and remove the
redundant code in fdctrl_init_sysbus() that is also setting it.

There is a six-year-old FIXME comment in the jazz board code to the
effect that in theory it should support doing DMA via a custom DMA
controller.  If anybody ever chooses to fix that they can do it by
adding support for setting both FDCtrl::dma_chann and FDCtrl::dma.
(A QOM link property 'dma-controller' on the sysbus device which can
be set to an instance of IsaDmaClass is probably the way to go.)

Fixes: 1430759ec3 ("hw/block/fdc: Extract SysBus floppy controllers to fdc-sysbus.c")
Resolves: https://gitlab.com/qemu-project/qemu/-/issues/958
Signed-off-by: Peter Maydell &lt;peter.maydell@linaro.org&gt;
Reviewed-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
Reviewed-by: Mark Cave-Ayland &lt;mark.cave-ayland@ilande.co.uk&gt;
Message-Id: &lt;20220505101842.2757905-1-peter.maydell@linaro.org&gt;
Signed-off-by: Philippe Mathieu-Daudé &lt;f4bug@amsat.org&gt;
</content>
</entry>
</feed>
