virtualization.lists.linux-foundation.org archive mirror
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: vapier@gentoo.org, mst@redhat.com, linux-sh@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	virtualization@lists.linux-foundation.org,
	Christian Borntraeger <borntraeger@de.ibm.com>
Subject: Re: [PATCH 00/02][RESEND] virtio: Virtio platform driver
Date: Tue, 28 Jun 2011 14:14:36 +0900	[thread overview]
Message-ID: <BANLkTi==EpA8s4+F5EtetWsqWVaJcKD8kA@mail.gmail.com> (raw)
In-Reply-To: <87oc1q8vnj.fsf@rustcorp.com.au>

On Wed, Jun 22, 2011 at 11:09 AM, Rusty Russell <rusty@rustcorp.com.au> wrote:
> On Tue, 21 Jun 2011 19:26:05 +0900, Magnus Damm <magnus.damm@gmail.com> wrote:
>> virtio: Virtio platform driver
>>
>> [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c
>> [PATCH 02/02] virtio: Add virtio platform driver
>>
>> These patches add a virtio platform driver to the Linux kernel. This
>> platform driver has the same role as the virtio_pci driver, but instead
>> of building on top of emulated PCI this driver is making use of the
>> platform bus together with driver specific callbacks.
>>
>> The virtio platform driver can be seen as a reusable implementation of
>> the lguest virtio driver - in fact, most code is just taken directly
>> from lguest_device.c and reworked to fit the platform device driver
>> abstraction. The first patch breaks out code that can be shared between
>> lguest and the virtio platform driver.
>>
>> This code has been used to implement a mailbox interface between the
>> two processor cores included in the sh7372 SoC. The sh7372 contains
>> one ARM Cortex-A8 and one SH4AL-DSP core, and in the prototype two
>> Linux kernels are running in parallel on the same chip. Virtio serves
>> as a communication link between the two cores.

Hi Rusty,

Thanks for your comments!

> OK, this seems pretty neat, but I have three questions before we nail this
> down (note that lguest doesn't have an ABI, so we can change it as much
> as we want).
>
> 1) The lguest bus is dumb, and I never thought about device hotplug, for
>   example.  It would be nice to handle that somehow.  Is it possible?
>   Is this something you care about?

I would most likely use device hotplug if it already existed, but my
goal with this patch and the rest of the sh7372 AMP code is to show
that virtio exists and that there is no need for people to invent
their own IPC software mechanism. So I don't care that much about
device hotplug.

I do however care about ABI and a non-GPL licensed virtio library to
allow people to tie in commercial RTOS with virtio. To prevent them
from rolling their own. It's pretty low priority though, I am quite
happy as-is staying in proof-of-concept-land running two instances of
Linux.

> 2) Have you seen the '[RFC 0/8] Introducing a generic AMP/IPC framework'
>   patches?  Seems to overlap with what you're doing after these patches.

Yes, there is clearly overlap, but surprisingly little. I believe
we're trying to solve different sides of the same problem.

Lguest system (Linux + Linux):
Host: lguest.c (user space) talks to /dev/lguest
Guest: lguest_device.c ties in virtio devices

SH Core Linux system (Linux + Linux):
Host: SoC-specific rtcpu-loader.c (user space) talks to /dev/uioX
Slave: SoC-specific code chats to virtio_platform.c that ties in virtio devices

"generic AMP/IPC framework" (Linux + DSP/RTOS):
Host: "remoteproc" and "rpmsg" run in the kernel
Slave: ?? (not covered by the patches I believe)

So while the "generic AMP/IPC framework" looks great for the host,
this patch tries to make something reusable on the slave/guest side.

> 3) The S/390 layout is identical, except their struct kvm_vqconfig is a
>   bit different.  Perhaps we should just use theirs (they use a 64-bit
>   token instead of an interrupt number).

I don't mind so much, but alignment wise I find it odd that the s390
version chose to use u64 + u64 + u16.

Thanks,

/ magnus

  parent reply	other threads:[~2011-06-28  5:14 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20110621102605.1382.90232.sendpatchset@t400s>
2011-06-21 10:26 ` [PATCH 01/02] virtio: Break out lguest virtio code to virtio_lguest.c Magnus Damm
2011-06-21 10:26 ` [PATCH 02/02] virtio: Add virtio platform driver Magnus Damm
     [not found] ` <20110621102623.1382.71841.sendpatchset@t400s>
2011-06-21 18:27   ` Mike Frysinger
     [not found]   ` <BANLkTi=tut=Y4fc4tkT8wt_q1azJOYaDoQ@mail.gmail.com>
2011-06-23  2:26     ` Magnus Damm
2011-06-23  8:54   ` Bhushan Bharat-R65777
     [not found]   ` <B8D6CA50DACE9E4AAADE9A4D56FBAAE6166661@039-SN1MPN1-004.039d.mgd.msft.net>
2011-06-24  1:14     ` Magnus Damm
     [not found]     ` <BANLkTi=QhwBAv5GtrTpitVhx+yDZPnRN+g@mail.gmail.com>
2011-06-24  4:08       ` Bhushan Bharat-R65777
2011-06-22  2:09 ` [PATCH 00/02][RESEND] virtio: Virtio " Rusty Russell
     [not found] ` <87oc1q8vnj.fsf@rustcorp.com.au>
2011-06-28  5:14   ` Magnus Damm [this message]
2011-06-21 10:26 Magnus Damm

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='BANLkTi==EpA8s4+F5EtetWsqWVaJcKD8kA@mail.gmail.com' \
    --to=magnus.damm@gmail.com \
    --cc=borntraeger@de.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=mst@redhat.com \
    --cc=rusty@rustcorp.com.au \
    --cc=vapier@gentoo.org \
    --cc=virtualization@lists.linux-foundation.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).