* [PATCH 1/2] lguest: fix up after pda->percpu conversion
@ 2007-04-29 13:34 Rusty Russell
2007-04-29 13:36 ` [PATCH 2/2] lguest: handle new paravirt lazy mode (fix userspace segfaults) Rusty Russell
0 siblings, 1 reply; 2+ messages in thread
From: Rusty Russell @ 2007-04-29 13:34 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml - Kernel Mailing List, virtualization
Andrew Morton commented out some stuff to make lguest compile. This
should actually make it work (in the latest -mm).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/lguest/lguest.c | 11 ++---------
1 file changed, 2 insertions(+), 9 deletions(-)
===================================================================
--- a/drivers/lguest/lguest.c
+++ b/drivers/lguest/lguest.c
@@ -34,7 +34,6 @@
#include <asm/desc.h>
#include <asm/setup.h>
#include <asm/e820.h>
-//#include <asm/pda.h>
#include <asm/mce.h>
/* Declarations for definitions in lguest_guest.S */
@@ -406,10 +409,6 @@ static unsigned lguest_patch(u8 type, u1
memcpy(insns, lguest_insns[type].start, insn_len);
return insn_len;
}
-
-/* From head.S */
-//extern void setup_pda(void);
-extern struct Xgt_desc_struct early_gdt_descr;
__init void lguest_init(void)
{
@@ -466,10 +465,8 @@ __init void lguest_init(void)
/* We use top of mem for initial pagetables. */
init_pg_tables_end = __pa(pg0);
- /* set up PDA descriptor */
-// setup_pda();
- load_gdt(&early_gdt_descr);
-// asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_PDA) : "memory");
+ /* Set up per-cpu descriptor (pointing to master area) */
+ asm volatile ("mov %0, %%fs" : : "r" (__KERNEL_DS) : "memory");
reserve_top_address(lguest_data.reserve_mem);
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH 2/2] lguest: handle new paravirt lazy mode (fix userspace segfaults)
2007-04-29 13:34 [PATCH 1/2] lguest: fix up after pda->percpu conversion Rusty Russell
@ 2007-04-29 13:36 ` Rusty Russell
0 siblings, 0 replies; 2+ messages in thread
From: Rusty Russell @ 2007-04-29 13:36 UTC (permalink / raw)
To: Andrew Morton; +Cc: lkml - Kernel Mailing List, virtualization, Zachary Amsden
There's a new paravirt_lazy_mode mode in town.
Well, it's spelled "mode", but it's pronounced "hack".
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
---
drivers/lguest/lguest.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
===================================================================
--- a/drivers/lguest/lguest.c
+++ b/drivers/lguest/lguest.c
@@ -59,9 +59,13 @@ static enum paravirt_lazy_mode lazy_mode
static enum paravirt_lazy_mode lazy_mode;
static void lguest_lazy_mode(enum paravirt_lazy_mode mode)
{
- lazy_mode = mode;
- if (mode == PARAVIRT_LAZY_NONE)
+ if (mode == PARAVIRT_LAZY_FLUSH)
hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
+ else {
+ lazy_mode = mode;
+ if (mode == PARAVIRT_LAZY_NONE)
+ hcall(LHCALL_FLUSH_ASYNC, 0, 0, 0);
+ }
}
static void lazy_hcall(unsigned long call,
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-04-29 13:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-29 13:34 [PATCH 1/2] lguest: fix up after pda->percpu conversion Rusty Russell
2007-04-29 13:36 ` [PATCH 2/2] lguest: handle new paravirt lazy mode (fix userspace segfaults) Rusty Russell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®