]> git.baikalelectronics.ru Git - kernel.git/commit
MIPS: KVM: Use 64-bit CP0_EBase when appropriate
authorJames Hogan <james.hogan@imgtec.com>
Fri, 8 Jul 2016 10:53:25 +0000 (11:53 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Mon, 1 Aug 2016 16:42:24 +0000 (18:42 +0200)
commit69660232ff26ceddff8a51d8fd25872b1eca6222
tree39616859bb440c62c4421ff3ad4e56532492ec89
parent610835578a1fef83cd9907fd4c1a15fa0d396eb8
MIPS: KVM: Use 64-bit CP0_EBase when appropriate

Update the KVM entry point to write CP0_EBase as a 64-bit register when
it is 64-bits wide, and to set the WG (write gate) bit if it exists in
order to write bits 63:30 (or 31:30 on MIPS32).

Prior to MIPS64r6 it was UNDEFINED to perform a 64-bit read or write of
a 32-bit COP0 register. Since this is dynamically generated code,
generate the right type of access depending on whether the kernel is
64-bit and cpu_has_ebase_wg.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: "Radim Krčmář" <rkrcmar@redhat.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
arch/mips/kvm/entry.c