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.


Allow strict MSR semantics
Peter Dinda [Tue, 26 Nov 2013 01:35:07 +0000 (19:35 -0600)]
When enabled, reads/writes to MSRs we do not handle cause GPF to be injected.
This is the architecturally specified reaction.

When disabled, our more lenient behavior is used (read=0, write=ignored)

palacios/src/palacios/vmm_msr.c

index 0ed99ed..7331a59 100644 (file)
@@ -110,15 +110,24 @@ int v3_handle_msr_read(struct guest_info * info) {
 int v3_msr_unhandled_read(struct guest_info * core, uint32_t msr, struct v3_msr * dst, void * priv_data) {
     V3_Print(core->vm_info, core, "Palacios: Unhandled MSR Read (MSR=0x%x) - returning zero\n", msr);
 
+#ifdef V3_CONFIG_STRICT_MSR_SEMANTICS
+    v3_raise_exception(core,GPF_EXCEPTION);
+#else
     dst->value = 0;
-
-    // should produce GPF for unsupported msr
+#endif
+    
     return 0;
 }
 
 int v3_msr_unhandled_write(struct guest_info * core, uint32_t msr, struct v3_msr src, void * priv_data) {
     V3_Print(core->vm_info, core, "Palacios: Unhandled MSR Write (MSR=0x%x) - ignored\n", msr);
-    // should produce GPF for unsupported msr
+
+#ifdef V3_CONFIG_STRICT_MSR_SEMANTICS
+    v3_raise_exception(core,GPF_EXCEPTION);
+#else
+    // write ignored
+#endif
+
     return 0;
 }