MIPS: KVM: Report more accurate CP0_Config fields to guest
authorJames Hogan <james.hogan@imgtec.com>
Wed, 15 Jun 2016 18:30:00 +0000 (19:30 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Jun 2016 21:58:42 +0000 (23:58 +0200)
commite342925f1777f73befda61b48845b0bc88a33181
treeb2f7ee9e779acda4c1abc8f533eed72d5e697aa6
parent4b34bca0e4c7091a06d774342faf8c9a4836af22
MIPS: KVM: Report more accurate CP0_Config fields to guest

Initialise the guest's CP0_Config register with a few more bits of
information from the host. The BE bit should be set on big endian
machines, the VI bit should be set on machines with a virtually tagged
instruction cache, and the reported architecture revision should match
that of the host (since we won't support emulating pre-r6 instruction
encodings on r6 or vice versa).

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/trap_emul.c