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.


*** empty log message ***
Jack Lange [Sat, 1 Mar 2008 23:48:00 +0000 (23:48 +0000)]
palacios/include/geekos/svm.h
palacios/include/geekos/vmm_sizes.h
palacios/src/geekos/svm.c
palacios/src/geekos/vmm.c

index 32d79c6..ed2aae0 100644 (file)
 
 
 
-void Init_SVM();
+void Init_SVM(struct vmm_ctrl_ops * vmm_ops);
 int is_svm_capable();
 
 
index bdf1052..fbaa8d9 100644 (file)
@@ -2,7 +2,7 @@
 #define __vmm_sizes
 #define KERNEL_LOAD_ADDRESS  0x2fe9d000
 #define KERNEL_START (KERNEL_LOAD_ADDRESS)
-#define KERNEL_CORE_LENGTH ( 195 *512)
+#define KERNEL_CORE_LENGTH ( 204 *512)
 #define KERNEL_END (KERNEL_LOAD_ADDRESS+KERNEL_CORE_LENGTH-1)
 #define VM_KERNEL_LENGTH ( 97 *512)
 #define VM_KERNEL_START (KERNEL_LOAD_ADDRESS + KERNEL_CORE_LENGTH)
index 5e8eb77..28ef40e 100644 (file)
@@ -19,7 +19,6 @@ int is_svm_capable() {
   uint_t vm_cr_low = 0, vm_cr_high = 0;
 
 
-  return 1;
   if ((ret & CPUID_FEATURE_IDS_ecx_svm_avail) == 0) {
     PrintDebug("SVM Not Available\n");
     return 0;
@@ -44,7 +43,7 @@ int is_svm_capable() {
 
 
 
-void Init_SVM() {
+void Init_SVM(struct vmm_ctrl_ops * vmm_ops) {
   reg_ex_t msr;
   void * host_state;
 
@@ -68,6 +67,12 @@ void Init_SVM() {
   Set_MSR(SVM_VM_HSAVE_PA_MSR, msr.e_reg.high, msr.e_reg.low);
 
 
+
+  // Setup the SVM specific vmm operations
+  vmm_ops->init_guest = &init_svm_guest;
+  vmm_ops->start_guest = &start_svm_guest;
+
+
   return;
 }
 
index e081816..9350cf0 100644 (file)
@@ -25,10 +25,7 @@ void Init_VMM(struct vmm_os_hooks * hooks, struct vmm_ctrl_ops * vmm_ops) {
     vmm_cpu_type = VMM_SVM_CPU;
     PrintDebug("Machine is SVM Capable\n");
 
-    Init_SVM();
-
-    vmm_ops->init_guest = &init_svm_guest;
-    vmm_ops->start_guest = &start_svm_guest;
+    Init_SVM(vmm_ops);
 
   } else if (is_vmx_capable()) {
     vmm_cpu_type = VMM_VMX_CPU;