Skip to content

Add hypervisor sysfs-like support

Juergen Gross xen-devel 10 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest12 patches 26 repliesIn review
  2. v912 patches 3 repliesSuperseded
  3. v812 patches 18 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v712 patches32 repliesSuperseded
v612 patches37 repliesSuperseded
v58 patches15 repliesSuperseded
v48 patches2 repliesSuperseded
v39 patches32 repliesSuperseded
v26 patches11 repliesSuperseded
v16 patches14 repliesSuperseded

Changes in v10 from the cover letter

- adressed review comments

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/12xen/vmx: let opt_ept_ad always reflect the current settingxen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/hvm/vmx/vmx.c xen/include/asm-x86/hvm/vmx/vmcs.h+17 -121 reply
2/12xen: add a generic way to include binary files as variables.gitignore xen/tools/binfile xen/xsm/flask/Makefile +1 more+48 -174 replies
3/12docs: add feature document for Xen hypervisor sysfs-like supportdocs/features/hypervisorfs.pandoc docs/misc/hypfs-paths.pandoc+199 -00 replies
4/12xen: add basic hypervisor filesystem supporttools/flask/policy/modules/dom0.te xen/arch/arm/traps.c xen/arch/x86/hvm/hypercall.c +16 more+732 -11 reply
5/12libs: add libxenhypfs.gitignore tools/Rules.mk tools/libs/Makefile +5 more+671 -02 replies
6/12tools: add xenfs tool.gitignore docs/man/xenhypfs.1.pod tools/misc/Makefile +1 more+260 -00 replies
7/12xen: provide version information in hypfsdocs/misc/hypfs-paths.pandoc xen/common/kernel.c+92 -04 replies
8/12xen: add /buildinfo/config entry to hypervisor filesystem.gitignore docs/misc/hypfs-paths.pandoc xen/common/Kconfig +3 more+43 -02 replies
9/12xen: add runtime parameter access support to hypfsdocs/misc/hypfs-paths.pandoc xen/arch/arm/xen.lds.S xen/arch/x86/hvm/vmx/vmcs.c +8 more+372 -251 reply
10/12tools/libxl: use libxenhypfs for setting xen runtime parameterstools/Rules.mk tools/libxl/Makefile tools/libxl/libxl.c +3 more+52 -103 replies
11/12tools/libxc: remove xc_set_parameters()tools/libxc/include/xenctrl.h tools/libxc/xc_misc.c+0 -221 reply
12/12xen: remove XEN_SYSCTL_set_parameter supporttools/flask/policy/modules/dom0.te xen/arch/arm/xen.lds.S xen/arch/x86/hvm/vmx/vmcs.c +11 more+23 -1700 replies

Reviews trailers per patch

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

PatchJan BeulichWei LiuJulien GrallKevin Tian
1/12R-b R-b
2/12R-b R-b
3/12A-b
4/12R-b A-b
5/12A-b
6/12A-b
7/12R-b R-b T-b
8/12R-b
9/12R-b A-b
10/12A-b
11/12A-b
12/12A-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 4 reviewers.

Read the v10 thread

Cover letter [PATCH v10 00/12] Add hypervisor sysfs-like support

On the 2019 Xen developer summit there was agreement that the Xen hypervisor should gain support for a hierarchical name-value store similar to the Linux kernel's sysfs.

This is a first implementation of that idea adding the basic functionality to hypervisor and tools side. The interface to any user program making use of that "xen-hypfs" is a new library "libxenhypfs" with a stable interface.

The series adds read-only nodes with buildinfo data and writable nodes with runtime parameters. xl is switched to use the new file system for modifying the runtime parameters and the old sysctl interface for that purpose is dropped.

Changes in V10:
- adressed review comments

Changes in V9:
- addressed review comments

Changes in V8:
- addressed review comments
- added CONFIG_HYPFS config option

Changes in V7:
- old patch 1 already applied
- add new patch 1 (carved out and modified from patch 9)
- addressed review comments
- modified public interface to have a max write size instead of a writable flag only

Changes in V6:
- added new patches 1, 10, 11, 12
- addressed review comments
- modified interface for creating nodes for runtime parameters

Changes in V5:
- switched to xsm for privilege check

Changes in V4:
- former patch 2 removed as already committed
- addressed review comments

Changes in V3:
- major rework, especially by supporting binary contents of entries
- added several new patches (1, 2, 7)
- full support of all runtime parameters
- support of writing entries (especially runtime parameters)

Changes in V2:
- all comments to V1 addressed
- added man-page for xenhypfs tool
- added runtime parameter read access for string parameters

Changes in V1:
- renamed xenfs ->xenhypfs
- added writable entries support at the interface level and in the xenhypfs tool
- added runtime parameter read access (integer type only for now)
- added docs/misc/hypfs-paths.pandoc for path descriptions

Juergen Gross (12):
xen/vmx: let opt_ept_ad always reflect the current setting
xen: add a generic way to include binary files as variables
docs: add feature document for Xen hypervisor sysfs-like support
xen: add basic hypervisor filesystem support
libs: add libxenhypfs
tools: add xenfs tool
xen: provide version information in hypfs
xen: add /buildinfo/config entry to hypervisor filesystem
xen: add runtime parameter access support to hypfs tools/libxl: use libxenhypfs for setting xen runtime parameters tools/libxc: remove xc_set_parameters()
xen: remove XEN_SYSCTL_set_parameter support

 .gitignore                          |   6 +
 docs/features/hypervisorfs.pandoc   |  92 +++++
 docs/man/xenhypfs.1.pod             |  61 ++++
 docs/misc/hypfs-paths.pandoc        | 165 +++++++++
 tools/Rules.mk                      |   8 +-
 tools/flask/policy/modules/dom0.te  |   4 +-
 tools/libs/Makefile                 |   1 +
 tools/libs/hypfs/Makefile           |  16 +
 tools/libs/hypfs/core.c             | 536 ++++++++++++++++++++++++++++
 tools/libs/hypfs/include/xenhypfs.h |  90 +++++
 tools/libs/hypfs/libxenhypfs.map    |  10 +
 tools/libs/hypfs/xenhypfs.pc.in     |  10 +
 tools/libxc/include/xenctrl.h       |   1 -
 tools/libxc/xc_misc.c               |  21 --
 tools/libxl/Makefile                |   3 +-
 tools/libxl/libxl.c                 |  53 ++-
 tools/libxl/libxl_internal.h        |   1 +
 tools/libxl/xenlight.pc.in          |   2 +-
 tools/misc/Makefile                 |   6 +
 tools/misc/xenhypfs.c               | 192 ++++++++++
 tools/xl/xl_misc.c                  |   1 -
 xen/arch/arm/traps.c                |   3 +
 xen/arch/arm/xen.lds.S              |  13 +-
 xen/arch/x86/hvm/hypercall.c        |   3 +
 xen/arch/x86/hvm/vmx/vmcs.c         |  47 ++-
 xen/arch/x86/hvm/vmx/vmx.c          |   4 +-
 xen/arch/x86/hypercall.c            |   3 +
 xen/arch/x86/pv/domain.c            |  21 +-
 xen/arch/x86/pv/hypercall.c         |   3 +
 xen/arch/x86/xen.lds.S              |  12 +-
 xen/common/Kconfig                  |  23 ++
 xen/common/Makefile                 |  13 +
 xen/common/grant_table.c            |  62 +++-
 xen/common/hypfs.c                  | 452 +++++++++++++++++++++++
 xen/common/kernel.c                 |  84 ++++-
 xen/common/sysctl.c                 |  36 --
 xen/drivers/char/console.c          |  72 +++-
 xen/include/Makefile                |   1 +
 xen/include/asm-x86/hvm/vmx/vmcs.h  |   3 +-
 xen/include/public/hypfs.h          | 129 +++++++
 xen/include/public/sysctl.h         |  19 +-
 xen/include/public/xen.h            |   1 +
 xen/include/xen/hypercall.h         |  10 +
 xen/include/xen/hypfs.h             | 123 +++++++
 xen/include/xen/kernel.h            |   3 +
 xen/include/xen/lib.h               |   1 -
 xen/include/xen/param.h             | 126 +++++--
 xen/include/xlat.lst                |   2 +
 xen/include/xsm/dummy.h             |   6 +
 xen/include/xsm/xsm.h               |   6 +
 xen/tools/binfile                   |  43 +++
 xen/xsm/dummy.c                     |   1 +
 xen/xsm/flask/Makefile              |   5 +-
 xen/xsm/flask/flask-policy.S        |  16 -
 xen/xsm/flask/hooks.c               |   9 +-
 xen/xsm/flask/policy/access_vectors |   4 +-
 56 files changed, 2445 insertions(+), 193 deletions(-)
 create mode 100644 docs/features/hypervisorfs.pandoc
 create mode 100644 docs/man/xenhypfs.1.pod
 create mode 100644 docs/misc/hypfs-paths.pandoc
 create mode 100644 tools/libs/hypfs/Makefile
 create mode 100644 tools/libs/hypfs/core.c
 create mode 100644 tools/libs/hypfs/include/xenhypfs.h
 create mode 100644 tools/libs/hypfs/libxenhypfs.map
 create mode 100644 tools/libs/hypfs/xenhypfs.pc.in
 create mode 100644 tools/misc/xenhypfs.c
 create mode 100644 xen/common/hypfs.c
 create mode 100644 xen/include/public/hypfs.h
 create mode 100644 xen/include/xen/hypfs.h
 create mode 100755 xen/tools/binfile
 delete mode 100644 xen/xsm/flask/flask-policy.S
Signature · 1 line
2.26.1