MIPS: KVM: Use raw_cpu_has_fpu in kvm_mips_guest_can_have_fpu()
authorJames Hogan <james.hogan@imgtec.com>
Wed, 15 Jun 2016 18:29:50 +0000 (19:29 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 15 Jun 2016 21:58:24 +0000 (23:58 +0200)
We need to use kvm_mips_guest_can_have_fpu() when deciding which
registers to list with KVM_GET_REG_LIST, however it causes warnings with
preemption since it uses cpu_has_fpu. KVM is only really supported on
CPUs which have symmetric FPUs, so switch to raw_cpu_has_fpu to avoid
the warning.

Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: 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>
arch/mips/include/asm/kvm_host.h

index 38f0491fcb2ffd895c86f77d766f85de70d45fa9..f12eb01a31959105866c632b35d06e493acdb4dc 100644 (file)
@@ -510,7 +510,7 @@ static inline void _kvm_atomic_change_c0_guest_reg(unsigned long *reg,
 
 static inline bool kvm_mips_guest_can_have_fpu(struct kvm_vcpu_arch *vcpu)
 {
-       return (!__builtin_constant_p(cpu_has_fpu) || cpu_has_fpu) &&
+       return (!__builtin_constant_p(raw_cpu_has_fpu) || raw_cpu_has_fpu) &&
                vcpu->fpu_enabled;
 }