MAINTAINERS: KVM tweaks and additions
Subsystems (2)
Sean Christopherson
maintainercover MAINTAINERS: KVM tweaks and additions
A few tangentially related KVM MAINTAINERS updates. RFC as I haven't run these ideas by anyone. Feedback is very much wanted, especially on the non-x86 changes (everything except patch 1).
Sean Christopherson (5):
MAINTAINERS: Add kvm-x86 tree to KVM x86 entries
KVM: guest_memfd: Move gmem function declarations to dedicated
guest_memfd.h
MAINTAINERS: Add an entry for KVM's guest_memfd
MAINTAINERS: Add David H. as a KVM guest_memfd reviewer
MAINTAINERS: Add myself (Sean) as a reviewer in the main KVM entry
MAINTAINERS | 14 ++++++++++++++ virt/kvm/guest_memfd.c | 1 + virt/kvm/guest_memfd.h | 34 ++++++++++++++++++++++++++++++++++ virt/kvm/kvm_main.c | 1 + virt/kvm/kvm_mm.h | 27 --------------------------- 5 files changed, 50 insertions(+), 27 deletions(-) create mode 100644 virt/kvm/guest_memfd.h
base-commit: 39f1c201b93f4ff71631bac72cff6eb155f976a4
Signature · 1 line
2.54.0.545.g6539524ca2-goog
Sean Christopherson
maintainerRFC PATCH 1/5 MAINTAINERS: Add kvm-x86 tree to KVM x86 entries
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.
--- MAINTAINERS | 3 +++ 1 file changed, 3 insertions(+)
MAINTAINERS +3 -0
@@ -14149,6 +14149,7 @@ L: [email protected] 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: arch/x86/include/asm/kvm* F: arch/x86/include/asm/svm.h F: arch/x86/include/asm/vmx*.h
@@ -14419,6 +14420,7 @@ M: Paolo Bonzini <[email protected]> L: [email protected] 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.*
@@ -14433,6 +14435,7 @@ M: Paolo Bonzini <[email protected]> L: [email protected] 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
Signature · 1 line
2.54.0.545.g6539524ca2-goog
Sean Christopherson
maintainerRFC PATCH 2/5 KVM: guest_memfd: Move gmem function declarations to dedicated guest_memfd.h
In reply to Sean ChristophersonExtract 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.
--- 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
virt/kvm/guest_memfd.c +1 -0
@@ -9,6 +9,7 @@#include <linux/pagemap.h> #include "kvm_mm.h" +#include "guest_memfd.h" static struct vfsmount *kvm_gmem_mnt;
virt/kvm/guest_memfd.h new file +34 -0
@@ -0,0 +1,34 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +#ifndef __KVM_GUEST_MEMFD_H__ +#define __KVM_GUEST_MEMFD_H__ + +#include <linux/kvm_types.h> + +#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,loff_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,loff_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__ */
virt/kvm/kvm_main.c +1 -0
@@ -56,6 +56,7 @@#include "coalesced_mmio.h" #include "async_pf.h" +#include "guest_memfd.h" #include "kvm_mm.h" #include "vfio.h"
virt/kvm/kvm_mm.h +0 -27
@@ -67,31 +67,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,loff_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,loff_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__ */
Signature · 1 line
2.54.0.545.g6539524ca2-goog
Re: [RFC PATCH 2/5] KVM: guest_memfd: Move gmem function declarations to dedicated guest_memfd.h
Quoted 6 lines · Sean Christopherson
Extract the gmem function declarations out of
kvm_mm.hand into a dedicated header,guest_memfd.h. This will allow creating aMAINTAINERSentry forguest_memfdwithout having to rely on content pattern matching.Signed-off-by Sean Christopherson <[email protected]>---
Signature · 3 lines
Cheers, David
Re: [RFC PATCH 2/5] KVM: guest_memfd: Move gmem function declarations to dedicated guest_memfd.h
In reply to Sean ChristophersonQuoted 4 lines · Sean Christopherson
Extract the gmem function declarations out of
kvm_mm.hand into a dedicated header,guest_memfd.h. This will allow creating aMAINTAINERSentry forguest_memfdwithout having to rely on content pattern matching.
This also trims kvm_mm.h, which makes it easier to look stuff up. Thanks!
Shall we do something similar for include/linux/kvm_host.h?
Quoted 12 lines
Signed-off-by Sean Christopherson <[email protected]>--- 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[...snip...]
Sean Christopherson
maintainerRe: [RFC PATCH 2/5] KVM: guest_memfd: Move gmem function declarations to dedicated guest_memfd.h
Quoted 11 lines · Ackerley Tng
Quoted 4 lines · Sean Christopherson
Extract the gmem function declarations out of
kvm_mm.hand into a dedicated header,guest_memfd.h. This will allow creating aMAINTAINERSentry forguest_memfdwithout having to rely on content pattern matching.This also trims
kvm_mm.h, which makes it easier to look stuff up. Thanks!Shall we do something similar for
include/linux/kvm_host.h?
LOL, we can try. :-)
Not for linux/kvm_host.h, but I've tried to carve up x86's asm/kvm_host.h on multiple occassions, and have failed miserably every time.
But linux/kvm_host.h is probably less intertwined? Though I think we should split out headers if and only if there's substantial .c content as well. E.g. if we add kvm_memslots.h, then I would also want kvm_memslots.c, because having a dedicated headers while leaving the vast majority of memslots code in the common kvm_main.c would be kludgy.
Sean Christopherson
maintainerRFC PATCH 3/5 MAINTAINERS: Add an entry for KVM's guest_memfd
In reply to Sean ChristophersonTo 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.
--- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+)
MAINTAINERS +9 -0
@@ -14396,6 +14396,15 @@ S: Maintained F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml F: drivers/video/backlight/ktz8866.c +KVM GUEST_MEMFD +M: Sean Christopherson <[email protected]> +M: Paolo Bonzini <[email protected]> +L: [email protected] +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 <[email protected]> R: Vitaly Kuznetsov <[email protected]>
Signature · 1 line
2.54.0.545.g6539524ca2-goog
David Hildenbrand (Arm)
reviewerRe: [RFC PATCH 3/5] MAINTAINERS: Add an entry for KVM's guest_memfd
Quoted 20 lines · Sean Christopherson
To better reflect how
guest_memfdhas been maintained for the last few years, and to prepare for significant upcoming growth and expansion, add a dedicatedMAINTAINERSentry for KVM'sguest_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_memfdchange has a equal odds of hitting KVM x86 or not.Signed-off-by Sean Christopherson <[email protected]>--- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+)MAINTAINERS +0
-0@@ -14396,6 +14396,15 @@ S: Maintained F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml F: drivers/video/backlight/ktz8866.c
MAINTAINERS S: Maintained · line 14407
Quoted 10 lines
MAINTAINERS +8
-0+KVM GUEST_MEMFD +M: Sean Christopherson <[email protected]> +M: Paolo Bonzini <[email protected]> +L: [email protected] +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.*
LGTM. There is still the open question regarding other hypervisors, and it having to move out of virt/kvm at some point.
For the time being, this is the right thing to do.
Signature · 3 lines
Cheers, David
Re: [RFC PATCH 3/5] MAINTAINERS: Add an entry for KVM's guest_memfd
In reply to Sean ChristophersonQuoted 19 lines · Sean Christopherson
To better reflect how
guest_memfdhas been maintained for the last few years, and to prepare for significant upcoming growth and expansion, add a dedicatedMAINTAINERSentry for KVM'sguest_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_memfdchange has a equal odds of hitting KVM x86 or not.Signed-off-by Sean Christopherson <[email protected]>--- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+)MAINTAINERS +0
-0@@ -14396,6 +14396,15 @@ S: Maintained F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml
MAINTAINERS S: Maintained · line 14406
Quoted 10 lines
MAINTAINERS +8
-0F: drivers/video/backlight/ktz8866.c +KVM GUEST_MEMFD +M: Sean Christopherson <[email protected]> +M: Paolo Bonzini <[email protected]> +L: [email protected] +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.*
Should selftests for guest_memfd be added here too?
Quoted 6 lines
MAINTAINERS +1
-1+ KVM PARAVIRT (KVM/paravirt) M: Paolo Bonzini <[email protected]> R: Vitaly Kuznetsov <[email protected]> --2.54.0.545.g6539524ca2-goog
Sean Christopherson
maintainerRe: [RFC PATCH 3/5] MAINTAINERS: Add an entry for KVM's guest_memfd
Quoted 23 lines · Ackerley Tng
Quoted 21 lines · Sean Christopherson
To better reflect how
guest_memfdhas been maintained for the last few years, and to prepare for significant upcoming growth and expansion, add a dedicatedMAINTAINERSentry for KVM'sguest_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_memfdchange has a equal odds of hitting KVM x86 or not.Signed-off-by Sean Christopherson <[email protected]>--- MAINTAINERS | 9 +++++++++ 1 file changed, 9 insertions(+)MAINTAINERS +0
-0@@ -14396,6 +14396,15 @@ S: Maintained F: Documentation/devicetree/bindings/leds/backlight/kinetic,ktz8866.yaml F: drivers/video/backlight/ktz8866.c
Quoted 10 lines
MAINTAINERS S: Maintained · line 14406
Quoted 8 lines
MAINTAINERS +8
-0+KVM GUEST_MEMFD +M: Sean Christopherson <[email protected]> +M: Paolo Bonzini <[email protected]> +L: [email protected] +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.*Should selftests for
guest_memfdbe added here too?
Hmm, no? I don't think I want to go to that level of granularity for selftests, at least not at this time. Maybe if we end up with a large collection of guest_memfd specific, arch-agnostic tests, then we could extend the entry? But even then, I don't think I want to go that route.
Much of the guest_memfd functionality and testing is in common files and/or arch-specific code, e.g. a lot of the truly core functionality is in lib/kvm_util.c, and set_memory_region_test.c and x86/private_mem_conversions_test.c have about as much guest_memfd testing as guest_memfd_test.c. I worry that adding a selftests clause to KVM GUEST_MEMFD would do more harm than good, e.g. create expectations that guest_memfd testing should be isolated and/or be reviewed differently or something, without actually making it easier to maintain the tests.
Sean Christopherson
maintainerRFC PATCH 4/5 MAINTAINERS: Add David H. as a KVM guest_memfd reviewer
In reply to Sean ChristophersonOfficially "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.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -14399,6 +14399,7 @@ F: drivers/video/backlight/ktz8866.c KVM GUEST_MEMFD M: Sean Christopherson <[email protected]> M: Paolo Bonzini <[email protected]> +R: David Hildenbrand <[email protected]> L: [email protected] S: Supported T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
Signature · 1 line
2.54.0.545.g6539524ca2-goog
Re: [RFC PATCH 4/5] MAINTAINERS: Add David H. as a KVM guest_memfd reviewer
Quoted 5 lines · Sean Christopherson
Officially "reward" David with
guest_memfdresponsibilities and authority, as he's been instrumental in pushingguest_memfdforward, and his ongoing input and feedback, especially from anmm/perspective, is and will be critical to keeping us virtualization folks from going too far off the rails.
Thanks for the kind words, Sean!
Quoted 19 lines
Cc David Hildenbrand <[email protected]>Signed-off-by Sean Christopherson <[email protected]>--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)MAINTAINERS +1
-0@@ -14399,6 +14399,7 @@ F: drivers/video/backlight/ktz8866.c KVM GUEST_MEMFD M: Sean Christopherson <[email protected]> M: Paolo Bonzini <[email protected]> +R: David Hildenbrand <[email protected]> L: [email protected] S: Supported T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git
Signature · 3 lines
Cheers, David
Re: [RFC PATCH 4/5] MAINTAINERS: Add David H. as a KVM guest_memfd reviewer
Quoted 11 lines · David Hildenbrand (Arm)
Quoted 5 lines · Sean Christopherson
Officially "reward" David with
guest_memfdresponsibilities and authority, as he's been instrumental in pushingguest_memfdforward, and his ongoing input and feedback, especially from anmm/perspective, is and will be critical to keeping us virtualization folks from going too far off the rails.Thanks for the kind words, Sean!
Thank you David!
Quoted 25 lines
Quoted 12 lines
Cc David Hildenbrand <[email protected]>Signed-off-by Sean Christopherson <[email protected]>--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)MAINTAINERS +0
-0MAINTAINERS F: drivers/video/backlight/ktz8866.c · line 14405
Quoted 7 lines
MAINTAINERS +1
-0@@ -14399,6 +14399,7 @@ F: drivers/video/backlight/ktz8866.c KVM GUEST_MEMFD M: Sean Christopherson <[email protected]> M: Paolo Bonzini <[email protected]> +R: David Hildenbrand <[email protected]> L: [email protected] S: Supported T: git git://git.kernel.org/pub/scm/virt/kvm/kvm.git--
Cheers,David
Sean Christopherson
maintainerRFC PATCH 5/5 MAINTAINERS: Add myself (Sean) as a reviewer in the main KVM entry
In reply to Sean ChristophersonAdd 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.
--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)
MAINTAINERS +1 -0
@@ -14034,6 +14034,7 @@ F: kernel/umh.c KERNEL VIRTUAL MACHINE (KVM) M: Paolo Bonzini <[email protected]> +R: Sean Christopherson <[email protected]> L: [email protected] S: Supported W: http://www.linux-kvm.org
Signature · 1 line
2.54.0.545.g6539524ca2-goog
David Hildenbrand (Arm)
reviewerRe: [RFC PATCH 5/5] MAINTAINERS: Add myself (Sean) as a reviewer in the main KVM entry
Quoted 30 lines · Sean Christopherson
Add myself as a reviewer for overall KVM, as I have been helping shepherd a decent chunk of the
virt/kvmcommits 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 tovirt/kvmsince 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 <[email protected]>Cc Oliver Upton <[email protected]>Cc Tianrui Zhao <[email protected]>Cc Bibo Mao <[email protected]>Cc Huacai Chen <[email protected]>Cc Anup Patel <[email protected]>Cc Christian Borntraeger <[email protected]>Cc Janosch Frank <[email protected]>Cc Claudio Imbrenda <[email protected]>Signed-off-by Sean Christopherson <[email protected]>--- MAINTAINERS | 1 + 1 file changed, 1 insertion(+)MAINTAINERS +0
-0
MAINTAINERS F: kernel/umh.c · line 14040
Quoted 7 lines
MAINTAINERS +1
-0@@ -14034,6 +14034,7 @@ F: kernel/umh.c KERNEL VIRTUAL MACHINE (KVM) M: Paolo Bonzini <[email protected]> +R: Sean Christopherson <[email protected]> L: [email protected] S: Supported W: http://www.linux-kvm.org
I believe any bigger subsystem should have a backup in place. If that's spelled out through an M or R depends on the subsystem.
Certainly LGTM, but if you would have made that an M, I would also not have been struck by surprise (up to you and Paolo to figure out) :)
Signature · 3 lines
Cheers, David