Skip to content

RFC x86/p2m: Some P2M refactoring

Teddy Astie xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest4 patches 8 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4x86/ept: Drop shadow mode check in ept_sync_domain()xen/arch/x86/mm/p2m-ept.c+3 -21 reply
2/4x86/shadow: Replace guest_tlb_flush_mask with sh_flush_tlb_maskxen/arch/x86/mm/shadow/common.c xen/arch/x86/mm/shadow/hvm.c xen/arch/x86/mm/shadow/multi.c +1 more+38 -221 reply
3/4x86/p2m-pt: Set p2m->need_flush if page was present beforexen/arch/x86/mm/p2m-pt.c xen/arch/x86/mm/p2m.c+7 -22 replies
4/4x86/hap: Migrate tlb flush logic to p2m->flush_tlbxen/arch/x86/flushtlb.c xen/arch/x86/include/asm/flushtlb.h xen/arch/x86/include/asm/p2m.h +5 more+7 -492 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchJan Beulich
1/4R-b
2/4
3/4
4/4

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

Read the v1 thread

Cover letter [RFC PATCH 0/4] x86/p2m: Some P2M refactoring

First patch removes a shadow mode check in a function that can't be called with shadow mode (only called with EPT hence HAP).

3 other patches drops guest_tlb_flush_mask by removing all its users :
in the shadow paging case by migrating it a shadow variant of it and in the hap case by moving it to p2m->flush_tlb logic.

One of the goal is to prepare adding HAP-specific optimizations to TLB flushing code without risking regressions in the shadow paging code.

Teddy Astie (4):
x86/ept: Drop shadow mode check in ept_sync_domain() x86/shadow: Replace guest_tlb_flush_mask with sh_flush_tlb_mask x86/p2m-pt: Set p2m->need_flush if page was present before x86/hap: Migrate tlb flush logic to p2m->flush_tlb

 xen/arch/x86/flushtlb.c             | 15 ---------------
 xen/arch/x86/include/asm/flushtlb.h |  3 ---
 xen/arch/x86/include/asm/p2m.h      |  3 ---
 xen/arch/x86/mm/hap/hap.c           | 14 +++-----------
 xen/arch/x86/mm/hap/nested_hap.c    |  7 +------
 xen/arch/x86/mm/nested.c            |  2 +-
 xen/arch/x86/mm/p2m-ept.c           |  5 +++--
 xen/arch/x86/mm/p2m-pt.c            | 13 +++++--------
 xen/arch/x86/mm/p2m.c               |  8 ++++----
 xen/arch/x86/mm/shadow/common.c     | 12 ++++++------
 xen/arch/x86/mm/shadow/hvm.c        |  8 ++++----
 xen/arch/x86/mm/shadow/multi.c      | 18 ++++++------------
 xen/arch/x86/mm/shadow/private.h    | 22 ++++++++++++++++++++++
 13 files changed, 55 insertions(+), 75 deletions(-)
Signature · 10 lines
2.51.2



--
Teddy Astie | Vates XCP-ng Developer

XCP-ng & Xen Orchestra - Vates solutions

web: https://vates.tech