Skip to content
Snippets Groups Projects
  1. May 10, 2021
  2. May 05, 2021
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/dg-gitlab/tags/ppc-for-6.1-20210504' into staging · d90f1548
      Peter Maydell authored
      
      ppc patch queue 2021-05-04
      
      Here's the first ppc pull request for qemu-6.1.  It has a wide variety
      of stuff accumulated during the 6.0 freeze.  Highlights are:
      
       * Multi-phase reset cleanups for PAPR
       * Preliminary cleanups towards allowing !CONFIG_TCG for the ppc target
       * Cleanup of AIL logic and extension to POWER10
       * Further improvements to handling of hot unplug failures on PAPR
       * Allow much larger numbers of CPU on pseries
       * Support for the H_SCM_HEALTH hypercall
       * Add support for the Pegasos II board
       * Substantial cleanup to hflag handling
       * Assorted minor fixes and cleanups
      
      # gpg: Signature made Tue 04 May 2021 06:52:39 BST
      # gpg:                using RSA key 75F46586AE61A66CC44E87DC6C38CACA20D9B392
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>" [full]
      # gpg:                 aka "David Gibson (Red Hat) <dgibson@redhat.com>" [full]
      # gpg:                 aka "David Gibson (ozlabs.org) <dgibson@ozlabs.org>" [full]
      # gpg:                 aka "David Gibson (kernel.org) <dwg@kernel.org>" [unknown]
      # Primary key fingerprint: 75F4 6586 AE61 A66C C44E  87DC 6C38 CACA 20D9 B392
      
      * remotes/dg-gitlab/tags/ppc-for-6.1-20210504: (46 commits)
        hw/ppc/pnv_psi: Use device_cold_reset() instead of device_legacy_reset()
        hw/ppc/spapr_vio: Reset TCE table object with device_cold_reset()
        hw/intc/spapr_xive: Use device_cold_reset() instead of device_legacy_reset()
        target/ppc: removed VSCR from SPR registration
        target/ppc: Reduce the size of ppc_spr_t
        target/ppc: Clean up _spr_register et al
        target/ppc: Add POWER10 exception model
        target/ppc: rework AIL logic in interrupt delivery
        target/ppc: move opcode table logic to translate.c
        target/ppc: code motion from translate_init.c.inc to gdbstub.c
        spapr_drc.c: handle hotunplug errors in drc_unisolate_logical()
        spapr.h: increase FDT_MAX_SIZE
        spapr.c: do not use MachineClass::max_cpus to limit CPUs
        ppc: Rename current DAWR macros and variables
        target/ppc: POWER10 supports scv
        target/ppc: Fix POWER9 radix guest HV interrupt AIL behaviour
        docs/system: ppc: Add documentation for ppce500 machine
        roms/u-boot: Bump ppce500 u-boot to v2021.04 to fix broken pci support
        roms/Makefile: Update ppce500 u-boot build directory name
        ppc/spapr: Add support for implement support for H_SCM_HEALTH
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      d90f1548
    • Peter Maydell's avatar
      Merge remote-tracking branch... · d45a5270
      Peter Maydell authored
      Merge remote-tracking branch 'remotes/vivier2/tags/trivial-branch-for-6.1-pull-request' into staging
      
      Trivial patches pull request 20210503
      
      # gpg: Signature made Mon 03 May 2021 09:34:56 BST
      # 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-for-6.1-pull-request: (23 commits)
        hw/rx/rx-gdbsim: Do not accept invalid memory size
        docs: More precisely describe memory-backend-*::id's user
        scripts: fix generation update-binfmts templates
        docs/system: Document the removal of "compat" property for POWER CPUs
        mc146818rtc: put it into the 'misc' category
        Do not include exec/address-spaces.h if it's not really necessary
        Do not include cpu.h if it's not really necessary
        Do not include hw/boards.h if it's not really necessary
        Do not include sysemu/sysemu.h if it's not really necessary
        hw: Do not include qemu/log.h if it is not necessary
        hw: Do not include hw/irq.h if it is not necessary
        hw: Do not include hw/sysbus.h if it is not necessary
        hw: Remove superfluous includes of hw/hw.h
        ui: Fix memory leak in qemu_xkeymap_mapping_table()
        hw/usb: Constify VMStateDescription
        hw/display/qxl: Constify VMStateDescription
        hw/arm: Constify VMStateDescription
        vmstate: Constify some VMStateDescriptions
        Fix typo in CFI build documentation
        hw/pcmcia: Do not register PCMCIA type if not required
        ...
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      d45a5270
  3. May 04, 2021
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/legoater/tags/pull-aspeed-20210503' into staging · 87c6cef6
      Peter Maydell authored
      
      Aspeed patches :
      
      * Fixes for the DMA space
      * New model for ASPEED's Hash and Crypto Engine (Joel and Klaus)
      * Acceptance tests (Joel)
      * A fix for the XDMA  model
      * Some extra features for the SMC controller.
      * Two new boards : rainier-bmc and quanta-q7l1-bmc (Patrick)
      
      # gpg: Signature made Mon 03 May 2021 06:23:36 BST
      # gpg:                using RSA key A0F66548F04895EBFE6B0B6051A343C7CFFBECA1
      # gpg: Good signature from "Cédric Le Goater <clg@kaod.org>" [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: A0F6 6548 F048 95EB FE6B  0B60 51A3 43C7 CFFB ECA1
      
      * remotes/legoater/tags/pull-aspeed-20210503:
        aspeed: Add support for the quanta-q7l1-bmc board
        hw/block: m25p80: Add support for mt25ql02g and mt25qu02g
        aspeed: Add support for the rainier-bmc board
        aspeed: Deprecate the swift-bmc machine
        tests/qtest: Rename m25p80 test in aspeed_smc test
        aspeed/smc: Add extra controls to request DMA
        aspeed/smc: Add a 'features' attribute to the object class
        hw/misc/aspeed_xdma: Add AST2600 support
        tests/acceptance: Test ast2600 machine
        tests/acceptance: Test ast2400 and ast2500 machines
        tests/qtest: Add test for Aspeed HACE
        aspeed: Integrate HACE
        hw: Model ASPEED's Hash and Crypto Engine
        hw/arm/aspeed: Do not sysbus-map mmio flash region directly, use alias
        aspeed/i2c: Rename DMA address space
        aspeed/i2c: Fix DMA address mask
        aspeed/smc: Remove unused "sdram-base" property
        aspeed/smc: Use the RAM memory region for DMAs
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      87c6cef6
    • Peter Maydell's avatar
      Merge remote-tracking branch 'remotes/bsdimp/tags/pull-bsd-user-20210430' into staging · 3e13d8e3
      Peter Maydell authored
      
      bsd-user: start to cleanup the mess
      
      A number of small cleanups to get started. All the checkpatch.pl warnings for
      bsdload.c have been fixed, as well as a warning from qemu.h (though more remain
      and this patch series fails the format check still). I've also fixed a
      compile-time warning about a missing break.
      
      # gpg: Signature made Fri 30 Apr 2021 16:40:08 BST
      # gpg:                using RSA key 2035F894B00AA3CF7CCDE1B76C1CD1287DB01100
      # gpg: Good signature from "Warner Losh <wlosh@netflix.com>" [unknown]
      # gpg:                 aka "Warner Losh <imp@bsdimp.com>" [unknown]
      # gpg:                 aka "Warner Losh <imp@freebsd.org>" [unknown]
      # gpg:                 aka "Warner Losh <imp@village.org>" [unknown]
      # gpg:                 aka "Warner Losh <wlosh@bsdimp.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: 2035 F894 B00A A3CF 7CCD  E1B7 6C1C D128 7DB0 1100
      
      * remotes/bsdimp/tags/pull-bsd-user-20210430:
        bsd-user: style tweak: Put {} around all if/else/for statements
        bsd-user: put back a break; that had gone missing...
        bsd-user: style tweak: return is not a function, eliminate ()
        bsd-user: style tweak: keyword space (
        bsd-user: whitespace changes
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      3e13d8e3
    • Peter Maydell's avatar
      hw/ppc/pnv_psi: Use device_cold_reset() instead of device_legacy_reset() · 4bb32cd7
      Peter Maydell authored
      
      The pnv_psi.c code uses device_legacy_reset() for two purposes:
       * to reset itself from its qemu_register_reset() handler
       * to reset a XiveSource object it has
      
      Neither it nor the XiveSource have any qbuses, so the new
      device_cold_reset() function (which resets both the device and its
      child buses) is equivalent here to device_legacy_reset() and we can
      just switch to the new API.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20210503151849.8766-4-peter.maydell@linaro.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      4bb32cd7
    • Peter Maydell's avatar
      hw/ppc/spapr_vio: Reset TCE table object with device_cold_reset() · 3e1c8ba9
      Peter Maydell authored
      
      The spapr_vio_quiesce_one() function resets the TCE table object
      (TYPE_SPAPR_TCE_TABLE) via device_legacy_reset().  We know that
      objects of that type do not have a qbus of their own, so the new
      device_cold_reset() function (which resets both the device and its
      child buses) is equivalent here to device_legacy_reset() and we can
      just switch to the new API.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20210503151849.8766-3-peter.maydell@linaro.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      3e1c8ba9
    • Peter Maydell's avatar
      hw/intc/spapr_xive: Use device_cold_reset() instead of device_legacy_reset() · b2df46fd
      Peter Maydell authored
      
      The h_int_reset() function resets the XIVE interrupt controller via
      device_legacy_reset().  We know that the interrupt controller does
      not have a qbus of its own, so the new device_cold_reset() function
      (which resets both the device and its child buses) is equivalent here
      to device_legacy_reset() and we can just switch to the new API.
      
      Signed-off-by: default avatarPeter Maydell <peter.maydell@linaro.org>
      Message-Id: <20210503151849.8766-2-peter.maydell@linaro.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      b2df46fd
    • Bruno Larsen (billionai)'s avatar
      target/ppc: removed VSCR from SPR registration · f350982f
      Bruno Larsen (billionai) authored
      
      Since vscr is not an spr, its initialization was removed from the
      spr registration functions, and moved to the relevant init_procs.
      
      We may look into adding vscr to the reset path instead of the init
      path (as suggested by David Gibson), but this looked like a good
      enough solution for now.
      
      Signed-off-by: default avatarBruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
      Message-Id: <20210430193533.82136-6-bruno.larsen@eldorado.org.br>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      f350982f
    • Richard Henderson's avatar
      target/ppc: Reduce the size of ppc_spr_t · 72369f5c
      Richard Henderson authored
      
      We elide values when registering sprs, we might as well
      save space in the array as well.
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20210501022923.1179736-3-richard.henderson@linaro.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      72369f5c
    • Richard Henderson's avatar
      target/ppc: Clean up _spr_register et al · 61135639
      Richard Henderson authored
      
      Introduce 3 helper macros to elide arguments that we cannot supply.
      This reduces the repetition required to get the job done.
      
      Signed-off-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Message-Id: <20210501022923.1179736-2-richard.henderson@linaro.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      61135639
    • Nicholas Piggin's avatar
      target/ppc: Add POWER10 exception model · 526cdce7
      Nicholas Piggin authored
      
      POWER10 adds a new bit that modifies interrupt behaviour, LPCR[HAIL],
      and it removes support for the LPCR[AIL]=0b10 mode.
      
      Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
      Tested-by: default avatarCédric Le Goater <clg@kaod.org>
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Message-Id: <20210501072436.145444-3-npiggin@gmail.com>
      [dwg: Corrected tab indenting]
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      526cdce7
    • Nicholas Piggin's avatar
      target/ppc: rework AIL logic in interrupt delivery · 8b7e6b07
      Nicholas Piggin authored
      
      The AIL logic is becoming unmanageable spread all over powerpc_excp(),
      and it is slated to get even worse with POWER10 support.
      
      Move it all to a new helper function.
      
      Reviewed-by: default avatarCédric Le Goater <clg@kaod.org>
      Tested-by: default avatarCédric Le Goater <clg@kaod.org>
      Signed-off-by: default avatarNicholas Piggin <npiggin@gmail.com>
      Message-Id: <20210501072436.145444-2-npiggin@gmail.com>
      [dwg: Corrected tab indenting]
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      8b7e6b07
    • Bruno Larsen (billionai)'s avatar
      target/ppc: move opcode table logic to translate.c · 7468e2c8
      Bruno Larsen (billionai) authored
      
      code motion to remove opcode callback table from
      translate_init.c.inc to translate.c in preparation to remove
      the #include <translate_init.c.inc> from translate.c. Also created
      destroy_ppc_opcodes and removed that logic from ppc_cpu_unrealize
      
      Signed-off-by: default avatarBruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
      Message-Id: <20210429162130.2412-2-bruno.larsen@eldorado.org.br>
      Reviewed-by: default avatarRichard Henderson <richard.henderson@linaro.org>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      7468e2c8
    • Bruno Larsen (billionai)'s avatar
      target/ppc: code motion from translate_init.c.inc to gdbstub.c · 35a5d74e
      Bruno Larsen (billionai) authored
      
      All the code related to gdb has been moved from translate_init.c.inc
      file to the gdbstub.c file, where it makes more sense.
      
      Version 4 fixes the omission of internal.h in gdbstub, mentioned in
      <87sg3d2gf5.fsf@linux.ibm.com>, and the extra blank line.
      
      Signed-off-by: default avatarBruno Larsen (billionai) <bruno.larsen@eldorado.org.br>
      Suggested-by: default avatarFabiano Rosas <farosas@linux.ibm.com>
      Message-Id: <20210426184706.48040-1-bruno.larsen@eldorado.org.br>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      35a5d74e
    • Daniel Henrique Barboza's avatar
      spapr_drc.c: handle hotunplug errors in drc_unisolate_logical() · 87758fed
      Daniel Henrique Barboza authored
      At this moment, PAPR does not provide a way to report errors during a
      device removal operation. This led the pSeries machine to implement
      extra mechanisms to try to fallback and recover from an error that might
      have happened during the hotunplug in the guest side. This started to
      change a bit with commit fe1831ef ("spapr_drc.c: use DRC
      reconfiguration to cleanup DIMM unplug state"), where one way to
      fallback from a memory removal error was introduced.
      
      Around the same time, in [1], the idea of using RTAS set-indicator for
      this role was first introduced. The RTAS set-indicator call, when
      attempting to UNISOLATE a DRC that is already UNISOLATED or CONFIGURED,
      returns RTAS_OK and does nothing else for both QEMU and phyp. This gives
      us an opportunity to use this behavior to signal the hypervisor layer
      when a device removal errir happens, allowing QEMU/phyp to do a proper
      error handling. Using set-indicator to report HP errors isn't strange to
      PAPR, as per R1-13.5.3.4-4. of table 13.7 of current PAPR [2]:
      
      "For all DR options: If this is a DR operation that involves the user
      insert- ing a DR entity, then if the firmware can determine that the
      inserted entity would cause a system disturbance, then the set-indicator
      RTAS call must not unisolate the entity and must return an error status
      which is unique to the particular error."
      
      A change was proposed to the pSeries Linux kernel to call set-indicator
      to move a DRC to 'unisolate' in the case of a hotunplug error in the
      guest side [3]. Setting a DRC that is already unisolated or configured to
      'unisolate' is a no-op (returns RTAS_OK) for QEMU and also for phyp.
      Being a benign change for hypervisors that doesn't care about handling
      such errors, we expect the kernel to accept this change at some point.
      
      This patch prepares the pSeries machine for this new kernel feature by
      changing drc_unisolate_logical() to handle guest side hotunplug errors.
      For CPUs it's a simple matter of setting drc->unplug_requested to 'false',
      while for LMBs the process is similar to the rollback that is done in
      rtas_ibm_configure_connector().
      
      [1] https://lists.gnu.org/archive/html/qemu-devel/2021-02/msg06395.html
      [2] https://openpowerfoundation.org/wp-content/uploads/2020/07/LoPAR-20200611.pdf
      [3] https://patchwork.ozlabs.org/project/linuxppc-dev/patch/20210416210216.380291-3-danielhb413@gmail.com/
      
      
      
      Reviewed-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      Message-Id: <20210420165100.108368-2-danielhb413@gmail.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      87758fed
    • Daniel Henrique Barboza's avatar
      spapr.h: increase FDT_MAX_SIZE · b7573092
      Daniel Henrique Barboza authored
      
      Certain SMP topologies stress, e.g. 1 thread/core, 2048 cores and
      1 socket, stress the current maximum size of the pSeries FDT:
      
      Calling ibm,client-architecture-support...qemu-system-ppc64: error
      creating device tree: (fdt_setprop(fdt, offset,
      "ibm,processor-segment-sizes", segs, sizeof(segs))): FDT_ERR_NOSPACE
      
      2048 is the default NR_CPUS value for the pSeries kernel. It's expected
      that users will want QEMU to be able to handle this kind of
      configuration.
      
      Bumping FDT_MAX_SIZE to 2MB is enough for these setups to be created.
      
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      Message-Id: <20210408204049.221802-3-danielhb413@gmail.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      b7573092
    • Daniel Henrique Barboza's avatar
      spapr.c: do not use MachineClass::max_cpus to limit CPUs · 5642e451
      Daniel Henrique Barboza authored
      
      Up to this patch, 'max_cpus' value is hardcoded to 1024 (commit
      6244bb7e). In theory this patch would simply bump it to 2048, since
      it's the default NR_CPUS kernel setting for ppc64 servers nowadays, but
      the whole mechanic of MachineClass:max_cpus is flawed for the pSeries
      machine. The two supported accelerators, KVM and TCG, can live without
      it.
      
      TCG guests don't have a theoretical limit. The user must be free to
      emulate as many CPUs as the hardware is capable of. And even if there
      were a limit, max_cpus is not the proper way to report it since it's a
      common value checked by SMP code in machine_smp_parse() for KVM as well.
      
      For KVM guests, the proper way to limit KVM CPUs is by host
      configuration via NR_CPUS, not a QEMU hardcoded value. There is no
      technical reason for a pSeries QEMU guest to forcefully stay below
      NR_CPUS.
      
      This hardcoded value also disregard hosts that might have a lower
      NR_CPUS limit, say 512. In this case, machine.c:machine_smp_parse() will
      allow a 1024 value to pass, but then kvm_init() will complain about it
      because it will exceed NR_CPUS:
      
      Number of SMP cpus requested (1024) exceeds the maximum cpus supported
      by KVM (512)
      
      A better 'max_cpus' value would consider host settings, but
      MachineClass::max_cpus is defined well before machine_init() and
      kvm_init(). We can't check for KVM limits because it's too soon, so we
      end up making a guess.
      
      This patch makes MachineClass:max_cpus settings innocuous by setting it
      to INT32_MAX. machine.c:machine_smp_parse() will not fail the
      verification based on max_cpus, letting kvm_init() do the checking with
      actual host settings. And TCG guests get to do whatever the hardware is
      capable of emulating.
      
      Signed-off-by: default avatarDaniel Henrique Barboza <danielhb413@gmail.com>
      Message-Id: <20210408204049.221802-2-danielhb413@gmail.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      5642e451
Loading