From: cov@codeaurora.org (Christopher Covington)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC] ARM VM System Sepcification
Date: Wed, 26 Feb 2014 14:27:40 -0500 [thread overview]
Message-ID: <530E402C.9040502@codeaurora.org> (raw)
In-Reply-To: <20140226183454.GA14639@cbox>
Hi Christoffer,
On 02/26/2014 01:34 PM, Christoffer Dall wrote:
> ARM VM System Specification
> ===========================
>
> Goal
> ----
> The goal of this spec is to allow suitably-built OS images to run on
> all ARM virtualization solutions, such as KVM or Xen.
Would you consider including simulators/emulators as well, such as QEMU in TCG
mode?
> Recommendations in this spec are valid for aarch32 and aarch64 alike, and
> they aim to be hypervisor agnostic.
>
> Note that simply adhering to the SBSA [2] is not a valid approach,
> for example because the SBSA mandates EL2, which will not be available
> for VMs. Further, the SBSA mandates peripherals like the pl011, which
> may be controversial for some ARM VM implementations to support.
> This spec also covers the aarch32 execution mode, not covered in the
> SBSA.
>
>
> Image format
> ------------
> The image format, as presented to the VM, needs to be well-defined in
> order for prepared disk images to be bootable across various
> virtualization implementations.
>
> The raw disk format as presented to the VM must be partitioned with a
> GUID Partition Table (GPT). The bootable software must be placed in the
> EFI System Partition (ESP), using the UEFI removable media path, and
> must be an EFI application complying to the UEFI Specification 2.4
> Revision A [6].
>
> The ESP partition's GPT entry's partition type GUID must be
> C12A7328-F81F-11D2-BA4B-00A0C93EC93B and the file system must be
> formatted as FAT32/vfat as per Section 12.3.1.1 in [6].
>
> The removable media path is \EFI\BOOT\BOOTARM.EFI for the aarch32
> execution state and is \EFI\BOOT\BOOTAA64.EFI for the aarch64 execution
> state.
>
> This ensures that tools for both Xen and KVM can load a binary UEFI
> firmware which can read and boot the EFI application in the disk image.
>
> A typical scenario will be GRUB2 packaged as an EFI application, which
> mounts the system boot partition and boots Linux.
>
>
> Virtual Firmware
> ----------------
> The VM system must be able to boot the EFI application in the ESP. It
> is recommended that this is achieved by loading a UEFI binary as the
> first software executed by the VM, which then executes the EFI
> application. The UEFI implementation should be compliant with UEFI
> Specification 2.4 Revision A [6] or later.
>
> This document strongly recommends that the VM implementation supports
> persistent environment storage for virtual firmware implementation in
> order to ensure probable use cases such as adding additional disk images
> to a VM or running installers to perform upgrades.
>
> The binary UEFI firmware implementation should not be distributed as
> part of the VM image, but is specific to the VM implementation.
Can you elaborate on the motivation for requiring that the kernel be stuffed
into a disk image and for requiring such a heavyweight bootloader/firmware? By
doing so you would seem to exclude those requiring an optimized boot process.
> Hardware Description
> --------------------
> The Linux kernel's proper entry point always takes a pointer to an FDT,
> regardless of the boot mechanism, firmware, and hardware description
> method. Even on real hardware which only supports ACPI and UEFI, the kernel
> entry point will still receive a pointer to a simple FDT, generated by
> the Linux kernel UEFI stub, containing a pointer to the UEFI system
> table. The kernel can then discover ACPI from the system tables. The
> presence of ACPI vs. FDT is therefore always itself discoverable,
> through the FDT.
>
> Therefore, the VM implementation must provide through its UEFI
> implementation, either:
>
> a complete FDT which describes the entire VM system and will boot
> mainline kernels driven by device tree alone, or
>
> no FDT. In this case, the VM implementation must provide ACPI, and
> the OS must be able to locate the ACPI root pointer through the UEFI
> system table.
>
> For more information about the arm and arm64 boot conventions, see
> Documentation/arm/Booting and Documentation/arm64/booting.txt in the
> Linux kernel source tree.
>
> For more information about UEFI and ACPI booting, see [4] and [5].
>
>
> VM Platform
> -----------
> The specification does not mandate any specific memory map. The guest
> OS must be able to enumerate all processing elements, devices, and
> memory through HW description data (FDT, ACPI) or a bus-specific
> mechanism such as PCI.
>
> The virtual platform must support at least one of the following ARM
> execution states:
> (1) aarch32 virtual CPUs on aarch32 physical CPUs
> (2) aarch32 virtual CPUs on aarch64 physical CPUs
> (3) aarch64 virtual CPUs on aarch64 physical CPUs
>
> It is recommended to support both (2) and (3) on aarch64 capable
> physical systems.
>
> The virtual hardware platform must provide a number of mandatory
> peripherals:
>
> Serial console: The platform should provide a console,
> based on an emulated pl011, a virtio-console, or a Xen PV console.
>
> An ARM Generic Interrupt Controller v2 (GICv2) [3] or newer. GICv2
> limits the the number of virtual CPUs to 8 cores, newer GIC versions
> removes this limitation.
>
> The ARM virtual timer and counter should be available to the VM as
> per the ARM Generic Timers specification in the ARM ARM [1].
>
> A hotpluggable bus to support hotplug of at least block and network
> devices. Suitable buses include a virtual PCIe bus and the Xen PV
> bus.
Is VirtIO hotplug capable? Over PCI or MMIO transports or both?
> We make the following recommendations for the guest OS kernel:
>
> The guest OS must include support for GICv2 and any available newer
> version of the GIC architecture to maintain compatibility with older
> VM implementations.
>
> It is strongly recommended to include support for all available
> (block, network, console, balloon) virtio-pci, virtio-mmio, and Xen PV
> drivers in the guest OS kernel or initial ramdisk.
I would love to eventually see some defconfigs for this sort of thing.
> Other common peripherals for block devices, networking, and more can
> (and typically will) be provided, but OS software written and compiled
> to run on ARM VMs cannot make any assumptions about which variations
> of these should exist or which implementation they use (e.g. VirtIO or
> Xen PV). See "Hardware Description" above.
>
> Note that this platform specification is separate from the Linux kernel
> concept of mach-virt, which merely specifies a machine model driven
> purely from device tree, but does not mandate any peripherals or have any
> mention of ACPI.
Well, the commit message for it said it mandated a GIC and architected timers.
Regards,
Christopher
--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
next prev parent reply other threads:[~2014-02-26 19:27 UTC|newest]
Thread overview: 73+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-26 18:34 [RFC] ARM VM System Sepcification Christoffer Dall
[not found] ` < CACxGe6tjuytsYAn6Hadf0AK+REzHgRydgbHPafL8+Sdtd_tMUA@mail.gmail.com>
2014-02-26 19:27 ` Christopher Covington [this message]
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
2014-02-28 10:01 ` Arnd Bergmann
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
[not found] ` <CACxGe6tjuytsYAn6Hadf0AK+REzHgRydgbHPafL8+Sdtd_tMUA@mail.gmail.com>
2014-02-26 22:47 ` Christoffer Dall
2014-02-27 12:27 ` Stefano Stabellini
2014-03-01 19:54 ` Grant Likely
2014-03-02 9:29 ` Peter Maydell
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
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-07 12:19 ` Grant Likely
2014-03-08 11:41 ` Michael Casadevall
2014-03-08 20:41 ` Laszlo Ersek
2014-03-07 12:09 ` Grant Likely
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=530E402C.9040502@codeaurora.org \
--to=cov@codeaurora.org \
--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 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).