Skip to content

x86: refactor mm.c: page APIs and hypercalls

Wei Liu xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 Latest11 patches 1 replyIn review

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/11x86: add pv_ prefix to {alloc, free}_page_typexen/arch/x86/domain.c xen/arch/x86/mm.c xen/include/asm-x86/mm.h+9 -90 replies
2/11x86/mm: export more get/put page functionsxen/arch/x86/mm.c xen/include/asm-x86/mm.h+35 -220 replies
3/11x86/mm: move and add pv_ prefix to create_pae_xen_mappingsxen/arch/x86/mm.c xen/arch/x86/pv/mm.c xen/arch/x86/pv/mm.h+50 -420 replies
4/11x86/mm: move disallow_mask variable and macrosxen/arch/x86/mm.c xen/include/asm-x86/mm.h+20 -180 replies
5/11x86/mm: move pv_{alloc, free}_page_typexen/arch/x86/domain.c xen/arch/x86/mm.c xen/arch/x86/pv/mm.c +2 more+504 -4950 replies
6/11x86/mm: move and add pv_ prefix to invalidate_shadow_ldtxen/arch/x86/mm.c xen/arch/x86/pv/mm.c xen/include/asm-x86/pv/mm.h+43 -400 replies
7/11x86/mm: move PV hypercalls to pv/mm-hypercalls.cxen/arch/x86/mm.c xen/arch/x86/pv/Makefile xen/arch/x86/pv/mm-hypercalls.c+1531 -14960 replies
8/11x86/mm: remove the now unused inclusion of pv/mm.hxen/arch/x86/mm.c+0 -20 replies
9/11x86/mm: use put_page_type_preemptible in put_page_from_l{2, 3}exen/arch/x86/mm.c+2 -40 replies
10/11x86/mm: move {get, put}_page_from_l{2, 3, 4}exen/arch/x86/mm.c xen/arch/x86/pv/mm.c xen/include/asm-x86/mm.h +1 more+275 -2630 replies
11/11x86/mm: move description of x86 page table API to pv/mm.cxen/arch/x86/mm.c xen/arch/x86/pv/mm.c+65 -650 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH v3 extra 00/11] x86: refactor mm.c: page APIs and hypercalls

This series is built on top of the "easy part" [0] (and rebased on top of current staging).

After discussing with George and Andrew on IRC, it is clear that alloc_page_type and free_page_type are only useful for PV guests. This immediately enables us to move them and the supporting code to PV directory.

Note that in the stubs I choose to return EINVAL but maybe we should just BUG() there because those paths aren't supposed to be taken when !CONFIG_PV. And I'm sure common code will BUG_ON() or BUG() sooner or later. Thoughts?

PV MMU hypercalls are moved to mm-hypercalls.c to avoid having a very huge pv/mm.c.

Cc Jan Beulich <[email protected]>
Cc Andrew Cooper <[email protected]>
Cc George Dunlap <[email protected]>

Wei Liu (11):
x86: add pv_ prefix to {alloc,free}_page_type x86/mm: export more get/put page functions
x86/mm: move and add pv_ prefix to create_pae_xen_mappings x86/mm: move disallow_mask variable and macros x86/mm: move pv_{alloc,free}_page_type
x86/mm: move and add pv_ prefix to invalidate_shadow_ldt x86/mm: move PV hypercalls to pv/mm-hypercalls.c x86/mm: remove the now unused inclusion of pv/mm.h x86/mm: use put_page_type_preemptible in put_page_from_l{2,3}e x86/mm: move {get,put}_page_from_l{2,3,4}e
x86/mm: move description of x86 page table API to pv/mm.c

 xen/arch/x86/domain.c           |    3 +-
 xen/arch/x86/mm.c               | 3018 +++++----------------------------------
 xen/arch/x86/pv/Makefile        |    1 +
 xen/arch/x86/pv/mm-hypercalls.c | 1461 +++++++++++++++++++
 xen/arch/x86/pv/mm.c            |  877 ++++++++++++
 xen/arch/x86/pv/mm.h            |    6 +
 xen/include/asm-x86/mm.h        |   29 +-
 xen/include/asm-x86/pv/mm.h     |   45 +
 8 files changed, 2759 insertions(+), 2681 deletions(-)
 create mode 100644 xen/arch/x86/pv/mm-hypercalls.c
 create mode 100644 xen/arch/x86/pv/mm.h
Signature · 7 lines
2.11.0


_______________________________________________
Xen-devel mailing list
[email protected]
https://lists.xen.org/xen-devel