Skip to content
Snippets Groups Projects
  1. Nov 20, 2017
  2. Nov 19, 2017
    • Greg Kurz's avatar
      spapr: reset DRCs after devices · 82512483
      Greg Kurz authored
      
      A DRC with a pending unplug request releases its associated device at
      machine reset time.
      
      In the case of LMB, when all DRCs for a DIMM device have been reset,
      the DIMM gets unplugged, causing guest memory to disappear. This may
      be very confusing for anything still using this memory.
      
      This is exactly what happens with vhost backends, and QEMU aborts
      with:
      
      qemu-system-ppc64: used ring relocated for ring 2
      qemu-system-ppc64: qemu/hw/virtio/vhost.c:649: vhost_commit: Assertion
       `r >= 0' failed.
      
      The issue is that each DRC registers a QEMU reset handler, and we
      don't control the order in which these handlers are called (ie,
      a LMB DRC will unplug a DIMM before the virtio device using the
      memory on this DIMM could stop its vhost backend).
      
      To avoid such situations, let's reset DRCs after all devices
      have been reset.
      
      Reported-by: default avatarMallesh N. Koti <mallesh@linux.vnet.ibm.com>
      Signed-off-by: default avatarGreg Kurz <groug@kaod.org>
      Reviewed-by: default avatarDaniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
      Reviewed-by: default avatarMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      82512483
    • Suraj Jitindar Singh's avatar
      target/ppc: Update setting of cpu features to account for compat modes · 7abd43ba
      Suraj Jitindar Singh authored
      
      The device tree nodes ibm,arch-vec-5-platform-support and ibm,pa-features
      are used to communicate features of the cpu to the guest operating
      system. The properties of each of these are determined based on the
      selected cpu model and the availability of hypervisor features.
      Currently the compatibility mode of the cpu is not taken into account.
      
      The ibm,arch-vec-5-platform-support node is used to communicate the
      level of support for various ISAv3 processor features to the guest
      before CAS to inform the guests' request. The available mmu mode should
      only be hash unless the cpu is a POWER9 which is not in a prePOWER9
      compat mode, in which case the available modes depend on the
      accelerator and the hypervisor capabilities.
      
      The ibm,pa-featues node is used to communicate the level of cpu support
      for various features to the guest os. This should only contain features
      relevant to the operating mode of the processor, that is the selected
      cpu model taking into account any compat mode. This means that the
      compat mode should be taken into account when choosing the properties of
      ibm,pa-features and they should match the compat mode selected, or the
      cpu model selected if no compat mode.
      
      Update the setting of these cpu features in the device tree as described
      above to properly take into account any compat mode. We use the
      ppc_check_compat function which takes into account the current processor
      model and the cpu compat mode.
      
      Signed-off-by: default avatarSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Signed-off-by: default avatarDavid Gibson <david@gibson.dropbear.id.au>
      7abd43ba
  3. Nov 17, 2017
Loading