// XSETBV. It is executed at the time of system resuming _Use_decl_annotations_ static void VmmpHandleXsetbv( GuestContext *guest_context) { HYPERPLATFORM_PERFORMANCE_MEASURE_THIS_SCOPE(); ULARGE_INTEGER value = {}; value.LowPart = static_cast<ULONG>(guest_context->gp_regs->ax); value.HighPart = static_cast<ULONG>(guest_context->gp_regs->dx); _xsetbv(static_cast<ULONG>(guest_context->gp_regs->cx), value.QuadPart); VmmpAdjustGuestInstructionPointer(guest_context->ip); }
VOID ShvVmxHandleXsetbv ( _In_ PSHV_VP_STATE VpState ) { // // Simply issue the XSETBV instruction on the native logical processor. // _xsetbv((ULONG)VpState->VpRegs->Rcx, VpState->VpRegs->Rdx << 32 | VpState->VpRegs->Rax); }
unsigned int xgetsetbv (void) { _xsetbv (0, 0); return _xgetbv (0); }