Skip to contentSkip to conversation

lguest: fix undefined asm-offsets symbols

PATCH In review Kyle McMartin 2 participants 2 messages Feb 20, 2008 – Mar 4, 2008 x86

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lguest: fix undefined asm-offsets symbols

lguest uses asm-offsets to generate ... offsets, obviously, for use in the lguest switcher code. When the hypervisor code is built as a module though, the asm offsets it needs won't be generated since CONFIG_LGUEST will be undefined.

---

arch/x86/kernel/asm-offsets_32.c +1 -1
index a33d530..44bafdd 100644
@@ -134,7 +134,7 @@ void foo(void)
 	OFFSET(LGUEST_DATA_pgdir, lguest_data, pgdir);
 #endif
 
-#ifdef CONFIG_LGUEST
+#if defined(CONFIG_LGUEST) || defined(CONFIG_LGUEST_MODULE)
 	BLANK();
 	OFFSET(LGUEST_PAGES_host_gdt_desc, lguest_pages, state.host_gdt_desc);
 	OFFSET(LGUEST_PAGES_host_idt_desc, lguest_pages, state.host_idt_desc);
#1 lore raw
Quoted 6 lines · On Thursday 21 February 2008 07:21:52 Kyle McMartin wrote:

lguest uses asm-offsets to generate ... offsets, obviously, for use in the lguest switcher code. When the hypervisor code is built as a module though, the asm offsets it needs won't be generated since CONFIG_LGUEST will be undefined.

Thanks Kyle,

This is in Linus' tree now thanks to Ingo. I had a slightly different fix
which I mistakenly hadn't pushed, but this works fine.

Cheers,
Rusty.