KVM
|
#include <linux/uaccess.h>
#include <linux/interrupt.h>
#include <linux/cpu.h>
#include <linux/kvm_host.h>
#include <kvm/arm_vgic.h>
#include <asm/kvm_emulate.h>
#include <asm/kvm_mmu.h>
#include "vgic.h"
Go to the source code of this file.
Functions | |
void | kvm_vgic_early_init (struct kvm *kvm) |
int | kvm_vgic_create (struct kvm *kvm, u32 type) |
static int | kvm_vgic_dist_init (struct kvm *kvm, unsigned int nr_spis) |
int | kvm_vgic_vcpu_init (struct kvm_vcpu *vcpu) |
static void | kvm_vgic_vcpu_enable (struct kvm_vcpu *vcpu) |
int | vgic_init (struct kvm *kvm) |
static void | kvm_vgic_dist_destroy (struct kvm *kvm) |
static void | __kvm_vgic_vcpu_destroy (struct kvm_vcpu *vcpu) |
void | kvm_vgic_vcpu_destroy (struct kvm_vcpu *vcpu) |
void | kvm_vgic_destroy (struct kvm *kvm) |
int | vgic_lazy_init (struct kvm *kvm) |
int | kvm_vgic_map_resources (struct kvm *kvm) |
void | kvm_vgic_cpu_up (void) |
void | kvm_vgic_cpu_down (void) |
static irqreturn_t | vgic_maintenance_handler (int irq, void *data) |
void __init | vgic_set_kvm_info (const struct gic_kvm_info *info) |
void | kvm_vgic_init_cpu_hardware (void) |
int | kvm_vgic_hyp_init (void) |
Variables | |
static struct gic_kvm_info * | gic_kvm_info |
|
static |
Definition at line 371 of file vgic-init.c.
void kvm_vgic_cpu_down | ( | void | ) |
Definition at line 513 of file vgic-init.c.
void kvm_vgic_cpu_up | ( | void | ) |
int kvm_vgic_create | ( | struct kvm * | kvm, |
u32 | type | ||
) |
kvm_vgic_create: triggered by the instantiation of the VGIC device by user space, either through the legacy KVM_CREATE_IRQCHIP ioctl (v2 only) or through the generic KVM_CREATE_DEVICE API ioctl. irqchip_in_kernel() tells you if this function succeeded or not. @kvm: kvm struct pointer @type: KVM_DEV_TYPE_ARM_VGIC_V[23]
Definition at line 71 of file vgic-init.c.
void kvm_vgic_destroy | ( | struct kvm * | kvm | ) |
Definition at line 397 of file vgic-init.c.
|
static |
Definition at line 343 of file vgic-init.c.
|
static |
kvm_vgic_dist_init: initialize the dist data structures @kvm: kvm struct pointer @nr_spis: number of spis, frozen by caller
Definition at line 140 of file vgic-init.c.
void kvm_vgic_early_init | ( | struct kvm * | kvm | ) |
kvm_vgic_early_init() - Initialize static VGIC VCPU data structures @kvm: The VM whose VGIC districutor should be initialized
Only do initialization of static structures that don't require any allocation or sizing information from userspace. vgic_init() called kvm_vgic_dist_init() which takes care of the rest.
Definition at line 52 of file vgic-init.c.
int kvm_vgic_hyp_init | ( | void | ) |
kvm_vgic_hyp_init: populates the kvm_vgic_global_state variable according to the host GIC model. Accordingly calls either vgic_v2/v3_probe which registers the KVM_DEVICE that can be instantiated by a guest later on .
Definition at line 564 of file vgic-init.c.
void kvm_vgic_init_cpu_hardware | ( | void | ) |
kvm_vgic_init_cpu_hardware - initialize the GIC VE hardware
For a specific CPU, initialize the GIC VE hardware.
Definition at line 544 of file vgic-init.c.
int kvm_vgic_map_resources | ( | struct kvm * | kvm | ) |
Map the MMIO regions depending on the VGIC model exposed to the guest called on the first VCPU run. Also map the virtual CPU interface into the VM. v2 calls vgic_init() if not already done. v3 and derivatives return an error if the VGIC is not initialized. vgic_ready() returns true if this function has succeeded. @kvm: kvm struct pointer
Definition at line 456 of file vgic-init.c.
void kvm_vgic_vcpu_destroy | ( | struct kvm_vcpu * | vcpu | ) |
Definition at line 388 of file vgic-init.c.
|
static |
Definition at line 245 of file vgic-init.c.
int kvm_vgic_vcpu_init | ( | struct kvm_vcpu * | vcpu | ) |
kvm_vgic_vcpu_init() - Initialize static VGIC VCPU data structures and register VCPU-specific KVM iodevs
@vcpu: pointer to the VCPU being created and initialized
Only do initialization, but do not actually enable the VGIC CPU interface
Definition at line 194 of file vgic-init.c.
int vgic_init | ( | struct kvm * | kvm | ) |
Definition at line 262 of file vgic-init.c.
int vgic_lazy_init | ( | struct kvm * | kvm | ) |
vgic_lazy_init: Lazy init is only allowed if the GIC exposed to the guest is a GICv2. A GICv3 must be explicitly initialized by userspace using the KVM_DEV_ARM_VGIC_GRP_CTRL KVM_DEVICE group. @kvm: kvm struct pointer
Definition at line 423 of file vgic-init.c.
|
static |
void __init vgic_set_kvm_info | ( | const struct gic_kvm_info * | info | ) |
Definition at line 531 of file vgic-init.c.
|
static |
Definition at line 529 of file vgic-init.c.