- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page