1. 24 10月, 2019 6 次提交
    • G
      spapr: Set VSMT to smp_threads by default · 29cb4187
      Greg Kurz 提交于
      Support for setting VSMT is available in KVM since linux-4.13. Most distros
      that support KVM on POWER already have it. It thus seem reasonable enough
      to have the default machine to set VSMT to smp_threads.
      
      This brings contiguous VCPU ids and thus brings their upper bound down to
      the machine's max_cpus. This is especially useful for XIVE KVM devices,
      which may thus allocate only one VP descriptor per VCPU.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <157010411885.246126.12610015369068227139.stgit@bahia.lan>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      29cb4187
    • C
      ppc/pnv: Use address_space_stq_be() when triggering an interrupt from PSI · 06d26eeb
      Cédric Le Goater 提交于
      Include the XIVE_TRIGGER_PQ bit in the trigger data which is how
      hardware signals to the IC that the PQ bits of the interrupt source
      have been checked.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20191007084102.29776-3-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      06d26eeb
    • C
      ppc/pnv: Improve trigger data definition · 106695ab
      Cédric Le Goater 提交于
      The trigger data is used for both triggers of a HW source interrupts,
      PHB, PSI, and triggers for rerouting interrupts between interrupt
      controllers.
      
      When an interrupt is rerouted, the trigger data follows an "END
      trigger" format. In that case, the remote IC needs EAS containing an
      END index to perform a lookup of an END.
      
      An END trigger, bit0 of word0 set to '1', is defined as :
      
                   |0123|4567|0123|4567|0123|4567|0123|4567|
          W0 E=1   |1P--|BLOC|          END IDX            |
          W1 E=1   |M   |           END DATA               |
      
      An EAS is defined as :
      
                   |0123|4567|0123|4567|0123|4567|0123|4567|
          W0       |V---|BLOC|          END IDX            |
          W1       |M   |          END DATA                |
      
      The END trigger adds an extra 'PQ' bit, bit1 of word0 set to '1',
      signaling that the PQ bits have been checked. That bit is unused in
      the initial EAS definition.
      
      When a HW device performs the trigger, the trigger data follows an
      "EAS trigger" format because the trigger data in that case contains an
      EAS index which the IC needs to look for.
      
      An EAS trigger, bit0 of word0 set to '0', is defined as :
      
                   |0123|4567|0123|4567|0123|4567|0123|4567|
          W0 E=0   |0P--|---- ---- ---- ---- ---- ---- ----|
          W1 E=0   |BLOC|            EAS INDEX             |
      
      There is also a 'PQ' bit, bit1 of word0 to '1', signaling that the
      PQ bits have been checked.
      
      Introduce these new trigger bits and rename the XIVE_SRCNO macros in
      XIVE_EAS to reflect better the nature of the data.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20191007084102.29776-2-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      106695ab
    • S
      target/ppc: Fix for optimized vsl/vsr instructions · 8d745875
      Stefan Brankovic 提交于
      In previous implementation, invocation of TCG shift function could request
      shift of TCG variable by 64 bits when variable 'sh' is 0, which is not
      supported in TCG (values can be shifted by 0 to 63 bits). This patch fixes
      this by using two separate invocation of TCG shift functions, with maximum
      shift amount of 32.
      
      Name of variable 'shifted' is changed to 'carry' so variable naming
      is similar to old helper implementation.
      
      Variables 'avrA' and 'avrB' are replaced with variable 'avr'.
      
      Fixes: 4e6d0920Reported-by: N"Paul A. Clark" <pc@us.ibm.com>
      Reported-by: NMark Cave-Ayland <mark.cave-ayland@ilande.co.uk>
      Suggested-by: NAleksandar Markovic <aleksandar.markovic@rt-rk.com>
      Signed-off-by: NStefan Brankovic <stefan.brankovic@rt-rk.com>
      Message-Id: <1570196639-7025-2-git-send-email-stefan.brankovic@rt-rk.com>
      Tested-by: NPaul A. Clarke  <pc@us.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      8d745875
    • G
      xics: Make some device types not user creatable · e6144bf9
      Greg Kurz 提交于
      Some device types of the XICS model are exposed to the QEMU command
      line:
      
      $ ppc64-softmmu/qemu-system-ppc64 -device help | grep ic[sp]
      name "icp"
      name "ics"
      name "ics-spapr"
      name "pnv-icp", desc "PowerNV ICP"
      
      These are internal devices that shouldn't be instantiable by the
      user. By the way, they can't be because their respective realize
      functions expect link properties that can't be set from the command
      line:
      
      qemu-system-ppc64: -device icp: required link 'xics' not found:
       Property '.xics' not found
      qemu-system-ppc64: -device ics: required link 'xics' not found:
       Property '.xics' not found
      qemu-system-ppc64: -device ics-spapr: required link 'xics' not found:
       Property '.xics' not found
      qemu-system-ppc64: -device pnv-icp: required link 'xics' not found:
       Property '.xics' not found
      
      Hide them by setting dc->user_creatable to false in the base class
      "icp" and "ics" init functions.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <157017826724.337875.14822177178282524024.stgit@bahia.lan>
      Message-Id: <157045578962.865784.8551555523533955113.stgit@bahia.lan>
      [dwg: Folded reason comment into base patch]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      e6144bf9
    • G
      xive: Make some device types not user creatable · 878b2b48
      Greg Kurz 提交于
      Some device types of the XIVE model are exposed to the QEMU command
      line:
      
      $ ppc64-softmmu/qemu-system-ppc64 -device help | grep xive
      name "xive-end-source", desc "XIVE END Source"
      name "xive-source", desc "XIVE Interrupt Source"
      name "xive-tctx", desc "XIVE Interrupt Thread Context"
      
      These are internal devices that shouldn't be instantiable by the
      user. By the way, they can't be because their respective realize
      functions expect link properties that can't be set from the command
      line:
      
      qemu-system-ppc64: -device xive-source: required link 'xive' not found:
       Property '.xive' not found
      qemu-system-ppc64: -device xive-end-source: required link 'xive' not found:
       Property '.xive' not found
      qemu-system-ppc64: -device xive-tctx: required link 'cpu' not found:
       Property '.cpu' not found
      
      Hide them by setting dc->user_creatable to false in their respective
      class init functions.
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <157017473006.331610.2983143972519884544.stgit@bahia.lan>
      Message-Id: <157045578401.865784.6058183726552779559.stgit@bahia.lan>
      Reviewed-by: NCédric Le Goater <clg@kaod.org>
      [dwg: Folded comment update into base patch]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      878b2b48
  2. 23 10月, 2019 21 次提交
  3. 22 10月, 2019 13 次提交