Skip to content

xenguest optimisations

Frediano Ziglio xen-devel 10 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v10 Latest9 of 10 patches 14 repliesIn review
  2. v94 patches 5 repliesSuperseded
  3. v84 patches 3 repliesSuperseded
Earlier versions · 7
VersionPostedPatchesRepliesStatus
v76 patches2 repliesSuperseded
v616 patches40 repliesSuperseded
v516 patches7 repliesSuperseded
v416 patches19 repliesSuperseded
v39 patches3 repliesSuperseded
v27 patches1 replySuperseded
v14 patches0 repliesSuperseded

Changes in v10 from the cover letter

- add back commits for foreign copy;
- rework page permissions check;
- do not limit domain for new hypercall;
- add back some memory check using Valgrind and sanitizers;
- fixed compatibility for ARM;
- minor fixes.

9 of 10 patches are in this archive. The cover letter announces 10.

Patches in v10 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/10libs/call: cache up to 4 pages in hypercall bounce bufferstools/libs/call/buffer.c tools/libs/call/core.c tools/libs/call/private.h+30 -150 replies
2/10libs/guest: move batch_pfns into a separate structuretools/libs/guest/xg_sr_common.h tools/libs/guest/xg_sr_save.c+18 -154 replies
3/10libs/guest: allocate various migration arrays just oncetools/libs/guest/xg_sr_common.h tools/libs/guest/xg_sr_save.c+22 -290 replies
4/10libs/guest: use Valgrind or sanitizers to detect various buffer overflowstools/config.h.in tools/configure tools/configure.ac +3 more+96 -30 replies
5/10libs/guest: add xg_foreignmemory_copy_{from,to}tools/libs/guest/xg_sr_common.c tools/libs/guest/xg_sr_common.h+65 -00 replies
6/10libs/guest: use foreign copy API during migrationtools/libs/guest/xg_sr_common.h tools/libs/guest/xg_sr_restore.c tools/libs/guest/xg_sr_save.c+71 -730 replies
7/10xen: implement new foreign copy hypercallxen/common/memory.c xen/include/public/memory.h xen/include/xsm/dummy.h +2 more+219 -18 replies
8/10privcmd: Add definition for new Linux privcmd to access new Xen hypercalltools/include/xen-sys/Linux/privcmd.h+10 -00 replies
9/10libs/guest: use new hypercall if availabletools/libs/guest/xg_sr_common.c+38 -90 replies

Reviews trailers per patch

3 of 9 patches have a Reviewed-by or Acked-by.

PatchAnthony PERARD
1/10R-b
2/10R-b
3/10R-b
4/10
5/10
6/10
7/10
8/10
9/10

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v10 thread

Cover letter [PATCH v10 0/10] xenguest optimisations

Reduce number of allocations sending memory state.

Implement and use new Xen and Linux kernel ABI to copy foreign memory. This new ABI allows to replace the expensive map/copy/unmap sequence with a single call.

Changes since v1:
- add commit to cache up to 4 pages in hypercall;
- add other 2 commits reducing chunks passed to write/writev.

Changes since v2:
- update patches commit prefixes;
- add other 2 optisations.

Changes since v3:
- address some comments;
- add patches for foreign copy optimisation.

Changes since v4:
- added Reviewed-by;
- improved commit messages;
- other minor fixes, see individual commits.

Changes since v5:
- avoids potential buffer underflow if nr_pages is 0 calling cache_alloc;
- do not overwrite errno if xenforeignmemory_map fails;
- lot of changes to "implement new foreign copy hypercall", see specific commit.

Changes since v6:
- removed merged patch;
- keep only optimization commits for now;
- improve comments;
- merged "fill directly iov structure collapsing them" and moved it;
- split "allocate various migration arrays just once";
- add a commit for memory checks using Valgrind.

Changes since v7:
- removed merged commits;
- minor style fixes.

Changes since v8:
- added Reviewed-by;
- remove useless check;
- remove useless memset;
- initialize variables while declaring them.

Changes since v9:
- add back commits for foreign copy;
- rework page permissions check;
- do not limit domain for new hypercall;
- add back some memory check using Valgrind and sanitizers;
- fixed compatibility for ARM;
- minor fixes.

Edwin Török (3):
libs/call: cache up to 4 pages in hypercall bounce buffers libs/guest: allocate various migration arrays just once libs/guest: use foreign copy API during migration

Frediano Ziglio (6):
libs/guest: move batch_pfns into a separate structure libs/guest: use Valgrind or sanitizers to detect various buffer
overflows
libs/guest: add xg_foreignmemory_copy_{from,to}
xen: implement new foreign copy hypercall
privcmd: Add definition for new Linux privcmd to access new Xen
hypercall
libs/guest: use new hypercall if available

 tools/config.h.in                     |   6 ++
 tools/configure                       |  12 +++
 tools/configure.ac                    |   3 +-
 tools/include/xen-sys/Linux/privcmd.h |  10 ++
 tools/libs/call/buffer.c              |  34 ++++--
 tools/libs/call/core.c                |   3 +-
 tools/libs/call/private.h             |   8 +-
 tools/libs/ctrl/xc_private.h          |  61 ++++++++++-
 tools/libs/guest/xg_sr_common.c       |  86 +++++++++++++++
 tools/libs/guest/xg_sr_common.h       |  25 ++++-
 tools/libs/guest/xg_sr_restore.c      |  78 +++++++-------
 tools/libs/guest/xg_sr_save.c         | 134 +++++++++++------------
 xen/common/memory.c                   | 149 ++++++++++++++++++++++++++
 xen/include/public/memory.h           |  45 +++++++-
 xen/include/xsm/dummy.h               |  14 +++
 xen/include/xsm/hooks.h               |   2 +
 xen/xsm/flask/hooks.c                 |  10 ++
 17 files changed, 552 insertions(+), 128 deletions(-)
Signature · 1 line
2.43.0