All of lore.kernel.org
 help / color / mirror / Atom feed
* One question to IST stack for PV guest
@ 2009-12-18  9:05 Jiang, Yunhong
  2009-12-18 21:21 ` Jeremy Fitzhardinge
  0 siblings, 1 reply; 11+ messages in thread
From: Jiang, Yunhong @ 2009-12-18  9:05 UTC (permalink / raw)
  To: Jeremy Fitzhardinge, Keir Fraser, Jan Beulich
  Cc: Kleen, Andi, xen-devel@lists.xensource.com

Jeremy/Keir, I'm trying to add vMCA injection to pv_ops dom0.  Because currently we didn't have virtual IST stack support, so I plan to use the kernel stack for vMCE. But Andi told me that this method should have issue if MCE is injected before syscall handler switches to kernel stack. After checking the code, seems this apply in pv_ops dom0, since undo_xen_syscall will switch to user space stack firstly (see following code).

I'm not sure if we really need to switch to user space stack, or we can simply place user stack to oldrsp and don't switch the stack at all, since xen hypervisor has use the kernel stack already.

Another option is to add vIST stack, but that requires changes for dom0/xen interface and is a bit complex.

I checked the 2.6.18 kernel and seems it have no such issue, because syscall entry in arch/x86_64/kernel/entry-xen.S will use kernel stack directly. (But vMCE injection may have issue still because it use zeroentry).

BTW, Jeremy, seems vNMI support is not included in pvops dom0, will it be supported in future?

Thanks
Yunhong Jiang

.macro undo_xen_syscall
    mov 0*8(%rsp), %rcx
    mov 1*8(%rsp), %r11
    mov 5*8(%rsp), %rsp
.endm

/* Normal 64-bit system call target */
ENTRY(xen_syscall_target)
    undo_xen_syscall
    jmp system_call_after_swapgs
ENDPROC(xen_syscall_target)

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2009-12-23 11:42 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-18  9:05 One question to IST stack for PV guest Jiang, Yunhong
2009-12-18 21:21 ` Jeremy Fitzhardinge
2009-12-18 21:43   ` Kleen, Andi
2009-12-18 21:50     ` Jeremy Fitzhardinge
2009-12-18 22:07       ` Kleen, Andi
2009-12-18 22:26         ` Jeremy Fitzhardinge
2009-12-18 22:57           ` Kleen, Andi
2009-12-19  9:24   ` Ian Campbell
2009-12-19 14:41     ` Jiang, Yunhong
2009-12-23 11:42       ` Ian Campbell
2009-12-19 14:24   ` Jiang, Yunhong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.