From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWMvi-00044u-IX for qemu-devel@nongnu.org; Tue, 23 Sep 2014 06:02:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XWMva-0000gp-Mg for qemu-devel@nongnu.org; Tue, 23 Sep 2014 06:02:42 -0400 Received: from mx1.redhat.com ([209.132.183.28]:56684) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XWMva-0000g1-E8 for qemu-devel@nongnu.org; Tue, 23 Sep 2014 06:02:34 -0400 From: Markus Armbruster References: <1410792279-2488-1-git-send-email-arei.gonglei@huawei.com> <20140922083421.GA13006@redhat.com> <541FE889.3050209@redhat.com> <33183CC9F5247A488A2544077AF1902086DD90B3@SZXEMA503-MBS.china.huawei.com> <541FF3F9.5060705@redhat.com> <33183CC9F5247A488A2544077AF1902086DD915A@SZXEMA503-MBS.china.huawei.com> <542010CE.3010209@redhat.com> <20140922123419.GA7992@redhat.com> <54201C35.1090502@redhat.com> <33183CC9F5247A488A2544077AF1902086DD991C@SZXEMA503-MBS.china.huawei.com> <542131D1.8050806@redhat.com> Date: Tue, 23 Sep 2014 11:13:41 +0200 In-Reply-To: <542131D1.8050806@redhat.com> (Paolo Bonzini's message of "Tue, 23 Sep 2014 10:39:45 +0200") Message-ID: <87d2amu2be.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH 0/3] Fix confused output for alias properties List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Paolo Bonzini Cc: "Huangweidong (C)" , "aliguori@amazon.com" , "Michael S. Tsirkin" , "qemu-devel@nongnu.org" , "Huangpeng (Peter)" , "agraf@suse.de" , "Gonglei (Arei)" , "stefanha@redhat.com" , "lcapitulino@redhat.com" Paolo Bonzini writes: > Il 23/09/2014 05:09, Gonglei (Arei) ha scritto: >> Hi, >> >>>>>>> This doesn't change the fact that ObjectProperty is a generic struct, >>>>>>> and adding alias-specific fields there is wrong. >>>>>> >>>>>> OK, Maybe I should find other ways to attach this purpose and >>>>>> avoid layering violation. Thanks! >>>>> >>>>> Unfortunately I cannot think of any. >>>>> >>>>> We could add a description field to ObjectProperty, and replace >>>>> legacy_name with a description. The output then would be >>>>> >>>>> virtio-blk.drive=str (drive) >> >> There is a question that the QOM properties are added dynamically. >> When we call qdev_alias_all_properties() adding alias properties to >> the source object all qdev properties on the target DeviceState, how do we >> judge the property's name and set the value of corresponding >> description field? >> Such as setting virtio-blk-pci.drive.description = "drive". > > You use the legacy_name field of PropertyInfo to set the description of > a qdev property, and then let object_property_add_alias() copy the > description. Gets us part of the way to what I described in my reply. I'm fine with that.