1. 08 6月, 2017 1 次提交
  2. 09 5月, 2017 2 次提交
  3. 08 5月, 2017 1 次提交
    • E
      KVM: arm64: vgic-its: Introduce migration ABI infrastructure · 71afe470
      Eric Auger 提交于
      We plan to support different migration ABIs, ie. characterizing
      the ITS table layout format in guest RAM. For example, a new ABI
      will be needed if vLPIs get supported for nested use case.
      
      So let's introduce an array of supported ABIs (at the moment a single
      ABI is supported though). The following characteristics are foreseen
      to vary with the ABI: size of table entries, save/restore operation,
      the way abi settings are applied.
      
      By default the MAX_ABI_REV is applied on its creation. In subsequent
      patches we will introduce a way for the userspace to change the ABI
      in use.
      
      The entry sizes now are set according to the ABI version and not
      hardcoded anymore.
      Signed-off-by: NEric Auger <eric.auger@redhat.com>
      Reviewed-by: NChristoffer Dall <cdall@linaro.org>
      71afe470
  4. 09 4月, 2017 3 次提交
  5. 04 4月, 2017 1 次提交
  6. 30 1月, 2017 1 次提交
    • V
      KVM: arm/arm64: vgic: Implement VGICv3 CPU interface access · d017d7b0
      Vijaya Kumar K 提交于
      VGICv3 CPU interface registers are accessed using
      KVM_DEV_ARM_VGIC_CPU_SYSREGS ioctl. These registers are accessed
      as 64-bit. The cpu MPIDR value is passed along with register id.
      It is used to identify the cpu for registers access.
      
      The VM that supports SEIs expect it on destination machine to handle
      guest aborts and hence checked for ICC_CTLR_EL1.SEIS compatibility.
      Similarly, VM that supports Affinity Level 3 that is required for AArch64
      mode, is required to be supported on destination machine. Hence checked
      for ICC_CTLR_EL1.A3V compatibility.
      
      The arch/arm64/kvm/vgic-sys-reg-v3.c handles read and write of VGIC
      CPU registers for AArch64.
      
      For AArch32 mode, arch/arm/kvm/vgic-v3-coproc.c file is created but
      APIs are not implemented.
      
      Updated arch/arm/include/uapi/asm/kvm.h with new definitions
      required to compile for AArch32.
      
      The version of VGIC v3 specification is defined here
      Documentation/virtual/kvm/devices/arm-vgic-v3.txt
      Acked-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Reviewed-by: NEric Auger <eric.auger@redhat.com>
      Signed-off-by: NPavel Fedin <p.fedin@samsung.com>
      Signed-off-by: NVijaya Kumar K <Vijaya.Kumar@cavium.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      d017d7b0
  7. 25 1月, 2017 2 次提交
  8. 22 9月, 2016 2 次提交
    • V
      ARM: KVM: Support vgic-v3 · acda5430
      Vladimir Murzin 提交于
      This patch allows to build and use vgic-v3 in 32-bit mode.
      
      Unfortunately, it can not be split in several steps without extra
      stubs to keep patches independent and bisectable.  For instance,
      virt/kvm/arm/vgic/vgic-v3.c uses function from vgic-v3-sr.c, handling
      access to GICv3 cpu interface from the guest requires vgic_v3.vgic_sre
      to be already defined.
      
      It is how support has been done:
      
      * handle SGI requests from the guest
      
      * report configured SRE on access to GICv3 cpu interface from the guest
      
      * required vgic-v3 macros are provided via uapi.h
      
      * static keys are used to select GIC backend
      
      * to make vgic-v3 build KVM_ARM_VGIC_V3 guard is removed along with
        the static inlines
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: NChristoffer Dall <christoffer.dall@linaro.org>
      Signed-off-by: NVladimir Murzin <vladimir.murzin@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      acda5430
    • V
      arm64: KVM: Use static keys for selecting the GIC backend · 5a7a8426
      Vladimir Murzin 提交于
      Currently GIC backend is selected via alternative framework and this
      is fine. We are going to introduce vgic-v3 to 32-bit world and there
      we don't have patching framework in hand, so we can either check
      support for GICv3 every time we need to choose which backend to use or
      try to optimise it by using static keys. The later looks quite
      promising because we can share logic involved in selecting GIC backend
      between architectures if both uses static keys.
      
      This patch moves arm64 from alternative to static keys framework for
      selecting GIC backend. For that we embed static key into vgic_global
      and enable the key during vgic initialisation based on what has
      already been exposed by the host GIC driver.
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NVladimir Murzin <vladimir.murzin@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      5a7a8426
  9. 08 9月, 2016 2 次提交
  10. 23 7月, 2016 1 次提交
    • E
      KVM: arm/arm64: Enable irqchip routing · 180ae7b1
      Eric Auger 提交于
      This patch adds compilation and link against irqchip.
      
      Main motivation behind using irqchip code is to enable MSI
      routing code. In the future irqchip routing may also be useful
      when targeting multiple irqchips.
      
      Routing standard callbacks now are implemented in vgic-irqfd:
      - kvm_set_routing_entry
      - kvm_set_irq
      - kvm_set_msi
      
      They only are supported with new_vgic code.
      
      Both HAVE_KVM_IRQCHIP and HAVE_KVM_IRQ_ROUTING are defined.
      KVM_CAP_IRQ_ROUTING is advertised and KVM_SET_GSI_ROUTING is allowed.
      
      So from now on IRQCHIP routing is enabled and a routing table entry
      must exist for irqfd injection to succeed for a given SPI. This patch
      builds a default flat irqchip routing table (gsi=irqchip.pin) covering
      all the VGIC SPI indexes. This routing table is overwritten by the
      first first user-space call to KVM_SET_GSI_ROUTING ioctl.
      
      MSI routing setup is not yet allowed.
      Signed-off-by: NEric Auger <eric.auger@redhat.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      180ae7b1
  11. 19 7月, 2016 9 次提交
  12. 04 7月, 2016 1 次提交
    • M
      KVM: arm/arm64: The GIC is dead, long live the GIC · 50926d82
      Marc Zyngier 提交于
      I don't think any single piece of the KVM/ARM code ever generated
      as much hatred as the GIC emulation.
      
      It was written by someone who had zero experience in modeling
      hardware (me), was riddled with design flaws, should have been
      scrapped and rewritten from scratch long before having a remote
      chance of reaching mainline, and yet we supported it for a good
      three years. No need to mention the names of those who suffered,
      the git log is singing their praises.
      
      Thankfully, we now have a much more maintainable implementation,
      and we can safely put the grumpy old GIC to rest.
      
      Fellow hackers, please raise your glass in memory of the GIC:
      
      	The GIC is dead, long live the GIC!
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      50926d82
  13. 20 5月, 2016 8 次提交
  14. 03 5月, 2016 1 次提交
  15. 09 3月, 2016 2 次提交
  16. 14 12月, 2015 1 次提交
  17. 25 11月, 2015 1 次提交
    • C
      KVM: arm/arm64: arch_timer: Preserve physical dist. active state on LR.active · 0e3dfda9
      Christoffer Dall 提交于
      We were incorrectly removing the active state from the physical
      distributor on the timer interrupt when the timer output level was
      deasserted.  We shouldn't be doing this without considering the virtual
      interrupt's active state, because the architecture requires that when an
      LR has the HW bit set and the pending or active bits set, then the
      physical interrupt must also have the corresponding bits set.
      
      This addresses an issue where we have been observing an inconsistency
      between the LR state and the physical distributor state where the LR
      state was active and the physical distributor was not active, which
      shouldn't happen.
      Reviewed-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      0e3dfda9
  18. 04 11月, 2015 1 次提交