H. Peter Anvin
2018-Jun-05 17:28 UTC
[PATCH v2 2/2] x86: paravirt: make native_save_fl extern inline
On 06/05/18 10:05, Nick Desaulniers wrote:> + > +/* > + * void native_restore_fl(unsigned long flags) > + * %rdi: flags > + */ > +ENTRY(native_restore_fl) > + push %_ASM_DI > + popf > + ret > +ENDPROC(native_restore_fl) > +EXPORT_SYMBOL(native_restore_fl) >To work on i386, this would have to be %_ASM_AX in that case. Something like this added to <asm/asm.h> might be useful; then you can simply: push %_ASM_ARG1 -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-x86-asm-add-_ASM_ARG-constants-for-argument-registes.patch Type: text/x-patch Size: 2092 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20180605/13d0e9ce/attachment.bin>
H. Peter Anvin
2018-Jun-05 17:31 UTC
[PATCH v2 2/2] x86: paravirt: make native_save_fl extern inline
On 06/05/18 10:28, H. Peter Anvin wrote:> On 06/05/18 10:05, Nick Desaulniers wrote: >> + >> +/* >> + * void native_restore_fl(unsigned long flags) >> + * %rdi: flags >> + */ >> +ENTRY(native_restore_fl) >> + push %_ASM_DI >> + popf >> + ret >> +ENDPROC(native_restore_fl) >> +EXPORT_SYMBOL(native_restore_fl) >> > > To work on i386, this would have to be %_ASM_AX in that case. > > Something like this added to <asm/asm.h> might be useful; then you can > simply: > > push %_ASM_ARG1 >Version with fixed typo... -hpa -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-x86-asm-add-_ASM_ARG-constants-for-argument-registes.patch Type: text/x-patch Size: 2092 bytes Desc: not available URL: <http://lists.linuxfoundation.org/pipermail/virtualization/attachments/20180605/dfd6fd6e/attachment.bin>
H. Peter Anvin
2018-Jun-05 18:06 UTC
[PATCH v2 2/2] x86: paravirt: make native_save_fl extern inline
On 06/05/18 10:52, Nick Desaulniers wrote:> > Does the kernel have a different calling convention for 32b x86? How > does that work? regparm=3? Does that need to be added to the > declaration? >Yes, -mregparm=3. No, doesn't need to be added to the declaration.>> Something like this added to <asm/asm.h> might be useful; then you can >> simply: >> >> push %_ASM_ARG1 >> >> Version with fixed typo... > > Oh, nice, thanks! I'll pick this up and add it to my patch set for v3 > (or did you want me to review/sign-off now?) I can pick up Sedat's > suggestion. >Add it to your patchset and add your own signoff underneath mine. -hpa
Maybe Matching Threads
- [PATCH v2 2/2] x86: paravirt: make native_save_fl extern inline
- Patch "x86/paravirt: Make native_save_fl() extern inline" has been added to the 4.17-stable tree
- Patch "x86/paravirt: Make native_save_fl() extern inline" has been added to the 4.14-stable tree
- Patch "x86/paravirt: Make native_save_fl() extern inline" has been added to the 4.9-stable tree
- [PATCH 4.17 003/101] x86/paravirt: Make native_save_fl() extern inline