X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_msr.c;h=7331a59993757cc24ce4cc839d46221a8088d924;hb=99578627551cadf5f5c5b60b9700c4a1272d38f6;hp=0ed99ed229f923e33907e8ba31f4ca2d34523ac0;hpb=fc031944334dfed8c0b025423e2f0b3ed462fad1;p=palacios.git diff --git a/palacios/src/palacios/vmm_msr.c b/palacios/src/palacios/vmm_msr.c index 0ed99ed..7331a59 100644 --- a/palacios/src/palacios/vmm_msr.c +++ b/palacios/src/palacios/vmm_msr.c @@ -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; }