1. 25 9月, 2015 3 次提交
  2. 24 9月, 2015 28 次提交
  3. 23 9月, 2015 9 次提交
    • P
      Merge remote-tracking branch 'remotes/dgibson/tags/spapr-next-20150923' into staging · 684bb577
      Peter Maydell 提交于
      sPAPR Patch Queue: 2015-09-23
      
      Highlights:
          * pseries-2.5 machine type
          * Memory hotplug for "pseries" guests
          * Fixes to the PAPR Dynamic Reconfiguration hotplug code
          * Several PAPR compliance fixes
          * New SLOF with:
              * GPT support
              * Much faster VGA handling
      
      # gpg: Signature made Wed 23 Sep 2015 02:50:10 BST using DSA key ID FDDA6FC6
      # gpg: Good signature from "David Gibson <david@gibson.dropbear.id.au>"
      # 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: F730 2185 38B4 D13E FD80  34F2 6882 CAC6 FDDA 6FC6
      
      * remotes/dgibson/tags/spapr-next-20150923: (36 commits)
        sPAPR: Enable EEH on VFIO PCI device only
        sPAPR: Revert don't enable EEH on emulated PCI devices
        ppc/spapr: Implement H_RANDOM hypercall in QEMU
        ppc/spapr: Fix buffer overflow in spapr_populate_drconf_memory()
        spapr: Fix default NUMA node allocation for threads
        spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type
        spapr: Support hotplug by specifying DRC count
        spapr: Revert to memory@XXXX representation for non-hotplugged memory
        spapr: Populate ibm,associativity-lookup-arrays correctly for non-NUMA
        spapr: Provide better error message when slots exceed max allowed
        spapr: Don't allow memory hotplug to memory less nodes
        spapr: Memory hotplug support
        spapr: Make hash table size a factor of maxram_size
        spapr: Support ibm,dynamic-reconfiguration-memory
        spapr: Add LMB DR connectors
        spapr: Use QEMU limit for maximum CPUs number
        spapr: Don't use QOM [*] syntax for DR connectors.
        spapr_drc: use RTAS return codes for methods called by RTAS
        spapr: Initialize hotplug memory address space
        spapr_drc: don't allow 'empty' DRCs to be unisolated or allocated
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      684bb577
    • G
      sPAPR: Enable EEH on VFIO PCI device only · d76548a9
      Gavin Shan 提交于
      This checks if the PCI device retrieved from the PCI device address
      is VFIO PCI device when enabling EEH functionality. If it's not
      VFIO PCI device, the EEH functonality isn't enabled.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      d76548a9
    • G
      sPAPR: Revert don't enable EEH on emulated PCI devices · 47445c80
      Gavin Shan 提交于
      This reverts commit 7cb18007 ("sPAPR: Don't enable EEH on emulated
      PCI devices") as rtas_ibm_set_eeh_option() isn't the right place
      to check if there has the corresponding PCI device for the input
      address, which can be PE address, not PCI device address.
      Signed-off-by: NGavin Shan <gwshan@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      47445c80
    • T
      ppc/spapr: Implement H_RANDOM hypercall in QEMU · 4d9392be
      Thomas Huth 提交于
      The PAPR interface defines a hypercall to pass high-quality
      hardware generated random numbers to guests. Recent kernels can
      already provide this hypercall to the guest if the right hardware
      random number generator is available. But in case the user wants
      to use another source like EGD, or QEMU is running with an older
      kernel, we should also have this call in QEMU, so that guests that
      do not support virtio-rng yet can get good random numbers, too.
      
      This patch now adds a new pseudo-device to QEMU that either
      directly provides this hypercall to the guest or is able to
      enable the in-kernel hypercall if available. The in-kernel
      hypercall can be enabled with the use-kvm property, e.g.:
      
       qemu-system-ppc64 -device spapr-rng,use-kvm=true
      
      For handling the hypercall in QEMU instead, a "RngBackend" is
      required since the hypercall should provide "good" random data
      instead of pseudo-random (like from a "simple" library function
      like rand() or g_random_int()). Since there are multiple RngBackends
      available, the user must select an appropriate back-end via the
      "rng" property of the device, e.g.:
      
       qemu-system-ppc64 -object rng-random,filename=/dev/hwrng,id=gid0 \
                         -device spapr-rng,rng=gid0 ...
      
      See http://wiki.qemu-project.org/Features-Done/VirtIORNG for
      other example of specifying RngBackends.
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      4d9392be
    • T
      ppc/spapr: Fix buffer overflow in spapr_populate_drconf_memory() · ef001f06
      Thomas Huth 提交于
      The buffer that is allocated in spapr_populate_drconf_memory()
      is used for setting both, the "ibm,dynamic-memory" and the
      "ibm,associativity-lookup-arrays" property. However, only the
      size of the first one is taken into account when allocating the
      memory. So if the length of the second property is larger than
      the length of the first one, we run into a buffer overflow here!
      Fix it by taking the length of the second property into account,
      too.
      
      Fixes: "spapr: Support ibm,dynamic-reconfiguration-memory" patch
      Signed-off-by: NThomas Huth <thuth@redhat.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      ef001f06
    • D
      spapr: Fix default NUMA node allocation for threads · 20bb648d
      David Gibson 提交于
      At present, if guest numa nodes are requested, but the cpus in each node
      are not specified, spapr just uses the default behaviour or assigning each
      vcpu round-robin to nodes.
      
      If smp_threads != 1, that will assign adjacent threads in a core to
      different NUMA nodes.  As well as being just weird, that's a configuration
      that can't be represented in the device tree we give to the guest, which
      means the guest and qemu end up with different ideas of the NUMA topology.
      
      This patch implements mc->cpu_index_to_socket_id in the spapr code to
      make sure vcpus get assigned to nodes only at the socket granularity.
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      20bb648d
    • B
      spapr: Move memory hotplug to RTAS_LOG_V6_HP_ID_DRC_COUNT type · 0a417869
      Bharata B Rao 提交于
      Till now memory hotplug used RTAS_LOG_V6_HP_ID_DRC_INDEX hotplug type
      which meant that we generated one hotplug type of EPOW event for every
      256MB (SPAPR_MEMORY_BLOCK_SIZE). This quickly overruns the kernel
      rtas log buffer thus resulting in loss of memory hotplug events. Switch
      to RTAS_LOG_V6_HP_ID_DRC_COUNT hotplug type for memory so that we
      generate only one event per hotplug request.
      Signed-off-by: NBharata B Rao <bharata@linux.vnet.ibm.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      0a417869
    • B
      spapr: Support hotplug by specifying DRC count · 7a36ae7a
      Bharata B Rao 提交于
      Support hotplug identifier type RTAS_LOG_V6_HP_ID_DRC_COUNT that allows
      hotplugging of DRCs by specifying the DRC count.
      
      While we are here, rename
      
      spapr_hotplug_req_add_event() to spapr_hotplug_req_add_by_index()
      spapr_hotplug_req_remove_event() to spapr_hotplug_req_remove_by_index()
      
      so that they match with spapr_hotplug_req_add_by_count().
      Signed-off-by: NBharata B Rao <bharata@linux.vnet.ibm.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      7a36ae7a
    • B
      spapr: Revert to memory@XXXX representation for non-hotplugged memory · e8f986fc
      Bharata B Rao 提交于
      Don't represent non-hotluggable memory under drconf node. With this
      we don't have to create DRC objects for them.
      
      The effect of this patch is that we revert back to memory@XXXX representation
      for all the memory specified with -m option and represent the cold
      plugged memory and hot-pluggable memory under
      ibm,dynamic-reconfiguration-memory.
      Signed-off-by: NBharata B Rao <bharata@linux.vnet.ibm.com>
      Reviewed-by: NDavid Gibson <david@gibson.dropbear.id.au>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      e8f986fc