qemu/hw/block
Xiang Zheng a4b15a8b9e pflash: Only read non-zero parts of backend image
Currently we fill the VIRT_FLASH memory space with two 64MB NOR images
when using persistent UEFI variables on virt board. Actually we only use
a very small(non-zero) part of the memory while the rest significant
large(zero) part of memory is wasted.

So this patch checks the block status and only writes the non-zero part
into memory. This requires pflash devices to use sparse files for
backends.

Signed-off-by: Xiang Zheng <zhengxiang9@huawei.com>

[ kraxel: rebased to latest master ]

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Message-Id: <20221220084246.1984871-1-kraxel@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2023-01-24 18:26:41 +01:00
..
dataplane virtio-blk: simplify virtio_blk_dma_restart_cb() 2023-01-23 15:01:23 -05:00
block.c pflash: Only read non-zero parts of backend image 2023-01-24 18:26:41 +01:00
cdrom.c
ecc.c
fdc-internal.h
fdc-isa.c
fdc-sysbus.c
fdc.c
hd-geometry.c
Kconfig
m25p80_sfdp.c m25p80: Add the w25q01jvq SFPD table 2022-10-24 11:20:16 +02:00
m25p80_sfdp.h m25p80: Add the w25q01jvq SFPD table 2022-10-24 11:20:16 +02:00
m25p80.c m25p80: Add the w25q01jvq SFPD table 2022-10-24 11:20:16 +02:00
meson.build m25p80: Add the n25q256a SFDP table 2022-10-24 11:20:15 +02:00
nand.c
onenand.c
pflash_cfi01.c bulk: Rename TARGET_FMT_plx -> HWADDR_FMT_plx 2023-01-18 11:14:34 +01:00
pflash_cfi02.c Revert "hw/block/pflash_cfi: Error out if dev length isn't power of 2" 2022-11-08 15:53:40 -05:00
swim.c
tc58128.c
trace-events m25p80: Add basic support for the SFDP command 2022-10-24 11:20:15 +02:00
trace.h
vhost-user-blk.c hw/virtio: generalise CHR_EVENT_CLOSED handling 2022-12-01 02:30:13 -05:00
virtio-blk-common.c virtio-blk: move config size params to virtio-blk-common 2022-10-07 09:41:51 -04:00
virtio-blk.c virtio-blk: simplify virtio_blk_dma_restart_cb() 2023-01-23 15:01:23 -05:00
xen_blkif.h
xen-block.c