Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread Ingo Molnar
* Miklos Szeredi <[EMAIL PROTECTED]> wrote: > FASTCALL is defined empty in -mm, but UML is not compiled with > -mregparm=3 and so this breaks things (I noticed problems with > rwsem_down_write_failed). > > Tried recompiling UML with -mregparm=3, but that resulted in a strange > failure immedi

Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread H. Peter Anvin
Andi Kleen wrote: > On Wed, Jan 09, 2008 at 09:14:04PM -0500, Jeff Dike wrote: >> On Wed, Jan 09, 2008 at 10:50:48PM +0100, Miklos Szeredi wrote: FASTCALL is useless and should not make a difference. It enables regparm on specific functions, but that should not make a difference if i

Re: [uml-devel] [RFC PATCH 0/9] SKAS4

2008-01-09 Thread Jeff Dike
On Wed, Jan 09, 2008 at 05:09:49PM -0500, Jeff Dike wrote: > These patches implement host and guest SKAS4 support for both 32- and > 64-bit x86. I forgot to include a single rolled-up patch, so it's below - again, against 2.6.24-rc7. Jeff -- Work email - jdike at

Re: [uml-devel] [RFC PATCH 9/9] SKAS4 - Guest get_mm and switch_mm support

2008-01-09 Thread Jeff Dike
On Wed, Jan 09, 2008 at 05:09:54PM -0500, Jeff Dike wrote: > Add get_mm and switch_mm support to UML. This patch had a couple of bugs. A fixed patch is below. Jeff -- Work email - jdike at linux dot intel dot com diff --git a/arch/um/include/as-layout.h b/arch/

Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread Andi Kleen
On Wed, Jan 09, 2008 at 09:14:04PM -0500, Jeff Dike wrote: > On Wed, Jan 09, 2008 at 10:50:48PM +0100, Miklos Szeredi wrote: > > > FASTCALL is useless and should not make a difference. It enables > > > regparm on specific functions, but that should not make a difference > > > if it works or not. >

Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread Jeff Dike
On Wed, Jan 09, 2008 at 10:50:48PM +0100, Miklos Szeredi wrote: > > FASTCALL is useless and should not make a difference. It enables > > regparm on specific functions, but that should not make a difference > > if it works or not. > > __down_write() in include/asm-x86/rwsem.h seems to assume, that

Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread linux-os (Dick Johnson)
On Wed, 9 Jan 2008, Miklos Szeredi wrote: > FASTCALL is defined empty in -mm, but UML is not compiled with > -mregparm=3 and so this breaks things (I noticed problems with > rwsem_down_write_failed). > > Tried recompiling UML with -mregparm=3, but that resulted in a strange > failure immediately

[uml-devel] [RFC PATCH 6/9] SKAS4 - Host get_mm and switch_mm

2008-01-09 Thread Jeff Dike
This is the new_mm, switch_mm, and /proc//mm implementation for 32- and 64-bit x86 and UML. Index: linux-2.6-skas4/include/asm-x86/unistd_32.h === --- linux-2.6-skas4.orig/include/asm-x86/unistd_32.h2008-01-09 16:29:06.0

[uml-devel] [RFC PATCH 9/9] SKAS4 - Guest get_mm and switch_mm support

2008-01-09 Thread Jeff Dike
Add get_mm and switch_mm support to UML. Index: linux-2.6-skas4/arch/um/include/skas/mm_id.h === --- linux-2.6-skas4.orig/arch/um/include/skas/mm_id.h 2008-01-09 16:22:13.0 -0500 +++ linux-2.6-skas4/arch/um/include/skas/mm_

[uml-devel] [RFC PATCH 8/9] SKAS4 - rename new_mm

2008-01-09 Thread Jeff Dike
UML already had a new_mm(). This is renamed to make_new_mm(). Index: linux-2.6-skas4/arch/um/include/skas/skas.h === --- linux-2.6-skas4.orig/arch/um/include/skas/skas.h2008-01-09 16:22:13.0 -0500 +++ linux-2.6-skas4/arc

[uml-devel] [RFC PATCH 3/9] SKAS4 - Host SIGSEGV siginfo_t extensions

2008-01-09 Thread Jeff Dike
Add CPU trap number and error code to siginfo_t in the SIGSEGV case for x86. Index: linux-2.6-skas4/arch/x86/mm/fault_32.c === --- linux-2.6-skas4.orig/arch/x86/mm/fault_32.c 2008-01-08 18:48:30.0 -0500 +++ linux-2.6-skas4/ar

[uml-devel] [RFC PATCH 7/9] SKAS4 - stub management preparation

2008-01-09 Thread Jeff Dike
Tidy the existing stub code so that the skas4 code can be dropped in. Index: linux-2.6-skas4/arch/um/os-Linux/skas/mem.c === --- linux-2.6-skas4.orig/arch/um/os-Linux/skas/mem.c2008-01-09 15:10:48.0 -0500 +++ linux-2.6-sk

[uml-devel] [RFC PATCH 4/9] SKAS4 - Guest siginfo_t support

2008-01-09 Thread Jeff Dike
Add guest support for getting page fault information using PTRACE_GETSIGINFO. The nastiness at the top of arch/um/os-Linux/skas/process.c is defining the new siginfo_t structure, which requires using CPP to rename the old one out of the way. Index: linux-2.6-skas4/arch/um/os-Linux/skas/process.c

[uml-devel] [RFC PATCH 0/9] SKAS4

2008-01-09 Thread Jeff Dike
These patches implement host and guest SKAS4 support for both 32- and 64-bit x86. I think the new interfaces here are much more acceptable, so I'm going to push this to mainline. What's new: two new system calls - new_mm - creates a new address space and returns a file descriptor refe

[uml-devel] [RFC PATCH 1/9] SKAS4 - Fix x86_64 arch_copy_thread

2008-01-09 Thread Jeff Dike
Fix a bug which will be important later. x86_64 copy_thread needs to copy %fs from parent to child. Got rid of some extraneous tabs while I was here. Index: linux-2.6-skas4/include/asm-um/processor-x86_64.h === --- linux-2.6-skas4.o

[uml-devel] [RFC PATCH 2/9] SKAS4 - Macroize stub system call execution loop

2008-01-09 Thread Jeff Dike
Extract the system call execution loop in the stubs into a macro. A later patch will need this loop, so this makes it available. Index: linux-2.6-skas4/arch/um/sys-i386/stub.S === --- linux-2.6-skas4.orig/arch/um/sys-i386/stub.S

[uml-devel] [RFC PATCH 5/9] SKAS4 - start_up.c preparation

2008-01-09 Thread Jeff Dike
Tidy arch/um/os-Linux/start_up.c in preparation for host SKAS4 testing. There are now explicit variables for disabling any particular host capability. init_registers is moved out of the skas3 testing because it needs to happen every time, and the skas3 checks will become optional. Index: linux-2

Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread Miklos Szeredi
> FASTCALL is useless and should not make a difference. It enables > regparm on specific functions, but that should not make a difference > if it works or not. __down_write() in include/asm-x86/rwsem.h seems to assume, that the semaphore pointer is passed in %eax down to rwsem_down_write_failed(),

Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread Adrian Bunk
On Wed, Jan 09, 2008 at 10:20:49PM +0100, Miklos Szeredi wrote: > > Miklos Szeredi <[EMAIL PROTECTED]> writes: > > > > > FASTCALL is defined empty in -mm, but UML is not compiled with > > > -mregparm=3 and so this breaks things (I noticed problems with > > > rwsem_down_write_failed). > > > > > > T

Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread Andi Kleen
On Wed, Jan 09, 2008 at 10:20:49PM +0100, Miklos Szeredi wrote: > > Miklos Szeredi <[EMAIL PROTECTED]> writes: > > > > > FASTCALL is defined empty in -mm, but UML is not compiled with > > > -mregparm=3 and so this breaks things (I noticed problems with > > > rwsem_down_write_failed). > > > > > > T

Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread Miklos Szeredi
> Miklos Szeredi <[EMAIL PROTECTED]> writes: > > > FASTCALL is defined empty in -mm, but UML is not compiled with > > -mregparm=3 and so this breaks things (I noticed problems with > > rwsem_down_write_failed). > > > > Tried recompiling UML with -mregparm=3, but that resulted in a strange > > fail

Re: [uml-devel] uml and -regparm=3

2008-01-09 Thread Andi Kleen
Miklos Szeredi <[EMAIL PROTECTED]> writes: > FASTCALL is defined empty in -mm, but UML is not compiled with > -mregparm=3 and so this breaks things (I noticed problems with > rwsem_down_write_failed). > > Tried recompiling UML with -mregparm=3, but that resulted in a strange > failure immediately

[uml-devel] uml and -regparm=3

2008-01-09 Thread Miklos Szeredi
FASTCALL is defined empty in -mm, but UML is not compiled with -mregparm=3 and so this breaks things (I noticed problems with rwsem_down_write_failed). Tried recompiling UML with -mregparm=3, but that resulted in a strange failure immediately after startup: |%G�%@: Invalid argument What's up