All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/13] KVM: guest_memfd fixes
@ 2023-09-21 20:33 Sean Christopherson
  2023-09-21 20:33 ` [PATCH 01/13] KVM: Assert that mmu_invalidate_in_progress *never* goes negative Sean Christopherson
                   ` (13 more replies)
  0 siblings, 14 replies; 23+ messages in thread
From: Sean Christopherson @ 2023-09-21 20:33 UTC (permalink / raw)
  To: Sean Christopherson, Paolo Bonzini
  Cc: kvm, linux-kernel, Michael Roth, Binbin Wu

Fix a variety of bugs in the guest_memfd series, almost all of which are
my fault, and add assertions and testcases to detect future regressions.

The last patch, renaming guest_mem.c to guest_memfd.c, is obviously not a
bug fix, I included it here so that if we want to go with guest_memfd.c,
squashing everything will be straightforward.

Note, the truncate fix and test conflicts with Isaku's series[*].  My
fix is more correct (knock wood), and my test is slightly more comprehensive
(though arguably not really all that more interesting).

Note #2, this is based on kvm-x86/guest_memfd, to which I force-pushed v12.

Note #3, the patches are organized so that they can be squashed with their
Fixes, i.e. the splits are more than a bit odd in some places.

[*] https://lore.kernel.org/all/cover.1695327124.git.isaku.yamahata@intel.com

Sean Christopherson (13):
  KVM: Assert that mmu_invalidate_in_progress *never* goes negative
  KVM: Actually truncate the inode when doing PUNCH_HOLE for guest_memfd
  KVM: WARN if *any* MMU invalidation sequence doesn't add a range
  KVM: WARN if there are danging MMU invalidations at VM destruction
  KVM: Fix MMU invalidation bookkeeping in guest_memfd
  KVM: Disallow hugepages for incompatible gmem bindings, but let 'em
    succeed
  KVM: x86/mmu: Track PRIVATE impact on hugepage mappings for all
    memslots
  KVM: x86/mmu: Zap shared-only memslots when private attribute changes
  KVM: Always add relevant ranges to invalidation set when changing
    attributes
  KVM: x86/mmu: Drop repeated add() of to-be-invalidated range
  KVM: selftests: Refactor private mem conversions to prep for
    punch_hole test
  KVM: selftests: Add a "pure" PUNCH_HOLE on guest_memfd testcase
  KVM: Rename guest_mem.c to guest_memfd.c

 arch/x86/kvm/mmu/mmu.c                        |  25 ++--
 .../kvm/x86_64/private_mem_conversions_test.c | 112 ++++++++++++++----
 virt/kvm/Makefile.kvm                         |   2 +-
 virt/kvm/{guest_mem.c => guest_memfd.c}       |  84 +++++++------
 virt/kvm/kvm_main.c                           |  40 +++++--
 5 files changed, 184 insertions(+), 79 deletions(-)
 rename virt/kvm/{guest_mem.c => guest_memfd.c} (92%)


base-commit: 7af66fbd6d89b159acc359895449b5940b6e4fdb
-- 
2.42.0.515.g380fc7ccd1-goog


^ permalink raw reply	[flat|nested] 23+ messages in thread

end of thread, other threads:[~2023-10-02 16:49 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-21 20:33 [PATCH 00/13] KVM: guest_memfd fixes Sean Christopherson
2023-09-21 20:33 ` [PATCH 01/13] KVM: Assert that mmu_invalidate_in_progress *never* goes negative Sean Christopherson
2023-09-21 20:33 ` [PATCH 02/13] KVM: Actually truncate the inode when doing PUNCH_HOLE for guest_memfd Sean Christopherson
2023-09-21 20:33 ` [PATCH 03/13] KVM: WARN if *any* MMU invalidation sequence doesn't add a range Sean Christopherson
2023-09-21 20:33 ` [PATCH 04/13] KVM: WARN if there are danging MMU invalidations at VM destruction Sean Christopherson
2023-09-27  3:16   ` Binbin Wu
2023-09-28 18:11     ` Sean Christopherson
2023-09-21 20:33 ` [PATCH 05/13] KVM: Fix MMU invalidation bookkeeping in guest_memfd Sean Christopherson
2023-09-21 20:33 ` [PATCH 06/13] KVM: Disallow hugepages for incompatible gmem bindings, but let 'em succeed Sean Christopherson
2023-09-22 22:42   ` Michael Roth
2023-09-28 18:31     ` Sean Christopherson
2023-10-02 15:53       ` Michael Roth
2023-10-02 16:49         ` Sean Christopherson
2023-09-21 20:33 ` [PATCH 07/13] KVM: x86/mmu: Track PRIVATE impact on hugepage mappings for all memslots Sean Christopherson
2023-09-27  6:01   ` Binbin Wu
2023-09-27 14:25     ` Sean Christopherson
2023-09-21 20:33 ` [PATCH 08/13] KVM: x86/mmu: Zap shared-only memslots when private attribute changes Sean Christopherson
2023-09-21 20:33 ` [PATCH 09/13] KVM: Always add relevant ranges to invalidation set when changing attributes Sean Christopherson
2023-09-21 20:33 ` [PATCH 10/13] KVM: x86/mmu: Drop repeated add() of to-be-invalidated range Sean Christopherson
2023-09-21 20:33 ` [PATCH 11/13] KVM: selftests: Refactor private mem conversions to prep for punch_hole test Sean Christopherson
2023-09-21 20:33 ` [PATCH 12/13] KVM: selftests: Add a "pure" PUNCH_HOLE on guest_memfd testcase Sean Christopherson
2023-09-21 20:33 ` [PATCH 13/13] KVM: Rename guest_mem.c to guest_memfd.c Sean Christopherson
2023-09-29  2:22 ` [PATCH 00/13] KVM: guest_memfd fixes Sean Christopherson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.