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.


update CPUID to disable unsupported features (MTRRS, ARET, APIC2) and globalize the...
Jack Lange [Mon, 24 Sep 2012 20:21:19 +0000 (16:21 -0400)]
palacios/src/extensions/ext_vmware.c
palacios/src/palacios/vmm_cpuid.c

index 9026db9..ea1c789 100644 (file)
@@ -89,13 +89,14 @@ static int vmware_init(struct v3_vm_info * vm, v3_cfg_tree_t * cfg, void ** priv
 
     V3_Print("Using VMWARE virtualization persona\n");
 
+/*
     v3_cpuid_add_fields(vm, 0x00000001, 
                        0, 0, 
                        0, 0, 
                        0x80000000, 0x80000000,
                        0, 0
                        );
-
+*/
 
     v3_hook_io_port(vm, VMWARE_IO_PORT, 
                    io_read, io_write, 
index bd0862b..e36f5c2 100644 (file)
@@ -46,6 +46,27 @@ void v3_init_cpuid_map(struct v3_vm_info * vm) {
     // Disable MONITOR/MWAIT (cpuid 0x01, ECX bit 3)
     v3_cpuid_add_fields(vm, 0x01, 0, 0, 0, 0, (1 << 3), 0, 0, 0);
 
+
+    // disable MTRR
+    v3_cpuid_add_fields(vm, 0x00000001, 0, 0, 0, 0, 0, 0, (1 << 12), 0);
+    // disable PAT
+    v3_cpuid_add_fields(vm, 0x00000001, 0, 0, 0, 0, 0, 0, (1 << 16), 0);
+    // disable X2APIC
+    v3_cpuid_add_fields(vm, 0x00000001, 0, 0, 0, 0, (1 << 21), 0, 0, 0);
+
+
+    // Demarcate machine as a VM
+    v3_cpuid_add_fields(vm, 0x00000001,
+                        0, 0,
+                        0, 0,
+                        0x80000000, 0x80000000,
+                        0, 0
+                        );
+
+
+    // disable ARAT
+    v3_cpuid_add_fields(vm, 0x00000006, (1 << 2), 0, 0, 0, 0, 0, 0, 0);
+
 }