Lines Matching +full:vm +full:- +full:map
24 #include <linux/irqchip/arm-gic-v4.h>
36 * agnostic actually means KVM-specific - what were you thinking?).
41 * - Any guest-visible VLPI is backed by a Linux interrupt (and a
47 * - Enabling/disabling a VLPI is done by issuing mask/unmask calls.
49 * - Guest INT/CLEAR commands are implemented through
52 * - The *bizarre* stuff (mapping/unmapping an interrupt to a VLPI, or
56 * confines the crap to a single location. And map/unmap really is
72 * interrupts which are delivered when a VLPI targeting a non-running
81 * - VMs (or rather the VM abstraction that matters to the GIC)
86 * - mask/unmask do what is expected on the doorbell interrupt.
88 * - irq_set_affinity is used to move a VPE from one redistributor to
91 * - irq_set_vcpu_affinity once again gets hijacked for the purpose of
92 * creating a new sub-API, namely scheduling/descheduling a VPE
100 int its_alloc_vcpu_irqs(struct its_vm *vm) in its_alloc_vcpu_irqs() argument
104 vm->fwnode = irq_domain_alloc_named_id_fwnode("GICv4-vpe", in its_alloc_vcpu_irqs()
106 if (!vm->fwnode) in its_alloc_vcpu_irqs()
109 vm->domain = irq_domain_create_hierarchy(gic_domain, 0, vm->nr_vpes, in its_alloc_vcpu_irqs()
110 vm->fwnode, vpe_domain_ops, in its_alloc_vcpu_irqs()
111 vm); in its_alloc_vcpu_irqs()
112 if (!vm->domain) in its_alloc_vcpu_irqs()
115 for (i = 0; i < vm->nr_vpes; i++) { in its_alloc_vcpu_irqs()
116 vm->vpes[i]->its_vm = vm; in its_alloc_vcpu_irqs()
117 vm->vpes[i]->idai = true; in its_alloc_vcpu_irqs()
120 vpe_base_irq = __irq_domain_alloc_irqs(vm->domain, -1, vm->nr_vpes, in its_alloc_vcpu_irqs()
121 NUMA_NO_NODE, vm, in its_alloc_vcpu_irqs()
126 for (i = 0; i < vm->nr_vpes; i++) in its_alloc_vcpu_irqs()
127 vm->vpes[i]->irq = vpe_base_irq + i; in its_alloc_vcpu_irqs()
132 if (vm->domain) in its_alloc_vcpu_irqs()
133 irq_domain_remove(vm->domain); in its_alloc_vcpu_irqs()
134 if (vm->fwnode) in its_alloc_vcpu_irqs()
135 irq_domain_free_fwnode(vm->fwnode); in its_alloc_vcpu_irqs()
137 return -ENOMEM; in its_alloc_vcpu_irqs()
140 void its_free_vcpu_irqs(struct its_vm *vm) in its_free_vcpu_irqs() argument
142 irq_domain_free_irqs(vm->vpes[0]->irq, vm->nr_vpes); in its_free_vcpu_irqs()
143 irq_domain_remove(vm->domain); in its_free_vcpu_irqs()
144 irq_domain_free_fwnode(vm->fwnode); in its_free_vcpu_irqs()
149 return irq_set_vcpu_affinity(vpe->irq, info); in its_send_vpe_cmd()
172 int its_map_vlpi(int irq, struct its_vlpi_map *map) in its_map_vlpi() argument
177 .map = map, in its_map_vlpi()
195 int its_get_vlpi(int irq, struct its_vlpi_map *map) in its_get_vlpi() argument
200 .map = map, in its_get_vlpi()
235 return -ENODEV; in its_init_v4()