Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 556f2a52 authored by James Hogan's avatar James Hogan Committed by Paolo Bonzini
Browse files

MIPS: KVM: Fix preemption warning reading FPU capability



Reading the KVM_CAP_MIPS_FPU capability returns cpu_has_fpu, however
this uses smp_processor_id() to read the current CPU capabilities (since
some old MIPS systems could have FPUs present on only a subset of CPUs).

We don't support any such systems, so work around the warning by using
raw_cpu_has_fpu instead.

We should probably instead claim not to support FPU at all if any one
CPU is lacking an FPU, but this should do for now.

Signed-off-by: default avatarJames 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: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent f049729c
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -1079,7 +1079,8 @@ int kvm_vm_ioctl_check_extension(struct kvm *kvm, long ext)
		r = KVM_COALESCED_MMIO_PAGE_OFFSET;
		r = KVM_COALESCED_MMIO_PAGE_OFFSET;
		break;
		break;
	case KVM_CAP_MIPS_FPU:
	case KVM_CAP_MIPS_FPU:
		r = !!cpu_has_fpu;
		/* We don't handle systems with inconsistent cpu_has_fpu */
		r = !!raw_cpu_has_fpu;
		break;
		break;
	case KVM_CAP_MIPS_MSA:
	case KVM_CAP_MIPS_MSA:
		/*
		/*