/kernel/linux/linux-5.10/arch/arm64/kvm/ |
H A 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/vgi [all...] |
/kernel/linux/linux-6.6/arch/arm64/kvm/ |
H A D | Makefile | 16 vgic-sys-reg-v3.o fpsimd.o pkvm.o \ 18 vgic/vgic.o vgic/vgic-init.o \ 19 vgic/vgic-irqfd.o vgic/vgic-v2.o \ 20 vgic/vgi [all...] |
/kernel/linux/linux-5.10/arch/arm64/kvm/vgic/ |
H A D | vgic-init.c | 13 #include "vgic.h" 16 * Initialization rules: there are multiple stages to the vgic 54 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_early_init() 109 kvm->arch.vgic.in_kernel = true; in kvm_vgic_create() 110 kvm->arch.vgic.vgic_model = type; in kvm_vgic_create() 112 kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF; in kvm_vgic_create() 115 kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF; in kvm_vgic_create() 117 INIT_LIST_HEAD(&kvm->arch.vgic.rd_regions); in kvm_vgic_create() 133 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_dist_init() 188 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in kvm_vgic_vcpu_init() [all...] |
H A 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...] |
H A 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() 700 struct vgic_dist *vgic = &kvm->arch.vgic; vgic_register_redist_iodev() local [all...] |
H A D | vgic-kvm-device.c | 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 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() 90 rdreg = list_first_entry_or_null(&vgic in kvm_vgic_addr() [all...] |
H A D | vgic-v3.c | 11 #include "vgic.h" 35 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_fold_lr_state() 120 u32 model = vcpu->kvm->arch.vgic.vgic_model; 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() 439 struct vgic_dist *d = &kvm->arch.vgic; in vgic_v3_check_base() 485 struct list_head *rd_regions = &kvm->arch.vgic in vgic_v3_rdist_region_from_index() [all...] |
H A 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 in vgic_mmio_uaccess_write_v2_group() [all...] |
H A 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() 211 * vgic is initialized. This relies on kvm->lock to be 217 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v4_init() 293 struct its_vm *its_vm = &kvm->arch.vgic.its_vm; in vgic_v4_teardown() 341 err = its_make_vpe_resident(vpe, false, vcpu->kvm->arch.vgic.enabled); in vgic_v4_load() 404 .vm = &kvm->arch.vgic.its_vm, in kvm_vgic_v4_set_forwarding()
|
H A D | vgic.c | 15 #include "vgic.h" 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() 127 struct vgic_dist *dist = &kvm->arch.vgic; in __vgic_put_lpi_locked() 140 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_put_irq() 231 !irq->target_vcpu->kvm->arch.vgic.enabled)) in vgic_target_oracle() 422 * kvm_vgic_inject_irq - Inject an IRQ from a device to the vgic 962 if (!vcpu->kvm->arch.vgic in kvm_vgic_vcpu_pending_irq() [all...] |
/kernel/linux/linux-5.10/arch/arm64/kvm/hyp/ |
H A 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-6.6/arch/arm64/kvm/vgic/ |
H A D | vgic-kvm-device.c | 13 #include "vgic.h" 38 if (kvm->arch.vgic.vgic_model != type_needed) in vgic_check_type() 46 struct vgic_dist *vgic = &kvm->arch.vgic; in kvm_set_legacy_vgic_v2_addr() local 54 r = vgic_check_iorange(kvm, vgic->vgic_dist_base, dev_addr->addr, in kvm_set_legacy_vgic_v2_addr() 57 vgic->vgic_dist_base = dev_addr->addr; in kvm_set_legacy_vgic_v2_addr() 62 r = vgic_check_iorange(kvm, vgic->vgic_cpu_base, dev_addr->addr, in kvm_set_legacy_vgic_v2_addr() 65 vgic->vgic_cpu_base = dev_addr->addr; in kvm_set_legacy_vgic_v2_addr() 77 * kvm_vgic_addr - set or get vgic VM base addresses 83 * Set or get the vgic bas 94 struct vgic_dist *vgic = &kvm->arch.vgic; kvm_vgic_addr() local [all...] |
H A D | vgic-init.c | 13 #include "vgic.h" 16 * Initialization rules: there are multiple stages to the vgic 54 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_early_init() 117 kvm->arch.vgic.in_kernel = true; in kvm_vgic_create() 118 kvm->arch.vgic.vgic_model = type; in kvm_vgic_create() 120 kvm->arch.vgic.vgic_dist_base = VGIC_ADDR_UNDEF; in kvm_vgic_create() 123 kvm->arch.vgic.vgic_cpu_base = VGIC_ADDR_UNDEF; in kvm_vgic_create() 125 INIT_LIST_HEAD(&kvm->arch.vgic.rd_regions); in kvm_vgic_create() 142 struct vgic_dist *dist = &kvm->arch.vgic; in kvm_vgic_dist_init() 197 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in kvm_vgic_vcpu_init() [all...] |
H A 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...] |
H A 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() 294 struct vgic_dist *vgic = &vcpu->kvm->arch.vgic; vgic_mmio_vcpu_rdist_is_last() local 774 struct vgic_dist *vgic = &kvm->arch.vgic; vgic_register_redist_iodev() local [all...] |
H A D | vgic-v3.c | 14 #include "vgic.h" 39 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_fold_lr_state() 109 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_populate_lr() 197 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_set_vmcr() 227 u32 model = vcpu->kvm->arch.vgic.vgic_model; in vgic_v3_get_vmcr() 277 if (vcpu->kvm->arch.vgic.vgic_model == KVM_DEV_TYPE_ARM_VGIC_V3) { in vgic_v3_enable() 356 struct vgic_dist *dist = &kvm->arch.vgic; in unmap_all_vpes() 365 struct vgic_dist *dist = &kvm->arch.vgic; in map_all_vpes() 379 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v3_save_pending_tables() 391 * The above vgic initialize in vgic_v3_save_pending_tables() [all...] |
H A 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() 76 struct vgic_dist *dist = &vcpu->kvm->arch.vgic; in vgic_mmio_uaccess_write_v2_misc() 98 vcpu->kvm->arch.vgic in vgic_mmio_uaccess_write_v2_misc() [all...] |
H A D | vgic-v4.c | 13 #include "vgic.h" 18 * The vgic-v4 layer acts as a bridge between several entities: 189 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v4_configure_vsgis() 236 * vgic is initialized. In both cases, the number of vcpus 241 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_v4_init() 317 struct its_vm *its_vm = &kvm->arch.vgic.its_vm; in vgic_v4_teardown() 370 err = its_make_vpe_resident(vpe, false, vcpu->kvm->arch.vgic.enabled); in vgic_v4_load() 446 .vm = &kvm->arch.vgic.its_vm, in kvm_vgic_v4_set_forwarding()
|
H A D | vgic.c | 15 #include "vgic.h" 62 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_get_lpi() 102 if (intid < (kvm->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS)) { in vgic_get_irq() 103 intid = array_index_nospec(intid, kvm->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS); in vgic_get_irq() 104 return &kvm->arch.vgic.spis[intid - VGIC_NR_PRIVATE_IRQS]; in vgic_get_irq() 128 struct vgic_dist *dist = &kvm->arch.vgic; in __vgic_put_lpi_locked() 141 struct vgic_dist *dist = &kvm->arch.vgic; in vgic_put_irq() 232 !irq->target_vcpu->kvm->arch.vgic.enabled)) in vgic_target_oracle() 423 * kvm_vgic_inject_irq - Inject an IRQ from a device to the vgic 981 if (!vcpu->kvm->arch.vgic in kvm_vgic_vcpu_pending_irq() [all...] |
/kernel/linux/linux-6.6/arch/arm64/kvm/hyp/ |
H A 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()
|
/kernel/linux/linux-5.10/arch/arm64/kvm/hyp/vhe/ |
H A D | Makefile | 10 obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
|
/kernel/linux/linux-6.6/arch/arm64/kvm/hyp/vhe/ |
H A D | Makefile | 10 obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
|
/kernel/linux/linux-5.10/include/kvm/ |
H A D | arm_vgic.h | 46 /* Physical address of vgic virtual cpu interface */ 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-6.6/include/kvm/ |
H A D | arm_vgic.h | 48 /* Physical address of vgic virtual cpu interface */ 284 /* used by vgic-debug */ 392 #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) 393 #define vgic_initialized(k) ((k)->arch.vgic.initialized) 394 #define vgic_ready(k) ((k)->arch.vgic.ready) 396 ((i) < (k)->arch.vgic.nr_spis + VGIC_NR_PRIVATE_IRQS))
|
/kernel/linux/linux-5.10/arch/arm64/kvm/hyp/nvhe/ |
H A D | Makefile | 13 obj-y += ../vgic-v3-sr.o ../aarch32.o ../vgic-v2-cpuif-proxy.o ../entry.o \
|