diff options
author | Peter Maydell <peter.maydell@linaro.org> | 2018-07-12 12:29:23 +0100 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2018-07-12 12:29:23 +0100 |
commit | ff82d3c73ec20d6f40e8bbfafe8ed5110bba5049 (patch) | |
tree | 3613b3317a26f609ea5246bc8a2345c02922cf33 | |
parent | 87130a0d43158f046873a7de7e1df45c45d6c8a8 (diff) | |
parent | 78dcf512efe72e211e6ca7783069364b01a1c05b (diff) | |
download | qemu-ff82d3c73ec20d6f40e8bbfafe8ed5110bba5049.zip qemu-ff82d3c73ec20d6f40e8bbfafe8ed5110bba5049.tar.gz qemu-ff82d3c73ec20d6f40e8bbfafe8ed5110bba5049.tar.bz2 |
Merge remote-tracking branch 'remotes/cohuck/tags/s390x-20180712' into staging
- fix confusion around sizes in storage attribute migration
- remove NULL check on error_propagate() in virtio-ccw
# gpg: Signature made Thu 12 Jul 2018 10:27:28 BST
# gpg: using RSA key DECF6B93C6F02FAF
# gpg: Good signature from "Cornelia Huck <conny@cornelia-huck.de>"
# gpg: aka "Cornelia Huck <huckc@linux.vnet.ibm.com>"
# gpg: aka "Cornelia Huck <cornelia.huck@de.ibm.com>"
# gpg: aka "Cornelia Huck <cohuck@kernel.org>"
# gpg: aka "Cornelia Huck <cohuck@redhat.com>"
# Primary key fingerprint: C3D0 D66D C362 4FF6 A8C0 18CE DECF 6B93 C6F0 2FAF
* remotes/cohuck/tags/s390x-20180712:
error: Remove NULL checks on error_propagate() calls
s390x/storage attributes: fix CMMA_BLOCK_SIZE usage
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
-rw-r--r-- | hw/s390x/s390-stattrib-kvm.c | 3 | ||||
-rw-r--r-- | hw/s390x/s390-stattrib.c | 5 | ||||
-rw-r--r-- | hw/s390x/virtio-ccw.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c index 480551c..c7e1f35 100644 --- a/hw/s390x/s390-stattrib-kvm.c +++ b/hw/s390x/s390-stattrib-kvm.c @@ -105,7 +105,8 @@ static void kvm_s390_stattrib_synchronize(S390StAttribState *sa) KVMS390StAttribState *sas = KVM_S390_STATTRIB(sa); MachineState *machine = MACHINE(qdev_get_machine()); unsigned long max = machine->maxram_size / TARGET_PAGE_SIZE; - unsigned long cx, len = 1 << 19; + /* We do not need to reach the maximum buffer size allowed */ + unsigned long cx, len = KVM_S390_SKEYS_MAX / 2; int r; struct kvm_s390_cmma_log clog = { .flags = 0, diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c index 5161a16..766f201 100644 --- a/hw/s390x/s390-stattrib.c +++ b/hw/s390x/s390-stattrib.c @@ -21,7 +21,8 @@ #include "qapi/error.h" #include "qapi/qmp/qdict.h" -#define CMMA_BLOCK_SIZE (1 * KiB) +/* 512KiB cover 2GB of guest memory */ +#define CMMA_BLOCK_SIZE (512 * KiB) #define STATTR_FLAG_EOS 0x01ULL #define STATTR_FLAG_MORE 0x02ULL @@ -203,7 +204,7 @@ static int cmma_save(QEMUFile *f, void *opaque, int final) S390StAttribClass *sac = S390_STATTRIB_GET_CLASS(sas); uint8_t *buf; int r, cx, reallen = 0, ret = 0; - uint32_t buflen = 1 << 19; /* 512kB cover 2GB of guest memory */ + uint32_t buflen = CMMA_BLOCK_SIZE; uint64_t start_gfn = sas->migration_cur_gfn; buf = g_try_malloc(buflen); diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c index b92a85d..7ddb378 100644 --- a/hw/s390x/virtio-ccw.c +++ b/hw/s390x/virtio-ccw.c @@ -1836,11 +1836,9 @@ static void vhost_vsock_ccw_realize(VirtioCcwDevice *ccw_dev, Error **errp) { VHostVSockCCWState *dev = VHOST_VSOCK_CCW(ccw_dev); DeviceState *vdev = DEVICE(&dev->vdev); - Error *err = NULL; qdev_set_parent_bus(vdev, BUS(&ccw_dev->bus)); - object_property_set_bool(OBJECT(vdev), true, "realized", &err); - error_propagate(errp, err); + object_property_set_bool(OBJECT(vdev), true, "realized", errp); } static void vhost_vsock_ccw_class_init(ObjectClass *klass, void *data) |