Page 1 of 1

Yet another vm86 thread: vm86 + paging help

Posted: Wed Jun 20, 2007 9:14 pm
by omin0us
Ok, i've been trying to get this for a while. I have my 16bit process setup with the correct eflags for vm86. and the extra segments and all that jazz, and when it tries to execute the 16bit instruction, it page faults. :-/

cant figure out why. I just have a task that does jmp $ to loop endlessly
and i can see it get to that instruction in the bochs debugger, but then faults when it executes it. any clues on this? anything i might need to know about vm86 + paging?

Posted: Wed Jun 20, 2007 9:38 pm
by frank
Vm86 tasks run at CP3. You need to make sure that the pages that the VM86 task are in are set to user level.

Posted: Thu Jun 21, 2007 5:15 am
by astrocrep
I believe you can run the task as cpl0 too...

I plan on doing it that way since my vm86 will just be used for video mode, I am not going to seperate it from the kernel.

-Rich

Posted: Thu Jun 21, 2007 6:52 am
by Combuster
V8086 tasks are by definition run in ring 3.