Skip to content

fix preemption handling for XENMEM_add_to_physmap_range{, _range}

Jan Beulich xen-devel 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest5 patches 9 repliesIn review
  2. v24 patches 0 repliesSuperseded
  3. v14 patches 22 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5move XENMEM_add_to_physmap handling framework to common codexen/arch/arm/mm.c xen/arch/x86/mm.c xen/arch/x86/x86_64/compat/mm.c +3 more+268 -3263 replies
2/5fix XENMEM_add_to_physmap preemption handlingxen/common/compat/memory.c xen/common/memory.c+64 -641 reply
3/5move XENMEM_add_to_physmap_range handling framework to common codexen/arch/arm/mm.c xen/common/memory.c+186 -1861 reply
4/5fix XENMEM_add_to_physmap_range preemption handlingxen/common/memory.c+52 -281 reply
5/5rename XENMEM_add_to_physmap_{range => batch}xen/common/memory.c xen/include/public/arch-arm.h xen/include/public/memory.h+84 -723 replies

Reviews trailers per patch

All 5 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchTim DeeganKeir FraserIan Campbell
SeriesR-b A-b
1/5R-b R-b A-b A-b A-b
2/5R-b R-b A-b A-b A-b
3/5R-b R-b A-b A-b A-b
4/5R-b R-b A-b A-b A-b
5/5A-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 3 reviewers.

Read the v3 thread

Cover letter [PATCH v3 0/5] fix preemption handling for XENMEM_add_to_physmap_range{, _range}

The hypervisor isn't supposed to use the input structures for storing continuation information - only fields explicitly used as hypercall outputs should ever be updated.

Obviously this implies an ABI change, but since the previous behavior was not intended to be that way I don't think we should stick to the old behavior.

There's one caveat though - with the previous model, the caller could - upon failure - use the updated structure to find out how by progress was made. However, that wasn't intended afaict, largely supported by this information depending on hypervisor internals (i.e. the caller would have to know the order of request processing and the meaning of the respective size fields, which aren't simply saying "this much was processed").

Consequently, as a follow-up we may want to consider making explicit (and straight forward) this progress indication on error.

1: move XENMEM_add_to_physmap handling framework to common code 2: fix XENMEM_add_to_physmap preemption handling
3: move XENMEM_add_to_physmap_range handling framework to common code 4: fix XENMEM_add_to_physmap_range preemption handling
5: rename XENMEM_add_to_physmap_{range => batch}

---
v3: Retain restriction of XENMAPSPACE_gmfn_foreign not being
possible via XENMEM_add_to_physmap (patch 1). Apart from patch 5 being new, other patches unchanged .
v2: Apart from the removal of a bogus ASSERT() as requested
by Tim, only a couple minor/cosmetic changes (see individual patches), hence I'm retaining the tags that were already given for v1.