WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] One question to IST stack for PV guest

To: Jeremy Fitzhardinge <jeremy@xxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Subject: [Xen-devel] One question to IST stack for PV guest
From: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Date: Fri, 18 Dec 2009 17:05:29 +0800
Accept-language: en-US
Acceptlanguage: en-US
Cc: "Kleen, Andi" <andi.kleen@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Fri, 18 Dec 2009 01:07:41 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: Acp/wT7pSwDwWo4kSiCwxwe4lsPDxA==
Thread-topic: One question to IST stack for PV guest
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)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel