mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] lguest update for mm: simplify boot_params
@ 2007-05-18  2:43 Rusty Russell
  2007-05-18  2:48 ` [PATCH 2/2] lguest update for mm: disable tsc, don't set PGE bit Rusty Russell
  0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2007-05-18  2:43 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml - Kernel Mailing List

Andrew patched up lguest after the boot parameters became a proper
structure, but in fact it can be considerably neatened.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff -r ffe7ce731118 drivers/lguest/lguest.c
--- a/drivers/lguest/lguest.c	Fri May 18 10:18:56 2007 +1000
+++ b/drivers/lguest/lguest.c	Fri May 18 11:04:19 2007 +1000
@@ -444,8 +444,7 @@ __init void lguest_init(void *boot)
 {
 	/* Copy boot parameters first. */
 	memcpy(&boot_params, boot, PARAM_SIZE);
-	memcpy(boot_command_line,
-	       __va(*(unsigned long *)((void *)&boot_params + NEW_CL_POINTER)),
+	memcpy(boot_command_line, __va(boot_params.hdr.cmd_line_ptr),
 	       COMMAND_LINE_SIZE);
 
 	paravirt_ops.name = "lguest";



^ permalink raw reply	[flat|nested] 2+ messages in thread

* [PATCH 2/2] lguest update for mm: disable tsc, don't set PGE bit
  2007-05-18  2:43 [PATCH 1/2] lguest update for mm: simplify boot_params Rusty Russell
@ 2007-05-18  2:48 ` Rusty Russell
  0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2007-05-18  2:48 UTC (permalink / raw)
  To: Andrew Morton; +Cc: lkml - Kernel Mailing List

Lguest guests don't use the TSC, and so we must disable it otherwise
sched-clock.c barfs.

Also, we no longer need to explicitly set the PGE feature bit:
cpu_detect->cpuid->lguest_cpuid does that for us now that cpu_detect
uses paravirt_ops (IIRC it used to do a direct cpuid from assembler).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>

diff -r fd2ae7085ca2 drivers/lguest/lguest.c
--- a/drivers/lguest/lguest.c	Fri May 18 11:04:27 2007 +1000
+++ b/drivers/lguest/lguest.c	Fri May 18 12:11:16 2007 +1000
@@ -504,10 +504,10 @@ __init void lguest_init(void *boot)
 	reserve_top_address(lguest_data.reserve_mem);
 
 	cpu_detect(&new_cpu_data);
-	/* Need this before paging_init. */
-	set_bit(X86_FEATURE_PGE, new_cpu_data.x86_capability);
 	/* Math is always hard! */
 	new_cpu_data.hard_math = 1;
+
+	tsc_disable = 1;
 
 #ifdef CONFIG_X86_MCE
 	mce_disabled = 1;



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-05-18  2:48 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-05-18  2:43 [PATCH 1/2] lguest update for mm: simplify boot_params Rusty Russell
2007-05-18  2:48 ` [PATCH 2/2] lguest update for mm: disable tsc, don't set PGE bit Rusty Russell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome