diff options
author | James Hogan <james.hogan@imgtec.com> | 2017-03-14 11:15:10 +0100 |
---|---|---|
committer | James Hogan <james.hogan@imgtec.com> | 2017-03-28 15:49:11 +0200 |
commit | a7c7ad6c3e0a2ae88625df4e41c1c7305aa26f04 (patch) | |
tree | 9839db3c2e78e23f16b464f18cbf28e06946e959 /arch/mips/include | |
parent | MIPS: Separate MAAR V bit into VL and VH for XPA (diff) | |
download | linux-a7c7ad6c3e0a2ae88625df4e41c1c7305aa26f04.tar.xz linux-a7c7ad6c3e0a2ae88625df4e41c1c7305aa26f04.zip |
MIPS: Probe guest CP0_UserLocal
Probe for presence of guest CP0_UserLocal register and expose via
cpu_guest_has_userlocal. This register is optional pre-r6, so this will
allow KVM to only save/restore/expose the guest CP0_UserLocal register
if it exists.
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
Diffstat (limited to 'arch/mips/include')
-rw-r--r-- | arch/mips/include/asm/cpu-features.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/arch/mips/include/asm/cpu-features.h b/arch/mips/include/asm/cpu-features.h index e12d4ec6854d..e898f441cc22 100644 --- a/arch/mips/include/asm/cpu-features.h +++ b/arch/mips/include/asm/cpu-features.h @@ -547,6 +547,9 @@ #ifndef cpu_guest_has_maar #define cpu_guest_has_maar (cpu_data[0].guest.options & MIPS_CPU_MAAR) #endif +#ifndef cpu_guest_has_userlocal +#define cpu_guest_has_userlocal (cpu_data[0].guest.options & MIPS_CPU_ULRI) +#endif /* * Guest dynamic capabilities |