Home
last modified time | relevance | path

Searched hist:"97 daa028f3f621adff2c4f7b15fe0874e5b5bd6c" (Results 1 – 1 of 1) sorted by relevance

/linux/arch/s390/kvm/
H A Dkvm-s390.cdiff 97daa028f3f621adff2c4f7b15fe0874e5b5bd6c Wed Apr 08 08:40:59 CEST 2020 Sean Christopherson <sean.j.christopherson@intel.com> KVM: s390: Return last valid slot if approx index is out-of-bounds

Return the index of the last valid slot from gfn_to_memslot_approx() if
its binary search loop yielded an out-of-bounds index. The index can
be out-of-bounds if the specified gfn is less than the base of the
lowest memslot (which is also the last valid memslot).

Note, the sole caller, kvm_s390_get_cmma(), ensures used_slots is
non-zero.

Fixes: afdad61615cc3 ("KVM: s390: Fix storage attributes migration with memory slots")
Cc: stable@vger.kernel.org # 4.19.x: 0774a964ef56: KVM: Fix out of range accesses to memslots
Cc: stable@vger.kernel.org # 4.19.x
Signed-off-by: Sean Christopherson <sean.j.christopherson@intel.com>
Message-Id: <20200408064059.8957-3-sean.j.christopherson@intel.com>
Reviewed-by: Cornelia Huck <cohuck@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>