ia64/xen-unstable

changeset 14921:3b8bf61f2ad6

LINUX: Fixes for XENFEAT_supervisor_mode_kernel and XENFEAT_writable_page_tables.

Signed-of-by: Ian Campbell <ian.campbell@xensource.com>
author Ian Campbell <ian.campbell@xensource.com>
date Tue Apr 24 22:35:16 2007 +0100 (2007-04-24)
parents 74b712492dba
children a91d7dec2858
files linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/mmu_context.h
line diff
     1.1 --- a/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S	Tue Apr 24 22:00:45 2007 +0100
     1.2 +++ b/linux-2.6-xen-sparse/arch/x86_64/kernel/entry-xen.S	Tue Apr 24 22:35:16 2007 +0100
     1.3 @@ -160,8 +160,8 @@ NMI_MASK = 0x80000000
     1.4  	testl $NMI_MASK,2*8(%rsp)
     1.5  	jnz   2f
     1.6  
     1.7 -	testb $1,(xen_features+XENFEAT_supervisor_mode_kernel)
     1.8 -	jnz   1f
     1.9 +	cmp   $0x00,(xen_features+XENFEAT_supervisor_mode_kernel)(%rip)
    1.10 +	jne   1f
    1.11  
    1.12  	/* Direct iret to kernel space. Correct CS and SS. */
    1.13  	orl   $3,1*8(%rsp)
     2.1 --- a/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/mmu_context.h	Tue Apr 24 22:00:45 2007 +0100
     2.2 +++ b/linux-2.6-xen-sparse/include/asm-x86_64/mach-xen/asm/mmu_context.h	Tue Apr 24 22:35:16 2007 +0100
     2.3 @@ -72,7 +72,8 @@ static inline void switch_mm(struct mm_s
     2.4  	struct mmuext_op _op[3], *op = _op;
     2.5  
     2.6  	if (likely(prev != next)) {
     2.7 -		BUG_ON(!next->context.pinned);
     2.8 +		BUG_ON(!xen_feature(XENFEAT_writable_page_tables) &&
     2.9 +		       !next->context.pinned);
    2.10  
    2.11  		/* stop flush ipis for the previous mm */
    2.12  		cpu_clear(cpu, prev->cpu_vm_mask);