1. 21 2月, 2020 11 次提交
    • G
      pnv/phb3: Convert 1u to 1ull · 5a205fcf
      Greg Kurz 提交于
      As reported by Coverity defect CID 1419397, the 'j' variable goes up to
      63 and shouldn't be used to left shift a 32-bit integer.
      
      The result of the operation goes to a 64-bit integer : use a 64-bit
      constant.
      
      Reported-by: Coverity CID 1419397 Bad bit shift operation
      Fixes: 9ae1329e "ppc/pnv: Add models for POWER8 PHB3 PCIe Host bridge"
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <158153364010.3229002.8004283672455615950.stgit@bahia.lan>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      5a205fcf
    • B
      target/ppc/cpu.h: Remove duplicate includes · 19b5c418
      BALATON Zoltan 提交于
      Commit 74433bf0 added some includes but added them twice. Since
      these are guarded against multiple inclusion including them once is
      enough.
      Signed-off-by: NBALATON Zoltan <balaton@eik.bme.hu>
      Message-Id: <20200212223207.5A37574637F@zero.eik.bme.hu>
      Reviewed-by: NPhilippe Mathieu-Daudé <philmd@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      19b5c418
    • S
      spapr: Add Hcalls to support PAPR NVDIMM device · b5fca656
      Shivaprasad G Bhat 提交于
      This patch implements few of the necessary hcalls for the nvdimm support.
      
      PAPR semantics is such that each NVDIMM device is comprising of multiple
      SCM(Storage Class Memory) blocks. The guest requests the hypervisor to
      bind each of the SCM blocks of the NVDIMM device using hcalls. There can
      be SCM block unbind requests in case of driver errors or unplug(not
      supported now) use cases. The NVDIMM label read/writes are done through
      hcalls.
      
      Since each virtual NVDIMM device is divided into multiple SCM blocks,
      the bind, unbind, and queries using hcalls on those blocks can come
      independently. This doesn't fit well into the qemu device semantics,
      where the map/unmap are done at the (whole)device/object level granularity.
      The patch doesnt actually bind/unbind on hcalls but let it happen at the
      device_add/del phase itself instead.
      
      The guest kernel makes bind/unbind requests for the virtual NVDIMM device
      at the region level granularity. Without interleaving, each virtual NVDIMM
      device is presented as a separate guest physical address range. So, there
      is no way a partial bind/unbind request can come for the vNVDIMM in a
      hcall for a subset of SCM blocks of a virtual NVDIMM. Hence it is safe to
      do bind/unbind everything during the device_add/del.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.ibm.com>
      Message-Id: <158131059899.2897.11515211602702956854.stgit@lep8c.aus.stglabs.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      b5fca656
    • S
      spapr: Add NVDIMM device support · ee3a71e3
      Shivaprasad G Bhat 提交于
      Add support for NVDIMM devices for sPAPR. Piggyback on existing nvdimm
      device interface in QEMU to support virtual NVDIMM devices for Power.
      Create the required DT entries for the device (some entries have
      dummy values right now).
      
      The patch creates the required DT node and sends a hotplug
      interrupt to the guest. Guest is expected to undertake the normal
      DR resource add path in response and start issuing PAPR SCM hcalls.
      
      The device support is verified based on the machine version unlike x86.
      
      This is how it can be used ..
      Ex :
      For coldplug, the device to be added in qemu command line as shown below
      -object memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm0,share=yes,size=1073872896
      -device nvdimm,label-size=128k,uuid=75a3cdd7-6a2f-4791-8d15-fe0a920e8e9e,memdev=memnvdimm0,id=nvdimm0,slot=0
      
      For hotplug, the device to be added from monitor as below
      object_add memory-backend-file,id=memnvdimm0,prealloc=yes,mem-path=/tmp/nvdimm0,share=yes,size=1073872896
      device_add nvdimm,label-size=128k,uuid=75a3cdd7-6a2f-4791-8d15-fe0a920e8e9e,memdev=memnvdimm0,id=nvdimm0,slot=0
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.ibm.com>
      Signed-off-by: NBharata B Rao <bharata@linux.ibm.com>
                     [Early implementation]
      Message-Id: <158131058078.2897.12767731856697459923.stgit@lep8c.aus.stglabs.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      ee3a71e3
    • S
      nvdimm: add uuid property to nvdimm · 6c5627bb
      Shivaprasad G Bhat 提交于
      For ppc64, PAPR requires the nvdimm device to have UUID property
      set in the device tree. Add an option to get it from the user.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.ibm.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Message-Id: <158131056931.2897.14057087440721445976.stgit@lep8c.aus.stglabs.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      6c5627bb
    • S
      mem: move nvdimm_device_list to utilities · 3f350f6b
      Shivaprasad G Bhat 提交于
      nvdimm_device_list is required for parsing the list for devices
      in subsequent patches. Move it to common utility area.
      Signed-off-by: NShivaprasad G Bhat <sbhat@linux.ibm.com>
      Reviewed-by: NIgor Mammedov <imammedo@redhat.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Message-Id: <158131055857.2897.15658377276504711773.stgit@lep8c.aus.stglabs.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      3f350f6b
    • M
      ppc: function to setup latest class options · a7849268
      Michael S. Tsirkin 提交于
      We are going to add more init for the latest machine, so move the setup
      to a function so we don't have to change the DEFINE_SPAPR_MACHINE macro
      each time.
      Signed-off-by: NMichael S. Tsirkin <mst@redhat.com>
      Message-Id: <20200207064628.1196095-1-mst@redhat.com>
      Reviewed-by: NLaurent Vivier <lvivier@redhat.com>
      Reviewed-by: NGreg Kurz <groug@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      a7849268
    • L
      ppc/pnv: Fix PCI_EXPRESS dependency · 90118a65
      Laurent Vivier 提交于
      When PHB4 bridge has been added, the dependencies to PCIE_PORT has been
      added to XIVE_SPAPR and indirectly to PSERIES.
      The build of the PowerNV machine is fine while we also build the PSERIES
      machine.
      If we disable the PSERIES machine, the PowerNV build fails because the
      PCI Express files are not built:
      
      /usr/bin/ld: hw/ppc/pnv.o: in function `pnv_chip_power8_pic_print_info':
      .../hw/ppc/pnv.c:623: undefined reference to `pnv_phb3_msi_pic_print_info'
      /usr/bin/ld: hw/ppc/pnv.o: in function `pnv_chip_power9_pic_print_info':
      .../hw/ppc/pnv.c:639: undefined reference to `pnv_phb4_pic_print_info'
      /usr/bin/ld: ../hw/usb/hcd-ehci-pci.o: in function `usb_ehci_pci_write_config':
      .../hw/usb/hcd-ehci-pci.c:129: undefined reference to `pci_default_write_config'
      /usr/bin/ld: ../hw/usb/hcd-ehci-pci.o: in function `usb_ehci_pci_realize':
      .../hw/usb/hcd-ehci-pci.c:68: undefined reference to `pci_allocate_irq'
      /usr/bin/ld: .../hw/usb/hcd-ehci-pci.c:72: undefined reference to `pci_register_bar'
      /usr/bin/ld: ../hw/usb/hcd-ehci-pci.o:(.data.rel+0x50): undefined reference to `vmstate_pci_device'
      
      This patch fixes the problem by adding needed dependencies to POWERNV.
      
      Fixes: 4f9924c4 ("ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge")
      Signed-off-by: NLaurent Vivier <lvivier@redhat.com>
      Message-Id: <20200205232016.588202-3-lvivier@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      90118a65
    • L
      qtest: Fix rtas dependencies · 2c6e918e
      Laurent Vivier 提交于
      qtest "rtas" command is only available with pseries not all ppc64 targets,
      so if I try to compile only powernv machine, the build fails with:
      
        /usr/bin/ld: qtest.o: in function `qtest_process_command':
        .../qtest.c:645: undefined reference to `qtest_rtas_call'
      
      We fix this by enabling rtas command only with pseries machine.
      
      Fixes: eeddd59f ("tests: add RTAS command in the protocol")
      Signed-off-by: NLaurent Vivier <lvivier@redhat.com>
      Message-Id: <20200205232016.588202-2-lvivier@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      2c6e918e
    • A
      spapr/rtas: Print message from "ibm,os-term" · a4c3791a
      Alexey Kardashevskiy 提交于
      The "ibm,os-term" RTAS call has a single parameter which is a pointer to
      a message from the guest kernel about the termination cause; this prints
      it.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <20200203032044.118585-1-aik@ozlabs.ru>
      Reviewed-by: NDaniel Henrique Barboza <danielhb413@gmail.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      a4c3791a
    • P
      Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-pull-request' into staging · 7afee874
      Peter Maydell 提交于
      Fix memory leak with fdt
      cosmetic change in code and logs
      update mailmap
      
      # gpg: Signature made Wed 19 Feb 2020 10:15:56 GMT
      # gpg:                using RSA key CD2F75DDC8E3A4DC2E4F5173F30C38BD3F2FBE3C
      # gpg:                issuer "laurent@vivier.eu"
      # gpg: Good signature from "Laurent Vivier <lvivier@redhat.com>" [full]
      # gpg:                 aka "Laurent Vivier <laurent@vivier.eu>" [full]
      # gpg:                 aka "Laurent Vivier (Red Hat) <lvivier@redhat.com>" [full]
      # Primary key fingerprint: CD2F 75DD C8E3 A4DC 2E4F  5173 F30C 38BD 3F2F BE3C
      
      * remotes/vivier2/tags/trivial-branch-pull-request:
        hw/xtensa/xtfpga:fix leak of fdevice tree blob
        hw/nios2:fix leak of fdevice tree blob
        hw/net/rocker: Report unimplemented feature with qemu_log_mask(UNIMP)
        hw/block/pflash_cfi02: Remove unneeded variable assignment
        hw/display/qxl: Remove unneeded variable assignment
        contrib/rdmacm-mux: Remove superfluous semicolon
        tests/qtest/libqos/qgraph: Remove superfluous semicolons
        target/i386/whpx: Remove superfluous semicolon
        ui/input-barrier: Remove superfluous semicolon
        hw/vfio/display: Remove superfluous semicolon
        hw/scsi/esp: Remove superfluous semicolon
        hw/m68k/next-cube: Remove superfluous semicolon
        hw/arm/xlnx-versal: Remove superfluous semicolon
        audio/alsaaudio: Remove superfluous semicolons
        scripts/checkpatch.pl: Detect superfluous semicolon in C code
        Report stringified errno in VFIO related errors
        mailmap: Add entry for Yu-Chen Lin
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      7afee874
  2. 20 2月, 2020 1 次提交
    • P
      Merge remote-tracking branch 'remotes/rth/tags/pull-pa-20200218' into staging · 8cd7325f
      Peter Maydell 提交于
      Fixes for Dino and Artist.
      
      # gpg: Signature made Tue 18 Feb 2020 19:35:09 GMT
      # gpg:                using RSA key 7A481E78868B4DB6A85A05C064DF38E8AF7E215F
      # gpg:                issuer "richard.henderson@linaro.org"
      # gpg: Good signature from "Richard Henderson <richard.henderson@linaro.org>" [full]
      # Primary key fingerprint: 7A48 1E78 868B 4DB6 A85A  05C0 64DF 38E8 AF7E 215F
      
      * remotes/rth/tags/pull-pa-20200218:
        hw/hppa/dino: Do not accept accesses to registers 0x818 and 0x82c
        hw/hppa/dino: Fix bitmask for the PCIROR register
        hw/hppa/dino: Fix reg800_keep_bits overrun (CID 1419387 1419393 1419394)
        hw/hppa/dino: Add comments with register name
        hw/display/artist: Remove dead code (CID 1419388 & 1419389)
        hw/display/artist: Avoid drawing line when nothing to display
        hw/display/artist: Delay some variables initialization
        hw/display/artist: Remove pointless initialization
        hw/display/artist: Move trace event to draw_line()
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      8cd7325f
  3. 19 2月, 2020 26 次提交
  4. 18 2月, 2020 2 次提交
    • P
      Merge remote-tracking branch 'remotes/kevin/tags/for-upstream' into staging · 672f9d0d
      Peter Maydell 提交于
      Block layer patches:
      
      - Fix check_to_replace_node()
      - commit: Expose on-error option in QMP
      - qcow2: Fix qcow2_alloc_cluster_abort() for external data file
      - mirror: Fix deadlock
      - vvfat: Fix segfault while closing read-write node
      - Code cleanups
      
      # gpg: Signature made Tue 18 Feb 2020 14:04:43 GMT
      # gpg:                using RSA key 7F09B272C88F2FD6
      # gpg: Good signature from "Kevin Wolf <kwolf@redhat.com>" [full]
      # Primary key fingerprint: DC3D EB15 9A9A F95D 3D74  56FE 7F09 B272 C88F 2FD6
      
      * remotes/kevin/tags/for-upstream: (36 commits)
        iotests: Check that @replaces can replace filters
        iotests: Add tests for invalid Quorum @replaces
        iotests: Use self.image_len in TestRepairQuorum
        iotests: Resolve TODOs in 041
        iotests/041: Drop superfluous shutdowns
        iotests: Add VM.assert_block_path()
        iotests: Use complete_and_wait() in 155
        quorum: Stop marking it as a filter
        mirror: Double-check immediately before replacing
        block: Remove bdrv_recurse_is_first_non_filter()
        block: Use bdrv_recurse_can_replace()
        quorum: Implement .bdrv_recurse_can_replace()
        blkverify: Implement .bdrv_recurse_can_replace()
        block: Add bdrv_recurse_can_replace()
        quorum: Fix child permissions
        iotests: Let 041 use -blockdev for quorum children
        block: Drop bdrv_is_first_non_filter()
        blockdev: Allow resizing everywhere
        blockdev: Allow external snapshots everywhere
        block/io_uring: Remove superfluous semicolon
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      672f9d0d
    • M
      iotests: Check that @replaces can replace filters · c45a88f4
      Max Reitz 提交于
      Signed-off-by: NMax Reitz <mreitz@redhat.com>
      Reviewed-by: NVladimir Sementsov-Ogievskiy <vsementsov@virtuozzo.com>
      Message-Id: <20200218103454.296704-20-mreitz@redhat.com>
      Signed-off-by: NKevin Wolf <kwolf@redhat.com>
      c45a88f4