X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_ctrl_regs.c;h=152a7c0a1e3e18c6c4e51f02daec647dc53115a6;hp=2e566ef8727687cb323724d1ffb90bb3241edacd;hb=bf0d677f3d92f5949c3a73dad30aaf330201da44;hpb=a5c5675571882a9b8a7594ef07fe303b195ef9ae diff --git a/palacios/src/palacios/vmm_ctrl_regs.c b/palacios/src/palacios/vmm_ctrl_regs.c index 2e566ef..152a7c0 100644 --- a/palacios/src/palacios/vmm_ctrl_regs.c +++ b/palacios/src/palacios/vmm_ctrl_regs.c @@ -45,11 +45,13 @@ int handle_cr0_write(struct guest_info * info) { ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr); } - if (ret != 15) { + /* The IFetch will already have faulted in the necessary bytes for the full instruction + if (ret != 15) { // I think we should inject a GPF into the guest PrintError("Could not read instruction (ret=%d)\n", ret); return -1; - } + } + */ if (v3_decode(info, (addr_t)instr, &dec_instr) == -1) { PrintError("Could not decode instruction\n"); @@ -157,11 +159,13 @@ int handle_cr0_read(struct guest_info * info) { ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr); } - if (ret != 15) { - // I think we should inject a GPF into the guest - PrintError("Could not read instruction (ret=%d)\n", ret); - return -1; - } + /* The IFetch will already have faulted in the necessary bytes for the full instruction + if (ret != 15) { + // I think we should inject a GPF into the guest + PrintError("Could not read instruction (ret=%d)\n", ret); + return -1; + } + */ if (v3_decode(info, (addr_t)instr, &dec_instr) == -1) { PrintError("Could not decode instruction\n"); @@ -220,11 +224,13 @@ int handle_cr3_write(struct guest_info * info) { ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr); } - if (ret != 15) { - // I think we should inject a GPF into the guest - PrintError("Could not read instruction (ret=%d)\n", ret); - return -1; - } + /* The IFetch will already have faulted in the necessary bytes for the full instruction + if (ret != 15) { + // I think we should inject a GPF into the guest + PrintError("Could not read instruction (ret=%d)\n", ret); + return -1; + } + */ if (v3_decode(info, (addr_t)instr, &dec_instr) == -1) { PrintError("Could not decode instruction\n"); @@ -297,11 +303,13 @@ int handle_cr3_read(struct guest_info * info) { ret = read_guest_va_memory(info, get_addr_linear(info, info->rip, &(info->segments.cs)), 15, instr); } - if (ret != 15) { - // I think we should inject a GPF into the guest - PrintError("Could not read instruction (ret=%d)\n", ret); - return -1; - } + /* The IFetch will already have faulted in the necessary bytes for the full instruction + if (ret != 15) { + // I think we should inject a GPF into the guest + PrintError("Could not read instruction (ret=%d)\n", ret); + return -1; + } + */ if (v3_decode(info, (addr_t)instr, &dec_instr) == -1) { PrintError("Could not decode instruction\n");