| /kernel/linux/linux-5.10/arch/arm64/kvm/ |
| D | Makefile | 18 vgic-sys-reg-v3.o fpsimd.o pmu.o \ 20 vgic/vgic.o vgic/vgic-init.o \ 21 vgic/vgic-irqfd.o vgic/vgic-v2.o \ 22 vgic/vgic-v3.o vgic/vgic-v4.o \ 23 vgic/vgic-mmio.o vgic/vgic-mmio-v2.o \ 24 vgic/vgic-mmio-v3.o vgic/vgic-kvm-device.o \ 25 vgic/vgic-its.o vgic/vgic-debug.o
|
| /kernel/linux/linux-4.19/arch/arm/kvm/ |
| D | Makefile | 11 ccflags-y += -Iarch/arm/kvm -Ivirt/kvm/arm/vgic 25 obj-y += coproc.o coproc_a15.o coproc_a7.o vgic-v3-coproc.o 30 obj-y += $(KVM)/arm/vgic/vgic.o 31 obj-y += $(KVM)/arm/vgic/vgic-init.o 32 obj-y += $(KVM)/arm/vgic/vgic-irqfd.o 33 obj-y += $(KVM)/arm/vgic/vgic-v2.o 34 obj-y += $(KVM)/arm/vgic/vgic-v3.o 35 obj-y += $(KVM)/arm/vgic/vgic-v4.o 36 obj-y += $(KVM)/arm/vgic/vgic-mmio.o 37 obj-y += $(KVM)/arm/vgic/vgic-mmio-v2.o [all …]
|
| /kernel/linux/linux-4.19/arch/arm64/kvm/ |
| D | Makefile | 6 ccflags-y += -Iarch/arm64/kvm -Ivirt/kvm/arm/vgic 22 kvm-$(CONFIG_KVM_ARM_HOST) += vgic-sys-reg-v3.o fpsimd.o 25 kvm-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/vgic/vgic.o 26 kvm-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/vgic/vgic-init.o 27 kvm-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/vgic/vgic-irqfd.o 28 kvm-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/vgic/vgic-v2.o 29 kvm-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/vgic/vgic-v3.o 30 kvm-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/vgic/vgic-v4.o 31 kvm-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/vgic/vgic-mmio.o 32 kvm-$(CONFIG_KVM_ARM_HOST) += $(KVM)/arm/vgic/vgic-mmio-v2.o [all …]
|
| /kernel/linux/linux-4.19/virt/kvm/arm/vgic/ |
| D | vgic-init.c | 24 #include "vgic.h" 27 * Initialization rules: there are multiple stages to the vgic 29 * idea is that even though the VGIC is not functional or not requested from 30 * user space, the critical path of the run loop can still call VGIC functions 56 * kvm_vgic_early_init() - Initialize static VGIC VCPU data structures 57 * @kvm: The VM whose VGIC districutor should be initialized 65 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_early_init() 74 * kvm_vgic_create: triggered by the instantiation of the VGIC device by 102 * that no other VCPUs are run while we create the vgic. in kvm_vgic_create() 127 kvm->arch.vgic.in_kernel = true; in kvm_vgic_create() [all …]
|
| D | vgic-kvm-device.c | 2 * VGIC: KVM DEVICE API 21 #include "vgic.h" 42 if (kvm->arch.vgic.vgic_model != type_needed) in vgic_check_type() 49 * kvm_vgic_addr - set or get vgic VM base addresses 51 * @type: the VGIC addr type, one of KVM_VGIC_V[23]_ADDR_TYPE_XXX 56 * Set or get the vgic base addresses for the distributor and the virtual CPU 67 struct vgic_dist *vgic = &kvm->arch.vgic; in kvm_vgic_addr() local 75 addr_ptr = &vgic->vgic_dist_base; in kvm_vgic_addr() 80 addr_ptr = &vgic->vgic_cpu_base; in kvm_vgic_addr() 85 addr_ptr = &vgic->vgic_dist_base; in kvm_vgic_addr() [all …]
|
| D | vgic-debug.c | 25 #include "vgic.h" 28 * Structure to control looping through the entire vgic state. We start at 74 iter->nr_spis = kvm->arch.vgic.nr_spis; in iter_init() 75 if (kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) { in iter_init() 100 iter = kvm->arch.vgic.iter; in vgic_debug_start() 113 kvm->arch.vgic.iter = iter; in vgic_debug_start() 125 struct vgic_state_iter *iter = kvm->arch.vgic.iter; in vgic_debug_next() 147 iter = kvm->arch.vgic.iter; in vgic_debug_stop() 150 kvm->arch.vgic.iter = NULL; in vgic_debug_stop() 238 print_dist_state(s, &kvm->arch.vgic); in vgic_debug_show() [all …]
|
| D | vgic-v3.c | 23 #include "vgic.h" 47 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_fold_lr_state() 104 * observe rising edges as input to the VGIC. in vgic_v3_fold_lr_state() 132 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_populate_lr() 197 * rising edges as input to the VGIC. We therefore lower the line in vgic_v3_populate_lr() 220 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_set_vmcr() 250 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_get_vmcr() 300 if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) { in vgic_v3_enable() 377 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v3_save_pending_tables() 434 struct vgic_dist *d = &kvm->arch.vgic; in vgic_v3_rdist_overlap() [all …]
|
| D | vgic-v2.c | 23 #include "vgic.h" 112 * observe rising edges as input to the VGIC. in vgic_v2_fold_lr_state() 213 * rising edges as input to the VGIC. We therefore lower the line in vgic_v2_populate_lr() 317 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v2_map_resources() 325 kvm_err("Need to set vgic cpu and dist addresses first\n"); in vgic_v2_map_resources() 331 kvm_err("VGIC CPU and dist frames overlap\n"); in vgic_v2_map_resources() 337 * Initialize the vgic if this hasn't already been done on demand by in vgic_v2_map_resources() 338 * accessing the vgic state from userspace. in vgic_v2_map_resources() 342 kvm_err("Unable to initialize VGIC dynamic data structures\n"); in vgic_v2_map_resources() 348 kvm_err("Unable to register VGIC MMIO regions\n"); in vgic_v2_map_resources() [all …]
|
| D | vgic-mmio-v2.c | 22 #include "vgic.h" 23 #include "vgic-mmio.h" 36 struct vgic_dist *vgic = &vcpu->kvm->arch.vgic; in vgic_mmio_read_v2_misc() local 41 value = vgic->enabled ? GICD_ENABLE : 0; in vgic_mmio_read_v2_misc() 44 value = vgic->nr_spis + VGIC_NR_PRIVATE_IRQS; in vgic_mmio_read_v2_misc() 50 (vgic->implementation_rev << GICD_IIDR_REVISION_SHIFT) | in vgic_mmio_read_v2_misc() 64 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_mmio_write_v2_misc() 98 vcpu->kvm->arch.vgic.v2_groups_user_writable = true; in vgic_mmio_uaccess_write_v2_misc() 110 if (vcpu->kvm->arch.vgic.v2_groups_user_writable) in vgic_mmio_uaccess_write_v2_group()
|
| D | vgic-mmio-v3.c | 24 #include "vgic.h" 25 #include "vgic-mmio.h" 49 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_has_its() 72 struct vgic_dist *vgic = &vcpu->kvm->arch.vgic; in vgic_mmio_read_v3_misc() local 77 if (vgic->enabled) in vgic_mmio_read_v3_misc() 82 value = vgic->nr_spis + VGIC_NR_PRIVATE_IRQS; in vgic_mmio_read_v3_misc() 93 (vgic->implementation_rev << GICD_IIDR_REVISION_SHIFT) | in vgic_mmio_read_v3_misc() 107 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_mmio_write_v3_misc() 258 * Refer to Documentation/virtual/kvm/devices/arm-vgic-v3.txt in vgic_v3_uaccess_read_pending() 392 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_mmio_read_propbase() [all …]
|
| /kernel/linux/linux-5.10/arch/arm64/kvm/vgic/ |
| D | vgic-init.c | 13 #include "vgic.h" 16 * Initialization rules: there are multiple stages to the vgic 18 * idea is that even though the VGIC is not functional or not requested from 19 * user space, the critical path of the run loop can still call VGIC functions 45 * kvm_vgic_early_init() - Initialize static VGIC VCPU data structures 46 * @kvm: The VM whose VGIC districutor should be initialized 54 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_early_init() 64 * kvm_vgic_create: triggered by the instantiation of the VGIC device by 109 kvm->arch.vgic.in_kernel = true; in kvm_vgic_create() 110 kvm->arch.vgic.vgic_model = type; in kvm_vgic_create() [all …]
|
| D | vgic-debug.c | 14 #include "vgic.h" 17 * Structure to control looping through the entire vgic state. We start at 63 iter->nr_spis = kvm->arch.vgic.nr_spis; in iter_init() 64 if (kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) { in iter_init() 89 iter = kvm->arch.vgic.iter; in vgic_debug_start() 102 kvm->arch.vgic.iter = iter; in vgic_debug_start() 114 struct vgic_state_iter *iter = kvm->arch.vgic.iter; in vgic_debug_next() 136 iter = kvm->arch.vgic.iter; in vgic_debug_stop() 139 kvm->arch.vgic.iter = NULL; in vgic_debug_stop() 239 print_dist_state(s, &kvm->arch.vgic); in vgic_debug_show() [all …]
|
| D | vgic-kvm-device.c | 3 * VGIC: KVM DEVICE API 13 #include "vgic.h" 34 if (kvm->arch.vgic.vgic_model != type_needed) in vgic_check_type() 41 * kvm_vgic_addr - set or get vgic VM base addresses 43 * @type: the VGIC addr type, one of KVM_VGIC_V[23]_ADDR_TYPE_XXX 48 * Set or get the vgic base addresses for the distributor and the virtual CPU 59 struct vgic_dist *vgic = &kvm->arch.vgic; in kvm_vgic_addr() local 67 addr_ptr = &vgic->vgic_dist_base; in kvm_vgic_addr() 72 addr_ptr = &vgic->vgic_cpu_base; in kvm_vgic_addr() 77 addr_ptr = &vgic->vgic_dist_base; in kvm_vgic_addr() [all …]
|
| D | vgic-v3.c | 11 #include "vgic.h" 35 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_fold_lr_state() 92 * observe rising edges as input to the VGIC. in vgic_v3_fold_lr_state() 120 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_populate_lr() 185 * rising edges as input to the VGIC. We therefore lower the line in vgic_v3_populate_lr() 208 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_set_vmcr() 238 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_get_vmcr() 288 if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) { in vgic_v3_enable() 365 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v3_save_pending_tables() 422 struct vgic_dist *d = &kvm->arch.vgic; in vgic_v3_rdist_overlap() [all …]
|
| D | vgic-v2.c | 12 #include "vgic.h" 101 * observe rising edges as input to the VGIC. in vgic_v2_fold_lr_state() 202 * rising edges as input to the VGIC. We therefore lower the line in vgic_v2_populate_lr() 306 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v2_map_resources() 314 kvm_err("Need to set vgic cpu and dist addresses first\n"); in vgic_v2_map_resources() 320 kvm_err("VGIC CPU and dist frames overlap\n"); in vgic_v2_map_resources() 326 * Initialize the vgic if this hasn't already been done on demand by in vgic_v2_map_resources() 327 * accessing the vgic state from userspace. in vgic_v2_map_resources() 331 kvm_err("Unable to initialize VGIC dynamic data structures\n"); in vgic_v2_map_resources() 337 kvm_err("Unable to register VGIC MMIO regions\n"); in vgic_v2_map_resources() [all …]
|
| D | vgic-mmio-v3.c | 18 #include "vgic.h" 19 #include "vgic-mmio.h" 43 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_has_its() 67 struct vgic_dist *vgic = &vcpu->kvm->arch.vgic; in vgic_mmio_read_v3_misc() local 72 if (vgic->enabled) in vgic_mmio_read_v3_misc() 75 if (vgic->nassgireq) in vgic_mmio_read_v3_misc() 79 value = vgic->nr_spis + VGIC_NR_PRIVATE_IRQS; in vgic_mmio_read_v3_misc() 94 (vgic->implementation_rev << GICD_IIDR_REVISION_SHIFT) | in vgic_mmio_read_v3_misc() 108 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_mmio_write_v3_misc() 157 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_mmio_uaccess_write_v3_misc() [all …]
|
| D | vgic-mmio-v2.c | 14 #include "vgic.h" 15 #include "vgic-mmio.h" 28 struct vgic_dist *vgic = &vcpu->kvm->arch.vgic; in vgic_mmio_read_v2_misc() local 33 value = vgic->enabled ? GICD_ENABLE : 0; in vgic_mmio_read_v2_misc() 36 value = vgic->nr_spis + VGIC_NR_PRIVATE_IRQS; in vgic_mmio_read_v2_misc() 42 (vgic->implementation_rev << GICD_IIDR_REVISION_SHIFT) | in vgic_mmio_read_v2_misc() 56 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_mmio_write_v2_misc() 90 vcpu->kvm->arch.vgic.v2_groups_user_writable = true; in vgic_mmio_uaccess_write_v2_misc() 102 if (vcpu->kvm->arch.vgic.v2_groups_user_writable) in vgic_mmio_uaccess_write_v2_group()
|
| /kernel/linux/linux-4.19/Documentation/virtual/kvm/devices/ |
| D | arm-vgic.txt | 1 ARM Virtual Generic Interrupt Controller v2 (VGIC) 7 Only one VGIC instance may be instantiated through either this API or the 8 legacy KVM_CREATE_IRQCHIP API. The created VGIC will act as the VM interrupt 10 VGIC instead of directly to CPUs. 14 device and guest ITS devices, see arm-vgic-v3.txt. It is not possible to 121 request the initialization of the VGIC or ITS, no additional parameter 124 -ENXIO: VGIC not properly configured as required prior to calling 127 -ENOMEM: memory shortage when allocating vgic internal data
|
| D | arm-vgic-v3.txt | 8 Only one VGIC instance may be instantiated through this API. The created VGIC 10 to inject interrupts to the VGIC instead of directly to CPUs. It is not 90 VGIC's internal state. 202 request the initialization of the VGIC, no additional parameter in 209 -ENXIO: VGIC not properly configured as required prior to calling 212 -ENOMEM: memory shortage when allocating vgic internal data
|
| /kernel/linux/linux-5.10/arch/arm64/kvm/hyp/ |
| D | vgic-v2-cpuif-proxy.c | 38 struct vgic_dist *vgic = &kvm->arch.vgic; in __vgic_v2_perform_cpuif_access() local 48 if (fault_ipa < vgic->vgic_cpu_base || in __vgic_v2_perform_cpuif_access() 49 fault_ipa >= (vgic->vgic_cpu_base + KVM_VGIC_V2_CPU_SIZE)) in __vgic_v2_perform_cpuif_access() 66 addr += fault_ipa - vgic->vgic_cpu_base; in __vgic_v2_perform_cpuif_access()
|
| /kernel/linux/linux-4.19/arch/arm64/kvm/hyp/ |
| D | vgic-v2-cpuif-proxy.c | 49 struct vgic_dist *vgic = &kvm->arch.vgic; in __vgic_v2_perform_cpuif_access() local 59 if (fault_ipa < vgic->vgic_cpu_base || in __vgic_v2_perform_cpuif_access() 60 fault_ipa >= (vgic->vgic_cpu_base + KVM_VGIC_V2_CPU_SIZE)) in __vgic_v2_perform_cpuif_access() 73 addr += fault_ipa - vgic->vgic_cpu_base; in __vgic_v2_perform_cpuif_access()
|
| /kernel/linux/linux-5.10/Documentation/virt/kvm/devices/ |
| D | index.rst | 10 arm-vgic-its 11 arm-vgic 12 arm-vgic-v3
|
| D | arm-vgic.rst | 4 ARM Virtual Generic Interrupt Controller v2 (VGIC) 11 Only one VGIC instance may be instantiated through either this API or the 12 legacy KVM_CREATE_IRQCHIP API. The created VGIC will act as the VM interrupt 14 VGIC instead of directly to CPUs. 18 device and guest ITS devices, see arm-vgic-v3.txt. It is not possible to 146 request the initialization of the VGIC or ITS, no additional parameter 152 -ENXIO VGIC not properly configured as required prior to calling 155 -ENOMEM memory shortage when allocating vgic internal data
|
| /kernel/linux/linux-5.10/include/kvm/ |
| D | arm_vgic.h | 46 /* Physical address of vgic virtual cpu interface */ 208 /* vGIC model the kernel emulates for the guest (GICv2 or GICv3) */ 259 /* used by vgic-debug */ 364 #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) 365 #define vgic_initialized(k) ((k)->arch.vgic.initialized) 366 #define vgic_ready(k) ((k)->arch.vgic.ready) 368 ((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS))
|
| /kernel/linux/linux-4.19/include/kvm/ |
| D | arm_vgic.h | 57 /* Physical address of vgic virtual cpu interface */ 218 /* vGIC model the kernel emulates for the guest (GICv2 or GICv3) */ 263 /* used by vgic-debug */ 366 #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) 367 #define vgic_initialized(k) ((k)->arch.vgic.initialized) 368 #define vgic_ready(k) ((k)->arch.vgic.ready) 370 ((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS))
|