[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YtUodTM53de5vVxO@worktop.programming.kicks-ass.net>
Date: Mon, 18 Jul 2022 11:31:33 +0200
From: Peter Zijlstra <peterz@...radead.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Juergen Gross <jgross@...e.com>,
Andrew Cooper <Andrew.Cooper3@...rix.com>,
LKML <linux-kernel@...r.kernel.org>,
"x86@...nel.org" <x86@...nel.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Tim Chen <tim.c.chen@...ux.intel.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Pawan Gupta <pawan.kumar.gupta@...ux.intel.com>,
Johannes Wikner <kwikner@...z.ch>,
Alyssa Milburn <alyssa.milburn@...ux.intel.com>,
Jann Horn <jannh@...gle.com>, "H.J. Lu" <hjl.tools@...il.com>,
Joao Moreira <joao.moreira@...el.com>,
Joseph Nuzman <joseph.nuzman@...el.com>,
Steven Rostedt <rostedt@...dmis.org>
Subject: Re: [patch 02/38] x86/cpu: Use native_wrmsrl() in
load_percpu_segment()
On Mon, Jul 18, 2022 at 10:55:29AM +0200, Thomas Gleixner wrote:
> On Mon, Jul 18 2022 at 08:54, Thomas Gleixner wrote:
> > On Mon, Jul 18 2022 at 07:11, Juergen Gross wrote:
> >>> - switch_to_new_gdt(cpu);
> >>> + switch_to_real_gdt(cpu);
> >>
> >> ... can't you use the paravirt variant of load_gdt in switch_to_real_gdt() ?
> >
> > That does not solve the problem of having a disagreement between GDT and
> > GS_BASE. Let me dig into this some more.
>
> Bah. The real problem is __loadsegment_simple(gs, 0). After that GS_BASE
> is 0. So any per CPU access before setting MSR_GS_BASE back to working
> state is going into lala land.
>
> So it's not the GDT. It's the mov 0, %gs which makes stuff go south, but
> as %gs is already 0, we can keep the paravirt load_gdt() and use
> native_write_msr() and everything should be happy.
How is the ret from xen_load_gdt() not going to explode?
Powered by blists - more mailing lists