aboutsummaryrefslogtreecommitdiffstats
path: root/include/kvm
diff options
context:
space:
mode:
authorAndre Przywara <andre.przywara@arm.com>2015-03-27 21:13:13 -0400
committerMarc Zyngier <marc.zyngier@arm.com>2015-03-30 12:07:19 -0400
commit950324ab81bf006542f30a1d1ab3d65fcf15cbc1 (patch)
tree07a4b0a29bf056eb3d700eafc4577a10bb2b2972 /include/kvm
parentfb8f61abab48467ef670ef165ff664cdc94f742e (diff)
KVM: arm/arm64: rework MMIO abort handling to use KVM MMIO bus
Currently we have struct kvm_exit_mmio for encapsulating MMIO abort data to be passed on from syndrome decoding all the way down to the VGIC register handlers. Now as we switch the MMIO handling to be routed through the KVM MMIO bus, it does not make sense anymore to use that structure already from the beginning. So we keep the data in local variables until we put them into the kvm_io_bus framework. Then we fill kvm_exit_mmio in the VGIC only, making it a VGIC private structure. On that way we replace the data buffer in that structure with a pointer pointing to a single location in a local variable, so we get rid of some copying on the way. With all of the virtual GIC emulation code now being registered with the kvm_io_bus, we can remove all of the old MMIO handling code and its dispatching functionality. I didn't bother to rename kvm_exit_mmio (to vgic_mmio or something), because that touches a lot of code lines without any good reason. This is based on an original patch by Nikolay. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Cc: Nikolay Nikolaev <n.nikolaev@virtualopensystems.com> Reviewed-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Diffstat (limited to 'include/kvm')
-rw-r--r--include/kvm/arm_vgic.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/include/kvm/arm_vgic.h b/include/kvm/arm_vgic.h
index d6705f447c28..16ec2c8b784d 100644
--- a/include/kvm/arm_vgic.h
+++ b/include/kvm/arm_vgic.h
@@ -140,8 +140,6 @@ struct vgic_params {
140}; 140};
141 141
142struct vgic_vm_ops { 142struct vgic_vm_ops {
143 bool (*handle_mmio)(struct kvm_vcpu *, struct kvm_run *,
144 struct kvm_exit_mmio *);
145 bool (*queue_sgi)(struct kvm_vcpu *, int irq); 143 bool (*queue_sgi)(struct kvm_vcpu *, int irq);
146 void (*add_sgi_source)(struct kvm_vcpu *, int irq, int source); 144 void (*add_sgi_source)(struct kvm_vcpu *, int irq, int source);
147 int (*init_model)(struct kvm *); 145 int (*init_model)(struct kvm *);
@@ -313,8 +311,6 @@ struct vgic_cpu {
313 311
314struct kvm; 312struct kvm;
315struct kvm_vcpu; 313struct kvm_vcpu;
316struct kvm_run;
317struct kvm_exit_mmio;
318 314
319int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write); 315int kvm_vgic_addr(struct kvm *kvm, unsigned long type, u64 *addr, bool write);
320int kvm_vgic_hyp_init(void); 316int kvm_vgic_hyp_init(void);
@@ -330,8 +326,6 @@ int kvm_vgic_inject_irq(struct kvm *kvm, int cpuid, unsigned int irq_num,
330void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg); 326void vgic_v3_dispatch_sgi(struct kvm_vcpu *vcpu, u64 reg);
331int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu); 327int kvm_vgic_vcpu_pending_irq(struct kvm_vcpu *vcpu);
332int kvm_vgic_vcpu_active_irq(struct kvm_vcpu *vcpu); 328int kvm_vgic_vcpu_active_irq(struct kvm_vcpu *vcpu);
333bool vgic_handle_mmio(struct kvm_vcpu *vcpu, struct kvm_run *run,
334 struct kvm_exit_mmio *mmio);
335 329
336#define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel)) 330#define irqchip_in_kernel(k) (!!((k)->arch.vgic.in_kernel))
337#define vgic_initialized(k) (!!((k)->arch.vgic.nr_cpus)) 331#define vgic_initialized(k) (!!((k)->arch.vgic.nr_cpus))