[PATCH v2 08/10] ARM: KVM: VGIC initialisation code

Will Deacon will.deacon at arm.com
Tue Oct 2 05:24:13 EDT 2012


On Mon, Oct 01, 2012 at 10:14:26AM +0100, Christoffer Dall wrote:
> From: Marc Zyngier <marc.zyngier at arm.com>
> 
> 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.
> 
> Signed-off-by: Marc Zyngier <marc.zyngier at arm.com>
> Signed-off-by: Christoffer Dall <c.dall at virtualopensystems.com>
> ---

[...]

> diff --git a/arch/arm/kvm/vgic.c b/arch/arm/kvm/vgic.c
> index b52d4c2..fc2a138 100644
> --- a/arch/arm/kvm/vgic.c
> +++ b/arch/arm/kvm/vgic.c
> @@ -20,7 +20,14 @@
>  #include <linux/kvm_host.h>
>  #include <linux/interrupt.h>
>  #include <linux/io.h>
> +#include <linux/of.h>
> +#include <linux/of_address.h>
> +#include <linux/of_irq.h>
> +
>  #include <asm/kvm_emulate.h>
> +#include <asm/hardware/gic.h>
> +#include <asm/kvm_arm.h>
> +#include <asm/kvm_mmu.h>
>  
>  /*
>   * How the whole thing works (courtesy of Christoffer Dall):
> @@ -61,6 +68,13 @@
>  /* Temporary hacks, need to be provided by userspace emulation */
>  #define VGIC_DIST_BASE		0x2c001000
>  #define VGIC_DIST_SIZE		0x1000
> +#define VGIC_CPU_BASE		0x2c002000
> +#define VGIC_CPU_SIZE		0x2000

We really don't want the physical memory map for the guest hardwired in the
kernel. Please find a way to parameterise this from userspace.

Will



More information about the linux-arm-kernel mailing list