mirror of
https://github.com/clearlinux/graphene.git
synced 2026-09-05 21:31:36 +00:00
[LibOS,Pal] Print debug messages on CPUID and SYSCALL emulation
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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];
|
||||
|
||||
Reference in New Issue
Block a user