problem with vmwrite instruction

problem with vmwrite instruction

Hello,I am writing a code with intel vmx architecture(for vm purpose),here are my troubles:I use asm and cpp to write my code, for convinient purpose, I writethis code to call by cpp:__VMWRITE64_ proc Field:qword,pData:qword push r10 mov r10,qword ptr[rdx] xor rax,rax mov eax,ecx VMWRITE rax,r10 pop r10 jc error jz error jmp endok error: xor rax,rax ret endok: mov rax,1 ret__VMWRITE64_ endpand this is the caller:re = __VMWRITE64(VMX_VMCS16_HOST_FIELD_CS, (u64*)&cs);that code sometimes works well,but sometimes it cause BSOD on my Windows 7 X64, the CS selector of my OS is always 0x10,I am frustrated, because that BSOD do not have anyregular patterns.My cpu is core i3 2100 ,could you help me?Thanks.

publicaciones de 2 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Problem resolved. i3 2100 has 4 logic processor,my code works in PASSIVE_LEVEL,sometimes it may be interrupted and scheduled to another processor after VMXON,but the processor have changed on is not in VMX operation,so it cause #UD.When I Raise the IRQL to DISPATCH_LEVL,my code can't be scheduled,that code works well now.

Deje un comentario

Por favor inicie sesión para agregar un comentario. ¿No es socio? Únase ya