Skip to content

RCU related fix based on kvm-coco-queue.

Yan Zhao kvm lkml 1 version Applied

Status from this message: Queued to kvm-coco-queue.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2KVM: x86/tdp_mmu: Use rcu_dereference() to protect sptep for dereferencingarch/x86/kvm/mmu/spte.h arch/x86/kvm/mmu/tdp_mmu.c+5 -50 replies
2/2KVM: guest_memfd: Remove RCU-protected attribute from slot->gmem.fileinclude/linux/kvm_host.h virt/kvm/guest_memfd.c+11 -142 replies

Reviews trailers per patch

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

Read the v1 thread

Cover letter [PATCH 0/2] RCU related fix based on kvm-coco-queue.

Hi Paolo and Sean,

The two patches are fixups to RCU related issues reported by sparse.

Patch 1 was reported by kernel test robot related to dereference of
mirrored sptep.

Patch 2 was a result of running sparse locally with error message:
"error: incompatible types in comparison expression (different address spaces)" in kvm_gmem_get_file() and __kvm_gmem_get_pfn().

Initially, I wanted to fix it by using rcu_access_pointer() to fetch the rcu-protected pointer slot->gmem.file.

However, after further analysis, I think it's not necessary to rely on RCU to protect slot->gmem.file.

Please kindly take a look to see if they are appropriate.

Thanks
Yan

Rick Edgecombe (1):
KVM: x86/tdp_mmu: Use rcu_dereference() to protect sptep for
dereferencing

Yan Zhao (1):
KVM: guest_memfd: Remove RCU-protected attribute from slot->gmem.file

 arch/x86/kvm/mmu/spte.h    |  4 ++--
 arch/x86/kvm/mmu/tdp_mmu.c |  6 +++---
 include/linux/kvm_host.h   |  2 +-
 virt/kvm/guest_memfd.c     | 23 ++++++++++-------------
 4 files changed, 16 insertions(+), 19 deletions(-)

base-commit: 49c492a89914b02fa5011d9ea9848318c6c98dd9

Signature · 1 line
2.43.2