Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-04 Thread Ingo Molnar
* Ricardo Neri wrote: > Plus, one more advantage of using char/short/int/long is that when building a > 32-bit kernel long will be a 32-bit type. Thus, all the aritmetic would be > naturally done with variables of the appropriate width. Perhaps I could

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-04 Thread Ingo Molnar
* Ricardo Neri wrote: > Plus, one more advantage of using char/short/int/long is that when building a > 32-bit kernel long will be a 32-bit type. Thus, all the aritmetic would be > naturally done with variables of the appropriate width. Perhaps I could use > u8/u16/u32/long? It looks white

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-03 Thread Ricardo Neri
On Fri, Nov 03, 2017 at 11:17:49AM +0100, Ingo Molnar wrote: > > * Ricardo Neri wrote: > > > On Thu, Nov 02, 2017 at 09:51:08AM +0100, Ingo Molnar wrote: > > > > > > * Ricardo Neri wrote: > > > > > > > + /* >

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-03 Thread Ricardo Neri
On Fri, Nov 03, 2017 at 11:17:49AM +0100, Ingo Molnar wrote: > > * Ricardo Neri wrote: > > > On Thu, Nov 02, 2017 at 09:51:08AM +0100, Ingo Molnar wrote: > > > > > > * Ricardo Neri wrote: > > > > > > > + /* > > > > +* -EDOM means that we must ignore the address_offset. In such

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-03 Thread Ingo Molnar
* Ricardo Neri wrote: > On Thu, Nov 02, 2017 at 09:51:08AM +0100, Ingo Molnar wrote: > > > > * Ricardo Neri wrote: > > > > > + /* > > > + * -EDOM means that we must ignore the address_offset. In such a case, > > >

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-03 Thread Ingo Molnar
* Ricardo Neri wrote: > On Thu, Nov 02, 2017 at 09:51:08AM +0100, Ingo Molnar wrote: > > > > * Ricardo Neri wrote: > > > > > + /* > > > + * -EDOM means that we must ignore the address_offset. In such a case, > > > + * in 64-bit mode the effective address relative to the RIP of the > > > +

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-02 Thread Ricardo Neri
On Thu, Nov 02, 2017 at 12:07:13PM +0100, Thomas Gleixner wrote: > On Thu, 2 Nov 2017, Ingo Molnar wrote: > > > * Ricardo Neri wrote: > > > > > + /* > > > + * -EDOM means that we must ignore the address_offset. In such a case, > > > + * in 64-bit mode

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-02 Thread Ricardo Neri
On Thu, Nov 02, 2017 at 12:07:13PM +0100, Thomas Gleixner wrote: > On Thu, 2 Nov 2017, Ingo Molnar wrote: > > > * Ricardo Neri wrote: > > > > > + /* > > > + * -EDOM means that we must ignore the address_offset. In such a case, > > > + * in 64-bit mode the effective address relative to the

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-02 Thread Ricardo Neri
On Thu, Nov 02, 2017 at 09:51:08AM +0100, Ingo Molnar wrote: > > * Ricardo Neri wrote: > > > + /* > > +* -EDOM means that we must ignore the address_offset. In such a case, > > +* in 64-bit mode the effective address relative to the RIP of the >

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-02 Thread Ricardo Neri
On Thu, Nov 02, 2017 at 09:51:08AM +0100, Ingo Molnar wrote: > > * Ricardo Neri wrote: > > > + /* > > +* -EDOM means that we must ignore the address_offset. In such a case, > > +* in 64-bit mode the effective address relative to the RIP of the > > +* following instruction. > > +

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-02 Thread Thomas Gleixner
On Thu, 2 Nov 2017, Ingo Molnar wrote: > * Ricardo Neri wrote: > > > + /* > > +* -EDOM means that we must ignore the address_offset. In such a case, > > +* in 64-bit mode the effective address relative to the RIP of the > > +* following

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-02 Thread Thomas Gleixner
On Thu, 2 Nov 2017, Ingo Molnar wrote: > * Ricardo Neri wrote: > > > + /* > > +* -EDOM means that we must ignore the address_offset. In such a case, > > +* in 64-bit mode the effective address relative to the RIP of the > > +* following instruction. > > +*/ > > + if

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-02 Thread Ingo Molnar
* Ricardo Neri wrote: > + /* > + * -EDOM means that we must ignore the address_offset. In such a case, > + * in 64-bit mode the effective address relative to the RIP of the > + * following instruction. > + */ > + if (*regoff ==

Re: [PATCH v10 02/13] x86/insn-eval: Compute linear address in several utility functions

2017-11-02 Thread Ingo Molnar
* Ricardo Neri wrote: > + /* > + * -EDOM means that we must ignore the address_offset. In such a case, > + * in 64-bit mode the effective address relative to the RIP of the > + * following instruction. > + */ > + if (*regoff == -EDOM) { > + if