[LibOS,Pal] Print debug messages on CPUID and SYSCALL emulation

This commit is contained in:
Dmitrii Kuvaiskii
2020-07-22 18:36:09 +00:00
parent 5e91e388b9
commit e91d610b3f
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -620,6 +620,7 @@ static void illegal_upcall (PAL_PTR event, PAL_NUM arg, PAL_CONTEXT * context)
context->rcx = (long)rip + 2;
context->r11 = context->efl;
context->rip = (long)&syscall_wrapper;
debug("SYSCALL emulated during app execution at 0x%08lx\n", (unsigned long)rip);
} else {
debug("Illegal instruction during app execution at 0x%08lx; delivering to app\n",
(unsigned long)rip);
+1
View File
@@ -135,6 +135,7 @@ static bool handle_ud(sgx_cpu_context_t* uc) {
/* cpuid */
unsigned int values[4];
if (!_DkCpuIdRetrieve(uc->rax & 0xffffffff, uc->rcx & 0xffffffff, values)) {
SGX_DBG(DBG_I, "CPUID emulated during app execution at RIP 0x%016lx\n", uc->rip);
uc->rip += 2;
uc->rax = values[0];
uc->rbx = values[1];