Skip to contentSkip to conversation

x86-64/Xen: fix stack switching

PATCH Juergen Gross 1 participant 2 messages Jan 16, 2019 4 messages not in the archive

lore
Share & tools
lore

Juergen Gross

author Reviewed-by
#4 lore raw
In reply to a message not in the archive
Quoted 9 lines · Jan Beulich

While in the native case entry into the kernel happens on the trampoline stack, PV Xen kernels get entered with the current thread stack right away. Hence source and destination stacks are identical in that case, and special care is needed.

Other than in sync_regs() the copying done on the INT80 path isn't NMI / #MC safe, as either of these events occurring in the middle of the stack copying would clobber data on the (source) stack.

Quoted 6 lines

I'm not altering the similar code in interrupt_entry() and nmi(), as those code paths are unreachable afaict when running PV Xen guests.

Fixes 7f2590a110b837af5679d08fc25c6227c5a8c497

Juergen

author Reviewed-by
#5 lore raw
In reply to a message not in the archive
Quoted 9 lines · Jan Beulich

While in the native case entry into the kernel happens on the trampoline stack, PV Xen kernels get entered with the current thread stack right away. Hence source and destination stacks are identical in that case, and special care is needed.

Other than in sync_regs() the copying done on the INT80 path isn't NMI / #MC safe, as either of these events occurring in the middle of the stack copying would clobber data on the (source) stack.

Quoted 6 lines

I'm not altering the similar code in interrupt_entry() and nmi(), as those code paths are unreachable afaict when running PV Xen guests.

Fixes 7f2590a110b837af5679d08fc25c6227c5a8c497

Juergen

_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xenproject.org/mailman/listinfo/xen-devel