From: Paolo Bonzini <pbonzini@redhat.com>
To: i.mitsyanko@samsung.com
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object
Date: Tue, 03 Apr 2012 11:50:02 +0200 [thread overview]
Message-ID: <4F7AC7CA.5080102@redhat.com> (raw)
In-Reply-To: <4F7AB66B.6010903@samsung.com>
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
prev parent reply other threads:[~2012-04-03 9:50 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-02 14:28 [Qemu-devel] [PATCH 0/6] SD save/load support and SD qomification Igor Mitsyanko
2012-04-02 14:28 ` [Qemu-devel] [PATCH 1/6] hw/sd.c: convert wp_groups in SDState to bitfield Igor Mitsyanko
2012-04-02 14:42 ` Peter Maydell
2012-04-02 20:17 ` Igor Mitsyanko
2012-04-02 14:28 ` [Qemu-devel] [PATCH 2/6] hw/sd.c: convert binary variables to bool Igor Mitsyanko
2012-04-02 16:32 ` Peter Maydell
2012-04-02 14:28 ` [Qemu-devel] [PATCH 3/6] hw/sd.c: make sd_dataready() return bool Igor Mitsyanko
2012-04-02 16:33 ` Peter Maydell
2012-04-02 14:28 ` [Qemu-devel] [PATCH 4/6] hw/sd.c: make sd_wp_addr() " Igor Mitsyanko
2012-04-02 14:28 ` [Qemu-devel] [PATCH 5/6] hw/sd.c: add SD card save/load support Igor Mitsyanko
2012-04-02 16:55 ` Peter Maydell
2012-04-02 14:28 ` [Qemu-devel] [PATCH 6/6] hw/sd.c: convert to QOM object Igor Mitsyanko
2012-04-02 16:48 ` Peter Maydell
2012-04-02 19:48 ` Paolo Bonzini
2012-04-02 20:56 ` Igor Mitsyanko
2012-04-02 20:11 ` Peter Maydell
2012-04-02 21:02 ` Paolo Bonzini
2012-04-03 8:35 ` Igor Mitsyanko
2012-04-03 9:50 ` Paolo Bonzini [this message]
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=4F7AC7CA.5080102@redhat.com \
--to=pbonzini@redhat.com \
--cc=i.mitsyanko@samsung.com \
--cc=qemu-devel@nongnu.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.