qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: [PATCH] Patches from PyQemu project
Date: Tue, 04 Sep 2007 15:56:17 -0500	[thread overview]
Message-ID: <1188939377.8046.18.camel@squirrel> (raw)
In-Reply-To: <46DDB893.2060403@charter.net>


On Tue, 2007-09-04 at 14:57 -0500, Brian Johnson wrote:
> Anthony Liguori wrote:
> > With things like KVM making it relatively simple to do CPU emulation, if
> > QEMU's device emulation was available as a library (even a GPL library),
> > it would be pretty easy to do interesting things without forking QEMU
> > which is what everyone seems to be doing these days.
> 
> Yes -- it would be valuable to have QEMU's devices available as a 
> separate library(ies), with a simple, well-defined API.  Some of us use 
> other CPU emulators (yes, yes, I know we should emulate all 
> architectures under qemu, but that's not always easy :) and would love 
> to use qemu's device emulations.
> 
> > My initial thought is to make the libraries at the individual device
> > level.
> 
> It would be good to have a general mechanism for bus providers, 

Well, I'm not much for over generalizing.  My current approach would be
incremental, start by focusing on a target like i386, and make the
devices into libraries.  The libraries should not be independently
loadable by another process.

I think two types of abstractions will become apparently.  The first is
how the devices communicate with the VM and covers things like
register_ioport_{read,write}, generating interrupts, etc.  QEMU already
has some nice abstractions here so this is pretty straight forward.  My
thinking is that we'll be able to have one set of APIs to cover this.

The second type of abstraction is the functionality the individual
devices provide.  This is covered by things like the BlockDriverState
interface.  Again, QEMU does a pretty good job at abstracting this
today.

Regards,

Anthony Liguori

> interrupts, APICs, chipsets, etc. as well, so we could emulate fancier 
> architectures than a simple PC (or simple Sparc/MIPS/ARM/etc. box.)  For 
> instance, I'd like to emulate multiple PCIe host bridges, each with an 
> APIC and multiple cards, which might contain PCI-to-PCI bridges.  And 
> I'd like to emulate NUMA systems with many memory controllers and a 
> complex memory map, with multiple sets of chipset registers.  I don't 
> expect qemu to do this off the shelf, but I'd like to avoid hardcoding 
> PC assumptions into the device libraries, so I can code the fancy 
> machines myself and use the I/O as-is.
> 
> Any more thoughts on how to structure the libraries?
> 
> Brian J. Johnson
> 
> 

  reply	other threads:[~2007-09-04 20:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-02 13:50 [Qemu-devel] [PATCH] Patches from PyQemu project Maria Zabolotnaya
2007-09-03 15:41 ` Blue Swirl
2007-09-03 20:44   ` Anthony Liguori
2007-09-04 19:40     ` [Qemu-devel] Re: qemu device emulation libraries (was [PATCH] Patches from the PyQemu project) Hollis Blanchard
2007-09-04 20:04       ` Paul Brook
2007-09-04 20:21         ` Hollis Blanchard
2007-09-04 20:38           ` Paul Brook
2007-09-04 23:38             ` [kvm-devel] " Jimi Xenidis
2007-09-04 20:52         ` Anthony Liguori
2007-09-04 19:57     ` [Qemu-devel] Re: [PATCH] Patches from PyQemu project Brian Johnson
2007-09-04 20:56       ` Anthony Liguori [this message]
2007-09-04 22:27       ` Thiemo Seufer
2007-09-04 23:34         ` Anthony Liguori
2007-09-04 23:45         ` Anthony Liguori
2007-09-05 10:08           ` Fabrice Bellard
2007-09-04 22:13     ` [Qemu-devel] " Paul Sokolovsky

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=1188939377.8046.18.camel@squirrel \
    --to=anthony@codemonkey.ws \
    --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).