]> Git Repo - linux.git/commit
kvm: s390: Reject memory region operations for ucontrol VMs
authorChristoph Schlameuss <[email protected]>
Mon, 24 Jun 2024 09:59:02 +0000 (11:59 +0200)
committerJanosch Frank <[email protected]>
Thu, 4 Jul 2024 07:07:24 +0000 (09:07 +0200)
commit7816e58967d0e6cadce05c8540b47ed027dc2499
treec4de39745e80e7573fda393ee6c8b639726be169
parent33a729a1770b5e03b9dbc7ecb065ae7997b7544d
kvm: s390: Reject memory region operations for ucontrol VMs

This change rejects the KVM_SET_USER_MEMORY_REGION and
KVM_SET_USER_MEMORY_REGION2 ioctls when called on a ucontrol VM.
This is necessary since ucontrol VMs have kvm->arch.gmap set to 0 and
would thus result in a null pointer dereference further in.
Memory management needs to be performed in userspace and using the
ioctls KVM_S390_UCAS_MAP and KVM_S390_UCAS_UNMAP.

Also improve s390 specific documentation for KVM_SET_USER_MEMORY_REGION
and KVM_SET_USER_MEMORY_REGION2.

Signed-off-by: Christoph Schlameuss <[email protected]>
Fixes: 27e0393f15fc ("KVM: s390: ucontrol: per vcpu address spaces")
Reviewed-by: Claudio Imbrenda <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Janosch Frank <[email protected]>
[[email protected]: commit message spelling fix, subject prefix fix]
Message-ID: <20240624095902[email protected]>
Documentation/virt/kvm/api.rst
arch/s390/kvm/kvm-s390.c
This page took 0.060278 seconds and 4 git commands to generate.