1. 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
  2. 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
  3. 20 5月, 2016 1 次提交
  4. 01 3月, 2016 1 次提交
  5. 17 6月, 2015 1 次提交
  6. 27 3月, 2015 1 次提交
  7. 12 3月, 2015 2 次提交
  8. 21 1月, 2015 1 次提交
    • A
      arm/arm64: KVM: split GICv2 specific emulation code from vgic.c · 1d916229
      Andre Przywara 提交于
      vgic.c is currently a mixture of generic vGIC emulation code and
      functions specific to emulating a GICv2. To ease the addition of
      GICv3, split off strictly v2 specific parts into a new file
      vgic-v2-emul.c.
      Signed-off-by: NAndre Przywara <andre.przywara@arm.com>
      Acked-by: NChristoffer Dall <christoffer.dall@linaro.org>
      
      -------
      As the diff isn't always obvious here (and to aid eventual rebases),
      here is a list of high-level changes done to the code:
      * added new file to respective arm/arm64 Makefiles
      * moved GICv2 specific functions to vgic-v2-emul.c:
        - handle_mmio_misc()
        - handle_mmio_set_enable_reg()
        - handle_mmio_clear_enable_reg()
        - handle_mmio_set_pending_reg()
        - handle_mmio_clear_pending_reg()
        - handle_mmio_priority_reg()
        - vgic_get_target_reg()
        - vgic_set_target_reg()
        - handle_mmio_target_reg()
        - handle_mmio_cfg_reg()
        - handle_mmio_sgi_reg()
        - vgic_v2_unqueue_sgi()
        - read_set_clear_sgi_pend_reg()
        - write_set_clear_sgi_pend_reg()
        - handle_mmio_sgi_set()
        - handle_mmio_sgi_clear()
        - vgic_v2_handle_mmio()
        - vgic_get_sgi_sources()
        - vgic_dispatch_sgi()
        - vgic_v2_queue_sgi()
        - vgic_v2_map_resources()
        - vgic_v2_init()
        - vgic_v2_add_sgi_source()
        - vgic_v2_init_model()
        - vgic_v2_init_emulation()
        - handle_cpu_mmio_misc()
        - handle_mmio_abpr()
        - handle_cpu_mmio_ident()
        - vgic_attr_regs_access()
        - vgic_create() (renamed to vgic_v2_create())
        - vgic_destroy() (renamed to vgic_v2_destroy())
        - vgic_has_attr() (renamed to vgic_v2_has_attr())
        - vgic_set_attr() (renamed to vgic_v2_set_attr())
        - vgic_get_attr() (renamed to vgic_v2_get_attr())
        - struct kvm_mmio_range vgic_dist_ranges[]
        - struct kvm_mmio_range vgic_cpu_ranges[]
        - struct kvm_device_ops kvm_arm_vgic_v2_ops {}
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      1d916229
  9. 11 7月, 2014 1 次提交
  10. 13 10月, 2013 1 次提交
  11. 19 5月, 2013 2 次提交
    • M
      KVM: get rid of $(addprefix ../../../virt/kvm/, ...) in Makefiles · 535cf7b3
      Marc Zyngier 提交于
      As requested by the KVM maintainers, remove the addprefix used to
      refer to the main KVM code from the arch code, and replace it with
      a KVM variable that does the same thing.
      Tested-by: NChristian Borntraeger <borntraeger@de.ibm.com>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Gleb Natapov <gleb@redhat.com>
      Cc: Christoffer Dall <cdall@cs.columbia.edu>
      Acked-by: NXiantao Zhang <xiantao.zhang@intel.com>
      Cc: Tony Luck <tony.luck@intel.com>
      Cc: Fenghua Yu <fenghua.yu@intel.com>
      Cc: Alexander Graf <agraf@suse.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Christian Borntraeger <borntraeger@de.ibm.com>
      Cc: Cornelia Huck <cornelia.huck@de.ibm.com>
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      535cf7b3
    • M
      ARM: KVM: move GIC/timer code to a common location · 7275acdf
      Marc Zyngier 提交于
      As KVM/arm64 is looming on the horizon, it makes sense to move some
      of the common code to a single location in order to reduce duplication.
      
      The code could live anywhere. Actually, most of KVM is already built
      with a bunch of ugly ../../.. hacks in the various Makefiles, so we're
      not exactly talking about style here. But maybe it is time to start
      moving into a less ugly direction.
      
      The include files must be in a "public" location, as they are accessed
      from non-KVM files (arch/arm/kernel/asm-offsets.c).
      
      For this purpose, introduce two new locations:
      - virt/kvm/arm/ : x86 and ia64 already share the ioapic code in
        virt/kvm, so this could be seen as a (very ugly) precedent.
      - include/kvm/  : there is already an include/xen, and while the
        intent is slightly different, this seems as good a location as
        any
      
      Eventually, we should probably have independant Makefiles at every
      levels (just like everywhere else in the kernel), but this is just
      the first step.
      Signed-off-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NGleb Natapov <gleb@redhat.com>
      7275acdf
  12. 29 4月, 2013 1 次提交
  13. 07 3月, 2013 1 次提交
  14. 12 2月, 2013 2 次提交
  15. 24 1月, 2013 4 次提交