aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kvm/vgic.c
Commit message (Collapse)AuthorAge
*-. Merge branches 'devel-stable', 'entry', 'fixes', 'mach-types', 'misc' and ↵Russell King2013-05-02
|\ \ | | | | | | | | | 'smp-hotplug' into for-linus
| | * ARM: KVM: vgic: take distributor lock on sync_hwstate pathMarc Zyngier2013-02-22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now that the maintenance interrupt handling is actually out of the handler itself, the code becomes quite racy as we can get preempted while we process the state. Wrapping this code around the distributor lock ensures that we're not preempted and relatively race-free. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
| | * ARM: KVM: vgic: force EOIed LRs to the empty stateMarc Zyngier2013-02-22
| |/ | | | | | | | | | | | | | | | | | | The VGIC doesn't guarantee that an EOIed LR that has been configured to generate a maintenance interrupt will appear as empty. While the code recovers from this situation, it is better to clean the LR and flag it as empty so it can be quickly recycled. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
* / ARM: KVM: vgic: decouple alignment restriction from page sizeMarc Zyngier2013-03-06
|/ | | | | | | | | The virtual GIC is supposed to be 4kB aligned. On a 64kB page system, comparing the alignment to PAGE_SIZE is wrong. Use SZ_4K instead. Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
* ARM: KVM: arch_timers: Wire the init code and config optionMarc Zyngier2013-02-11
| | | | | | | | | It is now possible to select CONFIG_KVM_ARM_TIMER to enable the KVM architected timer support. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
* ARM: KVM: VGIC initialisation codeMarc Zyngier2013-02-11
| | | | | | | | | | | | | | | | Add the init code for the hypervisor, the virtual machine, and the virtual CPUs. An interrupt handler is also wired to allow the VGIC maintenance interrupts, used to deal with level triggered interrupts and LR underflows. A CPU hotplug notifier is registered to disable/enable the interrupt as requested. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
* ARM: KVM: VGIC interrupt injectionMarc Zyngier2013-02-11
| | | | | | | | | Plug the interrupt injection code. Interrupts can now be generated from user space. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
* ARM: KVM: vgic: retire queued, disabled interruptsMarc Zyngier2013-02-11
| | | | | | | | | | | | | | An interrupt may have been disabled after being made pending on the CPU interface (the classic case is a timer running while we're rebooting the guest - the interrupt would kick as soon as the CPU interface gets enabled, with deadly consequences). The solution is to examine already active LRs, and check the interrupt is still enabled. If not, just retire it. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
* ARM: KVM: VGIC virtual CPU interface managementMarc Zyngier2013-02-11
| | | | | | | | | | Add VGIC virtual CPU interface code, picking pending interrupts from the distributor and stashing them in the VGIC control interface list registers. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
* ARM: KVM: VGIC distributor handlingMarc Zyngier2013-02-11
| | | | | | | | | Add the GIC distributor emulation code. A number of the GIC features are simply ignored as they are not required to boot a Linux guest. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
* ARM: KVM: VGIC accept vcpu and dist base addresses from user spaceChristoffer Dall2013-02-11
| | | | | | | | | | | | User space defines the model to emulate to a guest and should therefore decide which addresses are used for both the virtual CPU interface directly mapped in the guest physical address space and for the emulated distributor interface, which is mapped in software by the in-kernel VGIC support. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
* ARM: KVM: Initial VGIC infrastructure codeMarc Zyngier2013-02-11
Wire the basic framework code for VGIC support and the initial in-kernel MMIO support code for the VGIC, used for the distributor emulation. Reviewed-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>