A Beginner VMX Question

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
User avatar
Combuster
Member
Member
Posts: 9301
Joined: Wed Oct 18, 2006 3:45 am
Libera.chat IRC: [com]buster
Location: On the balcony, where I can actually keep 1½m distance
Contact:

Re: A Beginner VMX Question

Post by Combuster »

If you manually configure bochs with debugging enabled, don't forget to enable all the other things you want as well or you'll end up with a rather simplistic machine. There are specific configure flags for virtualisation.


And on a second note, returning to the same location from an Undefined Opcode exception is not useful other than wasting cpu cycles and log space :wink:
"Certainly avoid yourself. He is a newbie and might not realize it. You'll hate his code deeply a few years down the road." - Sortie
[ My OS ] [ VDisk/SFS ]
kemosparc
Member
Member
Posts: 207
Joined: Tue Oct 29, 2013 1:13 pm

Re: A Beginner VMX Question

Post by kemosparc »

Hi,

I am past this problem now, basically problems of passing return values of a method invocation to an asm.

The VM launch works but is followed right away with a VMEXIT (the print message in vmexit routine get displayed).

The error generated by bochs is:

Code: Select all

05631104614e[CPU0  ] VMENTER FAIL: VMCS guest ES not ACCESSED
05631104614e[CPU0  ] VMEXIT: Guest State Checks Failed
I tried to google the problem with no luck. I also looked at bochs code to try to understand the problem but still not able to solve it.


Bochs code that generate the error is:

Code: Select all

       if ((guest.sregs[n].cache.type & 0x1) == 0) {
           BX_ERROR(("VMENTER FAIL: VMCS guest %s not ACCESSED", segname[n]));
           return VMX_VMEXIT_VMENTRY_FAILURE_GUEST_STATE;
        }

I don't know how to set the cache.type flag of the ES register using vmwrite ?

Any ideas how to solve the problem?

Thanks,
Karim.
alexg
Posts: 16
Joined: Sun Mar 06, 2016 11:59 am

Re: A Beginner VMX Question

Post by alexg »

24.4.1 Guest Register State: for each guest selector CS, SS, DS, ES, ... etc you have to specify the access rights (these also specify if the segment is accessed or not).
Post Reply