[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 03/11] s390x/migration: Storage attributes devic
From: |
Thomas Huth |
Subject: |
Re: [Qemu-devel] [PATCH 03/11] s390x/migration: Storage attributes device |
Date: |
Thu, 13 Jul 2017 09:35:51 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.2.0 |
On 13.07.2017 09:11, Christian Borntraeger wrote:
> Thanks for the review, all valid. Claudio has provided me the following fixup.
>
> I plan to fold that in the base patch (retest pending).
>
> Christian
>
>
> ---
> hw/s390x/s390-stattrib-kvm.c | 26 +++++++++++++++++++-------
> hw/s390x/s390-stattrib.c | 12 +++---------
> include/hw/s390x/storage-attributes.h | 9 +++++++++
> 3 files changed, 31 insertions(+), 16 deletions(-)
>
> diff --git a/hw/s390x/s390-stattrib-kvm.c b/hw/s390x/s390-stattrib-kvm.c
> index 2e7f144..2ab3060 100644
> --- a/hw/s390x/s390-stattrib-kvm.c
> +++ b/hw/s390x/s390-stattrib-kvm.c
> @@ -11,7 +11,6 @@
>
> #include "qemu/osdep.h"
> #include "hw/boards.h"
> -#include "qmp-commands.h"
> #include "migration/qemu-file.h"
> #include "hw/s390x/storage-attributes.h"
> #include "qemu/error-report.h"
> @@ -19,6 +18,15 @@
> #include "exec/ram_addr.h"
> #include "cpu.h"
>
> +Object *kvm_s390_stattrib_create(void)
> +{
> + if (kvm_enabled() &&
> + kvm_check_extension(kvm_state, KVM_CAP_S390_CMMA_MIGRATION))
> {
> + return object_new(TYPE_KVM_S390_STATTRIB);
> + }
> + return object_new(TYPE_QEMU_S390_STATTRIB);
> +}
I think you could also return NULL here instead of
object_new(TYPE_QEMU_S390_STATTRIB) since ...
> diff --git a/hw/s390x/s390-stattrib.c b/hw/s390x/s390-stattrib.c
> index b9533b4..bac9aea 100644
> --- a/hw/s390x/s390-stattrib.c
> +++ b/hw/s390x/s390-stattrib.c
> @@ -40,16 +40,10 @@ void s390_stattrib_init(void)
> {
> Object *obj;
>
> -#ifdef CONFIG_KVM
> - if (kvm_enabled() &&
> - kvm_check_extension(kvm_state, KVM_CAP_S390_CMMA_MIGRATION)) {
> - obj = object_new(TYPE_KVM_S390_STATTRIB);
> - } else {
> + obj = kvm_s390_stattrib_create();
> + if (!obj) {
> obj = object_new(TYPE_QEMU_S390_STATTRIB);
> }
... the object will be created here, too.
Thomas
- [Qemu-devel] [PATCH 08/11] s390x/flic: introduce modify_ais_mode callback, (continued)
[Qemu-devel] [PATCH 03/11] s390x/migration: Storage attributes device, Christian Borntraeger, 2017/07/12
[Qemu-devel] [PATCH 04/11] s390x/migration: Monitor commands for storage attributes, Christian Borntraeger, 2017/07/12
[Qemu-devel] [PATCH 05/11] s390x/cpumodel: clean up spacing and comments, Christian Borntraeger, 2017/07/12
[Qemu-devel] [PATCH 11/11] s390x/css: update css_adapter_interrupt, Christian Borntraeger, 2017/07/12
Re: [Qemu-devel] [PATCH 11/11] s390x/css: update css_adapter_interrupt, Cornelia Huck, 2017/07/13
Re: [Qemu-devel] [PATCH 00/11] pending s390 patches part 1, Cornelia Huck, 2017/07/12