Add the kvm-x86 tree to all KVM x86 entries so that humans, bots, and everything in between can more easily find KVM x86 (and some broader KVM) patches that are targeted for the next kernel release, but haven't yet made their way to the main KVM tree. While the KVM x86 patch flow is documented in Documentation/process/maintainer-kvm-x86.rst, that's very much one-off documentation; random passersbys likely don't know it exists, and it's not suitable for any workflow that's at all automated. Reported-by: Yosry Ahmed Signed-off-by: Sean Christopherson --- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 5a8edbf2625f..64980c262893 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14163,6 +14163,7 @@ L: kvm@vger.kernel.org S: Supported P: Documentation/process/maintainer-kvm-x86.rst T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git +T: git https://github.com/kvm-x86/linux.git F: Documentation/process/maintainer-kvm-x86.rst F: arch/x86/include/asm/kvm* F: arch/x86/include/asm/svm.h @@ -14435,6 +14436,7 @@ M: Paolo Bonzini L: kvm@vger.kernel.org S: Supported T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git +T: git https://github.com/kvm-x86/linux.git F: arch/x86/kvm/hyperv.* F: arch/x86/kvm/kvm_onhyperv.* F: arch/x86/kvm/svm/hyperv.* @@ -14449,6 +14451,7 @@ M: Paolo Bonzini L: kvm@vger.kernel.org S: Supported T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git +T: git https://github.com/kvm-x86/linux.git F: arch/x86/kvm/xen.* L3MDEV -- 2.55.0.508.g3f0d502094-goog Extract the gmem function declarations out of kvm_mm.h and into a dedicated header, guest_memfd.h. This will allow creating a MAINTAINERS entry for guest_memfd without having to rely on content pattern matching. Reviewed-by: Ackerley Tng Acked-by: David Hildenbrand (Arm) Signed-off-by: Sean Christopherson --- virt/kvm/guest_memfd.c | 1 + virt/kvm/guest_memfd.h | 34 ++++++++++++++++++++++++++++++++++ virt/kvm/kvm_main.c | 1 + virt/kvm/kvm_mm.h | 27 --------------------------- 4 files changed, 36 insertions(+), 27 deletions(-) create mode 100644 virt/kvm/guest_memfd.h diff --git a/virt/kvm/guest_memfd.c b/virt/kvm/guest_memfd.c index 86690683b2fe..de2585539b25 100644 --- a/virt/kvm/guest_memfd.c +++ b/virt/kvm/guest_memfd.c @@ -9,6 +9,7 @@ #include #include "kvm_mm.h" +#include "guest_memfd.h" static struct vfsmount *kvm_gmem_mnt; diff --git a/virt/kvm/guest_memfd.h b/virt/kvm/guest_memfd.h new file mode 100644 index 000000000000..0f9c6f840838 --- /dev/null +++ b/virt/kvm/guest_memfd.h @@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __KVM_GUEST_MEMFD_H__ +#define __KVM_GUEST_MEMFD_H__ + +#include + +#ifdef CONFIG_KVM_GUEST_MEMFD +int kvm_gmem_init(struct module *module); +void kvm_gmem_exit(void); +int kvm_gmem_create(struct kvm *kvm, struct kvm_create_guest_memfd *args); +int kvm_gmem_bind(struct kvm *kvm, struct kvm_memory_slot *slot, + unsigned int fd, uoff_t offset); +void kvm_gmem_unbind(struct kvm_memory_slot *slot); +#else +static inline int kvm_gmem_init(struct module *module) +{ + return 0; +} +static inline void kvm_gmem_exit(void) {}; +static inline int kvm_gmem_bind(struct kvm *kvm, + struct kvm_memory_slot *slot, + unsigned int fd, uoff_t offset) +{ + WARN_ON_ONCE(1); + return -EIO; +} + +static inline void kvm_gmem_unbind(struct kvm_memory_slot *slot) +{ + WARN_ON_ONCE(1); +} +#endif /* CONFIG_KVM_GUEST_MEMFD */ + +#endif /* __KVM_GUEST_MEMFD_H__ */ diff --git a/virt/kvm/kvm_main.c b/virt/kvm/kvm_main.c index e44c20c04961..a2f67623e60a 100644 --- a/virt/kvm/kvm_main.c +++ b/virt/kvm/kvm_main.c @@ -56,6 +56,7 @@ #include "coalesced_mmio.h" #include "async_pf.h" +#include "guest_memfd.h" #include "kvm_mm.h" #include "vfio.h" diff --git a/virt/kvm/kvm_mm.h b/virt/kvm/kvm_mm.h index 7510ca915dd1..c65cfdb14f1c 100644 --- a/virt/kvm/kvm_mm.h +++ b/virt/kvm/kvm_mm.h @@ -70,31 +70,4 @@ static inline void gfn_to_pfn_cache_invalidate_start(struct kvm *kvm, } #endif /* HAVE_KVM_PFNCACHE */ -#ifdef CONFIG_KVM_GUEST_MEMFD -int kvm_gmem_init(struct module *module); -void kvm_gmem_exit(void); -int kvm_gmem_create(struct kvm *kvm, struct kvm_create_guest_memfd *args); -int kvm_gmem_bind(struct kvm *kvm, struct kvm_memory_slot *slot, - unsigned int fd, uoff_t offset); -void kvm_gmem_unbind(struct kvm_memory_slot *slot); -#else -static inline int kvm_gmem_init(struct module *module) -{ - return 0; -} -static inline void kvm_gmem_exit(void) {}; -static inline int kvm_gmem_bind(struct kvm *kvm, - struct kvm_memory_slot *slot, - unsigned int fd, uoff_t offset) -{ - WARN_ON_ONCE(1); - return -EIO; -} - -static inline void kvm_gmem_unbind(struct kvm_memory_slot *slot) -{ - WARN_ON_ONCE(1); -} -#endif /* CONFIG_KVM_GUEST_MEMFD */ - #endif /* __KVM_MM_H__ */ -- 2.55.0.508.g3f0d502094-goog To better reflect how guest_memfd has been maintained for the last few years, and to prepare for significant upcoming growth and expansion, add a dedicated MAINTAINERS entry for KVM's guest_memfd, with Paolo and myself (Sean) as co-maintainers. List both the KVM and KVM x86 git trees as authoritative repositories, as any given guest_memfd change has a equal odds of hitting KVM x86 or not. Signed-off-by: Sean Christopherson --- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 64980c262893..0e2f441314a1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14412,6 +14412,15 @@ S: Maintained F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml F: drivers/video/backlight/ktz8866.c +KVM GUEST_MEMFD +M: Sean Christopherson +M: Paolo Bonzini +L: kvm@vger.kernel.org +S: Supported +T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git +T: git https://github.com/kvm-x86/linux.git +F: virt/kvm/guest_memfd.* + KVM PARAVIRT (KVM/paravirt) M: Paolo Bonzini R: Vitaly Kuznetsov -- 2.55.0.508.g3f0d502094-goog Officially "reward" David with guest_memfd responsibilities and authority, as he's been instrumental in pushing guest_memfd forward, and his ongoing input and feedback, especially from an mm/ perspective, is and will be critical to keeping us virtualization folks from going too far off the rails. Cc: David Hildenbrand Acked-by: David Hildenbrand (Arm) Signed-off-by: Sean Christopherson --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 0e2f441314a1..6c79bb25522f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14415,6 +14415,7 @@ F: drivers/video/backlight/ktz8866.c KVM GUEST_MEMFD M: Sean Christopherson M: Paolo Bonzini +R: David Hildenbrand L: kvm@vger.kernel.org S: Supported T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git -- 2.55.0.508.g3f0d502094-goog Add myself as a reviewer for overall KVM, as I have been helping shepherd a decent chunk of the virt/kvm commits into the kernel over the last few years, and I expect to continue doing so. Of the 270 non-merge commits that have been made to virt/kvm since v6.6, I have committed 127 (~47%) and Paolo has committed 117 (~43.3%), with all but 5 of the remaining 26 coming from non-KVM folks, e.g. from treewide changes. Note, this intended to purely be an efficiency and quality of life improvement, for both contributors and myself. There is no implied right of succession or anything of the sort. Cc: Marc Zyngier Cc: Oliver Upton Cc: Tianrui Zhao Cc: Bibo Mao Cc: Huacai Chen Cc: Anup Patel Cc: Christian Borntraeger Cc: Janosch Frank Cc: Claudio Imbrenda Signed-off-by: Sean Christopherson --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index 6c79bb25522f..556ccf640516 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14047,6 +14047,7 @@ F: kernel/umh.c KERNEL VIRTUAL MACHINE (KVM) M: Paolo Bonzini +R: Sean Christopherson L: kvm@vger.kernel.org S: Supported W: http://www.linux-kvm.org -- 2.55.0.508.g3f0d502094-goog