Skip to content

Split large EPT mappings properly

Peter Feiner kvm 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest6 patches 1 replyIn review
  2. v26 patches 3 repliesSuperseded
  3. v15 patches 5 repliesSuperseded

Changes in v3 from the cover letter

* Added #define BITS_PER_LONG_LONG 64
* Fixed EPT_ADDR_MASK bit range
* Made EPT_ADDR_MASK unsigned long long

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6x86: vmx.h: trivial whitespace fixesx86/vmx.h+53 -540 replies
2/6lib: generic bitops.hlib/arm/asm/bitops.h lib/arm/asm/cpumask.h lib/arm/bitops.c +4 more+70 -101 reply
3/6x86: vmx: Named constant: EPT_ADDR_MASKx86/vmx.c x86/vmx.h+5 -30 replies
4/6x86: vmx: Named constant: EPT_LEVEL_SHIFTx86/vmx.c x86/vmx.h+7 -110 replies
5/6x86: vmx: split large EPTEs in install_ept_entryx86/vmx.c x86/vmx.h+41 -20 replies
6/6x86: vmx: don't explicitly split identity EPT mapx86/vmx_tests.c+0 -70 replies

Reviews trailers per patch

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

PatchAndrew Jones
1/6
2/6R-b
3/6
4/6
5/6
6/6

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

Read the v3 thread

Cover letter [kvm-unit-tests v3 0/6] Split large EPT mappings properly

install_ept_entry would overwrite arbitrary memory when it encountered a large page.

I discovered the bug while working on a simple multi-page allocator, which I'm using for huge page testing, that sorts the free list in ascending order of HPA.

v3:
* Added #define BITS_PER_LONG_LONG 64
* Fixed EPT_ADDR_MASK bit range
* Made EPT_ADDR_MASK unsigned long long

v2:
* Added lib/bitops.h for GENMASK.
* Factored common stuff out of lib/*/asm/bitops.h
* Fixed all of the whitespace in vmx.h.

Peter Feiner (6):
x86: vmx.h: trivial whitespace fixes
lib: generic bitops.h
x86: vmx: Named constant: EPT_ADDR_MASK
x86: vmx: Named constant: EPT_LEVEL_SHIFT
x86: vmx: split large EPTEs in install_ept_entry
x86: vmx: don't explicitly split identity EPT map

 lib/arm/asm/bitops.h   |   8 ++--
 lib/arm/asm/cpumask.h  |   2 +-
 lib/arm/bitops.c       |   2 +-
 lib/arm64/asm/bitops.h |   8 ++--
 lib/bitops.h           |  36 ++++++++++++++++
 lib/ppc64/asm/bitops.h |  10 +++++
 lib/x86/asm/bitops.h   |  14 +++++++
 x86/vmx.c              |  65 ++++++++++++++++++++++-------
 x86/vmx.h              | 111 +++++++++++++++++++++++++------------------------
 x86/vmx_tests.c        |   7 ----
 10 files changed, 176 insertions(+), 87 deletions(-)
 create mode 100644 lib/bitops.h
 create mode 100644 lib/ppc64/asm/bitops.h
 create mode 100644 lib/x86/asm/bitops.h
Signature · 1 line
2.7.0.rc3.207.g0ac5344