Skip to content

x86/ept: batch PML type-changes into single locked region

Roger Pau Monne xen-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2x86/ept: move vmx_domain_flush_pml_buffers() to p2m-ept.cxen/arch/x86/hvm/vmx/vmcs.c xen/arch/x86/hvm/vmx/vmx.c xen/arch/x86/include/asm/hvm/vmx/vmcs.h +2 more+60 -591 reply
2/2x86/ept: batch PML p2m type-changes into single locked regionxen/arch/x86/mm/p2m-ept.c+11 -21 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchJan Beulich
1/2A-b
2/2R-b

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

Read the v1 thread

Cover letter [PATCH 0/2] x86/ept: batch PML type-changes into single locked region

Hello,

Following series attempts to batch PML related type-changes into a single locked region, so that the lock is not individually taken for each gfn that requires changing, and to also defer the EPT flush until all type-changes are done. Doing an EPT flush for each gfn changed is extremely wasteful

First patch moves the implementation of vmx_domain_flush_pml_buffers() into the EPT file, so it has access to the mm locking primitives. Patch 2 introduces p2m locking around the type change loop.

PML related code is already split between EPT and VMX, it could certainly do with some cleanup. The patch here doesn't make things better, but I don't think it makes them any worse either.

Thanks, Roger.

Roger Pau Monne (2):
x86/ept: move vmx_domain_flush_pml_buffers() to p2m-ept.c x86/ept: batch PML p2m type-changes into single locked region

 xen/arch/x86/hvm/vmx/vmcs.c             | 59 +---------------------
 xen/arch/x86/hvm/vmx/vmx.c              |  2 +-
 xen/arch/x86/include/asm/hvm/vmx/vmcs.h |  1 -
 xen/arch/x86/include/asm/hvm/vmx/vmx.h  |  1 +
 xen/arch/x86/mm/p2m-ept.c               | 65 +++++++++++++++++++++++++
 5 files changed, 69 insertions(+), 59 deletions(-)
Signature · 1 line
2.49.0