Palacios Public Git Repository

To checkout Palacios execute

  git clone http://v3vee.org/palacios/palacios.web/palacios.git
This will give you the master branch. You probably want the devel branch or one of the release branches. To switch to the devel branch, simply execute
  cd palacios
  git checkout --track -b devel origin/devel
The other branches are similar.


moved mptable to a device for the moment
Jack Lange [Mon, 2 May 2011 22:39:40 +0000 (17:39 -0500)]
this allows the ability to enable/disable it as needed

palacios/include/palacios/vmm_mptable.h [deleted file]
palacios/src/devices/Kconfig
palacios/src/devices/Makefile
palacios/src/devices/mptable.c [moved from palacios/src/palacios/vmm_mptable.c with 99% similarity]
palacios/src/palacios/Makefile
palacios/src/palacios/vmm_config.c
palacios/src/palacios/vmm_config_class.h

diff --git a/palacios/include/palacios/vmm_mptable.h b/palacios/include/palacios/vmm_mptable.h
deleted file mode 100644 (file)
index eb6a630..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * 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
index 35b8523..86c8dfc 100644 (file)
@@ -18,6 +18,7 @@ config DEBUG_APIC
 
 config IO_APIC
        bool "IOAPIC"
+       depends on APIC
        default y
        help 
          Includes the Virtual IO APIC
@@ -30,6 +31,13 @@ config DEBUG_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"
index 3eb4a87..f3a553e 100644 (file)
@@ -1,5 +1,6 @@
 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
similarity index 99%
rename from palacios/src/palacios/vmm_mptable.c
rename to palacios/src/devices/mptable.c
index 4b21fcc..64cf96f 100644 (file)
@@ -18,7 +18,6 @@
  */
 
 #include <palacios/vmm.h>
-#include <palacios/vmm_mptable.h>
 #include <palacios/vmm_string.h>
 #include <palacios/vm_guest_mem.h>
 
@@ -397,8 +396,7 @@ static int write_mptable(void * target, uint32_t numcores) {
     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) { 
@@ -441,3 +439,7 @@ int v3_inject_mptable(struct v3_vm_info * vm) {
 
     return 0;
 }
+
+
+
+device_register("MPTABLE", mptable_init)
index 2be53ea..8fba939 100644 (file)
@@ -32,7 +32,6 @@ obj-y := \
        vmm_cpuid.o \
        vmm_xml.o \
        vmm_mem_hook.o \
-       vmm_mptable.o \
        vmm_extensions.o \
        vmm_mtrr.o \
        vmm_multitree.o \
index b000939..8082970 100644 (file)
@@ -30,7 +30,6 @@
 #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>
 
 
@@ -353,13 +352,6 @@ static int post_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
        return -1;
     }
 
-    /* 
-     * Initialize configured extensions 
-     */
-    if (setup_extensions(vm, cfg) == -1) {
-       PrintError("Failed to setup extensions\n");
-       return -1;
-    }
 
     /* 
      * Initialize configured devices
@@ -384,6 +376,15 @@ static int post_config_vm(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
        return -1;
     }
 
+    /* 
+     * Initialize configured extensions 
+     */
+    if (setup_extensions(vm, cfg) == -1) {
+       PrintError("Failed to setup extensions\n");
+       return -1;
+    }
+
+
     return 0;
 }
 
index df42ea6..3f5b238 100644 (file)
@@ -77,12 +77,6 @@ static int post_config_pc(struct v3_vm_info * vm, v3_cfg_tree_t * cfg) {
     }
 
 
-    if (vm->num_cores > 1) {
-       if (v3_inject_mptable(vm) == -1) { 
-           PrintError("Failed to inject mptable during configuration\n");
-           return -1;
-       }
-    }
     return 0;
 }