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] Re: One question to IST stack for PV guest

To: "Jiang, Yunhong" <yunhong.jiang@xxxxxxxxx>
Subject: [Xen-devel] Re: One question to IST stack for PV guest
From: Jeremy Fitzhardinge <jeremy@xxxxxxxx>
Date: Fri, 18 Dec 2009 13:21:45 -0800
Cc: "Kleen, Andi" <andi.kleen@xxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, Keir Fraser <keir.fraser@xxxxxxxxxxxxx>, Jan Beulich <JBeulich@xxxxxxxxxx>
Delivery-date: Fri, 18 Dec 2009 13:22:05 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <C8EDE645B81E5141A8C6B2F73FD9265105AE092F76@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
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>
References: <C8EDE645B81E5141A8C6B2F73FD9265105AE092F76@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.5) Gecko/20091209 Fedora/3.0-4.fc12 Thunderbird/3.0
On 12/18/2009 01:05 AM, Jiang, Yunhong wrote:
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).

What are the requirements here? Are these events delivered to dom0 to indicate that something needs attention on the machine, or are they delivered synchronously to whatever domain is currently running to say that something bad needs immediate attention?

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.

What about making the call a bit like the failsafe callback, which always uses the kernel stack, to deliver these exceptions? That could reshape the kernel stack to conform to the normal stack frame and then call the usual arch/x86 handlers.

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?

There's been no call for it so far, so I hadn't worried about it much. I was thinking it might be useful as a debug tool, but I don't know what it gets used for normally.

    J

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