From: Josh Poimboeuf <jpoimboe@redhat.com>
To: x86@kernel.org
Cc: Juergen Gross <jgross@suse.com>,
Rusty Russell <rusty@rustcorp.com.au>,
xen-devel@lists.xenproject.org,
Peter Zijlstra <peterz@infradead.org>,
Jiri Slaby <jslaby@suse.cz>,
Boris Ostrovsky <boris.ostrovsky@oracle.com>,
Mike Galbraith <efault@gmx.de>,
linux-kernel@vger.kernel.org,
Sasha Levin <alexander.levin@verizon.com>,
Chris Wright <chrisw@sous-sol.org>,
Thomas Gleixner <tglx@linutronix.de>,
Andy Lutomirski <luto@kernel.org>,
"H. Peter Anvin" <hpa@zytor.com>, Borislav Petkov <bp@alien8.de>,
live-patching@vger.kernel.org, Alok Kataria <akataria@vmware.com>,
virtualization@lists.linux-foundation.org,
Linus Torvalds <torvalds@linux-foundation.org>,
Ingo Molnar <mingo@kernel.org>
Subject: [PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality
Date: Wed, 4 Oct 2017 10:58:21 -0500 [thread overview]
Message-ID: <cover.1507128293.git.jpoimboe__48344.5874335759$1509079559$gmane$org@redhat.com> (raw)
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
--
2.13.6
next reply other threads:[~2017-10-04 15:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-04 15:58 Josh Poimboeuf [this message]
-- strict thread matches above, loose matches on Subject: below --
2017-10-04 15:58 [PATCH 00/13] x86/paravirt: Make pv ops code generation more closely match reality Josh Poimboeuf
2017-10-06 7:35 ` [Xen-devel] " Vitaly Kuznetsov
2017-10-06 14:36 ` Josh Poimboeuf
2017-10-06 7:35 ` Vitaly Kuznetsov
2017-10-04 15:58 Josh Poimboeuf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='cover.1507128293.git.jpoimboe__48344.5874335759$1509079559$gmane$org@redhat.com' \
--to=jpoimboe@redhat.com \
--cc=akataria@vmware.com \
--cc=alexander.levin@verizon.com \
--cc=boris.ostrovsky@oracle.com \
--cc=bp@alien8.de \
--cc=chrisw@sous-sol.org \
--cc=efault@gmx.de \
--cc=hpa@zytor.com \
--cc=jgross@suse.com \
--cc=jslaby@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=live-patching@vger.kernel.org \
--cc=luto@kernel.org \
--cc=mingo@kernel.org \
--cc=peterz@infradead.org \
--cc=rusty@rustcorp.com.au \
--cc=tglx@linutronix.de \
--cc=torvalds@linux-foundation.org \
--cc=virtualization@lists.linux-foundation.org \
--cc=x86@kernel.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.