[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <f35d0f8ddc2a4e518bd9674b74e40497@AcuMS.aculab.com>
Date: Wed, 20 May 2020 09:13:14 +0000
From: David Laight <David.Laight@...LAB.COM>
To: 'Thomas Gleixner' <tglx@...utronix.de>,
'Sasha Levin' <sashal@...nel.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"bp@...en8.de" <bp@...en8.de>, "luto@...nel.org" <luto@...nel.org>,
"hpa@...or.com" <hpa@...or.com>,
"dave.hansen@...el.com" <dave.hansen@...el.com>,
"tony.luck@...el.com" <tony.luck@...el.com>,
"ak@...ux.intel.com" <ak@...ux.intel.com>,
"ravi.v.shankar@...el.com" <ravi.v.shankar@...el.com>,
"chang.seok.bae@...el.com" <chang.seok.bae@...el.com>,
Andrew Cooper <andrew.cooper3@...rix.com>,
"x86@...nel.org" <x86@...nel.org>
Subject: RE: [PATCH v12 10/18] x86/fsgsbase/64: Enable FSGSBASE instructions
in helper functions
From: Thomas Gleixner
> Sent: 19 May 2020 15:48
>
> David Laight <David.Laight@...LAB.COM> writes:
> > From: Sasha Levin
> >> >> + native_swapgs();
> >> >> + gsbase = rdgsbase();
> >> >> + native_swapgs();
> >
> > Does local_irq_save() even do anything useful here.
> > You need to actually execute CLI, not just set a
> > flag that indicates interrupts shouldn't happen.
> > (Which is what I think local_irq_save() might do.)
>
> local_irq_save()
> raw_local_irq_save()
> arch_local_irq_save()
> arch_local_irq_disable()
> native_irq_disable()
> asm("CLI")
Ah, I was expecting software 'tricks' to avoid the expensive CLI.
But that call chain probably costs more - unless it is all inlined.
David
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Powered by blists - more mailing lists