From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:37181) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF0NR-0006Ny-4W for qemu-devel@nongnu.org; Tue, 03 Apr 2012 05:50:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SF0NK-0004wo-Va for qemu-devel@nongnu.org; Tue, 03 Apr 2012 05:50:12 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59013) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SF0NK-0004vo-NA for qemu-devel@nongnu.org; Tue, 03 Apr 2012 05:50:06 -0400 Message-ID: <4F7AC7CA.5080102@redhat.com> Date: Tue, 03 Apr 2012 11:50:02 +0200 From: Paolo Bonzini MIME-Version: 1.0 References: <1333376921-13834-1-git-send-email-i.mitsyanko@samsung.com> <1333376921-13834-7-git-send-email-i.mitsyanko@samsung.com> <4F7A1298.70507@samsung.com> <4F7AB66B.6010903@samsung.com> In-Reply-To: <4F7AB66B.6010903@samsung.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: i.mitsyanko@samsung.com Cc: qemu-devel@nongnu.org Il 03/04/2012 10:35, Igor Mitsyanko ha scritto: > I think there's no point in preserving BlockDriverState along with > SDState when we eject image from slot. Just drive_add()-drive_init() it > when user inserts image and drive_put_ref() when user ejects image. Note that the BlockDriverState currently cannot be changed without deleting whatever device holds it (qdev properties can only be set at construction time). > As a user I would prefer to use > "qom-set /my-board/slot0.image /home/dodo/my_sd.img" rather then > "qom-set /my-board/cortex-a20/sdhc0/card.image /home/dod/my_sd.img". You can use partial paths: qom-set sdhc0/card /home/dod/my_sd.img More precisely, that would be something like # Add a block device pointing to the file blockdev-add my_sd file=/home/dod/my_sd.img # Point the drive property to it qom-set sdhc0/card drive=my_sd The alternative would be something like this: # Add a block device pointing to the file blockdev-add my_sd file=/home/dod/my_sd.img # Make it visible as an SD card # my_sd = parent path # card = property name # sd = class name qom-add my_sd card sd # Point the host controller to the newly-created card qom-set sdhc0 card=my_sd/card > Anyway, sdhc/child is the best decision for now I think.. Yes, agreed. Paolo