* [Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc
@ 2018-07-12 9:32 Cornelia Huck
2018-07-12 9:33 ` [Qemu-devel] [PULL for-3.0 1/2] s390x/storage attributes: fix CMMA_BLOCK_SIZE usage Cornelia Huck
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Cornelia Huck @ 2018-07-12 9:32 UTC (permalink / raw)
To: Peter Maydell
Cc: Christian Borntraeger, Alexander Graf, Richard Henderson,
David Hildenbrand, Thomas Huth, qemu-s390x, qemu-devel,
Cornelia Huck
The following changes since commit c447afd5783b9237fa51b7a85777007d8d568bfc:
Update version for v3.0.0-rc0 release (2018-07-10 18:19:50 +0100)
are available in the Git repository at:
git://github.com/cohuck/qemu tags/s390x-20180712
for you to fetch changes up to 78dcf512efe72e211e6ca7783069364b01a1c05b:
error: Remove NULL checks on error_propagate() calls (2018-07-11 14:36:54 +0200)
----------------------------------------------------------------
- fix confusion around sizes in storage attribute migration
- remove NULL check on error_propagate() in virtio-ccw
----------------------------------------------------------------
Claudio Imbrenda (1):
s390x/storage attributes: fix CMMA_BLOCK_SIZE usage
Philippe Mathieu-Daudé (1):
error: Remove NULL checks on error_propagate() calls
hw/s390x/s390-stattrib-kvm.c | 3 ++-
hw/s390x/s390-stattrib.c | 5 +++--
hw/s390x/virtio-ccw.c | 4 +---
3 files changed, 6 insertions(+), 6 deletions(-)
--
2.14.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL for-3.0 1/2] s390x/storage attributes: fix CMMA_BLOCK_SIZE usage
2018-07-12 9:32 [Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc Cornelia Huck
@ 2018-07-12 9:33 ` Cornelia Huck
2018-07-12 9:33 ` [Qemu-devel] [PULL for-3.0 2/2] error: Remove NULL checks on error_propagate() calls Cornelia Huck
2018-07-12 13:59 ` [Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Cornelia Huck @ 2018-07-12 9:33 UTC (permalink / raw)
To: Peter Maydell
Cc: Christian Borntraeger, Alexander Graf, Richard Henderson,
David Hildenbrand, Thomas Huth, qemu-s390x, qemu-devel,
Claudio Imbrenda, Cornelia Huck
From: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
The macro CMMA_BLOCK_SIZE was defined but not used, and a hardcoded
value was instead used in the code.
This patch fixes the value of CMMA_BLOCK_SIZE and uses it in the
appropriate place in the code, and fixes another case of hardcoded
value in the KVM backend, replacing it with the more appropriate
constant KVM_S390_CMMA_SIZE_MAX.
Signed-off-by: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>
Message-Id: <1530787170-3101-1-git-send-email-imbrenda@linux.vnet.ibm.com>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
hw/s390x/s390-stattrib-kvm.c | 3 ++-
hw/s390x/s390-stattrib.c | 5 +++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c
index 480551c3db..c7e1f35524 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 5161a1659b..766f2015a4 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);
--
2.14.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [Qemu-devel] [PULL for-3.0 2/2] error: Remove NULL checks on error_propagate() calls
2018-07-12 9:32 [Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc Cornelia Huck
2018-07-12 9:33 ` [Qemu-devel] [PULL for-3.0 1/2] s390x/storage attributes: fix CMMA_BLOCK_SIZE usage Cornelia Huck
@ 2018-07-12 9:33 ` Cornelia Huck
2018-07-12 13:59 ` [Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Cornelia Huck @ 2018-07-12 9:33 UTC (permalink / raw)
To: Peter Maydell
Cc: Christian Borntraeger, Alexander Graf, Richard Henderson,
David Hildenbrand, Thomas Huth, qemu-s390x, qemu-devel,
Philippe Mathieu-Daudé, Cornelia Huck
From: Philippe Mathieu-Daudé <f4bug@amsat.org>
Patch created mechanically by rerunning:
$ spatch --sp-file scripts/coccinelle/error_propagate_null.cocci \
--macro-file scripts/cocci-macro-file.h \
--dir . --in-place
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Acked-by: Michael S. Tsirkin <mst@redhat.com>
Message-Id: <20180705155811.20366-3-f4bug@amsat.org>
Signed-off-by: Cornelia Huck <cohuck@redhat.com>
---
hw/s390x/virtio-ccw.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/hw/s390x/virtio-ccw.c b/hw/s390x/virtio-ccw.c
index b92a85d0b0..7ddb378d52 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)
--
2.14.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc
2018-07-12 9:32 [Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc Cornelia Huck
2018-07-12 9:33 ` [Qemu-devel] [PULL for-3.0 1/2] s390x/storage attributes: fix CMMA_BLOCK_SIZE usage Cornelia Huck
2018-07-12 9:33 ` [Qemu-devel] [PULL for-3.0 2/2] error: Remove NULL checks on error_propagate() calls Cornelia Huck
@ 2018-07-12 13:59 ` Peter Maydell
2 siblings, 0 replies; 4+ messages in thread
From: Peter Maydell @ 2018-07-12 13:59 UTC (permalink / raw)
To: Cornelia Huck
Cc: Christian Borntraeger, Alexander Graf, Richard Henderson,
David Hildenbrand, Thomas Huth, qemu-s390x, QEMU Developers
On 12 July 2018 at 10:32, Cornelia Huck <cohuck@redhat.com> wrote:
> The following changes since commit c447afd5783b9237fa51b7a85777007d8d568bfc:
>
> Update version for v3.0.0-rc0 release (2018-07-10 18:19:50 +0100)
>
> are available in the Git repository at:
>
> git://github.com/cohuck/qemu tags/s390x-20180712
>
> for you to fetch changes up to 78dcf512efe72e211e6ca7783069364b01a1c05b:
>
> error: Remove NULL checks on error_propagate() calls (2018-07-11 14:36:54 +0200)
>
> ----------------------------------------------------------------
> - fix confusion around sizes in storage attribute migration
> - remove NULL check on error_propagate() in virtio-ccw
>
> ----------------------------------------------------------------
>
Applied, thanks.
-- PMM
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2018-07-12 13:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-12 9:32 [Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc Cornelia Huck
2018-07-12 9:33 ` [Qemu-devel] [PULL for-3.0 1/2] s390x/storage attributes: fix CMMA_BLOCK_SIZE usage Cornelia Huck
2018-07-12 9:33 ` [Qemu-devel] [PULL for-3.0 2/2] error: Remove NULL checks on error_propagate() calls Cornelia Huck
2018-07-12 13:59 ` [Qemu-devel] [PULL for-3.0 0/2] s390x changes for 3.0-rc Peter Maydell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).