Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

2007-03-18 Thread Rusty Russell
On Sun, 2007-03-18 at 13:08 +0100, Andi Kleen wrote: > > The idea is _NOT_ that you go look for references to the paravirt_ops > > members structure, that would be stupid and you wouldn't be able to > > use the most efficient addressing mode on a given cpu, you'd be > > patching up indirect calls a

Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

2007-03-18 Thread Jeremy Fitzhardinge
Andi Kleen wrote: > Yes. All inline assembly tells gcc what registers are clobbered > and it fills in the tables. Hand clobbering in inline assembly cannot > be expressed with the current toolchain, so we moved all those > out of line. > > But again I'm not sure it will work anyways. For once you w

Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

2007-03-18 Thread Andi Kleen
On Sun, Mar 18, 2007 at 10:29:10AM -0700, Jeremy Fitzhardinge wrote: > Andi Kleen wrote: > > You could use the dwarf2 unwind tables. They have exact information > > what register has what. But it would likely get complicated. > > Yes. And would they be accurate for hand-written asm, which is wher

Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

2007-03-18 Thread Jeremy Fitzhardinge
Andi Kleen wrote: > You could use the dwarf2 unwind tables. They have exact information > what register has what. But it would likely get complicated. Yes. And would they be accurate for hand-written asm, which is where we have this problem? J ___

Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

2007-03-18 Thread Andi Kleen
> The bigger problem is that you don't know what registers you can > clobber. For the pv_ops in hand-written asm, that a big pain. The code > either has to assume the worst, or the "relocator" has to do something > more sophisticated (like look for push/pop pairs surrounding the call, > perhaps?)

Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

2007-03-18 Thread Jeremy Fitzhardinge
Andi Kleen wrote: >> The idea is _NOT_ that you go look for references to the paravirt_ops >> members structure, that would be stupid and you wouldn't be able to >> use the most efficient addressing mode on a given cpu, you'd be >> patching up indirect calls and crap like that. Just say no... >>

Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

2007-03-18 Thread Andi Kleen
> The idea is _NOT_ that you go look for references to the paravirt_ops > members structure, that would be stupid and you wouldn't be able to > use the most efficient addressing mode on a given cpu, you'd be > patching up indirect calls and crap like that. Just say no... That wouldn't handle inli

prankster

2007-03-18 Thread Herbert
1 defines a fixed function 3D graphics pipeline which is widely adopted across multiple industries. The Company creates innovative, industry-changing products for computing, consumer electronics, and mobile devices. Plus, 12 months no interest! Already registered on BNET, TechRepublic, or ZDNet?

Re: [patch 13/26] Xen-paravirt_ops: Consistently wrap paravirt ops callsites to make them patchable

2007-03-18 Thread Jeremy Fitzhardinge
David Miller wrote: > The idea is _NOT_ that you go look for references to the paravirt_ops > members structure, that would be stupid and you wouldn't be able to > use the most efficient addressing mode on a given cpu, you'd be > patching up indirect calls and crap like that. Just say no... > > In