diff options
Diffstat (limited to 'include/kvm/arm_vgic.h')
-rw-r--r-- | include/kvm/arm_vgic.h | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h index 4e14dac282bb..9c747cb14ad8 100644 --- a/include/kvm/arm_vgic.h +++ b/include/kvm/arm_vgic.h | |||
@@ -112,7 +112,6 @@ struct vgic_vmcr { | |||
112 | struct vgic_ops { | 112 | struct vgic_ops { |
113 | struct vgic_lr (*get_lr)(const struct kvm_vcpu *, int); | 113 | struct vgic_lr (*get_lr)(const struct kvm_vcpu *, int); |
114 | void (*set_lr)(struct kvm_vcpu *, int, struct vgic_lr); | 114 | void (*set_lr)(struct kvm_vcpu *, int, struct vgic_lr); |
115 | void (*sync_lr_elrsr)(struct kvm_vcpu *, int, struct vgic_lr); | ||
116 | u64 (*get_elrsr)(const struct kvm_vcpu *vcpu); | 115 | u64 (*get_elrsr)(const struct kvm_vcpu *vcpu); |
117 | u64 (*get_eisr)(const struct kvm_vcpu *vcpu); | 116 | u64 (*get_eisr)(const struct kvm_vcpu *vcpu); |
118 | void (*clear_eisr)(struct kvm_vcpu *vcpu); | 117 | void (*clear_eisr)(struct kvm_vcpu *vcpu); |
@@ -159,7 +158,6 @@ struct irq_phys_map { | |||
159 | u32 virt_irq; | 158 | u32 virt_irq; |
160 | u32 phys_irq; | 159 | u32 phys_irq; |
161 | u32 irq; | 160 | u32 irq; |
162 | bool active; | ||
163 | }; | 161 | }; |
164 | 162 | ||
165 | struct irq_phys_map_entry { | 163 | struct irq_phys_map_entry { |
@@ -282,7 +280,7 @@ struct vgic_v2_cpu_if { | |||
282 | }; | 280 | }; |
283 | 281 | ||
284 | struct vgic_v3_cpu_if { | 282 | struct vgic_v3_cpu_if { |
285 | #ifdef CONFIG_ARM_GIC_V3 | 283 | #ifdef CONFIG_KVM_ARM_VGIC_V3 |
286 | u32 vgic_hcr; | 284 | u32 vgic_hcr; |
287 | u32 vgic_vmcr; | 285 | u32 vgic_vmcr; |
288 | u32 vgic_sre; /* Restored only, change ignored */ | 286 | u32 vgic_sre; /* Restored only, change ignored */ |
@@ -296,22 +294,16 @@ struct vgic_v3_cpu_if { | |||
296 | }; | 294 | }; |
297 | 295 | ||
298 | struct vgic_cpu { | 296 | struct vgic_cpu { |
299 | /* per IRQ to LR mapping */ | ||
300 | u8 *vgic_irq_lr_map; | ||
301 | |||
302 | /* Pending/active/both interrupts on this VCPU */ | 297 | /* Pending/active/both interrupts on this VCPU */ |
303 | DECLARE_BITMAP( pending_percpu, VGIC_NR_PRIVATE_IRQS); | 298 | DECLARE_BITMAP(pending_percpu, VGIC_NR_PRIVATE_IRQS); |
304 | DECLARE_BITMAP( active_percpu, VGIC_NR_PRIVATE_IRQS); | 299 | DECLARE_BITMAP(active_percpu, VGIC_NR_PRIVATE_IRQS); |
305 | DECLARE_BITMAP( pend_act_percpu, VGIC_NR_PRIVATE_IRQS); | 300 | DECLARE_BITMAP(pend_act_percpu, VGIC_NR_PRIVATE_IRQS); |
306 | 301 | ||
307 | /* Pending/active/both shared interrupts, dynamically sized */ | 302 | /* Pending/active/both shared interrupts, dynamically sized */ |
308 | unsigned long *pending_shared; | 303 | unsigned long *pending_shared; |
309 | unsigned long *active_shared; | 304 | unsigned long *active_shared; |
310 | unsigned long *pend_act_shared; | 305 | unsigned long *pend_act_shared; |
311 | 306 | ||
312 | /* Bitmap of used/free list registers */ | ||
313 | DECLARE_BITMAP( lr_used, VGIC_V2_MAX_LRS); | ||
314 | |||
315 | /* Number of list registers on this CPU */ | 307 | /* Number of list registers on this CPU */ |
316 | int nr_lr; | 308 | int nr_lr; |
317 | 309 | ||
@@ -354,8 +346,6 @@ int kvm_vgic_vcpu_active_irq(struct kvm_vcpu *vcpu); | |||
354 | struct irq_phys_map *kvm_vgic_map_phys_irq(struct kvm_vcpu *vcpu, | 346 | struct irq_phys_map *kvm_vgic_map_phys_irq(struct kvm_vcpu *vcpu, |
355 | int virt_irq, int irq); | 347 | int virt_irq, int irq); |
356 | int kvm_vgic_unmap_phys_irq(struct kvm_vcpu *vcpu, struct irq_phys_map *map); | 348 | int kvm_vgic_unmap_phys_irq(struct kvm_vcpu *vcpu, struct irq_phys_map *map); |
357 | bool kvm_vgic_get_phys_irq_active(struct irq_phys_map *map); | ||
358 | void kvm_vgic_set_phys_irq_active(struct irq_phys_map *map, bool active); | ||
359 | 349 | ||
360 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) | 350 | #define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) |
361 | #define vgic_initialized(k) (!!((k)->arch.vgic.nr_cpus)) | 351 | #define vgic_initialized(k) (!!((k)->arch.vgic.nr_cpus)) |
@@ -364,7 +354,7 @@ void kvm_vgic_set_phys_irq_active(struct irq_phys_map *map, bool active); | |||
364 | int vgic_v2_probe(struct device_node *vgic_node, | 354 | int vgic_v2_probe(struct device_node *vgic_node, |
365 | const struct vgic_ops **ops, | 355 | const struct vgic_ops **ops, |
366 | const struct vgic_params **params); | 356 | const struct vgic_params **params); |
367 | #ifdef CONFIG_ARM_GIC_V3 | 357 | #ifdef CONFIG_KVM_ARM_VGIC_V3 |
368 | int vgic_v3_probe(struct device_node *vgic_node, | 358 | int vgic_v3_probe(struct device_node *vgic_node, |
369 | const struct vgic_ops **ops, | 359 | const struct vgic_ops **ops, |
370 | const struct vgic_params **params); | 360 | const struct vgic_params **params); |