X-Git-Url: http://v3vee.org/palacios/gitweb/gitweb.cgi?p=palacios.git;a=blobdiff_plain;f=palacios%2Fsrc%2Fpalacios%2Fvmm_cpuid.c;h=d0c3a328dd50b2d0da12438c1c6d0f9e46c8987b;hp=6dc29eb55d4683134200f6aa36152ed83022d3fd;hb=ed8feff1d5dd6bf028cd5ba0960ec125505d7597;hpb=1cd2958b5eb63b2ac63ced17447ba3b45c43f51a diff --git a/palacios/src/palacios/vmm_cpuid.c b/palacios/src/palacios/vmm_cpuid.c index 6dc29eb..d0c3a32 100644 --- a/palacios/src/palacios/vmm_cpuid.c +++ b/palacios/src/palacios/vmm_cpuid.c @@ -131,7 +131,10 @@ int v3_handle_cpuid(struct guest_info * info) { uint32_t cpuid = info->vm_regs.rax; struct v3_cpuid_hook * hook = get_cpuid_hook(info, cpuid); + //PrintDebug("CPUID called for 0x%x\n", cpuid); + if (hook == NULL) { + //PrintDebug("Calling passthrough handler\n"); // call the passthrough handler v3_cpuid(cpuid, (uint32_t *)&(info->vm_regs.rax), @@ -139,6 +142,8 @@ int v3_handle_cpuid(struct guest_info * info) { (uint32_t *)&(info->vm_regs.rcx), (uint32_t *)&(info->vm_regs.rdx)); } else { + // PrintDebug("Calling hook function\n"); + if (hook->hook_fn(info, cpuid, (uint32_t *)&(info->vm_regs.rax), (uint32_t *)&(info->vm_regs.rbx), @@ -150,6 +155,8 @@ int v3_handle_cpuid(struct guest_info * info) { } } + // PrintDebug("Cleaning up register contents\n"); + info->vm_regs.rax &= 0x00000000ffffffffLL; info->vm_regs.rbx &= 0x00000000ffffffffLL; info->vm_regs.rcx &= 0x00000000ffffffffLL;