Skip to content

Commit

Permalink
[PATCH] i386: vMI backend for paravirt-ops
Browse files Browse the repository at this point in the history
Fairly straightforward implementation of VMI backend for paravirt-ops.

[Adrian Bunk: some cleanups]

Signed-off-by: Zachary Amsden <zach@vmware.com>
Signed-off-by: Andi Kleen <ak@suse.de>
Cc: Andi Kleen <ak@suse.de>
Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
  • Loading branch information
Zachary Amsden authored and Andi Kleen committed Feb 13, 2007
1 parent ae5da27 commit 7ce0bcf
Show file tree
Hide file tree
Showing 10 changed files with 1,195 additions and 2 deletions.
9 changes: 9 additions & 0 deletions arch/i386/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -203,6 +203,15 @@ config PARAVIRT
However, when run without a hypervisor the kernel is
theoretically slower. If in doubt, say N.

config VMI
bool "VMI Paravirt-ops support"
depends on PARAVIRT
default y
help
VMI provides a paravirtualized interface to multiple hypervisors
include VMware ESX server and Xen by connecting to a ROM module
provided by the hypervisor.

config ACPI_SRAT
bool
default y
Expand Down
2 changes: 2 additions & 0 deletions arch/i386/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ obj-$(CONFIG_EARLY_PRINTK) += early_printk.o
obj-$(CONFIG_HPET_TIMER) += hpet.o
obj-$(CONFIG_K8_NB) += k8.o

obj-$(CONFIG_VMI) += vmi.o

# Make sure this is linked after any other paravirt_ops structs: see head.S
obj-$(CONFIG_PARAVIRT) += paravirt.o

Expand Down
2 changes: 1 addition & 1 deletion arch/i386/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ check_x87:
* cpu_gdt_table and boot_pda; for secondary CPUs, these will be
* that CPU's GDT and PDA.
*/
setup_pda:
ENTRY(setup_pda)
/* get the PDA pointer */
movl start_pda, %eax

Expand Down
2 changes: 1 addition & 1 deletion arch/i386/kernel/io_apic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1920,7 +1920,7 @@ static void __init setup_ioapic_ids_from_mpc(void)
static void __init setup_ioapic_ids_from_mpc(void) { }
#endif

static int no_timer_check __initdata;
int no_timer_check __initdata;

static int __init notimercheck(char *s)
{
Expand Down
9 changes: 9 additions & 0 deletions arch/i386/kernel/setup.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@
#include <asm/io_apic.h>
#include <asm/ist.h>
#include <asm/io.h>
#include <asm/vmi.h>
#include <setup_arch.h>
#include <bios_ebda.h>

Expand Down Expand Up @@ -581,6 +582,14 @@ void __init setup_arch(char **cmdline_p)

max_low_pfn = setup_memory();

#ifdef CONFIG_VMI
/*
* Must be after max_low_pfn is determined, and before kernel
* pagetables are setup.
*/
vmi_init();
#endif

/*
* NOTE: before this point _nobody_ is allowed to allocate
* any memory using the bootmem allocator. Although the
Expand Down
4 changes: 4 additions & 0 deletions arch/i386/kernel/smpboot.c
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include <mach_apic.h>
#include <mach_wakecpu.h>
#include <smpboot_hooks.h>
#include <asm/vmi.h>

/* Set if we find a B stepping CPU */
static int __devinitdata smp_b_stepping;
Expand Down Expand Up @@ -545,6 +546,9 @@ static void __cpuinit start_secondary(void *unused)
* booting is too fragile that we want to limit the
* things done here to the most necessary things.
*/
#ifdef CONFIG_VMI
vmi_bringup();
#endif
secondary_cpu_init();
preempt_disable();
smp_callin();
Expand Down
Loading

0 comments on commit 7ce0bcf

Please sign in to comment.