1. 13 12月, 2014 2 次提交
    • C
      arm/arm64: KVM: Rename vgic_initialized to vgic_ready · c52edf5f
      Christoffer Dall 提交于
      The vgic_initialized() macro currently returns the state of the
      vgic->ready flag, which indicates if the vgic is ready to be used when
      running a VM, not specifically if its internal state has been
      initialized.
      
      Rename the macro accordingly in preparation for a more nuanced
      initialization flow.
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: NEric Auger <eric.auger@linaro.org>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      c52edf5f
    • P
      arm/arm64: KVM: vgic: move reset initialization into vgic_init_maps() · 6d3cfbe2
      Peter Maydell 提交于
      VGIC initialization currently happens in three phases:
       (1) kvm_vgic_create() (triggered by userspace GIC creation)
       (2) vgic_init_maps() (triggered by userspace GIC register read/write
           requests, or from kvm_vgic_init() if not already run)
       (3) kvm_vgic_init() (triggered by first VM run)
      
      We were doing initialization of some state to correspond with the
      state of a freshly-reset GIC in kvm_vgic_init(); this is too late,
      since it will overwrite changes made by userspace using the
      register access APIs before the VM is run. Move this initialization
      earlier, into the vgic_init_maps() phase.
      
      This fixes a bug where QEMU could successfully restore a saved
      VM state snapshot into a VM that had already been run, but could
      not restore it "from cold" using the -loadvm command line option
      (the symptoms being that the restored VM would run but interrupts
      were ignored).
      
      Finally rename vgic_init_maps to vgic_init and renamed kvm_vgic_init to
      kvm_vgic_map_resources.
      
        [ This patch is originally written by Peter Maydell, but I have
          modified it somewhat heavily, renaming various bits and moving code
          around.  If something is broken, I am to be blamed. - Christoffer ]
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Reviewed-by: NEric Auger <eric.auger@linaro.org>
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      6d3cfbe2
  2. 26 11月, 2014 1 次提交
  3. 25 11月, 2014 2 次提交
  4. 16 10月, 2014 1 次提交
  5. 10 10月, 2014 1 次提交
  6. 26 9月, 2014 1 次提交
  7. 19 9月, 2014 14 次提交
  8. 17 9月, 2014 1 次提交
  9. 28 8月, 2014 2 次提交
  10. 30 7月, 2014 1 次提交
    • W
      kvm: arm64: vgic: fix hyp panic with 64k pages on juno platform · 63afbe7a
      Will Deacon 提交于
      If the physical address of GICV isn't page-aligned, then we end up
      creating a stage-2 mapping of the page containing it, which causes us to
      map neighbouring memory locations directly into the guest.
      
      As an example, consider a platform with GICV at physical 0x2c02f000
      running a 64k-page host kernel. If qemu maps this into the guest at
      0x80010000, then guest physical addresses 0x80010000 - 0x8001efff will
      map host physical region 0x2c020000 - 0x2c02efff. Accesses to these
      physical regions may cause UNPREDICTABLE behaviour, for example, on the
      Juno platform this will cause an SError exception to EL3, which brings
      down the entire physical CPU resulting in RCU stalls / HYP panics / host
      crashing / wasted weeks of debugging.
      
      SBSA recommends that systems alias the 4k GICV across the bounding 64k
      region, in which case GICV physical could be described as 0x2c020000 in
      the above scenario.
      
      This patch fixes the problem by failing the vgic probe if the physical
      base address or the size of GICV aren't page-aligned. Note that this
      generated a warning in dmesg about freeing enabled IRQs, so I had to
      move the IRQ enabling later in the probe.
      
      Cc: Christoffer Dall <christoffer.dall@linaro.org>
      Cc: Marc Zyngier <marc.zyngier@arm.com>
      Cc: Gleb Natapov <gleb@kernel.org>
      Cc: Paolo Bonzini <pbonzini@redhat.com>
      Cc: Joel Schopp <joel.schopp@amd.com>
      Cc: Don Dutile <ddutile@redhat.com>
      Acked-by: NPeter Maydell <peter.maydell@linaro.org>
      Acked-by: NJoel Schopp <joel.schopp@amd.com>
      Acked-by: NMarc Zyngier <marc.zyngier@arm.com>
      Signed-off-by: NWill Deacon <will.deacon@arm.com>
      Signed-off-by: NChristoffer Dall <christoffer.dall@linaro.org>
      63afbe7a
  11. 11 7月, 2014 14 次提交