kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>
To: Alexander Graf <agraf-l3A5Bk7waGM@public.gmane.org>
Cc: Peter Maydell
	<peter.maydell-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Ian Campbell
	<ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>,
	"kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"cross-distro-cunTk1MwBs8s++Sfvej+rw@public.gmane.org"
	<cross-distro-cunTk1MwBs8s++Sfvej+rw@public.gmane.org>,
	"marc.zyngier-5wv7dgnIgG8@public.gmane.org"
	<marc.zyngier-5wv7dgnIgG8@public.gmane.org>,
	Stefano Stabellini
	<stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org>,
	Michael Casadevall
	<Michael.casadevall-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Rob Herring <rob.herring-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org"
	<xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.org>,
	Stefano Stabellini
	<stefano.stabellini-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org>,
	Grant Likely
	<grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	"kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org"
	<kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org>,
	"linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org"
	<linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>
Subject: Re: [RFC] ARM VM System Sepcification
Date: Fri, 28 Feb 2014 11:01:50 +0100	[thread overview]
Message-ID: <7825615.Ak6TOGibTE@wuerfel> (raw)
In-Reply-To: <CB7DBE07-42BD-4588-AC9E-CB0BF95A811A-l3A5Bk7waGM@public.gmane.org>

On Friday 28 February 2014 08:05:15 Alexander Graf wrote: 
> > Am 28.02.2014 um 03:56 schrieb Arnd Bergmann <arnd-r2nGTMty4D4@public.gmane.org>:
> >> On Thursday 27 February 2014 22:24:13 Alexander Graf wrote:
>
> > When you have that, why do you still care about a
> > system specification? 
> 
> Because I don't want to go back to the system level definition. To me a 
> peripheral is a peripheral - regardless of whether it is on a platform 
> bus or a PCI bus. I want to leverage common ground and only add the few 
> pieces that diverge from it.

You may be missing a lot of the complexity that describing platform devices
in the general case brings then. To pass through an ethernet controller, you may 
also need to add (any subset of)

* phy device
* clock controller
* voltage regulator
* gpio controller
* LED controller
* DMA engine
* an MSI irqchip
* IOMMU

Each of the above in turn is shared with other peripherals on the host,
which brings you to three options:

* change the driver to not depend on the above, but instead support an
  abstract virtualized version of the platform device that doesn't
  need them.
* Pass through all devices this one depends on, giving up on guest
  isolation. This may work for some embedded use cases, but not
  for running untrusted guests.
* Implement virtualized versions of the other interfaces and make
  the hypervisor talk to the real hardware.

I would still argue that each of those approaches is out of scope for
this specification.

> > Going back to the previous argument, since the hypervisor has to make up the
> > description for the platform device itself, it won't matter whether the host
> > is booted using DT or ACPI: the description that the hypervisor makes up for
> > the guest has to match what the hypervisor uses to describe the rest of the
> > guest environment, which is independent of what the host uses.
> 
> I agree 100%. This spec should be completely independent of the host.
> 
> The reason I brought up the host is that if you want to migrate an OS from
> physical to virtual, you may need to pass through devices to make this work.
> If your host driver developers only ever worked with ACPI, there's a good
> chance the drivers won't work in a pure dt environment.
> 
> Brw, the same argument applies the other way around as well. I don't believe
> we will get around with generating and mandating a single machibe
> description environment.

I see those two cases as completely distinct. There are good reasons
for emulating a real machine for running a guest image that expects
certain hardware, and you can easily do this with qemu. But since you
are emulating an existing platform and run an existing OS, you don't
need a VM System Specification, you just do whatever the platform would
normally do that the guest relies on.

The VM system specification on the other hand should allow you to run
any OS that is written to support this specification on any hypervisor
that implements it.

> >> Replace Windows by "Linux with custom drivers" and you're in the same
> >> situation even when you neglect Windows. Reality will be that we will
> >> have fdt and acpi based systems.
> > 
> > We will however want to boot all sorts of guests in a standardized
> > virtual environment:
> > 
> > * 32 bit Linux (since some distros don't support biarch or multiarch
> >  on arm64) for running applications that are either binary-only
> >  or not 64-bit safe.
> > * 32-bit Android
> > * big-endian Linux for running applications that are not endian-clean
> >  (typically network stuff ported from powerpc or mipseb.
> > * OS/v guests
> > * NOMMU Linux
> > * BSD based OSs
> > * QNX
> > * random other RTOSs
> > 
> > Most of these will not work with ACPI, or at least not in 32-bit mode.
> > 64-bit Linux will obviously support both DT (always)
> 
> Unfortunately not
> 
> > and ACPI (optionally),
> > depending on the platform, but for a specification like this, I think
> > it's much easier to support fewer options, to make it easier for other
> > guest OSs to ensure they actually run on any compliant hypervisor.
> 
> You're forgetting a few pretty important cases here:
> 
> * Enterprise grade Linux distribution that only supports ACPI

You can't actually turn off DT support in the kernel, and I don't think
there is any point in patching the kernel to remove it. The only sane
thing the enterprise distros can do is turn on the "SBSA" platform
that supports all compliant machines running ACPI, but turn off all
platforms that are not SBSA compliant and boot using DT. With the way
that the VM spec is written at this point, Linux will still boot on
these guests, since the hardware support is a subset of SBSA, with the
addition of a few drivers for hypervisor specific features.

> * Maybe WinRT if we can convince MS to use it

I'd argue that would be unlikely.

> * Non-Linux with x86/ia64 heritage and thus ACPI support

That assumes that x86 ACPI support is anything like ARM64 ACPI
support, which it really isn't. In particular, you can turn off
ACPI on any x86 machine and it will still work for the most
part, while on ARM64 we will need to use ACPI to describe even
the most basic aspects of the platform.

	Arnd

  parent reply	other threads:[~2014-02-28 10:01 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-26 18:34 [RFC] ARM VM System Sepcification Christoffer Dall
2014-02-26 19:27 ` Christopher Covington
2014-02-26 19:51   ` Christoffer Dall
2014-02-27 13:12     ` Christopher Covington
2014-02-27 16:02       ` Christoffer Dall
2014-03-01 15:41       ` Grant Likely
2014-02-26 19:55 ` Arnd Bergmann
2014-02-26 20:05   ` Christoffer Dall
2014-02-26 20:22     ` Arnd Bergmann
     [not found]       ` < CABGGisxHOVqLcG7hVAuAzdeic41KWSLLBSjQLSJQcjTXLhNCow@mail.gmail.com>
2014-02-26 21:56       ` Rob Herring
2014-02-26 22:21         ` Christoffer Dall
2014-02-27  7:30           ` Arnd Bergmann
2014-02-27 10:05             ` Paolo Bonzini
2014-03-01 19:12           ` Grant Likely
2014-02-27  9:35     ` Catalin Marinas
2014-02-26 20:19   ` Paolo Bonzini
2014-02-26 20:20     ` Peter Maydell
2014-02-26 21:48   ` Leif Lindholm
2014-02-26 22:25     ` Christoffer Dall
2014-03-01 19:20       ` Grant Likely
2014-02-27 12:31     ` Stefano Stabellini
2014-02-27 14:00       ` Arnd Bergmann
2014-02-27 14:24         ` Alexander Graf
2014-02-27 19:56           ` Arnd Bergmann
2014-02-28  0:05             ` Alexander Graf
     [not found]               ` <CB7DBE07-42BD-4588-AC9E-CB0BF95A811A-l3A5Bk7waGM@public.gmane.org>
2014-02-28 10:01                 ` Arnd Bergmann [this message]
2014-02-28 13:38                 ` Riku Voipio
2014-02-28 14:44               ` Stefano Stabellini
2014-03-01 19:25         ` Grant Likely
2014-02-26 22:49   ` Rob Herring
2014-02-26 22:54     ` Peter Maydell
2014-02-26 23:08       ` Rob Herring
2014-02-26 23:14         ` Peter Maydell
2014-02-27  4:06           ` Nicolas Pitre
2014-02-27 11:36         ` Robie Basak
2014-02-26 23:13     ` Christopher Covington
2014-02-26 21:05 ` Michael Hudson-Doyle
2014-02-26 21:08   ` Christoffer Dall
2014-02-26 22:35 ` Grant Likely
2014-02-26 22:47   ` Christoffer Dall
2014-02-27 12:27   ` Stefano Stabellini
2014-02-27 12:55   ` Peter Maydell
2014-02-27  0:41 ` Blibbet
     [not found] ` <20140226134251.0436294e@anubis.ausil.us>
     [not found]   ` <CAMJs5B9bCs8Oz2Zg4UK--A3H4AaZRPMwy7SpxYom-1--_=qhBQ@mail.gmail.com>
     [not found]     ` <20140226151536.58154704@anubis.ausil.us>
2014-02-27 17:34       ` Grant Likely
2014-03-01 15:27 ` Grant Likely
2014-03-03  1:13   ` Christoffer Dall
2014-03-06  8:52   ` Robie Basak
2014-03-06  9:46     ` Paolo Bonzini
2014-03-06 11:44       ` Laszlo Ersek
2014-03-06 12:04         ` Robie Basak
2014-03-06 12:10           ` Paolo Bonzini
     [not found]         ` <20140306120449.GA29916@ mal.justgohome.co.uk>
     [not found]           ` <20140306120449.GA29916-TaX3GuEuUBUVRcMIguc0yNBc4/FLrbF6@public.gmane.org>
2014-03-07 12:24             ` Grant Likely
     [not found]               ` < 20140322010206.GF25519@cbox>
2014-03-22  2:29               ` Christoffer Dall
2014-03-22  8:08                 ` Paolo Bonzini
2014-03-23  3:19                   ` Christoffer Dall
2014-03-23  3:29                     ` Christoffer Dall
2014-03-24  9:57                       ` Robie Basak
2014-03-24 10:46                         ` Paolo Bonzini
2014-03-22 12:23                 ` Grant Likely
2014-03-22 19:57                   ` Paolo Bonzini
2014-03-22 22:35                     ` Grant Likely
2014-03-22 23:38                     ` Michael Casadevall
2014-03-23  0:33                       ` Laszlo Ersek
2014-03-23  3:23                   ` Christoffer Dall
2014-03-24  9:03                   ` Ian Campbell
2014-03-24 10:41                     ` Paolo Bonzini
2014-03-24 10:47                       ` Ian Campbell
2014-03-24 12:13                     ` Grant Likely
2014-03-24 12:16                       ` Ian Campbell
2014-03-08 11:41       ` Michael Casadevall
2014-03-08 20:41         ` Laszlo Ersek
2014-03-07 12:09     ` Grant Likely
     [not found]     ` <531843EE. 8040102@redhat.com>
     [not found]       ` <531843EE.8040102-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2014-03-07 12:19         ` Grant Likely
     [not found] ` < CACxGe6tjuytsYAn6Hadf0AK+REzHgRydgbHPafL8+Sdtd_tMUA@mail.gmail.com>
     [not found]   ` <alpine .DEB.2.02.1402271216040.31489@kaball.uk.xensource.com>
     [not found]     ` <alpine.DEB.2.02.1402271216040.31489-7Z66fg9igcxYtxbxJUhB2Dgeux46jI+i@public.gmane.org>
2014-03-01 19:54       ` Grant Likely
2014-03-02  9:29         ` Peter Maydell

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=7825615.Ak6TOGibTE@wuerfel \
    --to=arnd-r2ngtmty4d4@public.gmane.org \
    --cc=Michael.casadevall-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=agraf-l3A5Bk7waGM@public.gmane.org \
    --cc=cross-distro-cunTk1MwBs8s++Sfvej+rw@public.gmane.org \
    --cc=grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=ian.campbell-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org \
    --cc=kvm-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=kvmarm-FPEHb7Xf0XXUo1n7N8X6UoWGPAHP3yOg@public.gmane.org \
    --cc=linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=marc.zyngier-5wv7dgnIgG8@public.gmane.org \
    --cc=peter.maydell-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=rob.herring-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=stefano.stabellini-Sxgqhf6Nn4DQT0dZR+AlfA@public.gmane.org \
    --cc=stefano.stabellini-mvvWK6WmYclDPfheJLI6IQ@public.gmane.org \
    --cc=xen-devel-GuqFBffKawuEi8DpZVb4nw@public.gmane.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).