aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/kvm/trace.h
diff options
context:
space:
mode:
authorChristoffer Dall <c.dall@virtualopensystems.com>2013-01-20 18:43:58 -0500
committerChristoffer Dall <c.dall@virtualopensystems.com>2013-01-23 13:29:17 -0500
commit45e96ea6b369539a37040a8df9c59a39f073d9d6 (patch)
treeafe39e4ad356967d0bc02aa3f2b0b24afb79e819 /arch/arm/kvm/trace.h
parent94f8e6418d3915dbefbb5d66b63146f1df12b0c0 (diff)
KVM: ARM: Handle I/O aborts
When the guest accesses I/O memory this will create data abort exceptions and they are handled by decoding the HSR information (physical address, read/write, length, register) and forwarding reads and writes to QEMU which performs the device emulation. Certain classes of load/store operations do not support the syndrome information provided in the HSR. We don't support decoding these (patches are available elsewhere), so we report an error to user space in this case. This requires changing the general flow somewhat since new calls to run the VCPU must check if there's a pending MMIO load and perform the write after userspace has made the data available. Reviewed-by: Will Deacon <will.deacon@arm.com> Reviewed-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Christoffer Dall <c.dall@virtualopensystems.com>
Diffstat (limited to 'arch/arm/kvm/trace.h')
-rw-r--r--arch/arm/kvm/trace.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/arch/arm/kvm/trace.h b/arch/arm/kvm/trace.h
index 624b5a4e8fad..a8e73ed5ad5b 100644
--- a/arch/arm/kvm/trace.h
+++ b/arch/arm/kvm/trace.h
@@ -90,6 +90,27 @@ TRACE_EVENT(kvm_irq_line,
90 __entry->type, __entry->vcpu_idx, __entry->irq_num, __entry->level) 90 __entry->type, __entry->vcpu_idx, __entry->irq_num, __entry->level)
91); 91);
92 92
93TRACE_EVENT(kvm_mmio_emulate,
94 TP_PROTO(unsigned long vcpu_pc, unsigned long instr,
95 unsigned long cpsr),
96 TP_ARGS(vcpu_pc, instr, cpsr),
97
98 TP_STRUCT__entry(
99 __field( unsigned long, vcpu_pc )
100 __field( unsigned long, instr )
101 __field( unsigned long, cpsr )
102 ),
103
104 TP_fast_assign(
105 __entry->vcpu_pc = vcpu_pc;
106 __entry->instr = instr;
107 __entry->cpsr = cpsr;
108 ),
109
110 TP_printk("Emulate MMIO at: 0x%08lx (instr: %08lx, cpsr: %08lx)",
111 __entry->vcpu_pc, __entry->instr, __entry->cpsr)
112);
113
93/* Architecturally implementation defined CP15 register access */ 114/* Architecturally implementation defined CP15 register access */
94TRACE_EVENT(kvm_emulate_cp15_imp, 115TRACE_EVENT(kvm_emulate_cp15_imp,
95 TP_PROTO(unsigned long Op1, unsigned long Rt1, unsigned long CRn, 116 TP_PROTO(unsigned long Op1, unsigned long Rt1, unsigned long CRn,