From: Anthony Liguori <aliguori@us.ibm.com>
To: kvm-ppc@vger.kernel.org
Subject: Re: [kvm-ppc-devel] [PATCH] kvm(ppc)-userspace: initialize
Date: Wed, 02 Apr 2008 14:52:53 +0000 [thread overview]
Message-ID: <47F39DC5.505@us.ibm.com> (raw)
In-Reply-To: <47F225D2.9020409@linux.vnet.ibm.com>
ehrhardt@linux.vnet.ibm.com wrote:
> From: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
>
> virtio-block support is atm initialized in qemu/hw/pc.c which is only called
> for the "standart pc" platform.
> In our case we need to call the virtio-block initialization from our platform
> init. It might be worth moving this initialization into a funvtion in
> virtio-block.c and only call that initializer from any platform init that
> supports virtio - any suggestions/preferences if we should do it now or when
> another architecture needs that - Anthony ?
>
I think it's fine the way it is. It's only a few lines and it's the way
that QEMU does things right now.
Regards,
Anthony Liguori
> This patch adds that initialization for the kvmppc bamboo platform.
>
> Signed-off-by: Christian Ehrhardt <ehrhardt@linux.vnet.ibm.com>
> ---
>
> [diffstat]
> ppc440_bamboo.c | 13 +++++++++++++
> 1 files changed, 13 insertions(+)
>
> diff --git a/qemu/hw/ppc440_bamboo.c b/qemu/hw/ppc440_bamboo.c
> --- a/qemu/hw/ppc440_bamboo.c
> +++ b/qemu/hw/ppc440_bamboo.c
> @@ -13,6 +13,7 @@
> #include "net.h"
> #include "hw.h"
> #include "pci.h"
> +#include "sysemu.h"
> #include "ppc440.h"
> #include "qemu-kvm.h"
> #include "device_tree.h"
> @@ -185,6 +186,18 @@ void bamboo_init(ram_addr_t ram_size, in
> pci_nic_init(pci->bus, nd, -1);
> }
>
> + /* Add virtio block devices */
> + if (pci) {
> + int index;
> + int unit_id = 0;
> +
> + while ((index = drive_get_index(IF_VIRTIO, 0, unit_id)) != -1) {
> + virtio_blk_init(pci->bus, 0x1AF4, 0x1001,
> + drives_table[index].bdrv);
> + unit_id++;
> + }
> + }
> +
> printf("%s: DONE\n", __func__);
> }
>
>
-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
kvm-ppc-devel mailing list
kvm-ppc-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/kvm-ppc-devel
prev parent reply other threads:[~2008-04-02 14:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-01 12:01 [kvm-ppc-devel] [PATCH] kvm(ppc)-userspace: initialize virtio-block ehrhardt
2008-04-01 12:08 ` [kvm-ppc-devel] [PATCH] kvm(ppc)-userspace: initialize Christian Ehrhardt
2008-04-01 14:33 ` [kvm-ppc-devel] [PATCH] kvm(ppc)-userspace: Hollis Blanchard
2008-04-01 14:46 ` [kvm-ppc-devel] [PATCH] kvm(ppc)-userspace: initialize Anthony Liguori
2008-04-01 16:13 ` [kvm-ppc-devel] booting from virtio-blk Hollis Blanchard
2008-04-01 17:05 ` Anthony Liguori
2008-04-01 17:09 ` Anthony Liguori
2008-04-01 20:36 ` Benjamin Herrenschmidt
2008-04-01 21:03 ` Anthony Liguori
2008-04-01 21:14 ` Benjamin Herrenschmidt
2008-04-01 21:18 ` Hollis Blanchard
2008-04-01 21:24 ` Benjamin Herrenschmidt
2008-04-02 14:52 ` Anthony Liguori [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=47F39DC5.505@us.ibm.com \
--to=aliguori@us.ibm.com \
--cc=kvm-ppc@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox