From: Peter Dinda Date: Tue, 15 Nov 2011 00:43:42 +0000 (-0600) Subject: Assure that unhandled MSR reads get back zeros X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?a=commitdiff_plain;h=639f3d3bd42dd2218bcd994e423f3a5569ed7051;p=palacios.git Assure that unhandled MSR reads get back zeros --- diff --git a/palacios/src/palacios/vmm_msr.c b/palacios/src/palacios/vmm_msr.c index bb1b062..4163145 100644 --- a/palacios/src/palacios/vmm_msr.c +++ b/palacios/src/palacios/vmm_msr.c @@ -104,12 +104,15 @@ 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("Palacios: Unhandled MSR Read (MSR=0x%x)\n", msr); + V3_Print("Palacios: Unhandled MSR Read (MSR=0x%x) - returning zero\n", msr); + dst->lo=dst->hi=0; + // should produce GPF for unsupported msr return 0; } int v3_msr_unhandled_write(struct guest_info * core, uint32_t msr, struct v3_msr src, void * priv_data) { - V3_Print("Palacios: Unhandled MSR Write (MSR=0x%x)\n", msr); + V3_Print("Palacios: Unhandled MSR Write (MSR=0x%x) - ignored\n", msr); + // should produce GPF for unsupported msr return 0; }