virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] x86/paravirt: Get rid of paravirt patching
@ 2023-10-19  9:15 Juergen Gross via Virtualization
  2023-10-19  9:15 ` [PATCH v3 1/5] x86/paravirt: move some functions and defines to alternative Juergen Gross via Virtualization
                   ` (3 more replies)
  0 siblings, 4 replies; 15+ messages in thread
From: Juergen Gross via Virtualization @ 2023-10-19  9:15 UTC (permalink / raw)
  To: linux-kernel, x86, virtualization, kvm
  Cc: Juergen Gross, Wanpeng Li, Alexey Makhalov, xen-devel,
	VMware PV-Drivers Reviewers, Boris Ostrovsky, Dave Hansen,
	Ajay Kaher, Ingo Molnar, Borislav Petkov, H. Peter Anvin,
	Paolo Bonzini, Thomas Gleixner

This is a small series getting rid of paravirt patching by switching
completely to alternative patching for the same functionality.

The basic idea is to add the capability to switch from indirect to
direct calls via a special alternative patching option.

This removes _some_ of the paravirt macro maze, but most of it needs
to stay due to the need of hiding the call instructions from the
compiler in order to avoid needless register save/restore.

What is going away is the nasty stacking of alternative and paravirt
patching and (of course) the special .parainstructions linker section.

I have tested the series on bare metal and as Xen PV domain to still
work.

Note that objtool might need some changes to cope with the new
indirect call patching mechanism. Additionally some paravirt handling
can probably be removed from it.

Changes in V3:
- split v2 patch 3 into 2 patches as requested by Peter and Ingo

Changes in V2:
- split last patch into 2
- rebase of patch 2 as suggested by Peter
- addressed Peter's comments for patch 3

Juergen Gross (5):
  x86/paravirt: move some functions and defines to alternative
  x86/alternative: add indirect call patching
  x86/paravirt: introduce ALT_NOT_XEN
  x86/paravirt: switch mixed paravirt/alternative calls to alternative_2
  x86/paravirt: remove no longer needed paravirt patching code

 arch/x86/include/asm/alternative.h        |  26 ++++-
 arch/x86/include/asm/paravirt.h           |  79 +++++----------
 arch/x86/include/asm/paravirt_types.h     |  73 +++-----------
 arch/x86/include/asm/qspinlock_paravirt.h |   4 +-
 arch/x86/include/asm/text-patching.h      |  12 ---
 arch/x86/kernel/alternative.c             | 116 ++++++++++------------
 arch/x86/kernel/callthunks.c              |  17 ++--
 arch/x86/kernel/kvm.c                     |   4 +-
 arch/x86/kernel/module.c                  |  20 +---
 arch/x86/kernel/paravirt.c                |  54 ++--------
 arch/x86/kernel/vmlinux.lds.S             |  13 ---
 arch/x86/tools/relocs.c                   |   2 +-
 arch/x86/xen/irq.c                        |   2 +-
 13 files changed, 137 insertions(+), 285 deletions(-)

-- 
2.35.3

_______________________________________________
Virtualization mailing list
Virtualization@lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/virtualization

^ permalink raw reply	[flat|nested] 15+ messages in thread
[parent not found: <202310261032.76a10bc0-oliver.sang@intel.com>]

end of thread, other threads:[~2023-10-30 12:39 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-10-19  9:15 [PATCH v3 0/5] x86/paravirt: Get rid of paravirt patching Juergen Gross via Virtualization
2023-10-19  9:15 ` [PATCH v3 1/5] x86/paravirt: move some functions and defines to alternative Juergen Gross via Virtualization
2023-10-19 11:33   ` kernel test robot
2023-10-25 10:34   ` Borislav Petkov
2023-10-25 13:31     ` Juergen Gross via Virtualization
2023-10-25 13:44       ` Borislav Petkov
2023-10-25 13:57         ` Juergen Gross via Virtualization
2023-10-30 12:39     ` Juergen Gross via Virtualization
2023-10-19  9:15 ` [PATCH v3 3/5] x86/paravirt: introduce ALT_NOT_XEN Juergen Gross via Virtualization
2023-10-19  9:15 ` [PATCH v3 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2 Juergen Gross via Virtualization
2023-10-19 11:55   ` kernel test robot
2023-10-26  9:02   ` kernel test robot
2023-10-19  9:15 ` [PATCH v3 5/5] x86/paravirt: remove no longer needed paravirt patching code Juergen Gross via Virtualization
2023-10-19 12:06   ` kernel test robot
     [not found] <202310261032.76a10bc0-oliver.sang@intel.com>
2023-10-26  6:33 ` [PATCH v3 4/5] x86/paravirt: switch mixed paravirt/alternative calls to alternative_2 Juergen Gross via Virtualization

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).