if (core->mem_mode == PHYSICAL_MEM) {
- v3_gpa_to_hva(core,
- get_addr_linear(core, idtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gpa_to_hva(core,
+ get_addr_linear(core, idtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
PrintError(core->vm_info, core, "Kind of weird that we got here.... physical mem?\n");
} else if (core->mem_mode == VIRTUAL_MEM) {
- v3_gva_to_hva(core,
- get_addr_linear(core, idtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gva_to_hva(core,
+ get_addr_linear(core, idtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
}
// SANITY CHECK
}
if (core->mem_mode == PHYSICAL_MEM) {
- v3_gpa_to_hva(core,
- get_addr_linear(core, gdtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gpa_to_hva(core,
+ get_addr_linear(core, gdtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
PrintError(core->vm_info, core, "Kind of weird that we got here.... physical mem?\n");
} else if (core->mem_mode == VIRTUAL_MEM) {
- v3_gva_to_hva(core,
- get_addr_linear(core, gdtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gva_to_hva(core,
+ get_addr_linear(core, gdtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
}
// SANITY CHECK
}
if (core->mem_mode == PHYSICAL_MEM) {
- v3_gpa_to_hva(core,
- get_addr_linear(core, idtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gpa_to_hva(core,
+ get_addr_linear(core, idtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
} else if (core->mem_mode == VIRTUAL_MEM) {
- v3_gva_to_hva(core,
- get_addr_linear(core, idtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gva_to_hva(core,
+ get_addr_linear(core, idtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
}
// SANITY CHECK
}
if (core->mem_mode == PHYSICAL_MEM) {
- v3_gpa_to_hva(core,
- get_addr_linear(core, gdtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gpa_to_hva(core,
+ get_addr_linear(core, gdtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
} else if (core->mem_mode == VIRTUAL_MEM) {
- v3_gva_to_hva(core,
- get_addr_linear(core, gdtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gva_to_hva(core,
+ get_addr_linear(core, gdtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
}
// SANITY CHECK
}
if (core->mem_mode == PHYSICAL_MEM) {
- v3_gpa_to_hva(core,
- get_addr_linear(core, ldtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gpa_to_hva(core,
+ get_addr_linear(core, ldtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
} else if (core->mem_mode == VIRTUAL_MEM) {
- v3_gva_to_hva(core,
- get_addr_linear(core, ldtr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gva_to_hva(core,
+ get_addr_linear(core, ldtr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
}
// SANITY CHECK
}
if (core->mem_mode == PHYSICAL_MEM) {
- v3_gpa_to_hva(core,
- get_addr_linear(core, tr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gpa_to_hva(core,
+ get_addr_linear(core, tr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
} else if (core->mem_mode == VIRTUAL_MEM) {
- v3_gva_to_hva(core,
- get_addr_linear(core, tr_base, &(core->segments.cs)),
- &base_hva);
+ if (v3_gva_to_hva(core,
+ get_addr_linear(core, tr_base, &(core->segments.cs)),
+ &base_hva)) {
+ PrintError(core->vm_info, core, "Cannot translate address\n");
+ return;
+ }
}
// SANITY CHECK