From: David Hildenbrand <david@redhat.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
Cornelia Huck <cohuck@redhat.com>
Cc: Richard Henderson <rth@twiddle.net>,
Alexander Graf <agraf@suse.de>,
Yi Min Zhao <zyimin@linux.vnet.ibm.com>,
Halil Pasic <pasic@linux.vnet.ibm.com>,
qemu-devel <qemu-devel@nongnu.org>,
"Jason J . Herne" <jjherne@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [PATCH/RFC 2/3] s390x/ais: enable ais when migration is available
Date: Tue, 26 Sep 2017 14:33:25 +0200 [thread overview]
Message-ID: <5e73fb8d-c7da-712b-ab09-711a8aee7f35@redhat.com> (raw)
In-Reply-To: <c5533414-dc10-d0c9-cd42-634dce064fa1@de.ibm.com>
On 26.09.2017 14:29, Christian Borntraeger wrote:
>
>
> On 09/26/2017 02:23 PM, David Hildenbrand wrote:
>> On 22.09.2017 10:38, Christian Borntraeger wrote:
>>> Instead of unconditionally enabling the KVM AIS capability
>>> in the kvm arch init function, do this in the flic realize function
>>> when we know if migration is available. This requires to initialize
>>> flic before the CPUs.
>>>
>>> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
>>> ---
>>> hw/intc/s390_flic.c | 11 +++++++++--
>>> hw/intc/s390_flic_kvm.c | 8 +++++++-
>>> hw/s390x/s390-virtio-ccw.c | 8 ++++++--
>>> include/hw/s390x/s390_flic.h | 1 +
>>> target/s390x/cpu_models.c | 6 ++++++
>>> target/s390x/kvm.c | 8 +-------
>>> 6 files changed, 30 insertions(+), 12 deletions(-)
>>>
>>> diff --git a/hw/intc/s390_flic.c b/hw/intc/s390_flic.c
>>> index 6eaf178..08040fe 100644
>>> --- a/hw/intc/s390_flic.c
>>> +++ b/hw/intc/s390_flic.c
>>> @@ -1,7 +1,7 @@
>>> /*
>>> * QEMU S390x floating interrupt controller (flic)
>>> *
>>> - * Copyright 2014 IBM Corp.
>>> + * Copyright 2014,2017 IBM Corp.
>>> * Author(s): Jens Freimann <jfrei@linux.vnet.ibm.com>
>>> * Cornelia Huck <cornelia.huck@de.ibm.com>
>>> *
>>> @@ -49,6 +49,13 @@ void s390_flic_init(void)
>>> qdev_init_nofail(dev);
>>> }
>>>
>>> +void s390_flic_enable_ais(void)
>>> +{
>>> + S390FLICState *fs = s390_get_flic();
>>> +
>>> + fs->ais_supported = true;
>>
>> Can we simply replace all ais_supported checks by
>> s390_has_feat(S390_FEAT_ADAPTER_INT_SUPPRESSION) and drop ais_supported?
>
> No, at flic realize, the CPU model is not available yet. And if we move cpumodel
> before flic then we cannot check the flic attributes so the CPU will not know if
> ais is available or not.
>
We should we need that at realize time?
realize() simply inits flic and unlocks the CPU feature if
KVM_HAS_DEVICE_ATTR works.
What am I missing?
--
Thanks,
David
next prev parent reply other threads:[~2017-09-26 12:33 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-22 8:38 [Qemu-devel] [PATCH/RFC 0/3] ais fixups for 2.11 Christian Borntraeger
2017-09-22 8:38 ` [Qemu-devel] [PATCH/RFC 1/3] s390x/ais: disable ais facility as it is broken Christian Borntraeger
2017-09-26 12:01 ` David Hildenbrand
2017-09-22 8:38 ` [Qemu-devel] [PATCH/RFC 2/3] s390x/ais: enable ais when migration is available Christian Borntraeger
2017-09-22 12:13 ` Pierre Morel
2017-09-22 12:40 ` Christian Borntraeger
2017-09-22 13:49 ` Cornelia Huck
2017-09-22 14:02 ` Pierre Morel
2017-09-22 14:07 ` Christian Borntraeger
2017-09-22 14:27 ` Halil Pasic
2017-09-25 10:07 ` Cornelia Huck
2017-09-25 10:12 ` Christian Borntraeger
2017-09-25 11:45 ` Cornelia Huck
2017-09-25 11:47 ` Christian Borntraeger
2017-09-26 9:14 ` Yi Min Zhao
2017-09-26 13:04 ` Boris Fiuczynski
2017-09-22 14:38 ` Pierre Morel
2017-09-26 12:23 ` David Hildenbrand
2017-09-26 12:29 ` Christian Borntraeger
2017-09-26 12:33 ` David Hildenbrand [this message]
2017-09-26 12:33 ` Christian Borntraeger
2017-09-22 8:38 ` [Qemu-devel] [PATCH/RFC 3/3] s390x/ais: disable ais for compat machines Christian Borntraeger
2017-09-26 12:26 ` David Hildenbrand
2017-09-26 12:45 ` Christian Borntraeger
2017-09-26 13:00 ` David Hildenbrand
2017-09-26 13:32 ` Christian Borntraeger
2017-09-26 13:43 ` Cornelia Huck
2017-09-26 13:45 ` Christian Borntraeger
2017-09-22 11:27 ` [Qemu-devel] [PATCH/RFC 0/3] ais fixups for 2.11 Christian Borntraeger
2017-09-22 13:08 ` Christian Borntraeger
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=5e73fb8d-c7da-712b-ab09-711a8aee7f35@redhat.com \
--to=david@redhat.com \
--cc=agraf@suse.de \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=jjherne@linux.vnet.ibm.com \
--cc=pasic@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=rth@twiddle.net \
--cc=zyimin@linux.vnet.ibm.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).