x86/paravirt: Make pv ops code generation more closely match reality
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest13 patches 111 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/13 | x86/paravirt: remove wbinvd() paravirt interfacearch/ arch/ arch/ +3 more | +1 | 0 replies | |
| 1/13 | x86/paravirt: remove wbinvd() paravirt interfacearch/ arch/ arch/ +3 more | +1 | 6 replies | |
| 2/13 | x86/paravirt: Fix output constraint macro namesarch/ | +12 | 0 replies | |
| 2/13 | x86/paravirt: Fix output constraint macro namesarch/ | +12 | 7 replies | |
| 2/13 | x86/paravirt: Fix output constraint macro namesarch/ | +12 | 0 replies | |
| 3/13 | x86/paravirt: Convert native patch assembly code strings to macrosarch/ arch/ arch/ | +50 | 0 replies | |
| 3/13 | x86/paravirt: Convert native patch assembly code strings to macrosarch/ arch/ arch/ | +50 | 15 replies | |
| 4/13 | x86/paravirt: Convert DEF_NATIVE macro to GCC extended asm syntaxarch/ arch/ | +14 | 0 replies | |
| 4/13 | x86/paravirt: Convert DEF_NATIVE macro to GCC extended asm syntaxarch/ arch/ | +14 | 0 replies | |
| 4/13 | x86/paravirt: Convert DEF_NATIVE macro to GCC extended asm syntaxarch/ arch/ | +14 | 3 replies | |
| 5/13 | x86/paravirt: Move paravirt asm macros to paravirt-asm.harch/ arch/ arch/ +3 more | +138 | 0 replies | |
| 5/13 | x86/paravirt: Move paravirt asm macros to paravirt-asm.harch/ arch/ arch/ +3 more | +138 | 3 replies | |
| 6/13 | x86/paravirt: Clean up paravirt-asm.harch/ | +49 | 0 replies | |
| 6/13 | x86/paravirt: Clean up paravirt-asm.harch/ | +49 | 3 replies | |
| 6/13 | x86/paravirt: Clean up paravirt-asm.harch/ | +49 | 0 replies | |
| 7/13 | x86/paravirt: Simplify ____PVOP_CALL()arch/ | +13 | 0 replies | |
| 7/13 | x86/paravirt: Simplify ____PVOP_CALL()arch/ | +13 | 6 replies | |
| 8/13 | x86/paravirt: Clean up paravirt_types.harch/ | +54 | 0 replies | |
| 8/13 | x86/paravirt: Clean up paravirt_types.harch/ | +54 | 5 replies | |
| 8/13 | x86/paravirt: Clean up paravirt_types.harch/ | +54 | 0 replies | |
| 9/13 | x86/asm: Convert ALTERNATIVE*() assembler macros to preprocessor macrosarch/ arch/ arch/ +7 more | +59 | 0 replies | |
| 9/13 | x86/asm: Convert ALTERNATIVE*() assembler macros to preprocessor macrosarch/ arch/ arch/ +7 more | +59 | 2 replies | |
| 10/13 | x86/alternative: Support indirect call replacementarch/ | +15 | 0 replies | |
| 10/13 | x86/alternative: Support indirect call replacementarch/ | +15 | 0 replies | |
| 10/13 | x86/alternative: Support indirect call replacementarch/ | +15 | 9 replies | |
| 11/13 | x86/paravirt: Add paravirt alternatives infrastructurearch/ arch/ arch/ +7 more | +141 | 0 replies | |
| 11/13 | x86/paravirt: Add paravirt alternatives infrastructurearch/ arch/ arch/ +7 more | +141 | 0 replies | |
| 11/13 | x86/paravirt: Add paravirt alternatives infrastructurearch/ arch/ arch/ +7 more | +141 | 46 replies | |
| 12/13 | objtool: Add support for new .pv_altinstructions sectiontools/ | +10 | 0 replies | |
| 12/13 | objtool: Add support for new .pv_altinstructions sectiontools/ | +10 | 0 replies | |
| 12/13 | objtool: Add support for new .pv_altinstructions sectiontools/ | +10 | 0 replies | |
| 13/13 | x86/paravirt: Convert natively patched pv ops to use paravirt alternativesarch/ arch/ | +34 | 0 replies | |
| 13/13 | x86/paravirt: Convert natively patched pv ops to use paravirt alternativesarch/ arch/ | +34 | 0 replies | |
| 13/13 | x86/paravirt: Convert natively patched pv ops to use paravirt alternativesarch/ arch/ | +34 | 0 replies |
Reviews trailers per patch
19 of 34 patches have a Reviewed-by or Acked-by.
| Patch | Juergen Gross | Borislav Petkov |
|---|---|---|
| 1/13 | R-b R-b R-b | R-b R-b R-b |
| 1/13 | R-b R-b R-b | R-b R-b R-b |
| 2/13 | ||
| 2/13 | ||
| 2/13 | ||
| 3/13 | R-b R-b R-b | |
| 3/13 | R-b R-b R-b | |
| 4/13 | R-b R-b R-b | |
| 4/13 | R-b R-b R-b | |
| 4/13 | R-b R-b R-b | |
| 5/13 | R-b R-b R-b | |
| 5/13 | R-b R-b R-b | |
| 6/13 | R-b R-b R-b | |
| 6/13 | R-b R-b R-b | |
| 6/13 | R-b R-b R-b | |
| 7/13 | R-b R-b R-b | |
| 7/13 | R-b R-b R-b | |
| 8/13 | R-b R-b | |
| 8/13 | R-b R-b | |
| 8/13 | R-b R-b | |
| 9/13 | R-b R-b | |
| 9/13 | R-b R-b | |
| 10/13 | ||
| 10/13 | ||
| 10/13 | ||
| 11/13 | ||
| 11/13 | ||
| 11/13 | ||
| 12/13 | ||
| 12/13 | ||
| 12/13 | ||
| 13/13 | ||
| 13/13 | ||
| 13/13 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality
This changes the pv ops code generation to more closely match reality.
For example, instead of:
callq *0xffffffff81e3a400 (pv_irq_ops.save_fl)
vmlinux will now show:
pushfq
pop %rax
nop
nop
nop
nop
nop
which is what the runtime version of the code will show in most cases.
This idea was suggested by Andy Lutomirski.
The benefits are:
- For the most common runtime cases (everything except Xen and vSMP), vmlinux disassembly now matches what the actual runtime code looks like. This improves debuggability and kernel developer sanity (a precious resource).
- It fixes a KASAN warning in the ORC unwinder due to objtool not understanding the .parainstructions stuff.
- It's hopefully a first step in simplifying paravirt patching by getting rid of .parainstructions, pv ops, and apply_paravirt() completely. (I think Xen can be changed to set CPU feature bits to specify which ops it needs during early boot, then those ops can be patched in using early alternatives.)
For more details, see the commit log in patch 11/13.
Josh Poimboeuf (13):
x86/paravirt: remove wbinvd() paravirt interface x86/paravirt: Fix output constraint macro names x86/paravirt: Convert native patch assembly code strings to macros x86/paravirt: Convert DEF_NATIVE macro to GCC extended asm syntax x86/paravirt: Move paravirt asm macros to paravirt-asm.h x86/paravirt: Clean up paravirt-asm.h
x86/paravirt: Simplify ____PVOP_CALL()
x86/paravirt: Clean up paravirt_types.h
x86/asm: Convert ALTERNATIVE*() assembler macros to preprocessor
macros
x86/alternative: Support indirect call replacement x86/paravirt: Add paravirt alternatives infrastructure
objtool: Add support for new .pv_altinstructions section x86/paravirt: Convert natively patched pv ops to use paravirt
alternatives
arch/x86/entry/entry_32.S | 13 +- arch/x86/entry/entry_64.S | 12 +- arch/x86/entry/entry_64_compat.S | 9 +- arch/x86/entry/vdso/vdso32/system_call.S | 10 +- arch/x86/include/asm/alternative-asm.h | 71 ++++----- arch/x86/include/asm/alternative.h | 12 +- arch/x86/include/asm/cpufeatures.h | 1 + arch/x86/include/asm/paravirt-asm.h | 142 ++++++++++++++++++ arch/x86/include/asm/paravirt.h | 174 ++++------------------ arch/x86/include/asm/paravirt_types.h | 243 ++++++++++++++++++++----------- arch/x86/include/asm/smap.h | 4 +- arch/x86/include/asm/special_insns.h | 31 +++- arch/x86/kernel/alternative.c | 35 ++++- arch/x86/kernel/cpu/hypervisor.c | 2 + arch/x86/kernel/head_64.S | 2 +- arch/x86/kernel/module.c | 11 +- arch/x86/kernel/paravirt.c | 1 - arch/x86/kernel/paravirt_patch_32.c | 21 +-- arch/x86/kernel/paravirt_patch_64.c | 31 ++-- arch/x86/kernel/vmlinux.lds.S | 6 + arch/x86/lib/copy_page_64.S | 2 +- arch/x86/lib/memcpy_64.S | 4 +- arch/x86/lib/memmove_64.S | 3 +- arch/x86/lib/memset_64.S | 4 +- arch/x86/xen/enlighten_pv.c | 3 +- tools/objtool/special.c | 10 ++ 26 files changed, 516 insertions(+), 341 deletions(-) create mode 100644 arch/x86/include/asm/paravirt-asm.h
Signature · 1 line
2.13.6