From: Halil Pasic <pasic@linux.vnet.ibm.com>
To: Thomas Huth <thuth@redhat.com>,
Boris Fiuczynski <fiuczy@linux.vnet.ibm.com>,
Cornelia Huck <cohuck@redhat.com>
Cc: Shalini Chellathurai Saroja <shalini@linux.vnet.ibm.com>,
qemu-devel@nongnu.org,
Christian Borntraeger <borntraeger@de.ibm.com>,
qemu-s390x@nongnu.org, Dong Jia Shi <bjsdjshi@linux.vnet.ibm.com>
Subject: Re: [Qemu-devel] [qemu-s390x] [PATCH 2/3] s390x/css: advertise unrestricted cssids
Date: Tue, 5 Dec 2017 11:08:18 +0100 [thread overview]
Message-ID: <c5a418db-a68b-52b6-7569-4b1bfd33dbbb@linux.vnet.ibm.com> (raw)
In-Reply-To: <012d3c95-a552-9bfb-38c4-f1bab1bea854@redhat.com>
On 12/05/2017 09:28 AM, Thomas Huth wrote:
> On 01.12.2017 15:31, Halil Pasic wrote:
>> Let us advertise the changes introduced by "s390x/css: unrestrict cssids"
>> to the management software (so it can tell are cssids unrestricted or
>> restricted).
>>
>> Signed-off-by: Halil Pasic <pasic@linux.vnet.ibm.com>
>> ---
>>
>> Boris says having the property on the virtual-css-bridge is good form
>> Libvirt PoV. @Shalini: could you verify that things work out fine
>> (provided we get at least a preliminary blessing from Connie).
>>
>> Consider squashing into "s390x/css: unrestrict cssids".
>> ---
>> hw/s390x/css-bridge.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/hw/s390x/css-bridge.c b/hw/s390x/css-bridge.c
>> index c4a9735d71..c7e8998680 100644
>> --- a/hw/s390x/css-bridge.c
>> +++ b/hw/s390x/css-bridge.c
>> @@ -123,6 +123,11 @@ static Property virtual_css_bridge_properties[] = {
>> DEFINE_PROP_END_OF_LIST(),
>> };
>>
>> +static bool prop_get_true(Object *obj, Error **errp)
>> +{
>> + return true;
>> +}
>> +
>> static void virtual_css_bridge_class_init(ObjectClass *klass, void *data)
>> {
>> HotplugHandlerClass *hc = HOTPLUG_HANDLER_CLASS(klass);
>> @@ -131,6 +136,12 @@ static void virtual_css_bridge_class_init(ObjectClass *klass, void *data)
>> hc->unplug = ccw_device_unplug;
>> set_bit(DEVICE_CATEGORY_BRIDGE, dc->categories);
>> dc->props = virtual_css_bridge_properties;
>> + object_class_property_add_bool(klass, "cssid-unrestricted",
>> + prop_get_true, NULL, NULL);
>> + object_class_property_set_description(klass, "cssid-unrestricted",
>> + "A css device can use any cssid, regardless whether virtual"
>> + " or not (read only, always true)",
>
> I'd maybe remove the "always true" in the description here, since that
> might create wrong assumptions with regards to future versions or lead
> to bad code in the upper layers. If someone reads "always true", they
> simply might omit the check of the value of this property. If we then
> ever want to change it to "false" again, we're in trouble (sure, we
> could simply completely remove the property again, but we have to
> remember to do that instead of setting it to false ... so let's better
> play safe right now already, ok?)
>
> Thomas
>
Libvirt intends to check for the existence of the property and ignore
it's value. I've been told in Libvirt capabilities are usually tied
to existence. For inspecting the value one would have to work on an
instance. I don't think that would work with Libvirt's capability
probing scheme well.
So what you describe is basically like intended. I was not to document
always true though, but then Connie had a version with always true
and I got convinced it ain't a bad idea. If both Connie and you agree
that 'always true' is to be dropped I'm fine with dropping it.
Thanks for the review!
Halil
next prev parent reply other threads:[~2017-12-05 10:08 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-01 14:31 [Qemu-devel] [PATCH 0/3] unrestrict cssids related patches Halil Pasic
2017-12-01 14:31 ` [Qemu-devel] [PATCH 1/3] s390x/css: unrestrict cssids Halil Pasic
2017-12-04 11:10 ` Cornelia Huck
2017-12-04 11:18 ` Christian Borntraeger
2017-12-04 15:02 ` Halil Pasic
2017-12-04 16:05 ` Cornelia Huck
2017-12-05 5:46 ` Dong Jia Shi
2017-12-01 14:31 ` [Qemu-devel] [PATCH 2/3] s390x/css: advertise unrestricted cssids Halil Pasic
2017-12-04 11:14 ` Christian Borntraeger
2017-12-04 11:15 ` Cornelia Huck
2017-12-04 15:07 ` Halil Pasic
2017-12-04 16:07 ` Cornelia Huck
2017-12-04 16:19 ` Halil Pasic
2017-12-05 5:49 ` Dong Jia Shi
2017-12-05 17:28 ` Shalini Chellathurai Saroja
2017-12-06 9:00 ` Cornelia Huck
2017-12-06 10:50 ` Halil Pasic
2017-12-05 8:28 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2017-12-05 10:08 ` Halil Pasic [this message]
2017-12-05 12:42 ` Cornelia Huck
2017-12-05 15:25 ` Thomas Huth
2017-12-01 14:31 ` [Qemu-devel] [PATCH 3/3] s390x: deprecate s390-squash-mcss machine prop Halil Pasic
2017-12-04 11:28 ` Cornelia Huck
2017-12-04 15:32 ` Halil Pasic
2017-12-04 16:11 ` Cornelia Huck
2017-12-05 7:43 ` Dong Jia Shi
2017-12-05 7:48 ` Dong Jia Shi
2017-12-05 12:13 ` Halil Pasic
2017-12-12 14:05 ` Dong Jia Shi
2017-12-12 14:20 ` Cornelia Huck
2017-12-05 8:41 ` [Qemu-devel] [qemu-s390x] " Thomas Huth
2017-12-05 12:05 ` Halil Pasic
2017-12-05 12:59 ` Cornelia Huck
2017-12-05 14:54 ` Eric Blake
2017-12-05 15:21 ` Halil Pasic
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=c5a418db-a68b-52b6-7569-4b1bfd33dbbb@linux.vnet.ibm.com \
--to=pasic@linux.vnet.ibm.com \
--cc=bjsdjshi@linux.vnet.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=fiuczy@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
--cc=qemu-s390x@nongnu.org \
--cc=shalini@linux.vnet.ibm.com \
--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).