All of lore.kernel.org
 help / color / mirror / Atom feed
From: Igor Mitsyanko <i.mitsyanko@samsung.com>
To: Paolo Bonzini <pbonzini@redhat.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 12:35:55 +0400	[thread overview]
Message-ID: <4F7AB66B.6010903@samsung.com> (raw)
In-Reply-To: <jld454$id2$1@dough.gmane.org>

On 04/03/2012 01:02 AM, Paolo Bonzini wrote:
> Il 02/04/2012 22:56, Igor Mitsyanko ha scritto:
>> 2) At first I made SD card child of SD host controller, but it most
>> certainly wrong, it should be a link.
>
> This is a bit thorny, because BlockDriverState exposes a slot and its
> medium, not just the medium (you can have an empty BDS, and that is not
> NULL).
>

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.

> I think the right place for the SD card would be a child of the block
> device, but as block devices are not qdevified, for now it can be left
> as a child of the host controller.
>
QOM tree is intended for user, right?  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".
Anyway, sdhc/child<card> is the best decision for now I think..

> The patch looks good, except that I would prefer to have wrappers for
> SD_GET_CLASS(foo)->method(args) in sd.h.  It would also make the patch
> much smaller.

OK, thanks.

-- 
Mitsyanko Igor
ASWG, Moscow R&D center, Samsung Electronics
email: i.mitsyanko@samsung.com

  reply	other threads:[~2012-04-03  8:36 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 [this message]
2012-04-03  9:50           ` Paolo Bonzini

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=4F7AB66B.6010903@samsung.com \
    --to=i.mitsyanko@samsung.com \
    --cc=pbonzini@redhat.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.