소스 검색

Move lguest guest support to arch/x86.

Lguest has two sides: host support (to launch guests) and guest
support (replacement boot path and paravirt_ops).  This moves the
guest side to arch/x86/lguest where it's closer to related code.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Cc: Andi Kleen <ak@suse.de>
Rusty Russell 17 년 전
부모
커밋
34b8867a03
7개의 변경된 파일17개의 추가작업 그리고 11개의 파일을 삭제
  1. 2 8
      arch/i386/Kconfig
  2. 3 0
      arch/i386/Makefile
  3. 8 0
      arch/x86/lguest/Kconfig
  4. 1 0
      arch/x86/lguest/Makefile
  5. 0 0
      arch/x86/lguest/boot.c
  6. 1 1
      arch/x86/lguest/i386_head.S
  7. 2 2
      drivers/lguest/Makefile

+ 2 - 8
arch/i386/Kconfig

@@ -257,14 +257,8 @@ config VMI
 	  at the moment), by linking the kernel to a GPL-ed ROM module
 	  at the moment), by linking the kernel to a GPL-ed ROM module
 	  provided by the hypervisor.
 	  provided by the hypervisor.
 
 
-config LGUEST_GUEST
-	bool "Lguest guest support"
-	select PARAVIRT
-	depends on !X86_PAE
-	help
-	  Lguest is a tiny in-kernel hypervisor.  Selecting this will
-	  allow your kernel to boot under lguest.  This option will increase
-	  your kernel size by about 6k.  If in doubt, say N.
+source "arch/x86/lguest/Kconfig"
+
 endif
 endif
 
 
 config ACPI_SRAT
 config ACPI_SRAT

+ 3 - 0
arch/i386/Makefile

@@ -99,6 +99,9 @@ core-$(CONFIG_X86_ES7000)	:= arch/x86/mach-es7000/
 # Xen paravirtualization support
 # Xen paravirtualization support
 core-$(CONFIG_XEN)		+= arch/x86/xen/
 core-$(CONFIG_XEN)		+= arch/x86/xen/
 
 
+# lguest paravirtualization support
+core-$(CONFIG_LGUEST_GUEST)	+= arch/x86/lguest/
+
 # default subarch .h files
 # default subarch .h files
 mflags-y += -Iinclude/asm-x86/mach-default
 mflags-y += -Iinclude/asm-x86/mach-default
 
 

+ 8 - 0
arch/x86/lguest/Kconfig

@@ -0,0 +1,8 @@
+config LGUEST_GUEST
+	bool "Lguest guest support"
+	select PARAVIRT
+	depends on !X86_PAE
+	help
+	  Lguest is a tiny in-kernel hypervisor.  Selecting this will
+	  allow your kernel to boot under lguest.  This option will increase
+	  your kernel size by about 6k.  If in doubt, say N.

+ 1 - 0
arch/x86/lguest/Makefile

@@ -0,0 +1 @@
+obj-y		:= i386_head.o boot.o

+ 0 - 0
drivers/lguest/lguest.c → arch/x86/lguest/boot.c


+ 1 - 1
drivers/lguest/lguest_asm.S → arch/x86/lguest/i386_head.S

@@ -16,7 +16,7 @@
 .section .init.text, "ax", @progbits
 .section .init.text, "ax", @progbits
 .ascii "GenuineLguest"
 .ascii "GenuineLguest"
 	/* Set up initial stack. */
 	/* Set up initial stack. */
- 	movl $(init_thread_union+THREAD_SIZE),%esp
+	movl $(init_thread_union+THREAD_SIZE),%esp
 	movl %esi, %eax
 	movl %esi, %eax
 	addl $__PAGE_OFFSET, %eax
 	addl $__PAGE_OFFSET, %eax
 	jmp lguest_init
 	jmp lguest_init

+ 2 - 2
drivers/lguest/Makefile

@@ -1,5 +1,5 @@
-# Guest requires the paravirt_ops replacement and the bus driver.
-obj-$(CONFIG_LGUEST_GUEST) += lguest.o lguest_asm.o lguest_bus.o
+# Guest requires the bus driver.
+obj-$(CONFIG_LGUEST_GUEST) += lguest_bus.o
 
 
 # Host requires the other files, which can be a module.
 # Host requires the other files, which can be a module.
 obj-$(CONFIG_LGUEST)	+= lg.o
 obj-$(CONFIG_LGUEST)	+= lg.o