Skip to content
  • Daniel Henrique Barboza's avatar
    ef7716ca
    Revert "hw/block/pflash_cfi: Error out if dev length isn't power of 2" · ef7716ca
    Daniel Henrique Barboza authored
    Commit 334c388f ("pflash_cfi: Error out if device length
    isn't a power of two") aimed to finish the effort started by
    commit 06f15217 ("pflash: Require backend size to match device,
    improve errors"), but unfortunately we are not quite there since
    various machines are still ready to accept incomplete / oversized
    pflash backend images, and now fail, i.e. on Debian bullseye:
    
     $ qemu-system-x86_64 \
       -drive \
       if=pflash,format=raw,unit=0,readonly=on,file=/usr/share/OVMF/OVMF_CODE.fd
     qemu-system-x86_64: Device size must be a power of two.
    
    where OVMF_CODE.fd comes from the ovmf package, which doesn't
    pad the firmware images to the flash size:
    
     $ ls -lh /usr/share/OVMF/
     -rw-r--r-- 1 root root 3.5M Aug 19  2021 OVMF_CODE_4M.fd
     -rw-r--r-- 1 root root 1.9M Aug 19  2021 OVMF_CODE.fd
     -rw-r--r-- 1 root root 128K Aug 19  2021 OVMF_VARS.fd
    
    Since we entered the freeze period to prepare the v7.2.0 release,
    the safest is to revert commit 334c388f.
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1294
    
    
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
    Message-Id: <20221108175755.95141-1-philmd@linaro.org>
    Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
    Message-Id: <20221108172633.860700-1-danielhb413@gmail.com>
    ef7716ca
    Revert "hw/block/pflash_cfi: Error out if dev length isn't power of 2"
    Daniel Henrique Barboza authored
    Commit 334c388f ("pflash_cfi: Error out if device length
    isn't a power of two") aimed to finish the effort started by
    commit 06f15217 ("pflash: Require backend size to match device,
    improve errors"), but unfortunately we are not quite there since
    various machines are still ready to accept incomplete / oversized
    pflash backend images, and now fail, i.e. on Debian bullseye:
    
     $ qemu-system-x86_64 \
       -drive \
       if=pflash,format=raw,unit=0,readonly=on,file=/usr/share/OVMF/OVMF_CODE.fd
     qemu-system-x86_64: Device size must be a power of two.
    
    where OVMF_CODE.fd comes from the ovmf package, which doesn't
    pad the firmware images to the flash size:
    
     $ ls -lh /usr/share/OVMF/
     -rw-r--r-- 1 root root 3.5M Aug 19  2021 OVMF_CODE_4M.fd
     -rw-r--r-- 1 root root 1.9M Aug 19  2021 OVMF_CODE.fd
     -rw-r--r-- 1 root root 128K Aug 19  2021 OVMF_VARS.fd
    
    Since we entered the freeze period to prepare the v7.2.0 release,
    the safest is to revert commit 334c388f.
    
    Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1294
    
    
    Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@linaro.org>
    Message-Id: <20221108175755.95141-1-philmd@linaro.org>
    Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
    Message-Id: <20221108172633.860700-1-danielhb413@gmail.com>
Loading