Skip to content
Snippets Groups Projects
  1. Jul 29, 2022
  2. Jul 28, 2022
    • Richard Henderson's avatar
      Merge tag 'pull-ppc-20220728' of https://gitlab.com/danielhb/qemu into staging · cc42559a
      Richard Henderson authored
      ppc patch queue for 2022-07-28:
      
      Short queue with 2 Coverity fixes and one fix of the
      'wait' insns that is causing hangs if the guest kernel uses
      the most up to date wait opcode.
      
      - target/ppc:
        - implement new wait variants to fix guest hang when using the new opcode
      - ppc440_uc: initialize length passed to cpu_physical_memory_map()
      - spapr_nvdimm: check if spapr_drc_index() returns NULL
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iHUEABYKAB0WIQQX6/+ZI9AYAK8oOBk82cqW3gMxZAUCYuK8VgAKCRA82cqW3gMx
      # ZOc7AQDPMsFY9NHNqJ3O0MiX4Qoy8IGUreZ9dzZSS3zT1nxtEAD+Lwl0/aGO+dk+
      # +NiIO80A5Agy/0g8PHie4qR3EqHEnwA=
      # =Q4eR
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Thu 28 Jul 2022 09:41:58 AM PDT
      # gpg:                using EDDSA key 17EBFF9923D01800AF2838193CD9CA96DE033164
      # gpg: Good signature from "Daniel Henrique Barboza <danielhb413@gmail.com>" [unknown]
      # 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: 17EB FF99 23D0 1800 AF28  3819 3CD9 CA96 DE03 3164
      
      * tag 'pull-ppc-20220728' of https://gitlab.com/danielhb/qemu
      
      :
        target/ppc: Implement new wait variants
        hw/ppc/ppc440_uc: Initialize length passed to cpu_physical_memory_map()
        hw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      cc42559a
    • Nicholas Piggin's avatar
      target/ppc: Implement new wait variants · 0c9717ff
      Nicholas Piggin authored
      ISA v2.06 adds new variations of wait, specified by the WC field. These
      are not all compatible with the prior wait implementation, because they
      add additional conditions that cause the processor to resume, which can
      cause software to hang or run very slowly.
      
      At this moment, with the current wait implementation and a pseries guest
      using mainline kernel with new wait upcodes [1], QEMU hangs during boot if
      more than one CPU is present:
      
       qemu-system-ppc64 -M pseries,x-vof=on -cpu POWER10 -smp 2 -nographic
      -kernel zImage.pseries -no-reboot
      
      QEMU will exit (as there's no filesystem) if the test "passes", or hang
      during boot if it hits the bug.
      
      ISA v3.0 changed the wait opcode and removed the new variants (retaining
      the WC field but making non-zero values reserved).
      
      ISA v3.1 added new WC values to the new wait opcode, and added a PL
      field.
      
      This patch implements the new wait encoding and supports WC variants
      with no-op implementations, which provides basic correctness as
      explained in comments.
      
      [1] https://lore.kernel.org/all/20220720132132.903462-1-npiggin@gmail.com/
      
      
      
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Reviewed-by: default avatarVíctor Colombo <victor.colombo@eldorado.org.br>
      Tested-by: default avatarJoel Stanley <joel@jms.id.au>
      Reviewed-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      Message-Id: <20220720133352.904263-1-npiggin@gmail.com>
      [danielhb: added information about the bug being fixed]
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      0c9717ff
    • Peter Maydell's avatar
      hw/ppc/ppc440_uc: Initialize length passed to cpu_physical_memory_map() · eda3f17b
      Peter Maydell authored
      
      In dcr_write_dma(), there is code that uses cpu_physical_memory_map()
      to implement a DMA transfer.  That function takes a 'plen' argument,
      which points to a hwaddr which is used for both input and output: the
      caller must set it to the size of the range it wants to map, and on
      return it is updated to the actual length mapped. The dcr_write_dma()
      code fails to initialize rlen and wlen, so will end up mapping an
      unpredictable amount of memory.
      
      Initialize the length values correctly, and check that we managed to
      map the entire range before using the fast-path memmove().
      
      This was spotted by Coverity, which points out that we never
      initialized the variables before using them.
      
      Fixes: Coverity CID 1487137, 1487150
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20220726182341.1888115-2-peter.maydell@linaro.org>
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      eda3f17b
    • Daniel Henrique Barboza's avatar
      hw/ppc: check if spapr_drc_index() returns NULL in spapr_nvdimm.c · edccf661
      Daniel Henrique Barboza authored
      
      spapr_nvdimm_flush_completion_cb() and flush_worker_cb() are using the
      DRC object returned by spapr_drc_index() without checking it for NULL.
      In this case we would be dereferencing a NULL pointer when doing
      SPAPR_NVDIMM(drc->dev) and PC_DIMM(drc->dev).
      
      This can happen if, during a scm_flush(), the DRC object is wrongly
      freed/released (e.g. a bug in another part of the code).
      spapr_drc_index() would then return NULL in the callbacks.
      
      Fixes: Coverity CID 1487108, 1487178
      Reviewed-by: default avatarGreg Kurz <groug@kaod.org>
      Message-Id: <20220409200856.283076-2-danielhb413@gmail.com>
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      edccf661
    • Richard Henderson's avatar
      Merge tag 'pull-riscv-to-apply-20220728' of github.com:alistair23/qemu into staging · a17001c4
      Richard Henderson authored
      
      Sixth RISC-V PR for QEMU 7.1
      
      This is a PR to go in for RC1. It fixes a segfault that occurs
      when using multiple sockets on the RISC-V virt board. It also
      includes a small fix to allow both Zmmul and M extensions.
      
      * Allow both Zmmul and M extension
      * Fix multi-socket plic configuraiton
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQEzBAABCAAdFiEE9sSsRtSTSGjTuM6PIeENKd+XcFQFAmLh33AACgkQIeENKd+X
      # cFROBQf/QFxHsIX9clpAkHmK220efQ3rjHZtdCqQoCeRZp2EytFS9KZ6iae/BM9r
      # 3Z8cZci38kxjqTzsYJLj46yNO3AxHoFsDH41yWTMOsxjVWVlno/06R/C1B4Ek37N
      # kZXWKHzqfQvZRJIUAjKfVxaLtw9xRI9xYqWxVngdYSoW3HWHHz5UmA6fFoJ29QiZ
      # SKEgxhakrqhvN9GMm1aWGkLN10uD5lFWOBMYdqMVcWq48XSP3Df5FU2Xk0sfegXq
      # EqbIYKJL/Q6koyvmdpQz7VmtMAGjMTcmozEH8oN/MuCk7MCLmbloWVl+LF39SeTH
      # 3amapiJBtYBOwaNZUpb5TZkv/bEDIw==
      # =ip1R
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 27 Jul 2022 05:59:28 PM PDT
      # gpg:                using RSA key F6C4AC46D4934868D3B8CE8F21E10D29DF977054
      # gpg: Good signature from "Alistair Francis <alistair@alistair23.me>" [undefined]
      # 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: F6C4 AC46 D493 4868 D3B8  CE8F 21E1 0D29 DF97 7054
      
      * tag 'pull-riscv-to-apply-20220728' of github.com:alistair23/qemu:
        hw/intc: sifive_plic: Fix multi-socket plic configuraiton
        RISC-V: Allow both Zmmul and M
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      a17001c4
    • Richard Henderson's avatar
      Merge tag 'pull-block-2022-07-27' of https://gitlab.com/vsementsov/qemu into staging · 3e4abe2c
      Richard Henderson authored
      Block: fix parallels block driver
      
      # -----BEGIN PGP SIGNATURE-----
      #
      # iQIzBAABCgAdFiEEi5wmzbL9FHyIDoahVh8kwfGfefsFAmLhi0cACgkQVh8kwfGf
      # efs1Dg/7BwbaJu5uZEGhz3+KBRPk5kdYKX60bOojac27pBTVo4OyiP7QFzBt4c6+
      # 4yftT2vD7yTyzKANlmIYBvmjoIEw6eB09gJ5/mnUKgxTAS+thKo0e2v1zdncliy+
      # h9SEYRT3RhlePJYSssZx8lW4gfCG2JZi5xSjfqbG50X7I8RgDtMmcj7EUwkvCkaI
      # WL3iZIuYPxkfFwbQ/6xVmwc6uE97tWom9Z0iyEgFIhtFGlrgV3zJrDJ2CbOXIbi+
      # 9c2j4zmnMUZLwtdT2CFwyvO03iU8eMJxqnt4aSyByOAd/rqko+ugHeE53eZkND0Q
      # ci4bFq9XjgxOSsIqHXemIEUnuExhMuw5i7dtwR8w7K5Kwc88/44GTUgCZrPnBLx2
      # smGX0g7BiCpNYXA8DkquOsUQf8cS67M3rjdTB6SiMo0KuQHe5O0RDQAwu7f+hnTw
      # vEyo8dk4xGqUvqYcOpLLBHDis1lghWwseC5gB/M6Q+KqvDF4WDpIWwPLfR1phJ0L
      # kA1M9QO+NAcUtLEuT7N22QU8LMTxAX/hSYpR5Jrt5g3R26h7w7VZEvJbpQaytXTY
      # VhDVWAGg9Xn3oxGTEyVqGP3Avik9OeoK9gCFiIyTEOL1jfEXqOsX8V6QkpaKP6c+
      # WXWiWfV9A9D7O556Z92hUeDuWhQKb2w1dry2e7DPeSWiUmgHtyY=
      # =QfFj
      # -----END PGP SIGNATURE-----
      # gpg: Signature made Wed 27 Jul 2022 12:00:23 PM PDT
      # gpg:                using RSA key 8B9C26CDB2FD147C880E86A1561F24C1F19F79FB
      # gpg: Good signature from "Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru>" [unknown]
      # gpg:                 aka "Vladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>" [unknown]
      # 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: 8B9C 26CD B2FD 147C 880E  86A1 561F 24C1 F19F 79FB
      
      * tag 'pull-block-2022-07-27' of https://gitlab.com/vsementsov/qemu
      
      :
        iotests/131: Add parallels regression test
        block/parallels: Fix buffer-based write call
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      3e4abe2c
  3. Jul 27, 2022
  4. Jul 26, 2022
Loading