1. 21 2月, 2020 14 次提交
    • A
      spapr: Allow changing offset for -kernel image · 87262806
      Alexey Kardashevskiy 提交于
      This allows moving the kernel in the guest memory. The option is useful
      for step debugging (as Linux is linked at 0x0); it also allows loading
      grub which is normally linked to run at 0x20000.
      
      This uses the existing kernel address by default.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <20200203032943.121178-6-aik@ozlabs.ru>
      Reviewed-by: NFabiano Rosas <farosas@linux.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      87262806
    • G
      pnv/phb3: Add missing break statement · e8ead7d5
      Greg Kurz 提交于
      We obviously don't want to print out an error message if addr points to
      a valid register.
      
      Reported-by: Coverity CID 1419391 Missing break in switch
      Fixes: 9ae1329e "ppc/pnv: Add models for POWER8 PHB3 PCIe Host bridge"
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <158153365202.3229002.11521084761048102466.stgit@bahia.lan>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      e8ead7d5
    • G
      pnv/phb4: Fix error path in pnv_pec_realize() · 7cfb999f
      Greg Kurz 提交于
      Obviously, we want to pass &local_err so that we can check it then
      line below, not errp.
      
      Reported-by: Coverity CID 1419395 'Constant' variable guards dead code
      Fixes: 4f9924c4 "ppc/pnv: Add models for POWER9 PHB4 PCIe Host bridge"
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <158153364605.3229002.2796177658957390343.stgit@bahia.lan>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      7cfb999f
    • 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 25 次提交