qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Alexander Graf <agraf@suse.de>,
	Wood Scott-B07421 <B07421@freescale.com>,
	"joerg.roedel@amd.com" <joerg.roedel@amd.com>,
	"qemu-devel@nongnu.org" <qemu-devel@nongnu.org>,
	"dwg@au1.ibm.com" <dwg@au1.ibm.com>,
	"blauwirbel@gmail.com" <blauwirbel@gmail.com>,
	Yoder Stuart-B08248 <B08248@freescale.com>,
	"alex.williamson@redhat.com" <alex.williamson@redhat.com>,
	"paul@codesourcery.com" <paul@codesourcery.com>,
	"armbru@redhat.com" <armbru@redhat.com>
Subject: Re: [Qemu-devel] device assignment for embedded Power
Date: Fri, 01 Jul 2011 07:10:45 -0500	[thread overview]
Message-ID: <4E0DB945.4070203@codemonkey.ws> (raw)
In-Reply-To: <1309481894.14501.230.camel@pasglop>

On 06/30/2011 07:58 PM, Benjamin Herrenschmidt wrote:
> On Thu, 2011-06-30 at 15:59 +0000, Yoder Stuart-B08248 wrote:
>>     This avoids needing to pass the host device tree, but could
>>     get awkward-- the i2c example above is very simple, some device
>>     nodes are very large with a complex hierarchy of subnodes and
>>     could be hundreds of lines of text to represent a single
>>     node.
>>
>> It gets more complicated...
>
>
> So, from a qemu command line perspective, all you should have to do is
> pass qemu the device-tree -path- to the device you want to pass-trough
> (you may support passing a full hierarchy here).

I agree in principle but I think it should be done in a slightly 
different way.

I think we ought to support composing a device by passthrough.  For 
instance, something like:

[physical-device "mydev"]
region[0].file = "/dev/mem"
region[0].guest_address = "0x42232000"
region[0].file_offset = "0x23423400"
region[0].size = "4096"
irq[0].guest_irq = "10"
irq[0].host_irq = "10"

This should be independent of anything to do with device tree.  This 
would be useful for x86 too to assign platform devices (like the HPET).

I think there should be a separate mechanism to manipulate the guest 
device tree, just like there are mechanisms to manipulate the guest's 
ACPI tables.

Given these two mechanisms, there should be a simple command line like 
Ben has suggested that just takes a host device tree path and Just 
Works.  It really is just a convenience interface though.

With raw mechanisms like I described above, it would give you the 
flexibility to pass through a device with a modified host tree fragment 
without having an overly complicated command line interface for the more 
common case.

Regards,

Anthony Liguori

  parent reply	other threads:[~2011-07-01 12:10 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-30 15:59 [Qemu-devel] device assignment for embedded Power Yoder Stuart-B08248
2011-07-01  0:58 ` Benjamin Herrenschmidt
2011-07-01 11:40   ` Alexander Graf
2011-07-01 12:13     ` Anthony Liguori
2011-07-01 12:10   ` Anthony Liguori [this message]
2011-07-01 12:52     ` Paul Brook
2011-07-01 13:33       ` Anthony Liguori
2011-07-01 16:43     ` Scott Wood
2011-07-01 17:03       ` Paul Brook
2011-07-01 17:49         ` Scott Wood
2011-07-01 20:59           ` Paul Brook
2011-07-01 21:51             ` Scott Wood
2011-07-01 23:33               ` Paul Brook
2011-07-01 23:05             ` Benjamin Herrenschmidt
2011-07-01 23:50               ` Paul Brook
2011-07-02  2:17                 ` Alexander Graf
2011-07-02 11:45                   ` Paul Brook
2011-07-01 22:35         ` Anthony Liguori
2011-07-01 22:32       ` Anthony Liguori
2011-07-05 18:16         ` Scott Wood
2011-07-01 16:34   ` Scott Wood
2011-07-05 18:19   ` Yoder Stuart-B08248
2011-07-05 22:23     ` Alexander Graf
2011-07-01 11:16 ` Paul Brook
2011-07-01 11:33   ` Alexander Graf
2011-07-01 11:55     ` Paul Brook
2011-07-01 12:02       ` Alexander Graf
2011-07-01 12:14         ` Anthony Liguori
2011-07-01 17:51   ` Scott Wood

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=4E0DB945.4070203@codemonkey.ws \
    --to=anthony@codemonkey.ws \
    --cc=B07421@freescale.com \
    --cc=B08248@freescale.com \
    --cc=agraf@suse.de \
    --cc=alex.williamson@redhat.com \
    --cc=armbru@redhat.com \
    --cc=benh@kernel.crashing.org \
    --cc=blauwirbel@gmail.com \
    --cc=dwg@au1.ibm.com \
    --cc=joerg.roedel@amd.com \
    --cc=paul@codesourcery.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).