x86: get rid of ring0stacktop
The ring3 switch code relied on a special stack page that was used
for the ring0 stack during the ring3 part of the test. This special
stack page was used if an exception handler ran during the ring3 part
of the test.
This method is quite complex; it is easier to just use the same
stack for the "outer" part of the test and the exception handler.
To do so, store esp/rsp in the TSS just before doing the PUSH/IRET
sequence. On 64-bit, the TSS can also be used to restore rsp after
coming back from ring3.
Unifying the three copies of the ring switching code is left as an
exercise to the reader.
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
Loading
Please register or sign in to comment