1. 12 3月, 2019 33 次提交
    • C
      ppc/pnv: fix logging primitives using Ox · cdbaf8cd
      Cédric Le Goater 提交于
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-12-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      cdbaf8cd
    • C
      ppc/xive: activate HV support · 4836b455
      Cédric Le Goater 提交于
      The NSR register of the HV ring has a different, although similar, bit
      layout. TM_QW3_NSR_HE_PHYS bit should now be raised when the
      Hypervisor interrupt line is signaled. Other bits TM_QW3_NSR_HE_POOL
      and TM_QW3_NSR_HE_LSI are not modeled. LSI are for special interrupts
      reserved for HW bringup and the POOL bit is used when signaling a
      group of VPs. This is not currently implemented in Linux but it is in
      pHyp.
      
      The most important special commands on the HV TIMA page are added to
      let the core manage interrupts : acking and changing the CPU priority.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-10-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      4836b455
    • C
      ppc/pnv: introduce a new pic_print_info() operation to the chip model · d8e4aad5
      Cédric Le Goater 提交于
      The POWER9 and POWER8 processors have different interrupt controllers,
      and reporting their state requires calling different helper routines.
      
      However, the interrupt presenters are still handled in the higher
      level pic_print_info() routine because they are not related to the
      chip.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-9-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      d8e4aad5
    • C
      ppc/pnv: introduce a new dt_populate() operation to the chip model · eb859a27
      Cédric Le Goater 提交于
      The POWER9 and POWER8 processors have a different set of devices and a
      different device tree layout.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-8-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      eb859a27
    • C
      ppc/pnv: add a XIVE interrupt controller model for POWER9 · 2dfa91a2
      Cédric Le Goater 提交于
      This is a simple model of the POWER9 XIVE interrupt controller for the
      PowerNV machine which only addresses the needs of the skiboot
      firmware. The PowerNV model reuses the common XIVE framework developed
      for sPAPR as the fundamentals aspects are quite the same. The
      difference are outlined below.
      
      The controller initial BAR configuration is performed using the XSCOM
      bus from there, MMIO are used for further configuration.
      
      The MMIO regions exposed are :
      
       - Interrupt controller registers
       - ESB pages for IPIs and ENDs
       - Presenter MMIO (Not used)
       - Thread Interrupt Management Area MMIO, direct and indirect
      
      The virtualization controller MMIO region containing the IPI ESB pages
      and END ESB pages is sub-divided into "sets" which map portions of the
      VC region to the different ESB pages. These are modeled with custom
      address spaces and the XiveSource and XiveENDSource objects are sized
      to the maximum allowed by HW. The memory regions are resized at
      run-time using the configuration of EDT set translation table provided
      by the firmware.
      
      The XIVE virtualization structure tables (EAT, ENDT, NVTT) are now in
      the machine RAM and not in the hypervisor anymore. The firmware
      (skiboot) configures these tables using Virtual Structure Descriptor
      defining the characteristics of each table : SBE, EAS, END and
      NVT. These are later used to access the virtual interrupt entries. The
      internal cache of these tables in the interrupt controller is updated
      and invalidated using a set of registers.
      
      Still to address to complete the model but not fully required is the
      support for block grouping. Escalation support will be necessary for
      KVM guests.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-7-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      2dfa91a2
    • C
      ppc/pnv: change the CPU machine_data presenter type to Object * · 956b8f46
      Cédric Le Goater 提交于
      The POWER9 PowerNV machine will use a XIVE interrupt presenter type.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-6-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      956b8f46
    • C
      ppc/pnv: export the xive_router_notify() routine · a58a18ad
      Cédric Le Goater 提交于
      The PowerNV machine with need to encode the block id in the source
      interrupt number before forwarding the source event notification to
      the Router.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-5-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      a58a18ad
    • C
      ppc/xive: export the TIMA memory accessors · f9b9db38
      Cédric Le Goater 提交于
      The PowerNV machine can perform indirect loads and stores on the TIMA
      on behalf of another CPU. Give the controller the possibility to call
      the TIMA memory accessors with a XiveTCTX of its choice.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-4-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      f9b9db38
    • C
      ppc: externalize ppc_get_vcpu_by_pir() · 051e2973
      Cédric Le Goater 提交于
      We will use it to get the CPU interrupt presenter in XIVE when the
      TIMA is accessed from the indirect page.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-3-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      051e2973
    • C
      ppc/xive: hardwire the Physical CAM line of the thread context · d514c48d
      Cédric Le Goater 提交于
      By default on P9, the HW CAM line (23bits) is hardwired to :
      
            0x000||0b1||4Bit chip number||7Bit Thread number.
      
      When the block group mode is enabled at the controller level (PowerNV),
      the CAM line is changed for CAM compares to :
      
            4Bit chip number||0x001||7Bit Thread number
      
      This will require changes in xive_presenter_tctx_match() possibly.
      This is a lowlevel functionality of the HW controller and it is not
      strictly needed. Leave it for later.
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190306085032.15744-2-clg@kaod.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      d514c48d
    • A
      PPC: E500: Add FSL I2C controller and integrate RTC with it · 7abb479c
      Andrew Randrianasulu 提交于
      Original commit message:
      This patch adds an emulation model for i2c controller found on most of the FSL SoCs.
      It also integrates the RTC (ds1338) that sits on the i2c Bus with e500 machine model.
      
      Patch was originally written by Amit Singh Tomar <amit.tomar@freescale.com>
      see http://patchwork.ozlabs.org/patch/431475/
      I only fixed it enough for application on top of current qemu master
      20b084c4, and hopefully fixed checkpatch errors
      
      Tested by booting Linux kernel 4.20.12. Now e500 machine doesn't need
      network time protocol daemon because it will have working RTC
      (before all timestamps on files were from 2016)
      Signed-off-by: NAmit Singh Tomar <amit.tomar@freescale.com>
      Signed-off-by: NAndrew Randrianasulu <randrianasulu@gmail.com>
      Message-Id: <20190306102812.28972-1-randrianasulu@gmail.com>
      [dwg: Add Kconfig stanza to define the new symbol, update MAINTAINERS]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      7abb479c
    • S
      target/ppc/spapr: Enable H_PAGE_INIT in-kernel handling · 68f9f708
      Suraj Jitindar Singh 提交于
      The H_CALL H_PAGE_INIT can be used to zero or copy a page of guest
      memory. Enable the in-kernel H_PAGE_INIT handler.
      
      The in-kernel handler takes half the time to complete compared to
      handling the H_CALL in userspace.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Message-Id: <20190306060608.19935-1-sjitindarsingh@gmail.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      68f9f708
    • D
      spapr: Force SPAPR_MEMORY_BLOCK_SIZE to be a hwaddr (64-bit) · e075623a
      David Gibson 提交于
      SPAPR_MEMORY_BLOCK_SIZE is logically a difference in memory addresses, and
      hence of type hwaddr which is 64-bit.  Previously it wasn't marked as such
      which means that it could be treated as 32-bit.  That will work in some
      circumstances but if multiplied by another 32-bit value it could lead to
      a 32-bit overflow and an incorrect result.
      
      One specific instance of this in spapr_lmb_dt_populate() was spotted by
      Coverity (CID 1399145).
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      e075623a
    • S
      target/ppc/spapr: Clear partition table entry when allocating hash table · 176dccee
      Suraj Jitindar Singh 提交于
      If we allocate a hash page table then we know that the guest won't be
      using process tables, so set the partition table entry maintained for
      the guest to zero. If this isn't done, then the guest radix bit will
      remain set in the entry. This means that when the guest calls
      H_REGISTER_PROCESS_TABLE there will be a mismatch between then flags
      and the value in spapr->patb_entry, and the call will fail. The guest
      will then panic:
      
      Failed to register process table (rc=-4)
      kernel BUG at arch/powerpc/platforms/pseries/lpar.c:959
      
      The result being that it isn't possible to boot a hash guest on a P9
      system.
      
      Also fix a bug in the flags parsing in h_register_process_table() which
      was introduced by the same patch, and simplify the handling to make it
      less likely that errors will be introduced in the future. The effect
      would have been setting the host radix bit LPCR_HR for a hash guest
      using process tables, which currently isn't supported and so couldn't
      have been triggered.
      
      Fixes: 00fd075e "target/ppc/spapr: Set LPCR:HR when using Radix mode"
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Message-Id: <20190305022102.17610-1-sjitindarsingh@gmail.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      176dccee
    • A
      PPC: E500: Update u-boot to v2019.01 · f2a3b549
      Alexander Graf 提交于
      Quite a while has passed since we last updated U-Boot for e500. This patch
      bumps it to the last released version 2019.01 to make sure users don't feel
      like they're using out of date software.
      Signed-off-by: NAlexander Graf <agraf@csgraf.de>
      Message-Id: <20190304103930.16319-1-agraf@csgraf.de>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      f2a3b549
    • F
      target/ppc: Refactor kvm_handle_debug · 468e3a1a
      Fabiano Rosas 提交于
      There are four scenarios being handled in this function:
      
      - single stepping
      - hardware breakpoints
      - software breakpoints
      - fallback (no debug supported)
      
      A future patch will add code to handle specific single step and
      software breakpoints cases so let's split each scenario into its own
      function now to avoid hurting readability.
      Signed-off-by: NFabiano Rosas <farosas@linux.ibm.com>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <20190228225759.21328-5-farosas@linux.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      468e3a1a
    • F
      target/ppc: Move handling of hardware breakpoints to a separate function · 2cbd1581
      Fabiano Rosas 提交于
      This is in preparation for a refactoring of the kvm_handle_debug
      function in the next patch.
      Signed-off-by: NFabiano Rosas <farosas@linux.ibm.com>
      Message-Id: <20190228225759.21328-4-farosas@linux.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      2cbd1581
    • F
      target/ppc: Move exception vector offset computation into a function · 2586a4d7
      Fabiano Rosas 提交于
      Signed-off-by: NFabiano Rosas <farosas@linux.ibm.com>
      Reviewed-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <20190228225759.21328-2-farosas@linux.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      2586a4d7
    • S
      target/ppc/spapr: Enable mitigations by default for pseries-4.0 machine type · 2782ad4c
      Suraj Jitindar Singh 提交于
      There are currently 3 mitigations the availability of which is controlled
      by the spapr-caps mechanism, cap-cfpc, cap-sbbc, and cap-ibs. Enable these
      mitigations by default for the pseries-4.0 machine type.
      
      By now machine firmware should have been upgraded to allow these
      settings.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Message-Id: <20190301044609.9626-3-sjitindarsingh@gmail.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      2782ad4c
    • S
      target/ppc/tcg: make spapr_caps apply cap-[cfpc/sbbc/ibs] non-fatal for tcg · 006e9d36
      Suraj Jitindar Singh 提交于
      The spapr_caps cap-cfpc, cap-sbbc and cap-ibs are used to control the
      availability of certain mitigations to the guest. These haven't been
      implemented under TCG, it is unlikely they ever will be, and it is unclear
      as to whether they even need to be.
      
      As such, make failure to apply these capabilities under TCG non-fatal.
      Instead we print a warning message to the user but still allow the guest
      to continue.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Message-Id: <20190301044609.9626-2-sjitindarsingh@gmail.com>
      [dwg: Small style fix]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      006e9d36
    • S
      target/ppc/spapr: Add SPAPR_CAP_CCF_ASSIST · 8ff43ee4
      Suraj Jitindar Singh 提交于
      Introduce a new spapr_cap SPAPR_CAP_CCF_ASSIST to be used to indicate
      the requirement for a hw-assisted version of the count cache flush
      workaround.
      
      The count cache flush workaround is a software workaround which can be
      used to flush the count cache on context switch. Some revisions of
      hardware may have a hardware accelerated flush, in which case the
      software flush can be shortened. This cap is used to set the
      availability of such hardware acceleration for the count cache flush
      routine.
      
      The availability of such hardware acceleration is indicated by the
      H_CPU_CHAR_BCCTR_FLUSH_ASSIST flag being set in the characteristics
      returned from the KVM_PPC_GET_CPU_CHAR ioctl.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Message-Id: <20190301031912.28809-2-sjitindarsingh@gmail.com>
      [dwg: Small style fixes]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      8ff43ee4
    • S
      target/ppc/spapr: Add workaround option to SPAPR_CAP_IBS · 399b2896
      Suraj Jitindar Singh 提交于
      The spapr_cap SPAPR_CAP_IBS is used to indicate the level of capability
      for mitigations for indirect branch speculation. Currently the available
      values are broken (default), fixed-ibs (fixed by serialising indirect
      branches) and fixed-ccd (fixed by diabling the count cache).
      
      Introduce a new value for this capability denoted workaround, meaning that
      software can work around the issue by flushing the count cache on
      context switch. This option is available if the hypervisor sets the
      H_CPU_BEHAV_FLUSH_COUNT_CACHE flag in the cpu behaviours returned from
      the KVM_PPC_GET_CPU_CHAR ioctl.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Message-Id: <20190301031912.28809-1-sjitindarsingh@gmail.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      399b2896
    • S
      target/ppc/spapr: Enable the large decrementer for pseries-4.0 · edaa7995
      Suraj Jitindar Singh 提交于
      Enable the large decrementer by default for the pseries-4.0 machine type.
      It is disabled again by default_caps_with_cpu() for pre-POWER9 cpus
      since they don't support the large decrementer.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Message-Id: <20190301024317.22137-4-sjitindarsingh@gmail.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      edaa7995
    • S
      target/ppc: Implement large decrementer support for KVM · 7d050527
      Suraj Jitindar Singh 提交于
      Implement support to allow KVM guests to take advantage of the large
      decrementer introduced on POWER9 cpus.
      
      To determine if the host can support the requested large decrementer
      size, we check it matches that specified in the ibm,dec-bits device-tree
      property. We also need to enable it in KVM by setting the LPCR_LD bit in
      the LPCR. Note that to do this we need to try and set the bit, then read
      it back to check the host allowed us to set it, if so we can use it but
      if we were unable to set it the host cannot support it and we must not
      use the large decrementer.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190301024317.22137-3-sjitindarsingh@gmail.com>
      [dwg: Small style fixes]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      7d050527
    • S
      target/ppc: Implement large decrementer support for TCG · a8dafa52
      Suraj Jitindar Singh 提交于
      Prior to POWER9 the decrementer was a 32-bit register which decremented
      with each tick of the timebase. From POWER9 onwards the decrementer can
      be set to operate in a mode called large decrementer where it acts as a
      n-bit decrementing register which is visible as a 64-bit register, that
      is the value of the decrementer is sign extended to 64 bits (where n is
      implementation dependant).
      
      The mode in which the decrementer operates is controlled by the LPCR_LD
      bit in the logical paritition control register (LPCR).
      
      >From POWER9 onwards the HDEC (hypervisor decrementer) was enlarged to
      h-bits, also sign extended to 64 bits (where h is implementation
      dependant). Note this isn't configurable and is always enabled.
      
      On POWER9 the large decrementer and hdec are both 56 bits, as
      represented by the lrg_decr_bits cpu class property. Since they are the
      same size we only add one property for now, which could be extended in
      the case they ever differ in the future.
      
      We also add the lrg_decr_bits property for POWER5+/7/8 since it is used
      to determine the size of the hdec, which is only generated on the
      POWER5+ processor and later. On these processors it is 32 bits.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Signed-off-by: NCédric Le Goater <clg@kaod.org>
      Message-Id: <20190301024317.22137-2-sjitindarsingh@gmail.com>
      [dwg: Small style fixes]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      a8dafa52
    • S
      target/ppc/spapr: Add SPAPR_CAP_LARGE_DECREMENTER · c982f5cf
      Suraj Jitindar Singh 提交于
      Add spapr_cap SPAPR_CAP_LARGE_DECREMENTER to be used to control the
      availability of the large decrementer for a guest.
      Signed-off-by: NSuraj Jitindar Singh <sjitindarsingh@gmail.com>
      Message-Id: <20190301024317.22137-1-sjitindarsingh@gmail.com>
      [dwg: Trivial style fix]
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      c982f5cf
    • G
      Revert "spapr: support memory unplug for qtest" · c65ecfe2
      Greg Kurz 提交于
      Commit b8165118 broke CPU hotplug tests for old machine types:
      
      $ QTEST_QEMU_BINARY=ppc64-softmmu/qemu-system-ppc64 ./tests/cpu-plug-test -m=slow
      /ppc64/cpu-plug/pseries-3.1/device-add/2x3x1&maxcpus=6: OK
      /ppc64/cpu-plug/pseries-2.12-sxxm/device-add/2x3x1&maxcpus=6: OK
      /ppc64/cpu-plug/pseries-3.0/device-add/2x3x1&maxcpus=6: OK
      /ppc64/cpu-plug/pseries-2.10/device-add/2x3x1&maxcpus=6: OK
      /ppc64/cpu-plug/pseries-2.11/device-add/2x3x1&maxcpus=6: OK
      /ppc64/cpu-plug/pseries-2.12/device-add/2x3x1&maxcpus=6: OK
      /ppc64/cpu-plug/pseries-2.9/device-add/2x3x1&maxcpus=6: OK
      /ppc64/cpu-plug/pseries-2.7/device-add/2x3x1&maxcpus=6: **
      ERROR:/home/thuth/devel/qemu/hw/ppc/spapr_events.c:313:rtas_event_log_to_source: assertion failed: (source->enabled)
      Broken pipe
      /home/thuth/devel/qemu/tests/libqtest.c:143: kill_qemu() detected QEMU death from signal 6 (Aborted) (core dumped)
      Aborted (core dumped)
      
      The approach of faking the availability of OV5_HP_EVT causes the
      code to assume the hotplug event source is enabled, which is wrong
      for older machines.
      
      We've now fixed CAS under qtest with a different approach.  Therefore,
      this reverts commit b8165118.
      
      A subsequent patch will address the problem of CAS under qtest from
      a different angle.
      Reported-by: NThomas Huth <thuth@redhat.com>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <155146875097.147873.1732264036668112686.stgit@bahia.lan>
      Tested-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      c65ecfe2
    • G
      spapr: Simulate CAS for qtest · 23ff81bd
      Greg Kurz 提交于
      The RTAS event hotplug code for machine types 2.8 and newer depends on
      the CAS negotiated ov5 in order to work properly. However, there's no
      CAS when running under qtest. There has been a tentative to trick the
      code by faking the OV5_HP_EVT bit, but it turned out to break other
      assumptions in the code and the change got reverted.
      
      Go for a more general approach and simulate a CAS when running under
      qtest. For simplicity, this pseudo CAS simple simulates the case where
      the guest supports the same features as the machine. It is done at
      reset time, just before we reset the DRCs, which could potentially
      exercise the unplug code.
      
      This allows to test unplug on spapr with both older and newer machine
      types.
      Suggested-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NGreg Kurz <groug@kaod.org>
      Message-Id: <155146875704.147873.10563808578795890265.stgit@bahia.lan>
      Tested-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Reviewed-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      23ff81bd
    • A
      vfio/spapr: Rename local systempagesize variable · 3cdd801b
      Alexey Kardashevskiy 提交于
      The "systempagesize" name suggests that it is the host system page size
      while it is the smallest page size of memory backing the guest RAM so
      let's rename it to stop confusion. This should cause no behavioral change.
      Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <20190227085149.38596-4-aik@ozlabs.ru>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      3cdd801b
    • A
      vfio/spapr: Fix indirect levels calculation · 16107998
      Alexey Kardashevskiy 提交于
      The current code assumes that we can address more bits on a PCI bus
      for DMA than we really can but there is no way knowing the actual limit.
      
      This makes a better guess for the number of levels and if the kernel
      fails to allocate that, this increases the level numbers till succeeded
      or reached the 64bit limit.
      
      This adds levels to the trace point.
      
      This may cause the kernel to warn about failed allocation:
         [65122.837458] Failed to allocate a TCE memory, level shift=28
      which might happen if MAX_ORDER is not large enough as it can vary:
      https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/powerpc/Kconfig?h=v5.0-rc2#n727Signed-off-by: NAlexey Kardashevskiy <aik@ozlabs.ru>
      Message-Id: <20190227085149.38596-3-aik@ozlabs.ru>
      Signed-off-by: NDavid Gibson <david@gibson.dropbear.id.au>
      16107998
    • P
      Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging · 377b155b
      Peter Maydell 提交于
      * allow building QEMU without TCG or KVM support (Anthony)
      * update AMD IOMMU copyright (David)
      * compilation fixes for GCC and BSDs (Alexey, David, Paolo, Philippe)
      * coalesced I/O bugfix (Jagannathan)
      * Processor Tracing cpuid fix (Luwei)
      * Kconfig fixes (Paolo, David)
      * Cleanups (Paolo, Wei)
      * PVH vs. multiboot fix (Stefano)
      * LSI bugfixes (Sven)
      * elf2dmp Coverity fix (Victor)
      * scsi-disk fix (Zhengui)
      * authorization support for chardev TLS (Daniel)
      
      # gpg: Signature made Mon 11 Mar 2019 16:12:00 GMT
      # gpg:                using RSA key BFFBD25F78C7AE83
      # gpg: Good signature from "Paolo Bonzini <bonzini@gnu.org>" [full]
      # gpg:                 aka "Paolo Bonzini <pbonzini@redhat.com>" [full]
      # Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4  E2F7 7E15 100C CD36 69B1
      #      Subkey fingerprint: F133 3857 4B66 2389 866C  7682 BFFB D25F 78C7 AE83
      
      * remotes/bonzini/tags/for-upstream: (31 commits)
        qemugdb: fix licensing
        chardev: add support for authorization for TLS clients
        qom: cpu: destroy work_mutex in cpu_common_finalize
        exec.c: refactor function flatview_add_to_dispatch()
        lsi: 810/895A are always little endian
        lsi: return dfifo value
        lsi: use SCSI phase names instead of numbers in trace
        lsi: use enum type for s->msg_action
        lsi: use enum type for s->waiting
        lsi: use ldn_le_p()/stn_le_p()
        scsi-disk: Fix crash if request is invaild or disk is no medium
        configure: Disable W^X on OpenBSD
        oslib-posix: Ignore fcntl("/dev/null", F_SETFL, O_NONBLOCK) failure
        accel: Allow to build QEMU without TCG or KVM support
        build: clean trace/generated-helpers.c
        build: remove unnecessary assignments from Makefile.target
        build: get rid of target-obj-y
        update copyright notice
        lsi: check if SIGP bit is already set in Wait reselect
        lsi: implement basic SBCL functionality
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      377b155b
    • P
      Merge remote-tracking branch 'remotes/amarkovic/tags/mips-queue-mar-11-2019' into staging · c8761809
      Peter Maydell 提交于
      MIPS queue for March 11th, 2019
      
      # gpg: Signature made Mon 11 Mar 2019 14:16:09 GMT
      # gpg:                using RSA key D4972A8967F75A65
      # gpg: Good signature from "Aleksandar Markovic <amarkovic@wavecomp.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: 8526 FBF1 5DA3 811F 4A01  DD75 D497 2A89 67F7 5A65
      
      * remotes/amarkovic/tags/mips-queue-mar-11-2019:
        target/mips: Add tests for a variety of MSA integer subtract instructions
        target/mips: Add tests for a variety of MSA integer multiply instructions
        target/mips: Add tests for a variety of MSA integer dot product instructions
        target/mips: Add tests for a variety of MSA integer divide instructions
        target/mips: Add tests for a variety of MSA integer average instructions
        tests/tcg: target/mips: Rename two header files for consistency
        tests/tcg: target/mips: Correct preambles of test source files
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      c8761809
    • P
      Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20190311' into staging · 208d92df
      Peter Maydell 提交于
      s390x update:
      - clean up LowCore definition
      - first part of vector instruction support for tcg
      
      # gpg: Signature made Mon 11 Mar 2019 08:59:02 GMT
      # gpg:                using RSA key C3D0D66DC3624FF6A8C018CEDECF6B93C6F02FAF
      # gpg:                issuer "cohuck@redhat.com"
      # gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>" [unknown]
      # gpg:                 aka "Cornelia Huck <huckc@linux.vnet.ibm.com>" [full]
      # gpg:                 aka "Cornelia Huck <cornelia.huck@de.ibm.com>" [full]
      # gpg:                 aka "Cornelia Huck <cohuck@kernel.org>" [unknown]
      # gpg:                 aka "Cornelia Huck <cohuck@redhat.com>" [unknown]
      # Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0  18CE DECF 6B93 C6F0 2FAF
      
      * remotes/cohuck/tags/s390x-20190311: (33 commits)
        s390x/tcg: Implement VECTOR UNPACK *
        s390x/tcg: Implement VECTOR STORE WITH LENGTH
        s390x/tcg: Implement VECTOR STORE MULTIPLE
        s390x/tcg: Implement VECTOR STORE ELEMENT
        s390x/tcg: Implement VECTOR STORE
        s390x/tcg: Provide probe_write_access helper
        s390x/tcg: Implement VECTOR SIGN EXTEND TO DOUBLEWORD
        s390x/tcg: Implement VECTOR SELECT
        s390x/tcg: Implement VECTOR SCATTER ELEMENT
        s390x/tcg: Implement VECTOR REPLICATE IMMEDIATE
        s390x/tcg: Implement VECTOR REPLICATE
        s390x/tcg: Implement VECTOR PERMUTE DOUBLEWORD IMMEDIATE
        s390x/tcg: Implement VECTOR PERMUTE
        s390x/tcg: Implement VECTOR PACK *
        s390x/tcg: Implement VECTOR MERGE (HIGH|LOW)
        s390x/tcg: Implement VECTOR LOAD WITH LENGTH
        s390x/tcg: Implement VECTOR LOAD VR FROM GRS DISJOINT
        s390x/tcg: Implement VECTOR LOAD VR ELEMENT FROM GR
        s390x/tcg: Implement VECTOR LOAD TO BLOCK BOUNDARY
        s390x/tcg: Implement VECTOR LOAD MULTIPLE
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      208d92df
  2. 11 3月, 2019 7 次提交