| /Linux-v5.15/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
|
| D | vgic-sys-reg-v3.c | 3 * VGIC system registers handling functions for AArch64 mode 10 #include "vgic/vgic.h"
|
| /Linux-v5.15/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 | 13 #include "vgic.h" 37 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_fold_lr_state() 107 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_populate_lr() 172 * rising edges as input to the VGIC. We therefore lower the line in vgic_v3_populate_lr() 195 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_set_vmcr() 225 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_get_vmcr() 275 if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) { in vgic_v3_enable() 378 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v3_save_pending_tables() 390 * The above vgic initialized check also ensures that the allocation in vgic_v3_save_pending_tables() 461 struct vgic_dist *d = &kvm->arch.vgic; in vgic_v3_rdist_overlap() [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-v2.c | 12 #include "vgic.h" 187 * rising edges as input to the VGIC. We therefore lower the line in vgic_v2_populate_lr() 291 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v2_map_resources() 296 kvm_err("Need to set vgic cpu and dist addresses first\n"); in vgic_v2_map_resources() 301 kvm_err("VGIC CPU and dist frames overlap\n"); in vgic_v2_map_resources() 306 * Initialize the vgic if this hasn't already been done on demand by in vgic_v2_map_resources() 307 * accessing the vgic state from userspace. in vgic_v2_map_resources() 311 kvm_err("Unable to initialize VGIC dynamic data structures\n"); in vgic_v2_map_resources() 317 kvm_err("Unable to register VGIC MMIO regions\n"); in vgic_v2_map_resources() 326 kvm_err("Unable to remap VGIC CPU to VCPU\n"); in vgic_v2_map_resources() [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()
|
| D | vgic-mmio.c | 3 * VGIC MMIO handling functions 16 #include "vgic.h" 17 #include "vgic-mmio.h" 148 * while the interrupt was disabled at the VGIC level. in vgic_mmio_write_senable() 267 vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V2); in is_vgic_v2_sgi() 354 * can happen is an additional vgic injection. We also clear in vgic_hw_irq_cpending() 447 * userspace accesses to the VGIC state already require all VCPUs to be 453 if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 || in vgic_access_active_prepare() 461 if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3 || in vgic_access_active_finish() 542 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_mmio_change_active() [all …]
|
| D | vgic.c | 15 #include "vgic.h" 49 * Since the VGIC must support injecting virtual interrupts from ISRs, we have 60 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_get_lpi() 100 if (intid < (kvm->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS)) { in vgic_get_irq() 101 intid = array_index_nospec(intid, kvm->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS); in vgic_get_irq() 102 return &kvm->arch.vgic.spis[intid - VGIC_NR_PRIVATE_IRQS]; in vgic_get_irq() 126 struct vgic_dist *dist = &kvm->arch.vgic; in __vgic_put_lpi_locked() 139 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_put_irq() 230 !irq->target_vcpu->kvm->arch.vgic.enabled)) in vgic_target_oracle() 421 * kvm_vgic_inject_irq - Inject an IRQ from a device to the vgic [all …]
|
| D | vgic-v4.c | 13 #include "vgic.h" 18 * The vgic-v4 layer acts as a bridge between several entities: 190 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v4_configure_vsgis() 230 * vgic is initialized. This relies on kvm->lock to be 236 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v4_init() 312 struct its_vm *its_vm = &kvm->arch.vgic.its_vm; in vgic_v4_teardown() 360 err = its_make_vpe_resident(vpe, false, vcpu->kvm->arch.vgic.enabled); in vgic_v4_load() 436 .vm = &kvm->arch.vgic.its_vm, in kvm_vgic_v4_set_forwarding()
|
| D | vgic-irqfd.c | 10 #include "vgic.h" 125 * as long as the damn vgic is initialized. in kvm_arch_set_irq_inatomic() 138 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_setup_default_irq_routing()
|
| D | vgic.h | 37 * Below macro converts vgic userspace format to MPIDR reg format. 45 * As per Documentation/virt/kvm/devices/arm-vgic-v3.rst, 66 * As per Documentation/virt/kvm/devices/arm-vgic-its.rst, 304 struct vgic_dist *d = &kvm->arch.vgic; in vgic_dist_overlap()
|
| D | vgic-its.c | 23 #include "vgic.h" 24 #include "vgic-mmio.h" 42 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_add_lpi() 283 u64 propbase = GICR_PROPBASER_ADDRESS(kvm->arch.vgic.propbaser); in update_lpi_config() 321 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_copy_lpi_list() 383 * is targeting) to the VGIC's view, which deals with target VCPUs. 582 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_its_check_cache() 597 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_its_cache_translation() 648 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_its_invalidate_cache() 1072 lpi_nr >= max_lpis_propbaser(kvm->arch.vgic.propbaser)) in vgic_its_cmd_handle_mapi() [all …]
|
| /Linux-v5.15/arch/arm64/kvm/hyp/ |
| D | vgic-v2-cpuif-proxy.c | 40 struct vgic_dist *vgic = &kvm->arch.vgic; in __vgic_v2_perform_cpuif_access() local 50 if (fault_ipa < vgic->vgic_cpu_base || in __vgic_v2_perform_cpuif_access() 51 fault_ipa >= (vgic->vgic_cpu_base + KVM_VGIC_V2_CPU_SIZE)) in __vgic_v2_perform_cpuif_access() 68 addr += fault_ipa - vgic->vgic_cpu_base; in __vgic_v2_perform_cpuif_access()
|
| /Linux-v5.15/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
|
| D | arm-vgic-v3.rst | 11 Only one VGIC instance may be instantiated through this API. The created VGIC 13 to inject interrupts to the VGIC instead of directly to CPUs. It is not 102 VGIC's internal state. 230 request the initialization of the VGIC, no additional parameter in 240 -ENXIO VGIC not properly configured as required prior to calling 243 -ENOMEM memory shortage when allocating vgic internal data
|
| /Linux-v5.15/include/kvm/ |
| D | arm_vgic.h | 46 /* Physical address of vgic virtual cpu interface */ 227 /* vGIC model the kernel emulates for the guest (GICv2 or GICv3) */ 278 /* used by vgic-debug */ 384 #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) 385 #define vgic_initialized(k) ((k)->arch.vgic.initialized) 386 #define vgic_ready(k) ((k)->arch.vgic.ready) 388 ((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS))
|
| /Linux-v5.15/arch/arm64/kvm/hyp/vhe/ |
| D | Makefile | 10 obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
|
| /Linux-v5.15/tools/arch/arm/include/uapi/asm/ |
| D | kvm.h | 84 /* Supported VGIC address types */ 231 /* Device Control API: ARM VGIC */ 297 /* One single KVM irqchip, ie. the VGIC */
|
| /Linux-v5.15/arch/arm64/kvm/hyp/nvhe/ |
| D | Makefile | 18 obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
|
| /Linux-v5.15/tools/arch/arm64/include/uapi/asm/ |
| D | kvm.h | 85 /* Supported VGIC address types */ 330 /* Device Control API: ARM VGIC */ 399 /* One single KVM irqchip, ie. the VGIC */
|
| /Linux-v5.15/arch/arm64/include/uapi/asm/ |
| D | kvm.h | 85 /* Supported VGIC address types */ 330 /* Device Control API: ARM VGIC */ 399 /* One single KVM irqchip, ie. the VGIC */
|