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_ endp and 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.
problem with vmwrite instruction
For more complete information about compiler optimizations, see our Optimization Notice.

