ia64/xen-unstable

changeset 9866:707737b66f58

[IA64] RSE incomplete cfm

In theory, after Guest executes "cover", incomplete frame changes to complete
frame. So Guest should set INCOMPL to 0 just after "cover". At least before
guest psr.ic and psr.i are turned on.

Previously, only when Guest executes "rfi", INCOMPL is set to 0. The window
between "cover" and "rfi" causes trouble in below scenario.

1. Application A calls system call.

2. In OS breaks handler entry, INCOMPL is 0. Due to its system call,
Linux kernel doesn't execute "cover".

3. Before returning to Application A, schedule happens, Application B begins
to run.

4. A TLB miss happens on the context of B, this may make INCOMPL 1, before
Returning to B, (that means "rfi" is not executed, and INCOMPL is still 1)
schedule happens again. A resumes to run with INCOMPL 1 (this is incorrect now).

5. As mentioned before, this is system call, "cover" is executed in
ia64_leave_kernel path. Because INCOMPL is 1, this "cover" is not actually
executed, but this "cover" should be executed.

5. Thus application A's frame is destroyed. Issue appears.

From: Anthony Xu <anthony.xu@intel.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
author awilliam@xenbuild.aw
date Mon May 08 13:41:18 2006 -0600 (2006-05-08)
parents ee97d247a3b7
children 5d9eb92e63e2
files linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h	Mon May 08 13:08:37 2006 -0600
     1.2 +++ b/linux-2.6-xen-sparse/arch/ia64/xen/xenminstate.h	Mon May 08 13:41:18 2006 -0600
     1.3 @@ -155,6 +155,8 @@
     1.4  	;;											\
     1.5  	ld4 r30=[r8];										\
     1.6  	;;											\
     1.7 +	/* set XSI_INCOMPL_REGFR 0 */								\
     1.8 +	st4 [r8]=r0;										\
     1.9  	cmp.eq	p6,p7=r30,r0;									\
    1.10  	;; /* not sure if this stop bit is necessary */						\
    1.11  (p6)	adds r8=XSI_PRECOVER_IFS-XSI_INCOMPL_REGFR,r8;						\