* Re: [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline
[not found] ` <20180621162324.36656-4-ndesaulniers@google.com>
@ 2018-06-22 2:24 ` Ingo Molnar
[not found] ` <CAKwvOdn5gnB5cK=cy6weKyxAn4SNEdZTT_MtT_D_nHRG5EDZ4g@mail.gmail.com>
2018-07-13 10:16 ` David Laight
1 sibling, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2018-06-22 2:24 UTC (permalink / raw)
To: Nick Desaulniers
Cc: kstewart, andrea.parri, linux-efi, brijesh.singh, jan.kiszka,
jpoimboe, will.deacon, jarkko.sakkinen, virtualization,
yamada.masahiro, manojgupta, hpa, boris.ostrovsky, tweek,
mawilcox, x86, akataria, ghackmann, mingo, astrachan, rientjes,
geert, thomas.lendacky, arnd, linux-kbuild, pombredanne, rostedt,
acme, caoj.fnst, aryabinin, sedat.dilek, tglx, jgross,
michal.lkml, tstellar, gregkh, mka, ard.bieshe
* Nick Desaulniers <ndesaulniers@google.com> wrote:
> native_save_fl() is marked static inline, but by using it as
> a function pointer in arch/x86/kernel/paravirt.c, it MUST be outlined.
> --- a/arch/x86/include/asm/irqflags.h
> +++ b/arch/x86/include/asm/irqflags.h
> @@ -13,7 +13,7 @@
> * Interrupt control:
> */
>
> -static inline unsigned long native_save_fl(void)
> +extern inline unsigned long native_save_fl(void)
> {
> unsigned long flags;
>
What's the code generation effect of this on say a defconfig kernel vmlinux with
paravirt enabled?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline
[not found] ` <CAKwvOdn5gnB5cK=cy6weKyxAn4SNEdZTT_MtT_D_nHRG5EDZ4g@mail.gmail.com>
@ 2018-06-26 7:13 ` Ingo Molnar
[not found] ` <CAKwvOdnW9r=pgmodEL0VXCv=PZVt_WMCA+B5x4D5oKRM1y-0Ow@mail.gmail.com>
0 siblings, 1 reply; 5+ messages in thread
From: Ingo Molnar @ 2018-06-26 7:13 UTC (permalink / raw)
To: Nick Desaulniers
Cc: Kate Stewart, andrea.parri, linux-efi, brijesh.singh, J. Kiszka,
Josh Poimboeuf, Will Deacon, jarkko.sakkinen, virtualization,
Masahiro Yamada, Manoj Gupta, hpa, boris.ostrovsky,
Thiebaud Weksteen, mawilcox, x86, akataria, Greg Hackmann, mingo,
Alistair Strachan, David Rientjes, geert, thomas.lendacky,
Arnd Bergmann, Linux Kbuild mailing list, Philippe Ombredanne,
rostedt
* Nick Desaulniers <ndesaulniers@google.com> wrote:
> On Thu, Jun 21, 2018 at 7:24 PM Ingo Molnar <mingo@kernel.org> wrote:
> > * Nick Desaulniers <ndesaulniers@google.com> wrote:
> >
> > > native_save_fl() is marked static inline, but by using it as
> > > a function pointer in arch/x86/kernel/paravirt.c, it MUST be outlined.
> >
> > > --- a/arch/x86/include/asm/irqflags.h
> > > +++ b/arch/x86/include/asm/irqflags.h
> > > @@ -13,7 +13,7 @@
> > > * Interrupt control:
> > > */
> > >
> > > -static inline unsigned long native_save_fl(void)
> > > +extern inline unsigned long native_save_fl(void)
> > > {
> > > unsigned long flags;
> > >
> >
> > What's the code generation effect of this on say a defconfig kernel vmlinux with
> > paravirt enabled?
>
> Starting with this patch set applied:
> $ make CC=gcc-8 -j46
> $ objdump -d vmlinux | grep native_save_fl --context=3
> ffffffff81059140 <native_save_fl>:
> ffffffff81059140: 9c pushfq
> ffffffff81059141: 58 pop %rax
> ffffffff81059142: c3 retq
> $ git checkout HEAD~3
> $ make CC=gcc-8 -j46
> $ objdump -d vmlinux | grep native_save_fl --context=3
> ffffffff81079410 <native_save_fl>:
> ffffffff81079410: 9c pushfq
> ffffffff81079411: 58 pop %rax
> ffffffff81079412: c3 retq
>
> Mainly, this is to prevent the compiler from adding a stack protector
> to the outlined version, as the stack protector clobbers %rcx, but
> paravirt expects %rcx to be preserved. More info can be found:
> https://lkml.org/lkml/2018/5/24/1242--
Ok!
Acked-by: Ingo Molnar <mingo@kernel.org>
What's the planned upstreaming route for these patches/fixes?
Thanks,
Ingo
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline
[not found] ` <CAKwvOdnW9r=pgmodEL0VXCv=PZVt_WMCA+B5x4D5oKRM1y-0Ow@mail.gmail.com>
@ 2018-07-03 7:21 ` Juergen Gross
0 siblings, 0 replies; 5+ messages in thread
From: Juergen Gross @ 2018-07-03 7:21 UTC (permalink / raw)
To: Nick Desaulniers, Ingo Molnar
Cc: Kate Stewart, andrea.parri, linux-efi, brijesh.singh, J. Kiszka,
Josh Poimboeuf, Will Deacon, jarkko.sakkinen, virtualization,
Masahiro Yamada, Manoj Gupta, hpa, boris.ostrovsky,
Thiebaud Weksteen, mawilcox, x86, akataria, Greg Hackmann, mingo,
Alistair Strachan, David Rientjes, geert, thomas.lendacky,
Arnd Bergmann, Linux Kbuild mailing list, Philippe Ombredanne,
rostedt
On 26/06/18 18:22, Nick Desaulniers wrote:
> On Tue, Jun 26, 2018 at 3:13 AM Ingo Molnar <mingo@kernel.org> wrote:
>> Ok!
>>
>> Acked-by: Ingo Molnar <mingo@kernel.org>
>>
>> What's the planned upstreaming route for these patches/fixes?
>
> While the fix is mainly for paravirt, 2/3 of the patches exclusively
> touch arch/x86, so I think they should go up in the x86 tree (as
> opposed to paravirt's), if you would be so kind. hpa mentioned not
> handling merges in https://lkml.org/lkml/2018/6/14/903, so I reached
> out to you and tglx.
As there is no paravirt tree the x86 one seems to be appropriate. :-)
Juergen
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline
[not found] ` <20180621162324.36656-4-ndesaulniers@google.com>
2018-06-22 2:24 ` [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline Ingo Molnar
@ 2018-07-13 10:16 ` David Laight
[not found] ` <CAKwvOdmFVnSos71vAUnayuocBDhxLg76tvGF0y3sj+4+s7TCcw@mail.gmail.com>
1 sibling, 1 reply; 5+ messages in thread
From: David Laight @ 2018-07-13 10:16 UTC (permalink / raw)
To: 'Nick Desaulniers', mingo@redhat.com, tglx@linutronix.de
Cc: kstewart@linuxfoundation.org, andrea.parri@amarulasolutions.com,
linux-efi@vger.kernel.org, brijesh.singh@amd.com,
jan.kiszka@siemens.com, jpoimboe@redhat.com, will.deacon@arm.com,
jarkko.sakkinen@linux.intel.com,
virtualization@lists.linux-foundation.org,
yamada.masahiro@socionext.com, manojgupta@google.com,
hpa@zytor.com, akataria@vmware.com, tweek@google.com,
mawilcox@microsoft.com, x86@kernel.org, ghackmann
[-- Attachment #1.1: Type: text/plain, Size: 206 bytes --]
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Please consider the environment and don't print this e-mail unless you really need to
[-- Attachment #1.2: Type: text/html, Size: 1534 bytes --]
[-- Attachment #2: Type: text/plain, Size: 183 bytes --]
_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline
[not found] ` <CAKwvOdmFVnSos71vAUnayuocBDhxLg76tvGF0y3sj+4+s7TCcw@mail.gmail.com>
@ 2018-07-17 8:44 ` David Laight
0 siblings, 0 replies; 5+ messages in thread
From: David Laight @ 2018-07-17 8:44 UTC (permalink / raw)
To: 'Nick Desaulniers'
Cc: Kate Stewart, andrea.parri@amarulasolutions.com,
linux-efi@vger.kernel.org, brijesh.singh@amd.com, J. Kiszka,
Josh Poimboeuf, Will Deacon, jarkko.sakkinen@linux.intel.com,
virtualization@lists.linux-foundation.org, Masahiro Yamada,
Manoj Gupta, hpa@zytor.com, boris.ostrovsky@oracle.com,
Thiebaud Weksteen, mawilcox@microsoft.com, x86@kernel.org,
akataria@vmware.com, Greg Hackmann
-
Registered Address Lakeside, Bramley Road, Mount Farm, Milton Keynes, MK1 1PT, UK
Registration No: 1397386 (Wales)
Please consider the environment and don't print this e-mail unless you really need to
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2018-07-17 8:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20180621162324.36656-1-ndesaulniers@google.com>
[not found] ` <20180621162324.36656-4-ndesaulniers@google.com>
2018-06-22 2:24 ` [PATCH v6 3/3] x86: paravirt: make native_save_fl extern inline Ingo Molnar
[not found] ` <CAKwvOdn5gnB5cK=cy6weKyxAn4SNEdZTT_MtT_D_nHRG5EDZ4g@mail.gmail.com>
2018-06-26 7:13 ` Ingo Molnar
[not found] ` <CAKwvOdnW9r=pgmodEL0VXCv=PZVt_WMCA+B5x4D5oKRM1y-0Ow@mail.gmail.com>
2018-07-03 7:21 ` Juergen Gross
2018-07-13 10:16 ` David Laight
[not found] ` <CAKwvOdmFVnSos71vAUnayuocBDhxLg76tvGF0y3sj+4+s7TCcw@mail.gmail.com>
2018-07-17 8:44 ` David Laight
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).