MIPS: KVM: Add CP0_Count/Compare KVM register access
authorJames Hogan <james.hogan@imgtec.com>
Thu, 29 May 2014 09:16:29 +0000 (10:16 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 30 May 2014 11:00:44 +0000 (13:00 +0200)
commitf8be02dacaca49ac442d03a178d4290a083c3922
treefe31301bd12853c8103f193b7cd88ee318b259e0
parent48a3c4e4cd6aa1a2270f3dd2a29e44206e4b2428
MIPS: KVM: Add CP0_Count/Compare KVM register access

Implement KVM_{GET,SET}_ONE_REG ioctl based access to the guest CP0
Count and Compare registers. These registers are special in that writing
to them has side effects (adjusting the time until the next timer
interrupt) and reading of Count depends on the time. Therefore add a
couple of callbacks so that different implementations (trap & emulate or
VZ) can implement them differently depending on what the hardware
provides.

The trap & emulate versions mostly duplicate what happens when a T&E
guest reads or writes these registers, so it inherits the same
limitations which can be fixed in later patches.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Gleb Natapov <gleb@kernel.org>
Cc: kvm@vger.kernel.org
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: David Daney <david.daney@cavium.com>
Cc: Sanjay Lal <sanjayl@kymasys.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/mips/include/asm/kvm_host.h
arch/mips/kvm/kvm_mips.c
arch/mips/kvm/kvm_trap_emul.c
This page took 0.025192 seconds and 5 git commands to generate.