From: Arnd Bergmann <arnd@arndb.de>
To: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Virtualization Mailing List <virtualization@lists.osdl.org>,
"H. Peter Anvin" <hpa@zytor.com>,
Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
mathiasen@gmail.com, virtualization@lists.linux-foundation.org
Subject: Re: A set of "standard" virtual devices?
Date: Tue, 3 Apr 2007 19:50:59 +0200 [thread overview]
Message-ID: <200704031951.00544.arnd@arndb.de> (raw)
In-Reply-To: <20070403111731.52f2102a@gondolin.boeblingen.de.ibm.com>
On Tuesday 03 April 2007, Cornelia Huck wrote:
> On s390, it would be more than strangeness. There's no implementation
> of PCI at all, someone would have to cook it up - and it wouldn't have
> any use beyond those special devices. Since there isn't any bus type
> that is available on *all* architectures, a generic "virtual" bus with
> very simple probing seems much saner...
I think we need to separate two problems here:
1. Probing:
That's really what triggered the discussion, PCI probing is well-understood
and implemented on _most_ platforms, so there is some value in reusing it.
When you talk about 'very simple probing', I'm not sure what the most simple
approach could be. Ideas that have been implemented before include:
a) have a limited set of device IDs (e.g. 65535 devices, or a hierarchic tree),
and try to access each one of them in order to find out if it's there. We
do that for PCI or CCW, for instance.
b) Have an iterator in the hypervisor (or firmware), to return a handle to
the first, next or child of a device. We do that for open firmware.
c) ask the hypervisor for an unused device of a given class, which needs to
be returned to the hypervisor when no longer used. This is how the PS3
hypervisor works, but it does not play well with the Linux driver model.
2. Device access:
When talking to a virtual device, you want to have at least a way to give
commands to it and a way to get interrupts back. Again, multiple ideas
have been used in the past, and we should choose a subset:
a) PCI-like: mmio using memory and/or I/O space BAR setup, interrupt
numbers and DMA to guest physical addresses.
b) Channel-like: use an hcall to give commands to the hypervisor, passing
down a device handle command code and data areas in guest physical space.
Interrupts return the device handle or a OS-defined per-device value.
c) Minimalistic: Every device is mapped into the guest address space and
can potentially be remapped into user space. The device memory can be
shared between guests and/or with the host if that uses the same driver.
The guest is able to signal the receiving end using an hcall and gets
interrupts like in b)
d) UNIX-like: devices appear like file descriptors, the guest can do
operations like read/write/sync/mmap, potentially ioctl on them to talk
to the host.
Arnd <><
next prev parent reply other threads:[~2007-04-03 17:50 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4611652F.700@zytor.com>
2007-04-02 20:56 ` A set of "standard" virtual devices? Jeremy Fitzhardinge
2007-04-02 21:12 ` Andi Kleen
2007-04-02 21:33 ` Jeff Garzik
2007-04-02 21:36 ` Andi Kleen
2007-04-02 21:42 ` Jeremy Fitzhardinge
2007-04-02 21:53 ` Anthony Liguori
2007-04-02 22:04 ` Jeremy Fitzhardinge
2007-04-02 22:10 ` H. Peter Anvin
2007-04-02 22:25 ` Jeff Garzik
2007-04-02 22:30 ` H. Peter Anvin
2007-04-03 9:41 ` Arnd Bergmann
2007-04-03 10:41 ` Cornelia Huck
2007-04-03 12:15 ` Arnd Bergmann
2007-04-03 13:39 ` Cornelia Huck
2007-04-03 14:03 ` Arnd Bergmann
2007-04-03 16:07 ` Cornelia Huck
2007-04-03 8:29 ` Christian Borntraeger
2007-04-03 8:30 ` Andi Kleen
2007-04-03 9:17 ` Cornelia Huck
2007-04-03 9:26 ` Andi Kleen
2007-04-03 10:51 ` Cornelia Huck
2007-04-03 15:00 ` Adrian Bunk
2007-04-03 17:50 ` Arnd Bergmann [this message]
2007-04-03 19:07 ` Jeremy Fitzhardinge
2007-04-03 19:42 ` Arnd Bergmann
2007-04-03 19:55 ` Jeremy Fitzhardinge
2007-04-03 20:03 ` H. Peter Anvin
2007-04-03 21:00 ` Jeremy Fitzhardinge
2007-04-03 21:45 ` H. Peter Anvin
2007-04-03 21:51 ` Arnd Bergmann
2007-04-03 22:10 ` H. Peter Anvin
2007-04-03 22:49 ` Arnd Bergmann
2007-04-04 0:52 ` H. Peter Anvin
2007-04-04 13:11 ` Arnd Bergmann
2007-04-04 15:50 ` H. Peter Anvin
2007-04-03 20:50 ` Arnd Bergmann
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=200704031951.00544.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=cornelia.huck@de.ibm.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mathiasen@gmail.com \
--cc=virtualization@lists.linux-foundation.org \
--cc=virtualization@lists.osdl.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).