I am trying to write a long mode guest program under hypervision. When I inject an external interrupt to the guest, the guest immediately triggered a #GP fault. The error code is 0x11, indicating that cs
selector is 0x10, and that this fault is external. (The #GP fault was intercepted by my hypervisor. In other words, I did not set up #GP handler in IDT.)
I conjecture there is something wrong with my GDT. However, I specified the same cs
selector (i.e: cs.selector=0x10
) of interrupt handler as the normal control flow. The normal control flow went well with this cs
selector, so what could be the real specific cause of the #GP fault?
An exhaustive checklist would be appreciated as well.
Asked
Active
Viewed 122 times
0