+++ /dev/null
-/*
- * This file is part of the Palacios Virtual Machine Monitor developed
- * by the V3VEE Project with funding from the United States National
- * Science Foundation and the Department of Energy.
- *
- * The V3VEE Project is a joint project between Northwestern University
- * and the University of New Mexico. You can find out more at
- * http://www.v3vee.org
- *
- * Copyright (c) 2010, Peter Dinda <pdinda@cs.northwestern.edu>
- * Copyright (c) 2008, The V3VEE Project <http://www.v3vee.org>
- * All rights reserved.
- *
- * Author: Peter Dinda <pdinda@cs.northwestern.edu>
- *
- * This is free software. You are permitted to use,
- * redistribute, and modify it as specified in the file "V3VEE_LICENSE".
- */
-
-#ifndef __VMM_MPTABLE_H__
-#define __VMM_MPTABLE_H__
-
-/*
- This module is responsible for injecting an appropriate description of
- the multicore guest into the the guest's memory in the form
- of an Intel Multiprocessor Specification-compatible MP table.
-
- The guest BIOS must cooperate in having preallocated space for the table
-*/
-
-#include <palacios/vm_guest.h>
-#include <palacios/vmm_mem.h>
-#include <palacios/vmm_types.h>
-
-// Note that this must be run *after* the rombios has been mapped in
-// AND the rombios needs to be COPIED in so that we can edit it
-int v3_inject_mptable(struct v3_vm_info *vm);
-
-#endif
config IO_APIC
bool "IOAPIC"
+ depends on APIC
default y
help
Includes the Virtual IO APIC
Enable debugging for the IO APIC
+config MPTABLE
+ bool "MPTABLE"
+ default y
+ depends on APIC
+ help
+ Includes the MPTABLE to map the APICs and IO-APIC
+
config BOCHS_DEBUG
bool "Bochs Debug Console Device"
obj-$(V3_CONFIG_APIC) += apic.o
obj-$(V3_CONFIG_IO_APIC) += io_apic.o
+obj-$(V3_CONFIG_MPTABLE) += mptable.o
obj-$(V3_CONFIG_PIT) += 8254.o
obj-$(V3_CONFIG_PIC) += 8259a.o
obj-$(V3_CONFIG_BOCHS_DEBUG) += bochs_debug.o
*/
#include <palacios/vmm.h>
-#include <palacios/vmm_mptable.h>
#include <palacios/vmm_string.h>
#include <palacios/vm_guest_mem.h>
return 0;
}
-
-int v3_inject_mptable(struct v3_vm_info * vm) {
+static int mptable_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
void * target = NULL;
if (v3_gpa_to_hva(&(vm->cores[0]), BIOS_MP_TABLE_DEFAULT_LOCATION, (addr_t *)&target) == -1) {
return 0;
}
+
+
+
+device_register("MPTABLE", mptable_init)
vmm_cpuid.o \
vmm_xml.o \
vmm_mem_hook.o \
- vmm_mptable.o \
vmm_extensions.o \
vmm_mtrr.o \
vmm_multitree.o \
#include <palacios/vmm_xml.h>
#include <palacios/vmm_io.h>
#include <palacios/vmm_msr.h>
-#include <palacios/vmm_mptable.h>
#include <palacios/vmm_sprintf.h>
return -1;
}
- /*
- * Initialize configured extensions
- */
- if (setup_extensions(vm, cfg) == -1) {
- PrintError("Failed to setup extensions\n");
- return -1;
- }
/*
* Initialize configured devices
return -1;
}
+ /*
+ * Initialize configured extensions
+ */
+ if (setup_extensions(vm, cfg) == -1) {
+ PrintError("Failed to setup extensions\n");
+ return -1;
+ }
+
+
return 0;
}
}
- if (vm->num_cores > 1) {
- if (v3_inject_mptable(vm) == -1) {
- PrintError("Failed to inject mptable during configuration\n");
- return -1;
- }
- }
return 0;
}