Skip to content
Snippets Groups Projects
  1. Jan 04, 2019
    • Li Qiang's avatar
      fw_cfg: Fix -boot bootsplash error checking · 6912bb0b
      Li Qiang authored
      
      fw_cfg_bootsplash() gets option parameter "splash-time"
      with qemu_opt_get(), then converts it to an integer by hand.
      It neglects to check that conversion for errors. This is
      needlessly complicated and error-prone. But as "splash-time
      not specified" is not the same as "splash-time=T" for any T,
      we need use qemu_opt_get() to check if splash time exists.
      This patch also make the qemu exit when finding or loading
      splash file failed.
      
      Signed-off-by: default avatarLi Qiang <liq3ea@gmail.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarGerd Hoffmann <kraxel@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <1542777026-2788-2-git-send-email-liq3ea@gmail.com>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      6912bb0b
    • Li Qiang's avatar
      fw_cfg: Improve error message when can't load splash file · bed66336
      Li Qiang authored
      
      read_splashfile() reports "failed to read splash file" without
      further details. Get the details from g_file_get_contents(), and
      include them in the error message. Also remove unnecessary 'res'
      variable.
      
      Signed-off-by: default avatarLi Qiang <liq3ea@gmail.com>
      Reviewed-by: default avatarMarkus Armbruster <armbru@redhat.com>
      Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      Message-Id: <1541052148-28752-1-git-send-email-liq3ea@gmail.com>
      Signed-off-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
      bed66336
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging · 6395fe0c
      Peter Maydell authored
      
      Pull request
      
      Bug fixes for the .dmg image file format.
      
      # gpg: Signature made Fri 04 Jan 2019 11:21:18 GMT
      # gpg:                using RSA key 9CA4ABB381AB73C8
      # gpg: Good signature from "Stefan Hajnoczi <stefanha@redhat.com>"
      # gpg:                 aka "Stefan Hajnoczi <stefanha@gmail.com>"
      # Primary key fingerprint: 8695 A8BF D3F9 7CDA AC35  775A 9CA4 ABB3 81AB 73C8
      
      * remotes/stefanha/tags/block-pull-request:
        dmg: don't skip zero chunk
        dmg: use enumeration type instead of hard coding number
        dmg: fix binary search
        dmg: Fixing wrong dmg block type value for block terminator.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      6395fe0c
    • Yu-Chen Lin's avatar
      dmg: don't skip zero chunk · 39a0408e
      Yu-Chen Lin authored
      
      The dmg file has many tables which describe: "start from sector XXX to
      sector XXX, the compression method is XXX and where the compressed data
      resides on".
      
      Each sector in the expanded file should be covered by a table. The table
      will describe the offset of compressed data (or raw depends on the type)
      in the dmg.
      
      For example:
      
      [-----------The expanded file------------]
      [---bzip table ---]/* zeros */[---zlib---]
          ^
          | if we want to read this sector.
      
      we will find bzip table which contains this sector, and get the
      compressed data offset, read it from dmg, uncompress it, finally write to
      expanded file.
      
      If we skip zero chunk (table), some sector cannot find the table which
      will cause search_chunk() return s->n_chunks, dmg_read_chunk() return -1
      and finally causing dmg_co_preadv() return EIO.
      
      See:
      
      [-----------The expanded file------------]
      [---bzip table ---]/* zeros */[---zlib---]
                          ^
                          | if we want to read this sector.
      
      Oops, we cannot find the table contains it...
      
      In the original implementation, we don't have zero table. When we try to
      read sector inside the zero chunk. We will get EIO, and skip reading.
      
      After this patch, we treat zero chunk the same as ignore chunk, it will
      directly write zero and avoid some sector may not find the table.
      
      After this patch:
      
      [-----------The expanded file------------]
      [---bzip table ---][--zeros--][---zlib---]
      
      Signed-off-by: default avataryuchenlin <npes87184@gmail.com>
      Reviewed-by: default avatarJulio Faracco <jcfaracco@gmail.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20190103114700.9686-4-npes87184@gmail.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      39a0408e
    • Yu-Chen Lin's avatar
      dmg: use enumeration type instead of hard coding number · e80fcf59
      Yu-Chen Lin authored
      
      Signed-off-by: default avataryuchenlin <npes87184@gmail.com>
      Reviewed-by: default avatarJulio Faracco <jcfaracco@gmail.com>
      Reviewed-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      Message-id: 20190103114700.9686-3-npes87184@gmail.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      e80fcf59
    • Yu-Chen Lin's avatar
      dmg: fix binary search · 5ef40828
      Yu-Chen Lin authored
      
      There is a possible hang in original binary search implementation. That is
      if chunk1 = 4, chunk2 = 5, chunk3 = 4, and we go else case.
      
      The chunk1 will be still 4, and so on.
      
      Signed-off-by: default avataryuchenlin <npes87184@gmail.com>
      Message-id: 20190103114700.9686-2-npes87184@gmail.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      5ef40828
    • Julio Faracco's avatar
      dmg: Fixing wrong dmg block type value for block terminator. · b47c7d53
      Julio Faracco authored
      
      This is a trivial patch to fix a wrong value for block terminator.
      The old value was 0x7fffffff which is wrong. It was not affecting the
      code because QEMU dmg block is not handling block terminator right now.
      Neverthless, it should be fixed.
      
      Signed-off-by: default avatarJulio Faracco <jcfaracco@gmail.com>
      Reviewed-by: default avataryuchenlin <yuchenlin@synology.com>
      Message-id: 20181228145055.18039-1-jcfaracco@gmail.com
      Signed-off-by: default avatarStefan Hajnoczi <stefanha@redhat.com>
      b47c7d53
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-december-2018-v3' into staging · 8ecede46
      Peter Maydell authored
      
      MIPS queue for December 2018 - v3
      
      # gpg: Signature made Thu 03 Jan 2019 16:53:47 GMT
      # gpg:                using RSA key D4972A8967F75A65
      # gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.com>"
      # gpg: WARNING: This key is not certified with a trusted signature!
      # gpg:          There is no indication that the signature belongs to the owner.
      # Primary key fingerprint: 8526 FBF1 5DA3 811F 4A01  DD75 D497 2A89 67F7 5A65
      
      * remotes/amarkovic/tags/mips-queue-december-2018-v3: (44 commits)
        tests/tcg: mips: Test R5900 three-operand MADDU1
        tests/tcg: mips: Test R5900 three-operand MADDU
        tests/tcg: mips: Test R5900 three-operand MADD1
        tests/tcg: mips: Test R5900 three-operand MADD
        disas: nanoMIPS: Add a note on documentation
        disas: nanoMIPS: Reorder declarations and definitions of gpr decoders
        disas: nanoMIPS: Comment the decoder of 'gpr1' gpr encoding type
        disas: nanoMIPS: Rename the decoder of 'gpr1' gpr encoding type
        disas: nanoMIPS: Comment the decoder of 'gpr2.reg2' gpr encoding type
        disas: nanoMIPS: Rename the decoder of 'gpr2.reg2' gpr encoding type
        disas: nanoMIPS: Comment the decoder of 'gpr2.reg1' gpr encoding type
        disas: nanoMIPS: Rename the decoder of 'gpr2.reg1' gpr encoding type
        disas: nanoMIPS: Comment the decoder of 'gpr4.zero' gpr encoding type
        disas: nanoMIPS: Rename the decoder of 'gpr4.zero' gpr encoding type
        disas: nanoMIPS: Comment the decoder of 'gpr4' gpr encoding type
        disas: nanoMIPS: Rename the decoder of 'gpr4' gpr encoding type
        disas: nanoMIPS: Comment the decoder of 'gpr3.src.store' gpr encoding type
        disas: nanoMIPS: Rename the decoder of 'gpr3.src.store' gpr encoding type
        disas: nanoMIPS: Comment the decoder of 'gpr3' gpr encoding type
        disas: nanoMIPS: Rename the decoder of 'gpr3' gpr encoding type
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      8ecede46
  2. Jan 03, 2019
Loading