Skip to content

xen: drop hypercall function tables

Juergen Gross xen-devel 6 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest9 patches 24 repliesIn review
  2. v510 patches 4 repliesSuperseded
  3. v411 patches 14 repliesSuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v313 patches38 repliesSuperseded
v215 patches16 repliesSuperseded
v112 patches25 repliesSuperseded

Changes in v6 from the cover letter

- patch 1 of V5 has been applied already
- fix of a rebase artifact

Patches in v6 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/9xen: move do_vcpu_op() to arch specific codexen/arch/arm/domain.c xen/arch/arm/include/asm/hypercall.h xen/arch/arm/traps.c +6 more+42 -388 replies
2/9xen: harmonize return types of hypercall handlersxen/arch/x86/domctl.c xen/arch/x86/hvm/hypercall.c xen/arch/x86/hypercall.c +11 more+58 -643 replies
3/9xen: don't include asm/hypercall.h from C sourcesxen/arch/arm/hvm.c xen/arch/arm/include/asm/hypercall.h xen/arch/arm/platform_hypercall.c +12 more+19 -60 replies
4/9xen: include compat/platform.h from hypercall.hxen/arch/x86/x86_64/platform_hypercall.c xen/include/xen/hypercall.h+3 -20 replies
5/9xen: generate hypercall interface related code.gitignore xen/include/Makefile xen/include/hypercall-defs.c +1 more+613 -02 replies
6/9xen: use generated prototypes for hypercall handlersxen/arch/arm/include/asm/hypercall.h xen/arch/x86/hvm/hypercall.c xen/arch/x86/include/asm/hypercall.h +1 more+5 -3210 replies
7/9xen/x86: call hypercall handlers via generated macroxen/arch/x86/hvm/hypercall.c xen/arch/x86/hypercall.c xen/arch/x86/include/asm/hypercall.h +1 more+76 -3880 replies
8/9xen/arm: call hypercall handlers via generated macroxen/arch/arm/traps.c+24 -930 replies
9/9xen/x86: remove cf_check attribute from hypercall handlersxen/arch/x86/compat.c xen/arch/x86/cpu/mcheck/mce.c xen/arch/x86/cpu/vpmu.c +36 more+68 -721 reply

Reviews trailers per patch

All 9 patches have a Reviewed-by or Acked-by.

PatchJulien GrallJan BeulichMichal OrzelDaniel P. SmithTéo Couprie DiazDario FaggioliRoger Pau MonnéChristopher Clark
1/9R-b A-b
2/9R-b R-b
3/9A-b R-b
4/9A-b
5/9A-b R-b
6/9A-b A-b
7/9R-b
8/9R-b T-b
9/9A-b R-b T-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 8 reviewers.

Read the v6 thread

Cover letter [PATCH v6 0/9] xen: drop hypercall function tables

In order to avoid indirect function calls on the hypercall path as much as possible this series is removing the hypercall function tables and is replacing the hypercall handler calls via the function array by automatically generated call macros.

Another by-product of generating the call macros is the automatic generating of the hypercall handler prototypes from the same data base which is used to generate the macros.

This has the additional advantage of using type safe calls of the handlers and to ensure related handler (e.g. PV and HVM ones) share the same prototypes.

A very brief performance test (parallel build of the Xen hypervisor in a 6 vcpu guest) showed a very slim improvement (less than 1%) of the performance with the patches applied. The test was performed using a PV and a PVH guest.

Changes in V2:
- new patches 6, 14, 15
- patch 7: support hypercall priorities for faster code
- comments addressed

Changes in V3:
- patches 1 and 4 removed as already applied
- comments addressed

Changes in V4:
- 5 patches removed al already applied
- new patches 1, 3 and 11
- avoid switching Arm hypercall handlers to return long (no change of handlers returning long already)

Changes in V5:
- patch 3 of V4 has been applied already
- comments addressed
- rebase

Changes in V6:
- patch 1 of V5 has been applied already
- fix of a rebase artifact

Juergen Gross (9):
xen: move do_vcpu_op() to arch specific code
xen: harmonize return types of hypercall handlers
xen: don't include asm/hypercall.h from C sources
xen: include compat/platform.h from hypercall.h
xen: generate hypercall interface related code
xen: use generated prototypes for hypercall handlers xen/x86: call hypercall handlers via generated macro xen/arm: call hypercall handlers via generated macro xen/x86: remove cf_check attribute from hypercall handlers

 .gitignore                               |   1 +
 xen/arch/arm/domain.c                    |  15 +-
 xen/arch/arm/hvm.c                       |   3 +-
 xen/arch/arm/include/asm/hypercall.h     |   7 +-
 xen/arch/arm/platform_hypercall.c        |   1 +
 xen/arch/arm/traps.c                     | 117 ++-------
 xen/arch/x86/compat.c                    |   6 +-
 xen/arch/x86/cpu/mcheck/mce.c            |   2 +-
 xen/arch/x86/cpu/vpmu.c                  |   3 +-
 xen/arch/x86/domain.c                    |  11 +-
 xen/arch/x86/domctl.c                    |   4 +-
 xen/arch/x86/hvm/dm.c                    |   2 +-
 xen/arch/x86/hvm/hvm.c                   |   2 +-
 xen/arch/x86/hvm/hypercall.c             | 177 ++-----------
 xen/arch/x86/hypercall.c                 |  59 -----
 xen/arch/x86/include/asm/hypercall.h     | 201 ++++-----------
 xen/arch/x86/include/asm/paging.h        |   3 -
 xen/arch/x86/mm.c                        |  13 +-
 xen/arch/x86/mm/paging.c                 |   3 +-
 xen/arch/x86/physdev.c                   |   2 +-
 xen/arch/x86/platform_hypercall.c        |   3 +-
 xen/arch/x86/pv/callback.c               |  26 +-
 xen/arch/x86/pv/descriptor-tables.c      |   8 +-
 xen/arch/x86/pv/emul-priv-op.c           |   2 +-
 xen/arch/x86/pv/hypercall.c              | 187 ++------------
 xen/arch/x86/pv/iret.c                   |   5 +-
 xen/arch/x86/pv/misc-hypercalls.c        |  22 +-
 xen/arch/x86/pv/shim.c                   |   4 +-
 xen/arch/x86/traps.c                     |   2 +-
 xen/arch/x86/x86_64/compat/mm.c          |   3 +-
 xen/arch/x86/x86_64/domain.c             |  16 +-
 xen/arch/x86/x86_64/mm.c                 |   2 -
 xen/arch/x86/x86_64/platform_hypercall.c |   1 -
 xen/common/argo.c                        |   8 +-
 xen/common/compat/domain.c               |  15 +-
 xen/common/compat/grant_table.c          |   3 +-
 xen/common/compat/kernel.c               |   2 +-
 xen/common/compat/memory.c               |   3 +-
 xen/common/dm.c                          |   2 +-
 xen/common/domain.c                      |  14 +-
 xen/common/domctl.c                      |   2 +-
 xen/common/event_channel.c               |   3 +-
 xen/common/grant_table.c                 |   4 +-
 xen/common/hypfs.c                       |   2 +-
 xen/common/kernel.c                      |   2 +-
 xen/common/kexec.c                       |   6 +-
 xen/common/memory.c                      |   2 +-
 xen/common/multicall.c                   |   4 +-
 xen/common/sched/compat.c                |   2 +-
 xen/common/sched/core.c                  |   4 +-
 xen/common/sysctl.c                      |   2 +-
 xen/common/xenoprof.c                    |   2 +-
 xen/drivers/char/console.c               |   2 +-
 xen/include/Makefile                     |  13 +
 xen/include/hypercall-defs.c             | 285 ++++++++++++++++++++
 xen/include/xen/hypercall.h              | 185 +------------
 xen/scripts/gen_hypercall.awk            | 314 +++++++++++++++++++++++
 xen/xsm/xsm_core.c                       |   4 +-
 58 files changed, 861 insertions(+), 937 deletions(-)
 create mode 100644 xen/include/hypercall-defs.c
 create mode 100644 xen/scripts/gen_hypercall.awk
Signature · 1 line
2.34.1