diff options
author | James Hogan <james.hogan@imgtec.com> | 2016-07-04 19:35:15 +0100 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2016-07-05 16:09:20 +0200 |
commit | 8426097258c8092f8f3f7a5c420d3809e99b0769 (patch) | |
tree | 70a892e661d45fc38cc030aa6bd2482b01df22fe /arch/mips/kvm | |
parent | 8eeab81c3d55ba41ae68888b13a1a34893104e12 (diff) | |
download | linux-8426097258c8092f8f3f7a5c420d3809e99b0769.tar.gz linux-8426097258c8092f8f3f7a5c420d3809e99b0769.tar.bz2 linux-8426097258c8092f8f3f7a5c420d3809e99b0769.zip |
MIPS: KVM: Emulate generic QEMU machine on r6 T&E
Default the guest PRId register to represent a generic QEMU machine
instead of a 24kc on MIPSr6. 24kc isn't supported by r6 Linux kernels.
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>
Diffstat (limited to 'arch/mips/kvm')
-rw-r--r-- | arch/mips/kvm/trap_emul.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/mips/kvm/trap_emul.c b/arch/mips/kvm/trap_emul.c index 00e8dc3d36cb..091553942bcb 100644 --- a/arch/mips/kvm/trap_emul.c +++ b/arch/mips/kvm/trap_emul.c @@ -431,9 +431,15 @@ static int kvm_trap_emul_vcpu_setup(struct kvm_vcpu *vcpu) /* * Arch specific stuff, set up config registers properly so that the - * guest will come up as expected, for now we simulate a MIPS 24kc + * guest will come up as expected */ +#ifndef CONFIG_CPU_MIPSR6 + /* r2-r5, simulate a MIPS 24kc */ kvm_write_c0_guest_prid(cop0, 0x00019300); +#else + /* r6+, simulate a generic QEMU machine */ + kvm_write_c0_guest_prid(cop0, 0x00010000); +#endif /* * Have config1, Cacheable, noncoherent, write-back, write allocate. * Endianness, arch revision & virtually tagged icache should match |