aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/lguest
diff options
context:
space:
mode:
authorRusty Russell <rusty@rustcorp.com.au>2007-09-11 03:06:37 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-09-12 15:19:46 -0400
commitc413fecc763e380ec93dc6faf726e7e735ade04e (patch)
treedeadc5f49c90dbe41081f2ca472a6b03a105de08 /drivers/lguest
parent9863b78a1a82347fa1e727bdca0110151a5c4f10 (diff)
lguest: Fix guest crash when CONFIG_X86_USE_3DNOW=y
One of the very first things lguest_init() does is a memcpy. On Athlon/Duron/K7 or CyrixIII/VIA-C3 or Geode GX/LX, this tries to use MMX. memcpy -> _mmx_memcpy -> kernel_fpu_begin -> clts -> paravirt_ops.clts But we haven't set paravirt_ops.clts yet, so we do the native version and crash. The simplest solution is to use __memcpy. Thanks to Michael Rasenberger for the bug report. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/lguest')
-rw-r--r--drivers/lguest/lguest.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/lguest/lguest.c b/drivers/lguest/lguest.c
index 6e135ac0834f..ee1c6d05c3d3 100644
--- a/drivers/lguest/lguest.c
+++ b/drivers/lguest/lguest.c
@@ -964,11 +964,12 @@ __init void lguest_init(void *boot)
964{ 964{
965 /* Copy boot parameters first: the Launcher put the physical location 965 /* Copy boot parameters first: the Launcher put the physical location
966 * in %esi, and head.S converted that to a virtual address and handed 966 * in %esi, and head.S converted that to a virtual address and handed
967 * it to us. */ 967 * it to us. We use "__memcpy" because "memcpy" sometimes tries to do
968 memcpy(&boot_params, boot, PARAM_SIZE); 968 * tricky things to go faster, and we're not ready for that. */
969 __memcpy(&boot_params, boot, PARAM_SIZE);
969 /* The boot parameters also tell us where the command-line is: save 970 /* The boot parameters also tell us where the command-line is: save
970 * that, too. */ 971 * that, too. */
971 memcpy(boot_command_line, __va(boot_params.hdr.cmd_line_ptr), 972 __memcpy(boot_command_line, __va(boot_params.hdr.cmd_line_ptr),
972 COMMAND_LINE_SIZE); 973 COMMAND_LINE_SIZE);
973 974
974 /* We're under lguest, paravirt is enabled, and we're running at 975 /* We're under lguest, paravirt is enabled, and we're running at