1. 21 7月, 2018 5 次提交
  2. 25 5月, 2018 6 次提交
  3. 10 11月, 2017 1 次提交
  4. 06 11月, 2017 1 次提交
  5. 03 8月, 2017 1 次提交
  6. 04 6月, 2017 1 次提交
  7. 23 5月, 2017 1 次提交
  8. 18 5月, 2017 2 次提交
    • C
      KVM: arm/arm64: Hold slots_lock when unregistering kvm io bus devices · fa472fa9
      Christoffer Dall 提交于
      We were not holding the kvm->slots_lock as required when calling
      kvm_io_bus_unregister_dev() as required.
      
      This only affects the error path, but still, let's do our due
      diligence.
      
      Reported by: Eric Auger <eric.auger@redhat.com>
      Signed-off-by: NChristoffer Dall <cdall@linaro.org>
      Reviewed-by: NEric Auger <eric.auger@redhat.com>
      fa472fa9
    • C
      KVM: arm/arm64: Fix bug when registering redist iodevs · 552c9f47
      Christoffer Dall 提交于
      If userspace creates the VCPUs after initializing the VGIC, then we end
      up in a situation where we trigger a bug in kvm_vcpu_get_idx(), because
      it is called prior to adding the VCPU into the vcpus array on the VM.
      
      There is no tight coupling between the VCPU index and the area of the
      redistributor region used for the VCPU, so we can simply ensure that all
      creations of redistributors are serialized per VM, and increment an
      offset when we successfully add a redistributor.
      
      The vgic_register_redist_iodev() function can be called from two paths:
      vgic_redister_all_redist_iodev() which is called via the kvm_vgic_addr()
      device attribute handler.  This patch already holds the kvm->lock mutex.
      
      The other path is via kvm_vgic_vcpu_init, which is called through a
      longer chain from kvm_vm_ioctl_create_vcpu(), which releases the
      kvm->lock mutex just before calling kvm_arch_vcpu_create(), so we can
      simply take this mutex again later for our purposes.
      
      Fixes: ab6f468c10 ("KVM: arm/arm64: Register iodevs when setting redist base and creating VCPUs")
      Signed-off-by: NChristoffer Dall <cdall@linaro.org>
      Tested-by: NJean-Philippe Brucker <jean-philippe.brucker@arm.com>
      Reviewed-by: NEric Auger <eric.auger@redhat.com>
      552c9f47
  9. 09 5月, 2017 2 次提交
  10. 30 1月, 2017 4 次提交
  11. 25 1月, 2017 1 次提交
  12. 14 11月, 2016 1 次提交
  13. 22 9月, 2016 3 次提交
    • V
      KVM: arm: vgic: Support 64-bit data manipulation on 32-bit host systems · d7d0a11e
      Vladimir Murzin 提交于
      We have couple of 64-bit registers defined in GICv3 architecture, so
      unsigned long accesses to these registers will only access a single
      32-bit part of that regitser. On the other hand these registers can't
      be accessed as 64-bit with a single instruction like ldrd/strd or
      ldmia/stmia if we run a 32-bit host because KVM does not support
      access to MMIO space done by these instructions.
      
      It means that a 32-bit guest accesses these registers in 32-bit
      chunks, so the only thing we need to do is to ensure that
      extract_bytes() always takes 64-bit data.
      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>
      d7d0a11e
    • V
      KVM: arm: vgic: Fix compiler warnings when built for 32-bit · e533a37f
      Vladimir Murzin 提交于
      Well, this patch is looking ahead of time, but we'll get following
      compiler warnings as soon as we introduce vgic-v3 to 32-bit world
      
        CC      arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.o
      arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c: In function 'vgic_mmio_read_v3r_typer':
      arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c:184:35: warning: left shift count >= width of type [-Wshift-count-overflow]
        value = (mpidr & GENMASK(23, 0)) << 32;
                                         ^
      In file included from ./include/linux/kernel.h:10:0,
                       from ./include/asm-generic/bug.h:13,
                       from ./arch/arm/include/asm/bug.h:59,
                       from ./include/linux/bug.h:4,
                       from ./include/linux/io.h:23,
                       from ./arch/arm/include/asm/arch_gicv3.h:23,
                       from ./include/linux/irqchip/arm-gic-v3.h:411,
                       from arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c:14:
      arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c: In function 'vgic_v3_dispatch_sgi':
      ./include/linux/bitops.h:6:24: warning: left shift count >= width of type [-Wshift-count-overflow]
       #define BIT(nr)   (1UL << (nr))
                              ^
      arch/arm/kvm/../../../virt/kvm/arm/vgic/vgic-mmio-v3.c:614:20: note: in expansion of macro 'BIT'
        broadcast = reg & BIT(ICC_SGI1R_IRQ_ROUTING_MODE_BIT);
                          ^
      Let's fix them now.
      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>
      e533a37f
    • V
      KVM: arm64: vgic-its: Introduce config option to guard ITS specific code · 7a1ff708
      Vladimir Murzin 提交于
      By now ITS code guarded with KVM_ARM_VGIC_V3 config option which was
      introduced to hide everything specific to vgic-v3 from 32-bit world.
      We are going to support vgic-v3 in 32-bit world and KVM_ARM_VGIC_V3
      will gone, but we don't have support for ITS there yet and we need to
      continue keeping ITS away.
      Introduce the new config option to prevent ITS code being build in
      32-bit mode when support for vgic-v3 is done.
      Signed-off-by: NVladimir Murzin <vladimir.murzin@arm.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      7a1ff708
  14. 16 8月, 2016 1 次提交
  15. 19 7月, 2016 7 次提交
  16. 20 5月, 2016 3 次提交