alistair23-linux/arch/arm/kvm
Christoffer Dall 1138245ccf KVM: ARM: User space API for getting/setting co-proc registers
The following three ioctls are implemented:
 -  KVM_GET_REG_LIST
 -  KVM_GET_ONE_REG
 -  KVM_SET_ONE_REG

Now we have a table for all the cp15 registers, we can drive a generic
API.

The register IDs carry the following encoding:

ARM registers are mapped using the lower 32 bits.  The upper 16 of that
is the register group type, or coprocessor number:

ARM 32-bit CP15 registers have the following id bit patterns:
  0x4002 0000 000F <zero:1> <crn:4> <crm:4> <opc1:4> <opc2:3>

ARM 64-bit CP15 registers have the following id bit patterns:
  0x4003 0000 000F <zero:1> <zero:4> <crm:4> <opc1:4> <zero:3>

For futureproofing, we need to tell QEMU about the CP15 registers the
host lets the guest access.

It will need this information to restore a current guest on a future
CPU or perhaps a future KVM which allow some of these to be changed.

We use a separate table for these, as they're only for the userspace API.

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: Christoffer Dall <c.dall@virtualopensystems.com>
2013-01-23 13:29:14 -05:00
..
arm.c KVM: ARM: Emulation framework and CP15 emulation 2013-01-23 13:29:13 -05:00
coproc.c KVM: ARM: User space API for getting/setting co-proc registers 2013-01-23 13:29:14 -05:00
coproc.h KVM: ARM: Emulation framework and CP15 emulation 2013-01-23 13:29:13 -05:00
coproc_a15.c KVM: ARM: Emulation framework and CP15 emulation 2013-01-23 13:29:13 -05:00
emulate.c KVM: ARM: Emulation framework and CP15 emulation 2013-01-23 13:29:13 -05:00
guest.c KVM: ARM: User space API for getting/setting co-proc registers 2013-01-23 13:29:14 -05:00
init.S
interrupts.S KVM: ARM: World-switch implementation 2013-01-23 13:29:12 -05:00
interrupts_head.S KVM: ARM: World-switch implementation 2013-01-23 13:29:12 -05:00
Kconfig KVM: ARM: Memory virtualization setup 2013-01-23 13:29:11 -05:00
Makefile KVM: ARM: Emulation framework and CP15 emulation 2013-01-23 13:29:13 -05:00
mmu.c KVM: ARM: Memory virtualization setup 2013-01-23 13:29:11 -05:00
reset.c
trace.h KVM: ARM: Emulation framework and CP15 emulation 2013-01-23 13:29:13 -05:00