Message ID | 1370646215-6543-24-git-send-email-ddaney.cavm@gmail.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Fri, Jun 07, 2013 at 04:03:27PM -0700, David Daney wrote: > From: David Daney <david.daney@cavium.com> > > The MIPS VZ KVM code needs this to be able to manage the FPU. > > Signed-off-by: David Daney <david.daney@cavium.com> Looks good, Acked-by: Ralf Baechle <ralf@linux-mips.org>. However I get cold shivers at the thought of SMTC FPU management with VZ, it sounds like a source of new entertainment ... But thinkin gaobu this is something for another rainy day, not now. Ralf -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/arch/mips/kernel/traps.c b/arch/mips/kernel/traps.c index fca0a2f..2bdeb32 100644 --- a/arch/mips/kernel/traps.c +++ b/arch/mips/kernel/traps.c @@ -56,6 +56,7 @@ #include <asm/types.h> #include <asm/stacktrace.h> #include <asm/uasm.h> +#include <asm/kvm_mips_vz.h> extern void check_wait(void); extern asmlinkage void rollback_handle_int(void); @@ -1045,6 +1046,13 @@ asmlinkage void do_cpu(struct pt_regs *regs) int status; unsigned long __maybe_unused flags; +#ifdef CONFIG_KVM_MIPSVZ + if (test_tsk_thread_flag(current, TIF_GUESTMODE)) { + if (mipsvz_cp_unusable(regs)) + return; + } +#endif + die_if_kernel("do_cpu invoked from kernel context!", regs); cpid = (regs->cp0_cause >> CAUSEB_CE) & 3;