Page 3 of 3

Re: A Beginner VMX Question

Posted: Mon Apr 04, 2016 11:23 am
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:

Re: A Beginner VMX Question

Posted: Tue Apr 05, 2016 3:14 pm
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.

Re: A Beginner VMX Question

Posted: Fri Apr 08, 2016 11:51 am
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).