Received: from eggs.gnu.org ([2001:4830:134:3::10]:43415) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYx8s-0007rF-To for qemu-devel@nongnu.org; Tue, 30 Sep 2014 09:07:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XYx8n-0005Dd-N9 for qemu-devel@nongnu.org; Tue, 30 Sep 2014 09:06:58 -0400 Received: from blu004-omc1s29.hotmail.com ([65.55.116.40]:62992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XYx8n-0005Cw-JK for qemu-devel@nongnu.org; Tue, 30 Sep 2014 09:06:53 -0400 Message-ID: From: Gonglei References: <1412046159-5144-1-git-send-email-arei.gonglei@huawei.com> <20140930113528.GE7089@redhat.com> In-Reply-To: <20140930113528.GE7089@redhat.com> Date: Tue, 30 Sep 2014 21:05:53 +0800 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Content-Language: zh-cn Subject: Re: [Qemu-devel] [PATCH v4 0/5] add description field in ObjectProperty and PropertyInfo struct List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: "'Michael S. Tsirkin'" , arei.gonglei@huawei.com Cc: weidong.huang@huawei.com, stefanha@redhat.com, luonengjun@huawei.com, qemu-devel@nongnu.org, armbru@redhat.com, aliguori@amazon.com, pbonzini@redhat.com, peter.huangpeng@huawei.com, lcapitulino@redhat.com, afaerber@suse.de > Subject: Re: [Qemu-devel] [PATCH v4 0/5] add description field in > ObjectProperty and PropertyInfo struct > > On Tue, Sep 30, 2014 at 11:02:34AM +0800, arei.gonglei@huawei.com wrote: > > From: Gonglei > > > > This patch series based on qom-next tree: > > https://github.com/afaerber/qemu-cpu/commits/qom-next > > > > Add a description field in both ObjectProperty and PropertyInfo struct. > > The descriptions can serve as documentation in the code, > > and they can be used to provide better help. For example: > > > > Before this patch series: > > > > $./qemu-system-x86_64 -device virtio-blk-pci,? > > > > virtio-blk-pci.iothread=link > > virtio-blk-pci.x-data-plane=bool > > virtio-blk-pci.scsi=bool > > virtio-blk-pci.config-wce=bool > > virtio-blk-pci.serial=str > > virtio-blk-pci.secs=uint32 > > virtio-blk-pci.heads=uint32 > > virtio-blk-pci.cyls=uint32 > > virtio-blk-pci.discard_granularity=uint32 > > virtio-blk-pci.bootindex=int32 > > virtio-blk-pci.opt_io_size=uint32 > > virtio-blk-pci.min_io_size=uint16 > > virtio-blk-pci.physical_block_size=uint16 > > virtio-blk-pci.logical_block_size=uint16 > > virtio-blk-pci.drive=str > > virtio-blk-pci.virtio-backend=child > > virtio-blk-pci.command_serr_enable=on/off > > virtio-blk-pci.multifunction=on/off > > virtio-blk-pci.rombar=uint32 > > virtio-blk-pci.romfile=str > > virtio-blk-pci.addr=pci-devfn > > virtio-blk-pci.event_idx=on/off > > virtio-blk-pci.indirect_desc=on/off > > virtio-blk-pci.vectors=uint32 > > virtio-blk-pci.ioeventfd=on/off > > virtio-blk-pci.class=uint32 > > > > After: > > > > $./qemu-system-x86_64 -device virtio-blk-pci,? > > > > virtio-blk-pci.iothread=link > > virtio-blk-pci.x-data-plane=bool (on/off) > > virtio-blk-pci.scsi=bool (on/off) > > virtio-blk-pci.config-wce=bool (on/off) > > virtio-blk-pci.serial=str > > virtio-blk-pci.secs=uint32 > > virtio-blk-pci.heads=uint32 > > virtio-blk-pci.cyls=uint32 > > virtio-blk-pci.discard_granularity=uint32 > > virtio-blk-pci.bootindex=int32 > > virtio-blk-pci.opt_io_size=uint32 > > virtio-blk-pci.min_io_size=uint16 > > virtio-blk-pci.physical_block_size=uint16 (A power of two between 512 and > 32768) > > virtio-blk-pci.logical_block_size=uint16 (A power of two between 512 and > 32768) > > virtio-blk-pci.drive=str (ID of a drive to use as a backend) > > virtio-blk-pci.virtio-backend=child > > virtio-blk-pci.command_serr_enable=bool (on/off) > > virtio-blk-pci.multifunction=bool (on/off) > > virtio-blk-pci.rombar=uint32 > > virtio-blk-pci.romfile=str > > virtio-blk-pci.addr=int32 (Slot and function number, example: 06.0) > > Weird. 06.0 is clearly not an int, is it? > > > virtio-blk-pci.event_idx=bool (on/off) > > virtio-blk-pci.indirect_desc=bool (on/off) > > virtio-blk-pci.vectors=uint32 > > virtio-blk-pci.ioeventfd=bool (on/off) > > virtio-blk-pci.class=uint32 > > BTW, any way we can find out and report default values > as well? E.g. > virtio-blk-pci.indirect_desc=bool (on/off) default:on > I think qom-get is the only way at present. :) > This idea should not block this patch of course. > Best regards, -Gonglei