1. 22 1月, 2020 2 次提交
  2. 11 11月, 2019 2 次提交
  3. 15 10月, 2019 1 次提交
    • M
      arm64: Relax ICC_PMR_EL1 accesses when ICC_CTLR_EL1.PMHE is clear · f2266504
      Marc Zyngier 提交于
      The GICv3 architecture specification is incredibly misleading when it
      comes to PMR and the requirement for a DSB. It turns out that this DSB
      is only required if the CPU interface sends an Upstream Control
      message to the redistributor in order to update the RD's view of PMR.
      
      This message is only sent when ICC_CTLR_EL1.PMHE is set, which isn't
      the case in Linux. It can still be set from EL3, so some special care
      is required. But the upshot is that in the (hopefuly large) majority
      of the cases, we can drop the DSB altogether.
      
      This relies on a new static key being set if the boot CPU has PMHE
      set. The drawback is that this static key has to be exported to
      modules.
      
      Cc: Will Deacon <will@kernel.org>
      Cc: James Morse <james.morse@arm.com>
      Cc: Julien Thierry <julien.thierry.kdev@gmail.com>
      Cc: Suzuki K Poulose <suzuki.poulose@arm.com>
      Signed-off-by: NMarc Zyngier <maz@kernel.org>
      Signed-off-by: NCatalin Marinas <catalin.marinas@arm.com>
      f2266504
  4. 20 8月, 2019 3 次提交
  5. 19 6月, 2019 1 次提交
  6. 29 4月, 2019 1 次提交
  7. 31 1月, 2019 1 次提交
  8. 02 10月, 2018 2 次提交
  9. 01 10月, 2018 1 次提交
  10. 21 7月, 2018 1 次提交
  11. 16 7月, 2018 2 次提交
  12. 13 5月, 2018 1 次提交
  13. 23 3月, 2018 1 次提交
    • S
      irqchip/gic-v3: Ensure GICR_CTLR.EnableLPI=0 is observed before enabling · 6eb486b6
      Shanker Donthineni 提交于
      Booting with GICR_CTLR.EnableLPI=1 is usually a bad idea, and may
      result in subtle memory corruption. Detecting this is thus pretty
      important.
      
      On detecting that LPIs are still enabled, we taint the kernel (because
      we're not sure of anything anymore), and try to disable LPIs. This can
      fail, as implementations are allowed to implement GICR_CTLR.EnableLPI
      as a one-way enable, meaning the redistributors cannot be reprogrammed
      with new tables.
      
      Should this happen, we fail probing the redistributor and warn the user
      that things are pretty dire.
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      [maz: reworded changelog, minor comment and message changes]
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      6eb486b6
  14. 15 3月, 2018 1 次提交
    • M
      KVM: arm/arm64: vgic: Don't populate multiple LRs with the same vintid · 16ca6a60
      Marc Zyngier 提交于
      The vgic code is trying to be clever when injecting GICv2 SGIs,
      and will happily populate LRs with the same interrupt number if
      they come from multiple vcpus (after all, they are distinct
      interrupt sources).
      
      Unfortunately, this is against the letter of the architecture,
      and the GICv2 architecture spec says "Each valid interrupt stored
      in the List registers must have a unique VirtualID for that
      virtual CPU interface.". GICv3 has similar (although slightly
      ambiguous) restrictions.
      
      This results in guests locking up when using GICv2-on-GICv3, for
      example. The obvious fix is to stop trying so hard, and inject
      a single vcpu per SGI per guest entry. After all, pending SGIs
      with multiple source vcpus are pretty rare, and are mostly seen
      in scenario where the physical CPUs are severely overcomitted.
      
      But as we now only inject a single instance of a multi-source SGI per
      vcpu entry, we may delay those interrupts for longer than strictly
      necessary, and run the risk of injecting lower priority interrupts
      in the meantime.
      
      In order to address this, we adopt a three stage strategy:
      - If we encounter a multi-source SGI in the AP list while computing
        its depth, we force the list to be sorted
      - When populating the LRs, we prevent the injection of any interrupt
        of lower priority than that of the first multi-source SGI we've
        injected.
      - Finally, the injection of a multi-source SGI triggers the request
        of a maintenance interrupt when there will be no pending interrupt
        in the LRs (HCR_NPIE).
      
      At the point where the last pending interrupt in the LRs switches
      from Pending to Active, the maintenance interrupt will be delivered,
      allowing us to add the remaining SGIs using the same process.
      
      Cc: stable@vger.kernel.org
      Fixes: 0919e84c ("KVM: arm/arm64: vgic-new: Add IRQ sync/flush framework")
      Acked-by: NChristoffer Dall <cdall@kernel.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      16ca6a60
  15. 14 3月, 2018 1 次提交
    • D
      irqchip/gic-v3-its: Add ability to save/restore ITS state · dba0bc7b
      Derek Basehore 提交于
      Some platforms power off GIC logic in suspend, so we need to
      save/restore state. The distributor and redistributor registers need
      to be handled in firmware code due to access permissions on those
      registers, but the ITS registers can be restored in the kernel.
      
      We limit this to systems where the ITS collections are implemented
      in HW (as opposed to being backed by memory tables), as they are
      the only ones that cannot be dealt with by the firmware.
      Signed-off-by: NDerek Basehore <dbasehore@chromium.org>
      [maz: fixed changelog, dropped DT property, limited to HCC being >0]
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      dba0bc7b
  16. 19 10月, 2017 1 次提交
    • S
      irqchip/gic-v3: Add support for Range Selector (RS) feature · eda0d04a
      Shanker Donthineni 提交于
      A new feature Range Selector (RS) has been added to GIC specification
      in order to support more than 16 CPUs at affinity level 0. New fields
      are introduced in SGI system registers (ICC_SGI0R_EL1, ICC_SGI1R_EL1
      and ICC_ASGI1R_EL1) to relax an artificial limit of 16 at level 0.
      
      - A new RSS field in ICC_CTLR_EL3, ICC_CTLR_EL1 and ICV_CTLR_EL1:
        [18] - Range Selector Support (RSS)
        0b0 = Targeted SGIs with affinity level 0 values of 0-15 are supported.
        0b1 = Targeted SGIs with affinity level 0 values of 0-255 are supported.
      
      - A new RS field in ICC_SGI0R_EL1, ICC_SGI1R_EL1 and ICC_ASGI1R_EL1:
        [47:44] - RangeSelector (RS) which group of 16 TargetList[n] field
                  TargetList[n] represents aff0 value ((RS*16)+n)
                  When ICC_CTLR_EL3.RSS==0 or ICC_CTLR_EL1.RSS==0, RS is RES0.
      
      - A new RSS field in GICD_TYPER:
        [26] - Range Selector Support (RSS)
        0b0 = Targeted SGIs with affinity level 0 values of 0-15 are supported.
        0b1 = Targeted SGIs with affinity level 0 values of 0-255 are supported.
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      eda0d04a
  17. 13 10月, 2017 1 次提交
    • S
      irqchip/gic-v3-its: Add missing changes to support 52bit physical address · 30ae9610
      Shanker Donthineni 提交于
      The current ITS driver works fine as long as normal memory and GICR
      regions are located within the lower 48bit (>=0 && <2^48) physical
      address space. Some of the registers GICR_PEND/PROP, GICR_VPEND/VPROP
      and GITS_CBASER are handled properly but not all when configuring
      the hardware with 52bit physical address.
      
      This patch does the following changes to support 52bit PA.
        -Handle 52bit PA in GITS_BASERn.
        -Fix ITT_addr width to 52bits, bits[51:8].
        -Fix RDbase width to 52bits, bits[51:16].
        -Fix VPT_addr width to 52bits, bits[51:16].
      
      Definition of the GITS_BASERn register when ITS PageSize is 64KB:
        -Bits[47:16] of the register provide bits[47:16] of the table PA.
        -Bits[15:12] of the register provide bits[51:48] of the table PA.
        -Bits[15:00] of the base physical address are 0.
      Signed-off-by: NShanker Donthineni <shankerd@codeaurora.org>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      30ae9610
  18. 31 8月, 2017 4 次提交
  19. 23 8月, 2017 2 次提交
  20. 15 6月, 2017 5 次提交
  21. 24 5月, 2017 1 次提交
  22. 08 5月, 2017 4 次提交
  23. 06 3月, 2017 1 次提交