lkml.org 
[lkml]   [2009]   [Dec]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [GIT PULL] x86/paravirt for v2.6.33
On 12/09/2009 10:47 AM, Linus Torvalds wrote:
>
> NOTE NOTE NOTE! Totally untested. Is the second argument even in %edx? I
> don't remember, I didn't check, I'm just throwing this out as a "hey,
> maybe something _like_ this can work" patch, and will be immediately
> removing it from my machine after sending this email.
>

The second argument is in %edx, but unlike 64 bits, it is not loaded
into that register a priory ("asmlinkage" means arguments are on the stack.)

As such, we need something looking like:

#define PTREGSCALL0(name) \
ptregs_##name: \
leal 4(%esp),%eax; \
jmp sys_##name

#define PTREGSCALL1(name) \
ptregs_##name: \
movl 4(%esp),%eax; \
leal 4(%esp),%edx; \
jmp sys_##name

#define PTREGSCALL2(name) \
ptregs_##name: \
movl 4(%esp),%eax; \
movl 8(%esp),%edx; \
leal 4(%esp),%ecx; \
jmp sys_##name

If we need more than two arguments + pt_regs, then we have to set up a
temporary stack frame.

[Sorry, I'm sitting in a meeting so I can't actually write up a real patch]

-hpa


\
 
 \ /
  Last update: 2009-12-09 19:57    [from the cache]
©2003-2011 Jasper Spaans