]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Move WARN on invalid memslot index to update_memslots()
authorMaciej S. Szmigiero <maciej.szmigiero@oracle.com>
Mon, 6 Dec 2021 19:54:26 +0000 (20:54 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 Dec 2021 09:24:31 +0000 (04:24 -0500)
commitd1faa90e623ca5eaea95fec48d6f16034dd2be9e
tree80c0cbcc57bc7b25f49cf027ce2477196d66b49c
parent923f0bf58006ec19adabc1773d4e39e0fd64b31a
KVM: Move WARN on invalid memslot index to update_memslots()

Since kvm_memslot_move_forward() can theoretically return a negative
memslot index even when kvm_memslot_move_backward() returned a positive one
(and so did not WARN) let's just move the warning to the common code.

Signed-off-by: Maciej S. Szmigiero <maciej.szmigiero@oracle.com>
Reviewed-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
Reviewed-by: Sean Christopherson <seanjc@google.com>
Message-Id: <eeed890ccb951e7b0dce15bc170eb2661d5b02da.1638817640.git.maciej.szmigiero@oracle.com>
virt/kvm/kvm_main.c