1. 17 1月, 2014 5 次提交
  2. 16 1月, 2014 1 次提交
  3. 15 1月, 2014 3 次提交
  4. 09 1月, 2014 5 次提交
  5. 28 12月, 2013 3 次提交
  6. 22 12月, 2013 8 次提交
    • C
      KVM: arm-vgic: Add vgic reg access from dev attr · c07a0191
      Christoffer Dall 提交于
      Add infrastructure to handle distributor and cpu interface register
      accesses through the KVM_{GET/SET}_DEVICE_ATTR interface by adding the
      KVM_DEV_ARM_VGIC_GRP_DIST_REGS and KVM_DEV_ARM_VGIC_GRP_CPU_REGS groups
      and defining the semantics of the attr field to be the MMIO offset as
      specified in the GICv2 specs.
      
      Missing register accesses or other changes in individual register access
      functions to support save/restore of the VGIC state is added in
      subsequent patches.
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      c07a0191
    • C
      arm/arm64: kvm: Set vcpu->cpu to -1 on vcpu_put · e9b152cb
      Christoffer Dall 提交于
      The arch-generic KVM code expects the cpu field of a vcpu to be -1 if
      the vcpu is no longer assigned to a cpu.  This is used for the optimized
      make_all_cpus_request path and will be used by the vgic code to check
      that no vcpus are running.
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      e9b152cb
    • C
      KVM: arm-vgic: Set base addr through device API · ce01e4e8
      Christoffer Dall 提交于
      Support setting the distributor and cpu interface base addresses in the
      VM physical address space through the KVM_{SET,GET}_DEVICE_ATTR API
      in addition to the ARM specific API.
      
      This has the added benefit of being able to share more code in user
      space and do things in a uniform manner.
      
      Also deprecate the older API at the same time, but backwards
      compatibility will be maintained.
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      ce01e4e8
    • C
      KVM: arm-vgic: Support KVM_CREATE_DEVICE for VGIC · 7330672b
      Christoffer Dall 提交于
      Support creating the ARM VGIC device through the KVM_CREATE_DEVICE
      ioctl, which can then later be leveraged to use the
      KVM_{GET/SET}_DEVICE_ATTR, which is useful both for setting addresses in
      a more generic API than the ARM-specific one and is useful for
      save/restore of VGIC state.
      
      Adds KVM_CAP_DEVICE_CTRL to ARM capabilities.
      
      Note that we change the check for creating a VGIC from bailing out if
      any VCPUs were created, to bailing out if any VCPUs were ever run.  This
      is an important distinction that shouldn't break anything, but allows
      creating the VGIC after the VCPUs have been created.
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      7330672b
    • C
      ARM: KVM: Allow creating the VGIC after VCPUs · e1ba0207
      Christoffer Dall 提交于
      Rework the VGIC initialization slightly to allow initialization of the
      vgic cpu-specific state even if the irqchip (the VGIC) hasn't been
      created by user space yet.  This is safe, because the vgic data
      structures are already allocated when the CPU is allocated if VGIC
      support is compiled into the kernel.  Further, the init process does not
      depend on any other information and the sacrifice is a slight
      performance degradation for creating VMs in the no-VGIC case.
      
      The reason is that the new device control API doesn't mandate creating
      the VGIC before creating the VCPU and it is unreasonable to require user
      space to create the VGIC before creating the VCPUs.
      
      At the same time move the irqchip_in_kernel check out of
      kvm_vcpu_first_run_init and into the init function to make the per-vcpu
      and global init functions symmetric and add comments on the exported
      functions making it a bit easier to understand the init flow by only
      looking at vgic.c.
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      e1ba0207
    • A
      ARM/KVM: save and restore generic timer registers · 39735a3a
      Andre Przywara 提交于
      For migration to work we need to save (and later restore) the state of
      each core's virtual generic timer.
      Since this is per VCPU, we can use the [gs]et_one_reg ioctl and export
      the three needed registers (control, counter, compare value).
      Though they live in cp15 space, we don't use the existing list, since
      they need special accessor functions and the arch timer is optional.
      Acked-by: NMarc Zynger <marc.zyngier@arm.com>
      Signed-off-by: NAndre Przywara <andre.przywara@linaro.org>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      39735a3a
    • C
      arm/arm64: KVM: arch_timer: Initialize cntvoff at kvm_init · a1a64387
      Christoffer Dall 提交于
      Initialize the cntvoff at kvm_init_vm time, not before running the VCPUs
      at the first time because that will overwrite any potentially restored
      values from user space.
      
      Cc: Andre Przywara <andre.przywara@linaro.org>
      Acked-by: NMarc Zynger <marc.zyngier@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      a1a64387
    • C
      arm: KVM: Don't return PSCI_INVAL if waitqueue is inactive · 478a8237
      Christoffer Dall 提交于
      The current KVM implementation of PSCI returns INVALID_PARAMETERS if the
      waitqueue for the corresponding CPU is not active.  This does not seem
      correct, since KVM should not care what the specific thread is doing,
      for example, user space may not have called KVM_RUN on this VCPU yet or
      the thread may be busy looping to user space because it received a
      signal; this is really up to the user space implementation.  Instead we
      should check specifically that the CPU is marked as being turned off,
      regardless of the VCPU thread state, and if it is, we shall
      simply clear the pause flag on the CPU and wake up the thread if it
      happens to be blocked for us.
      
      Further, the implementation seems to be racy when executing multiple
      VCPU threads.  There really isn't a reasonable user space programming
      scheme to ensure all secondary CPUs have reached kvm_vcpu_first_run_init
      before turning on the boot CPU.
      
      Therefore, set the pause flag on the vcpu at VCPU init time (which can
      reasonably be expected to be completed for all CPUs by user space before
      running any VCPUs) and clear both this flag and the feature (in case the
      feature can somehow get set again in the future) and ping the waitqueue
      on turning on a VCPU using PSCI.
      Reported-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      478a8237
  7. 21 12月, 2013 2 次提交
  8. 18 12月, 2013 1 次提交
  9. 13 12月, 2013 2 次提交
  10. 12 12月, 2013 8 次提交
  11. 07 12月, 2013 2 次提交