Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-17 Thread Rafael J. Wysocki
On Saturday, 15 of December 2007, Ingo Molnar wrote: > > * Pavel Machek <[EMAIL PROTECTED]> wrote: > > > > Linux never uses that register. The only user is suspend > > > save/restore, but that' bogus because it wasn't ever initialized by > > > Linux in the first place. It could be probably all

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-17 Thread Andi Kleen
> It probably is safe to remove... but we currently support '2.8.95 > kernel loads/resumes 2.6.24 image'... which would break if 2.8 uses > cr8. No it won't. 2.8 would just restore some random useless value. If 2.8 wants to use CR8 it would have to re-initialize it -Andi _

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-17 Thread Pavel Machek
On Mon 2007-12-17 01:27:29, Rafael J. Wysocki wrote: > On Saturday, 15 of December 2007, Ingo Molnar wrote: > > > > * Pavel Machek <[EMAIL PROTECTED]> wrote: > > > > > > Linux never uses that register. The only user is suspend > > > > save/restore, but that' bogus because it wasn't ever initiali

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-17 Thread Rafael J. Wysocki
On Monday, 17 of December 2007, Pavel Machek wrote: > On Mon 2007-12-17 01:27:29, Rafael J. Wysocki wrote: > > On Saturday, 15 of December 2007, Ingo Molnar wrote: > > > > > > * Pavel Machek <[EMAIL PROTECTED]> wrote: > > > > > > > > Linux never uses that register. The only user is suspend > > >

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-17 Thread Pavel Machek
On Sat 2007-12-15 14:26:38, Andi Kleen wrote: > > It probably is safe to remove... but we currently support '2.8.95 > > kernel loads/resumes 2.6.24 image'... which would break if 2.8 uses > > cr8. > > No it won't. 2.8 would just restore some random useless value. Restoring random value seems wron

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-17 Thread Pavel Machek
On Tue 2007-12-04 20:34:32, Andi Kleen wrote: > On Tue, Dec 04, 2007 at 09:18:33PM +0200, Avi Kivity wrote: > > Glauber de Oliveira Costa wrote: > >> This patch moves the i386 control registers manipulation functions, > >> wbinvd, and clts functions to system.h. They are essentially the same > >> a

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-15 Thread H. Peter Anvin
Pavel Machek wrote: It probably is safe to remove... but we currently support '2.8.95 kernel loads/resumes 2.6.24 image'... which would break if 2.8 uses cr8. So please keep it if it is not a big problem. Note that CR8 is an alias for the TPR in the APIC. -hpa __

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-15 Thread Ingo Molnar
* Pavel Machek <[EMAIL PROTECTED]> wrote: > > Linux never uses that register. The only user is suspend > > save/restore, but that' bogus because it wasn't ever initialized by > > Linux in the first place. It could be probably all safely removed. > > It probably is safe to remove... but we curr

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-04 Thread Denys Vlasenko
On Tuesday 04 December 2007 11:41, Glauber de Oliveira Costa wrote: > On Dec 4, 2007 5:18 PM, Avi Kivity <[EMAIL PROTECTED]> wrote: > > There is no cr8 register on i386. This had better be protected by an > > #ifdef. > > Sure. I mentioned it in the changelog. I, however, am not sure If I > agree i

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-04 Thread Andi Kleen
On Tue, Dec 04, 2007 at 09:18:33PM +0200, Avi Kivity wrote: > Glauber de Oliveira Costa wrote: >> This patch moves the i386 control registers manipulation functions, >> wbinvd, and clts functions to system.h. They are essentially the same >> as in x86_64, except for the cr8 register, which we add.

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-04 Thread Glauber de Oliveira Costa
On Dec 4, 2007 5:18 PM, Avi Kivity <[EMAIL PROTECTED]> wrote: > Glauber de Oliveira Costa wrote: > > This patch moves the i386 control registers manipulation functions, > > wbinvd, and clts functions to system.h. They are essentially the same > > as in x86_64, except for the cr8 register, which we

Re: [PATCH 4/8] unify paravirt parts of system.h

2007-12-04 Thread Avi Kivity
Glauber de Oliveira Costa wrote: This patch moves the i386 control registers manipulation functions, wbinvd, and clts functions to system.h. They are essentially the same as in x86_64, except for the cr8 register, which we add. + +static inline unsigned long native_read_cr8(void) +{ + unsi

[PATCH 4/8] unify paravirt parts of system.h

2007-12-04 Thread Glauber de Oliveira Costa
This patch moves the i386 control registers manipulation functions, wbinvd, and clts functions to system.h. They are essentially the same as in x86_64, except for the cr8 register, which we add. With this, system.h paravirt comes for free in x86_64. Signed-off-by: Glauber de Oliveira Costa <[EMAI