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.


HVM updates to support apic partitioning
Peter Dinda [Mon, 23 Mar 2015 20:59:03 +0000 (15:59 -0500)]
palacios/include/palacios/vmm_hvm.h
palacios/src/palacios/vmm_hvm.c

index 423b80d..3fd0091 100644 (file)
@@ -60,6 +60,10 @@ int      v3_is_hvm_ros_core(struct guest_info *core);
 int      v3_is_hvm_hrt_core(struct guest_info *core);
 
 
+int      v3_hvm_should_deliver_ipi(struct guest_info *src, struct guest_info *dest);
+void     v3_hvm_find_apics_seen_by_core(struct guest_info *core, struct v3_vm_info *vm, 
+                                       uint32_t *start_apic, uint32_t *num_apics);
+
 #endif /* ! __V3VEE__ */
 
 
index 20c2408..4225d28 100644 (file)
@@ -256,3 +256,44 @@ int v3_is_hvm_ros_core(struct guest_info *core)
     return !core->hvm_state.is_hrt;
 }
 
+int      v3_hvm_should_deliver_ipi(struct guest_info *src, struct guest_info *dest)
+{
+    if (!src) {
+       // ioapic or msi to apic
+       return !dest->hvm_state.is_hrt;
+    } else {
+       // apic to apic
+       return src->hvm_state.is_hrt || (!src->hvm_state.is_hrt && !dest->hvm_state.is_hrt) ;
+    }
+}
+
+void     v3_hvm_find_apics_seen_by_core(struct guest_info *core, struct v3_vm_info *vm, 
+                                       uint32_t *start_apic, uint32_t *num_apics)
+{
+    if (!core) { 
+       // Seen from ioapic, msi, etc: 
+       if (vm->hvm_state.is_hvm) {
+           // HVM VM shows only the ROS cores/apics to ioapic, msi, etc
+           *start_apic = 0;
+           *num_apics = vm->hvm_state.first_hrt_core;
+       } else {
+           // Non-HVM shows all cores/APICs to apic, msi, etc.
+           *start_apic = 0;
+           *num_apics = vm->num_cores;
+       }
+    } else {
+       // Seen from apic
+       if (core->hvm_state.is_hrt) { 
+           // HRT core/apic sees all apics
+           // (this policy may change...)
+           *start_apic = 0;
+           *num_apics = vm->num_cores;
+       } else {
+           // non-HRT core/apic sees only non-HRT cores/apics
+           *start_apic = 0 ;
+           *num_apics = vm->hvm_state.first_hrt_core;
+       }
+    }
+}
+       
+