This is needed when the kernel is running on RING3, such as under Xen.
x86_64 has a weird feature that makes it #GP on iret when SS is a null
descriptor.
This need to be tested on bare metal to make sure it doesn't cause any
problems. AMD specs say SS is always ignored (except on iret?).
Signed-off-by: Eduardo Habkost <[email protected]>
Signed-off-by: Jeremy Fitzhardinge <[email protected]>
Cc: xen-devel <[email protected]>
Cc: Stephen Tweedie <[email protected]>
Cc: Eduardo Habkost <[email protected]>
Cc: Mark McLoughlin <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
.macro FAKE_STACK_FRAME child_rip
/* push in order ss, rsp, eflags, cs, rip */
xorl %eax, %eax
- pushq %rax /* ss */
+ pushq $__KERNEL_DS /* ss */
CFI_ADJUST_CFA_OFFSET 8
/*CFI_REL_OFFSET ss,0*/
pushq %rax /* rsp */