]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: s390: Use "new" memslot instead of userspace memory region
authorSean Christopherson <seanjc@google.com>
Mon, 6 Dec 2021 19:54:15 +0000 (20:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Dec 2021 09:24:23 +0000 (04:24 -0500)
commit46923d38f66aff8194b008074019d2033b35977c
tree45f0e7dc01211346ae42e4dc665614450f55744c
parentac2596d92bf4e610693c61ffc7cacbedcd3622cf
KVM: s390: Use "new" memslot instead of userspace memory region

Get the gfn, size, and hva from the new memslot instead of the userspace
memory region when preparing/committing memory region changes.  This will
allow a future commit to drop the @mem param.

Note, this has a subtle functional change as KVM would previously reject
DELETE if userspace provided a garbage userspace_addr or guest_phys_addr,
whereas KVM zeros those fields in the "new" memslot when deleting an
existing memslot.  Arguably the old behavior is more correct, but there's
zero benefit into requiring userspace to provide sane values for hva and
gfn.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Message-Id: <917ed131c06a4c7b35dd7fb7ed7955be899ad8cc.1638817639.git.maciej.szmigiero@oracle.com>
arch/s390/kvm/kvm-s390.c