diff options
author | James Hogan <james.hogan@imgtec.com> | 2016-06-15 21:29:53 +0300 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-06-16 00:58:31 +0300 |
commit | b937ff628fa76b242a74cb9087df972d5f1cecbb (patch) | |
tree | 9d49eb854596a321fb38b70d6d79a81609188c86 /arch/mips/include/asm | |
parent | aff565aab961d3cab3299a7008af6cdef88b79a0 (diff) | |
download | linux-b937ff628fa76b242a74cb9087df972d5f1cecbb.tar.xz |
MIPS: KVM: Don't hardcode restored HWREna
KVM modifies CP0_HWREna during guest execution so it can trap and
emulate RDHWR instructions, however it always restores the hardcoded
value 0x2000000F. This assumes the presence of the UserLocal register,
and the absence of any implementation dependent or future HW registers.
Fix by exporting the value that traps.c write into CP0_HWREna, and
loading from there instead of hard coding.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Acked-by: Ralf Baechle <ralf@linux-mips.org>
Cc: Paolo Bonzini <pbonzini@redhat.com>
Cc: Radim Krčmář <rkrcmar@redhat.com>
Cc: linux-mips@linux-mips.org
Cc: kvm@vger.kernel.org
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'arch/mips/include/asm')
-rw-r--r-- | arch/mips/include/asm/setup.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mips/include/asm/setup.h b/arch/mips/include/asm/setup.h index d7bfdeba9e84..4f5279a8308d 100644 --- a/arch/mips/include/asm/setup.h +++ b/arch/mips/include/asm/setup.h @@ -21,6 +21,7 @@ extern void *set_vi_handler(int n, vi_handler_t addr); extern void *set_except_vector(int n, void *addr); extern unsigned long ebase; +extern unsigned int hwrena; extern void per_cpu_trap_init(bool); extern void cpu_cache_init(void); |