]> git.proxmox.com Git - mirror_qemu.git/commit
s390x: fix storage attributes migration for non-small guests
authorClaudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Thu, 18 Jan 2018 17:51:44 +0000 (18:51 +0100)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Mon, 29 Jan 2018 14:28:08 +0000 (08:28 -0600)
commite7857ad9975400ef4a35237a92e21bc3c6bfd464
tree2fbb2b74c2e5fc998526c44ef177661e43dec3cd
parent9327a8e2d639370960c1dc3e11ff5d9c2b26174c
s390x: fix storage attributes migration for non-small guests

Fix storage attribute migration so that it does not fail for guests
with more than a few GB of RAM.
With such guests, the index in the buffer would go out of bounds,
usually by large amounts, thus receiving -EFAULT from the kernel.
Migration itself would be successful, but storage attributes would then
not be migrated completely.

This patch fixes the out of bounds access, and thus migration of all
storage attributes when the guest have large amounts of memory.

Cc: qemu-stable@nongnu.org
Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Fixes: 903fd80b03243476 ("s390x/migration: Storage attributes device")
Message-Id: <1516297904-18188-1-git-send-email-imbrenda@linux.vnet.ibm.com>
Reviewed-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
(cherry picked from commit 46fa893355e0bd88f3c59b886f0d75cbd5f0bbbe)
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
hw/s390x/s390-stattrib-kvm.c