[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object
From: |
Paolo Bonzini |
Subject: |
Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object |
Date: |
Tue, 03 Apr 2012 11:50:02 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
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<card> is the best decision for now I think..
Yes, agreed.
Paolo
- Re: [Qemu-devel] [PATCH 2/6] hw/sd.c: convert binary variables to bool, (continued)
- [Qemu-devel] [PATCH 5/6] hw/sd.c: add SD card save/load support, Igor Mitsyanko, 2012/04/02
- [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object, Igor Mitsyanko, 2012/04/02
- Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object, Peter Maydell, 2012/04/02
- Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object, Paolo Bonzini, 2012/04/02
- Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object, Igor Mitsyanko, 2012/04/02
- Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object, Peter Maydell, 2012/04/02
- Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object, Paolo Bonzini, 2012/04/02
- Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object, Igor Mitsyanko, 2012/04/03
- Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object,
Paolo Bonzini <=
[Qemu-devel] [PATCH 4/6] hw/sd.c: make sd_wp_addr() return bool, Igor Mitsyanko, 2012/04/02
[Qemu-devel] [PATCH 1/6] hw/sd.c: convert wp_groups in SDState to bitfield, Igor Mitsyanko, 2012/04/02