]> git.karo-electronics.de Git - linux-beck.git/commit
MIPS: KVM: Add count frequency KVM register
authorJames Hogan <james.hogan@imgtec.com>
Thu, 29 May 2014 09:16:38 +0000 (10:16 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Fri, 30 May 2014 11:02:54 +0000 (13:02 +0200)
commitf74a8e224e32edccade63a23bc260b141b067b1d
treeb79412e24fa3b7a059232871982f71bd1f8d2ff3
parentf82393426afb7c82f7618b3b4e440d8dd2b40c08
MIPS: KVM: Add count frequency KVM register

Expose the KVM guest CP0_Count frequency to userland via a new
KVM_REG_MIPS_COUNT_HZ register accessible with the KVM_{GET,SET}_ONE_REG
ioctls.

When the frequency is altered the bias is adjusted such that the guest
CP0_Count doesn't jump discontinuously or lose any timer interrupts.

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/include/uapi/asm/kvm.h
arch/mips/kvm/kvm_mips.c
arch/mips/kvm/kvm_mips_emul.c
arch/mips/kvm/kvm_trap_emul.c