All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v10 0/10] xenguest optimisations
@ 2026-08-10 10:30 Frediano Ziglio
  2026-08-10 10:30 ` [PATCH v10 1/10] libs/call: cache up to 4 pages in hypercall bounce buffers Frediano Ziglio
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Frediano Ziglio @ 2026-08-10 10:30 UTC (permalink / raw)
  To: xen-devel
  Cc: Frediano Ziglio, Jan Beulich, Andrew Cooper, Roger Pau Monné,
	Teddy Astie, Anthony PERARD, Juergen Gross

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

-- 
2.43.0



^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-08-10 10:31 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-10 10:30 [PATCH v10 0/10] xenguest optimisations Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 1/10] libs/call: cache up to 4 pages in hypercall bounce buffers Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 2/10] libs/guest: move batch_pfns into a separate structure Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 3/10] libs/guest: allocate various migration arrays just once Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 4/10] libs/guest: use Valgrind or sanitizers to detect various buffer overflows Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 5/10] libs/guest: add xg_foreignmemory_copy_{from,to} Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 6/10] libs/guest: use foreign copy API during migration Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 7/10] xen: implement new foreign copy hypercall Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 8/10] privcmd: Add definition for new Linux privcmd to access new Xen hypercall Frediano Ziglio
2026-08-10 10:30 ` [PATCH v10 9/10] libs/guest: use new hypercall if available Frediano Ziglio
2026-08-10 10:30 ` [PATCH Linux v6 10/10] xen/privcmd: Add new ABI to allow copying foreign memory Frediano Ziglio

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.