KVM: ARM: Handle I/O aborts
authorChristoffer Dall <c.dall@virtualopensystems.com>
Sun, 20 Jan 2013 23:43:58 +0000 (18:43 -0500)
committerChristoffer Dall <c.dall@virtualopensystems.com>
Wed, 23 Jan 2013 18:29:17 +0000 (13:29 -0500)
commit45e96ea6b369539a37040a8df9c59a39f073d9d6
treeafe39e4ad356967d0bc02aa3f2b0b24afb79e819
parent94f8e6418d3915dbefbb5d66b63146f1df12b0c0
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>
arch/arm/include/asm/kvm_arm.h
arch/arm/include/asm/kvm_emulate.h
arch/arm/include/asm/kvm_host.h
arch/arm/include/asm/kvm_mmio.h [new file with mode: 0644]
arch/arm/kvm/Makefile
arch/arm/kvm/arm.c
arch/arm/kvm/mmio.c [new file with mode: 0644]
arch/arm/kvm/mmu.c
arch/arm/kvm/trace.h