qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Christian Borntraeger <borntraeger@de.ibm.com>
To: Thomas Huth <thuth@redhat.com>, qemu-devel <qemu-devel@nongnu.org>
Cc: Claudio Imbrenda <imbrenda@linux.vnet.ibm.com>,
	Cornelia Huck <cohuck@redhat.com>, Alexander Graf <agraf@suse.de>,
	Richard Henderson <rth@twiddle.net>
Subject: Re: [Qemu-devel] [PATCH 03/11] s390x/migration: Storage attributes device
Date: Thu, 13 Jul 2017 09:45:52 +0200	[thread overview]
Message-ID: <05677519-ff4e-9dd7-2bcb-d01a5e4782bb@de.ibm.com> (raw)
In-Reply-To: <0445c2d0-c810-8d1e-4075-8251eb79a166@redhat.com>

On 07/13/2017 09:35 AM, Thomas Huth wrote:
> 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 ...

Yes, I like return NULL better so that we do not create the QEMU one
in *kvm.c. Will also fixup. thanks
> 
>> 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
> 

  reply	other threads:[~2017-07-13  7:46 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-12 12:57 [Qemu-devel] [PATCH 00/11] pending s390 patches part 1 Christian Borntraeger
2017-07-12 12:57 ` [Qemu-devel] [PATCH 01/11] s390x/kvm: Rework cmma management Christian Borntraeger
2017-07-12 13:49   ` Cornelia Huck
2017-07-13  5:37     ` Janosch Frank
2017-07-12 12:57 ` [Qemu-devel] [PATCH 02/11] linux-headers: update to 4.13-rc0 Christian Borntraeger
2017-07-12 12:57 ` [Qemu-devel] [PATCH 03/11] s390x/migration: Storage attributes device Christian Borntraeger
2017-07-12 14:09   ` Thomas Huth
2017-07-13  7:11     ` Christian Borntraeger
2017-07-13  7:32       ` Cornelia Huck
2017-07-13  7:35       ` Thomas Huth
2017-07-13  7:45         ` Christian Borntraeger [this message]
2017-07-12 12:57 ` [Qemu-devel] [PATCH 04/11] s390x/migration: Monitor commands for storage attributes Christian Borntraeger
2017-07-12 12:57 ` [Qemu-devel] [PATCH 05/11] s390x/cpumodel: clean up spacing and comments Christian Borntraeger
2017-07-12 12:57 ` [Qemu-devel] [PATCH 06/11] s390x/cpumodel: provide compat handling for new cpu features Christian Borntraeger
2017-07-12 14:51   ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 07/11] s390x: add flags field for registering I/O adapter Christian Borntraeger
2017-07-12 15:00   ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 08/11] s390x/flic: introduce modify_ais_mode callback Christian Borntraeger
2017-07-12 15:07   ` Cornelia Huck
2017-07-13  7:12     ` Christian Borntraeger
2017-07-13  7:27       ` Cornelia Huck
2017-07-13  7:35         ` Christian Borntraeger
2017-07-13  7:47           ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 09/11] s390x/flic: introduce inject_airq callback Christian Borntraeger
2017-07-12 15:12   ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 10/11] s390x/sic: realize SIC handling Christian Borntraeger
2017-07-12 13:40   ` Thomas Huth
2017-07-12 15:40     ` Cornelia Huck
2017-07-12 12:57 ` [Qemu-devel] [PATCH 11/11] s390x/css: update css_adapter_interrupt Christian Borntraeger
2017-07-12 14:26   ` Thomas Huth
2017-07-13  8:08     ` Christian Borntraeger
2017-07-13  8:18       ` Thomas Huth
2017-07-13  8:46   ` Cornelia Huck
2017-07-12 13:31 ` [Qemu-devel] [PATCH 00/11] pending s390 patches part 1 Cornelia Huck

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05677519-ff4e-9dd7-2bcb-d01a5e4782bb@de.ibm.com \
    --to=borntraeger@de.ibm.com \
    --cc=agraf@suse.de \
    --cc=cohuck@redhat.com \
    --cc=imbrenda@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    --cc=thuth@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).