Skip to content

x86/hvm: {svm,vmx} {c,h} cleanup

Xenia Ragiadakou xen-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest14 patches 23 repliesIn review
  2. v29 patches 18 repliesSuperseded
  3. v14 patches 13 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/14x86/svm: move declarations used only by svm code from svm.h to private headerxen/arch/x86/hvm/svm/nestedsvm.c xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/svm/svm.h +1 more+65 -410 replies
2/14x86/svm: make asid.h privatexen/arch/x86/hvm/svm/asid.c xen/arch/x86/hvm/svm/asid.h xen/arch/x86/hvm/svm/svm.c +1 more+41 -512 replies
3/14x86/svm: delete header asm/hvm/svm/intr.hxen/arch/x86/hvm/svm/intr.c xen/arch/x86/include/asm/hvm/svm/intr.h+0 -260 replies
4/14x86/svm: make emulate.h privatexen/arch/x86/hvm/svm/emulate.c xen/arch/x86/hvm/svm/emulate.h xen/arch/x86/hvm/svm/nestedsvm.c +1 more+9 -183 replies
5/14x86/svm: move nestedsvm declarations used only by svm code to private headerxen/arch/x86/hvm/svm/intr.c xen/arch/x86/hvm/svm/nestedhvm.h xen/arch/x86/hvm/svm/nestedsvm.c +3 more+86 -526 replies
6/14x86/svm: move vmcb declarations used only by svm code to private headerxen/arch/x86/hvm/svm/asid.c xen/arch/x86/hvm/svm/emulate.c xen/arch/x86/hvm/svm/intr.c +6 more+604 -5710 replies
7/14x86/svm: move svmdebug.h declarations to private vmcb.h and delete itxen/arch/x86/hvm/svm/nestedsvm.c xen/arch/x86/hvm/svm/svm.c xen/arch/x86/hvm/svm/svmdebug.c +3 more+6 -340 replies
8/14x86/vmx: move vmx_update_debug_state() in vmcs.c and declare it staticxen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/include/asm/hvm/vmx/vmx.h+12 -131 reply
9/14x86/vmx: remove unused included headers from vmx.hxen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/include/asm/hvm/vmx/vmx.h+7 -90 replies
10/14x86/vmx: move declarations used only by vmx code from vmx.h to private headersxen/arch/x86/hvm/vmx/intr.c xen/arch/x86/hvm/vmx/pi.h xen/arch/x86/hvm/vmx/realmode.c +5 more+505 -4396 replies
11/14x86/vmx: remove unused included headers from vmx.cxen/arch/x86/hvm/vmx/vmx.c+25 -310 replies
12/14x86/vmx: declare nvmx_enqueue_n2_exceptions() staticxen/arch/x86/hvm/vmx/vmx.c+1 -10 replies
13/14x86/vmx: move vvmx declarations used only by vmx code to private headerxen/arch/x86/hvm/vmx/intr.c xen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/hvm/vmx/vmx.c +3 more+198 -1590 replies
14/14x86/vmx: move vmcs declarations used only by vmx code to private headerxen/arch/x86/hvm/vmx/intr.c xen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/hvm/vmx/vmcs.h +3 more+128 -940 replies

Reviews trailers per patch

5 of 14 patches have a Reviewed-by or Acked-by.

PatchJan BeulichXenia RagiadakouAndrew Cooper
1/14
2/14R-b
3/14
4/14R-b
5/14R-b
6/14
7/14
8/14A-b
9/14
10/14
11/14
12/14R-b
13/14
14/14

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

Read the v3 thread

Cover letter [PATCH v3 00/14] x86/hvm: {svm,vmx} {c,h} cleanup

This patch series attempts a cleanup of files {svm,vmx} files and headers by removing redundant headers and sorting the rest, reducing the scope of declarations and definitions, moving functions used only by internal {svm,vmx} code to private headers, fix coding style, replace u* with uint*_t types etc.

This series aims to address the comments made on v2.

Main changes from the v2 series:
- move all internal svm/vmx declarations found in external headers into private headers
- add SPDX tags and guards to the new headers
- take the opportunity to fix coding style issues and rearrange the code per Jan's suggestion
- replace u* with uint*_t
- rebased to the latest staging

There are more detailed per-patch changesets.

Xenia Ragiadakou (14):
x86/svm: move declarations used only by svm code from svm.h to private
header
x86/svm: make asid.h private
x86/svm: delete header asm/hvm/svm/intr.h
x86/svm: make emulate.h private
x86/svm: move nestedsvm declarations used only by svm code to private
header
x86/svm: move vmcb declarations used only by svm code to private
header
x86/svm: move svmdebug.h declarations to private vmcb.h and delete it x86/vmx: move vmx_update_debug_state() in vmcs.c and declare it static x86/vmx: remove unused included headers from vmx.h x86/vmx: move declarations used only by vmx code from vmx.h to private
headers
x86/vmx: remove unused included headers from vmx.c x86/vmx: declare nvmx_enqueue_n2_exceptions() static x86/vmx: move vvmx declarations used only by vmx code to private
header
x86/vmx: move vmcs declarations used only by vmx code to private
header

 xen/arch/x86/hvm/svm/asid.c                   |   4 +-
 xen/arch/x86/hvm/svm/asid.h                   |  38 ++
 xen/arch/x86/hvm/svm/emulate.c                |   4 +-
 .../x86/{include/asm => }/hvm/svm/emulate.h   |  20 +-
 xen/arch/x86/hvm/svm/intr.c                   |   4 +-
 xen/arch/x86/hvm/svm/nestedhvm.h              |  77 +++
 xen/arch/x86/hvm/svm/nestedsvm.c              |   7 +-
 xen/arch/x86/hvm/svm/svm.c                    |  10 +-
 xen/arch/x86/hvm/svm/svm.h                    |  62 ++
 xen/arch/x86/hvm/svm/svmdebug.c               |   3 +-
 xen/arch/x86/hvm/svm/vmcb.c                   |   3 +-
 xen/arch/x86/hvm/svm/vmcb.h                   | 597 ++++++++++++++++++
 xen/arch/x86/hvm/vmx/intr.c                   |   4 +
 xen/arch/x86/hvm/vmx/pi.h                     |  78 +++
 xen/arch/x86/hvm/vmx/realmode.c               |   2 +
 xen/arch/x86/hvm/vmx/vmcs.c                   |  17 +-
 xen/arch/x86/hvm/vmx/vmcs.h                   | 100 +++
 xen/arch/x86/hvm/vmx/vmx.c                    |  76 +--
 xen/arch/x86/hvm/vmx/vmx.h                    | 416 ++++++++++++
 xen/arch/x86/hvm/vmx/vvmx.c                   |   4 +
 xen/arch/x86/hvm/vmx/vvmx.h                   | 187 ++++++
 xen/arch/x86/include/asm/hvm/svm/asid.h       |  49 --
 xen/arch/x86/include/asm/hvm/svm/intr.h       |  25 -
 xen/arch/x86/include/asm/hvm/svm/nestedsvm.h  |  53 +-
 xen/arch/x86/include/asm/hvm/svm/svm.h        |  41 --
 xen/arch/x86/include/asm/hvm/svm/svmdebug.h   |  30 -
 xen/arch/x86/include/asm/hvm/svm/vmcb.h       | 575 +----------------
 xen/arch/x86/include/asm/hvm/vmx/vmcs.h       | 118 +---
 xen/arch/x86/include/asm/hvm/vmx/vmx.h        | 453 +------------
 xen/arch/x86/include/asm/hvm/vmx/vvmx.h       | 165 +----
 30 files changed, 1685 insertions(+), 1537 deletions(-)
 create mode 100644 xen/arch/x86/hvm/svm/asid.h
 rename xen/arch/x86/{include/asm => }/hvm/svm/emulate.h (73%)
 create mode 100644 xen/arch/x86/hvm/svm/nestedhvm.h
 create mode 100644 xen/arch/x86/hvm/svm/svm.h
 create mode 100644 xen/arch/x86/hvm/svm/vmcb.h
 create mode 100644 xen/arch/x86/hvm/vmx/pi.h
 create mode 100644 xen/arch/x86/hvm/vmx/vmcs.h
 create mode 100644 xen/arch/x86/hvm/vmx/vmx.h
 create mode 100644 xen/arch/x86/hvm/vmx/vvmx.h
 delete mode 100644 xen/arch/x86/include/asm/hvm/svm/asid.h
 delete mode 100644 xen/arch/x86/include/asm/hvm/svm/intr.h
 delete mode 100644 xen/arch/x86/include/asm/hvm/svm/svmdebug.h
Signature · 1 line
2.37.2