All of lore.kernel.org
 help / color / mirror / Atom feed
From: robherring2@gmail.com (Rob Herring)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH 0/2] Add support for a fake, para-virtualised machine
Date: Tue, 04 Dec 2012 08:12:22 -0600	[thread overview]
Message-ID: <50BE04C6.4070602@gmail.com> (raw)
In-Reply-To: <20121204123001.GL23368@mudshark.cambridge.arm.com>

On 12/04/2012 06:30 AM, Will Deacon wrote:
> Hi Rob,
> 
> [fixing Arnd's address, as I apparently can't spell]
> 
> On Mon, Dec 03, 2012 at 09:54:09PM +0000, Rob Herring wrote:
>> On 12/03/2012 11:52 AM, Will Deacon wrote:
>>> When running Linux on a para-virtualised platform (that is, one where
>>> the guest is aware that it is dealing with virtual devices sitting on
>>> things like virtio or xenbus) we require very little in the way of
>>> platform code and piggy-backing on top of an existing platform can
>>> require a lot of device emulation for very little gain.
>>>
>>> These two patches introduce mach-virt: a very simple, DT-based machine
>>> which can be used with kvmtool in conjunction with virtio-based devices.
>>> It's not hard to imagine the same machine being targetted by Xen, which
>>> currently emulates a minimal variant of the vexpress platform.
>>>
>>> Note that this patch series depends on the timer rework from Mark
>>> Rutland, posted on Friday:
>>>
>>>   http://lists.infradead.org/pipermail/linux-arm-kernel/2012-November/135651.html
>>>
>>> All feedback welcome. We suspect that most controversy will be around
>>> the name of the thing :)
>>
>> We've discussed this before at conferences. I don't know that we
>> concluded this wasn't needed, but it certainly leaned that direction.
> 
> I too leaned that direction before I started looking at kvm in detail and,
> since then, I've changed my mind when it comes to para-virtualisation.
> 
> The reason for this is that there is absolutely no reason to emulate some
> components of a real platform and then bolt virtual devices onto it once
> you've got enough to get it going. It leads to a right royal mess in
> userspace, where you have to write a load of non-reusable emulation code and
> it leads to churn in the kernel because you're constantly at odds with
> people trying to develop the platform code based on the actual hardware
> they have.
> 
> With a virtualisation-capable ARMv7 system, all you *need* to boot SMP
> Debian is:
> 
> 	- A v7 CPU with virt extensions
> 	- vGIC
> 	- architected timers
> 
> *everything* else can be described using virtio devices in the device-tree,
> essentially allowing you to generate platforms based on the above and boot
> the same kernel on them.
> 
>> So what has changed? You're not going to save code space because we're
>> building multiple platforms together. You'll save some boot time, but a
>> stripped down dtb with only the minimal peripherals would probably save
>> nearly as much time. 
> 
> It's really got nothing to do with code space or boot speed. What it *is*
> about is avoiding the tight coupling with a real platform and suffering as a
> result. Yes, you can strip down the DT for a real platform but you'll likely
> still have to emulate things like the SP804 in order to boot. That's not to
> mention any platform-specific system register interfaces which are required
> early on.
> 
> We can't even re-use the socfpga code (which is incredibly minimal) without
> emulating the dw_apb_timer.

That to me is highlighting where we need to do more work on DT driving
the initialization. The platforms are still aware of what kind of timers
and interrupt controllers are present. They should not be. There's work
in progress for both of those.

Lorenzo's DT MPIDR patches should trim down smp code some. The DT spin
table code could probably be common. I think I could use it on highbank
as well. If we decide the pen code stays, then it should be common
rather than creating yet another copy.

Rob

  reply	other threads:[~2012-12-04 14:12 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-03 17:52 [RFC PATCH 0/2] Add support for a fake, para-virtualised machine Will Deacon
2012-12-03 17:52 ` [RFC PATCH 1/2] ARM: Dummy Virtual Machine platform support Will Deacon
2012-12-03 17:52 ` [RFC PATCH 2/2] ARM: SMP support for mach-virt Will Deacon
2012-12-03 21:55   ` Rob Herring
2012-12-04 12:40     ` Will Deacon
2012-12-04 13:33       ` Russell King - ARM Linux
2012-12-04 13:40         ` Will Deacon
2012-12-04 14:37           ` Russell King - ARM Linux
2012-12-04 16:11             ` Will Deacon
2012-12-04 16:35               ` Russell King - ARM Linux
2012-12-04 17:24                 ` Will Deacon
2012-12-04 19:37                   ` Arnd Bergmann
2012-12-04 16:45               ` Rob Herring
2012-12-04 17:16                 ` Will Deacon
2012-12-04 17:23                   ` Rob Herring
2012-12-04 17:24                   ` Marc Zyngier
2012-12-04 17:30                     ` Will Deacon
2012-12-11 16:04                       ` Stefano Stabellini
2012-12-11 16:09                         ` Will Deacon
2012-12-11 16:34                           ` Stefano Stabellini
2012-12-11 16:41                             ` Ian Campbell
2012-12-11 16:43                             ` Will Deacon
2012-12-11 17:14                               ` Stefano Stabellini
2012-12-11 17:24                                 ` Will Deacon
2012-12-04 18:10                   ` Nicolas Pitre
2012-12-03 21:54 ` [RFC PATCH 0/2] Add support for a fake, para-virtualised machine Rob Herring
2012-12-04 12:30   ` Will Deacon
2012-12-04 14:12     ` Rob Herring [this message]
2012-12-04 17:00       ` Nicolas Pitre
2012-12-04 17:11         ` Will Deacon
2012-12-04 18:02           ` Nicolas Pitre
2012-12-04 18:14             ` Will Deacon
2012-12-05 14:52               ` Catalin Marinas
2012-12-05 15:07                 ` Nicolas Pitre
2012-12-05 15:10                   ` Will Deacon
2012-12-05 15:07                 ` Will Deacon
2012-12-05 15:15                   ` Catalin Marinas
2012-12-11 16:19     ` Stefano Stabellini

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=50BE04C6.4070602@gmail.com \
    --to=robherring2@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.