On Fri, 10 Jan 2025 16:20:17 -0800, Sean Christopherson wrote: > Cleanups related to kvm_set_memory_region(), salvaged from similar patches > that were flying around when we were sorting out KVM_SET_USER_MEMORY_REGION2. > > And, hopefully, the KVM-internal memslots hardening will also be useful for > s390's ucontrol stuff (https://lore.kernel.org/all/Z4FJNJ3UND8LSJZz@xxxxxxxxxx). > > v2: > - Keep check_memory_region_flags() where it is. [Xiaoyao] > - Rework the changelog for the last patch to account for the change in > motiviation. > - Fix double spaces goofs. [Tao] > - Add a lockdep assertion in the x86 code, too. [Tao] > > [...] Applied to kvm-x86 memslots, and pushed https://github.com/kvm-x86/linux tags/kvm-memslots-6.14 as well. Thanks much for the reviews! [1/5] KVM: Open code kvm_set_memory_region() into its sole caller (ioctl() API) https://github.com/kvm-x86/linux/commit/f81a6d12bf8b [2/5] KVM: Assert slots_lock is held when setting memory regions https://github.com/kvm-x86/linux/commit/d131f0042f46 [3/5] KVM: Add a dedicated API for setting KVM-internal memslots https://github.com/kvm-x86/linux/commit/156bffdb2b49 [4/5] KVM: x86: Drop double-underscores from __kvm_set_memory_region() https://github.com/kvm-x86/linux/commit/344315e93dbc [5/5] KVM: Disallow all flags for KVM-internal memslots https://github.com/kvm-x86/linux/commit/0cc3cb2151f9 -- https://github.com/kvm-x86/linux/tree/next