Skip to contentSkip to conversation

ARM VM System Specification

RFC Christoffer Dall 12 participants 73 messages Mar 28, 2014 – Jul 2, 2014 KVM

lore
Share & tools
lore
#0 lore raw

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.

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, 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 as specified in Section 3.3 (3.3 (Boot Option Variables Default Boot Behavior) and 3.4.1.1 (Removable Media Boot Behavior) in [6].

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 UEFI compliant in order to 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.

This document strongly recommends that VM implementations implement persistent variable storage for their UEFI implementation. Persistent variable storage shall be a property of a VM instance, but shall not be stored as part of a portable disk image. Portable disk images shall conform to the UEFI removable disk requirements from the UEFI spec and cannot rely on on a pre-configured UEFI environment.

The binary UEFI firmware implementation should not be distributed as part of the VM image, but is specific to the VM implementation.

Hardware Description
--------------------
The VM system must be UEFI compliant and therefore the UEFI system table will provide a means to access hardware description data.

The VM implementation must provide through its UEFI implementation:

a complete FDT which describes the entire VM system and will boot mainline kernels driven by device tree alone

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 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) or a bus-specific mechanism such as PCI.

If aarch64 physical CPUs implement support for the aarch32 execution state in EL1 and EL0 execution, it is recommended that the VM implementation supports booting the VM at EL1 in both aarch32 and aarch64 execution states.

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].

It is strongly recommended that the VM implementation provides 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.

For the VM image to be compliant with this spec, the following applies for the guest OS in the VM image:

The guest OS must include support for pl011 UART, virtio-console, and the Xen PV console.

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.

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.

Changes from previous versions of this RFC
------------------------------------------
Changes v1-v2:
- Clearly specify that the guest must support the pl011, virtio-console, and Xen PV console. (Note that it was discussed to mandate a pl011 during Linaro Connect Asia 2014, but that was under the impression that the SBSA specification was an output-only no-irq serial port, which is not the case. The only two benefits from mandating a specific serial type was to handle "console=ttyAMA0" kernel command line parameters and earlyprintk; Grant Likely has submitted patches to avoid the need for "console=" parameters, and Rob Herring has submitted patches for paravirtualized earlyprintk consoles.)
- Reference EFI specification for bootable paths.
- Remove discussion on ACPI boot methods and do not suggest ACPI support in VMs.
- Add specification about UEFI persistent variable storage and portability.

References
----------
[1]: The ARM Architecture Reference Manual, ARMv8, Issue A.b
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[2]: ARM Server Base System Architecture
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html

[3]: The ARM Generic Interrupt Controller Architecture Specifications v2.0
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[4]: http://www.secretlab.ca/archives/27

[5]: https://git.linaro.org/people/leif.lindholm/linux.git/blob/refs/heads/uefi-for-upstream:/Documentation/arm/uefi.txt

[6]: UEFI Specification 2.4 Revision A
http://www.uefi.org/sites/default/files/resources/2_4_Errata_A.pdf

#1 lore raw
Quoted 2 lines · Christoffer Dall

ARM VM System Specification
===========================

[not quoting the whole spec here]

This looks very sane to me, and aligns very well with non-virtualized images.

For what it's worth, even though it's not a patch:

What's the plan on how to lock this in? Where's this document going to live? In the kernel sources under Documentation/, or external?

-Olof

#2 lore raw
Quoted 5 lines · Olof Johansson
Quoted 2 lines · Christoffer Dall

ARM VM System Specification
===========================

Quoted 7 lines

[not quoting the whole spec here]

This looks very sane to me, and aligns very well with non-virtualized images.

For what it's worth, even though it's not a patch:

Thanks, appreciate it.

Quoted 4 lines

What's the plan on how to lock this in? Where's this document going to live? In the kernel sources under Documentation/, or external?

There were talks during LCA14 about publishing it as a Linaro white-paper, but I would like it to be hosted by the open-source projects that relate to it, for example the Linux kernel under Documentaiton/ to represent both the guest and KVM side, and the Xen sources too.

However, that may be a pain to update so the preferred method could be to host it in either its current form (clear-text) or publish some versioned PDF somewhere and simply point to it from the compliant software pieces.

Suggestions or input welcome.

-Christoffer

#3 lore raw
Quoted 1 line · Christoffer Dall

However, that may be a pain to update

Very much, and there would be nothing worse than having multiple divergent copies of the spec.

Quoted 4 lines

so the preferred method could be
to host it in either its current form (clear-text) or publish some versioned PDF somewhere and simply point to it from the compliant software pieces.

I think that would be best.

I'm at a loss to suggest a suitable neutral home though I'm afraid.

Ian.

#4 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Ian Campbell
Quoted 1 line · Christoffer Dall

However, that may be a pain to update

Very much, and there would be nothing worse than having multiple divergent copies of the spec.

Quoted 9 lines
Quoted 3 lines

so the preferred method could be to host it in either its current form (clear-text) or publish some versioned PDF somewhere and simply point to it from the compliant software pieces.

I think that would be best.

I'm at a loss to suggest a suitable neutral home though I'm afraid.

I agree with formal PDF (or TeX/plain text) releases + versioning; something I can print out and hit people with always works great for spec compliance.

On the topic of hosting, if Linaro itself isn't neutral enough, what about under the Linux Foundation? They already host a bunch of standards like the FHS.
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTOo2JAAoJEGKVRgSEnX1Qu+gH/ja+aqOqc04gbpFvuarHtzeM nLtJ1ie4JKOJTVqqQz+lgPhx+r3H9PrMFZnGvzs8H6GYSaU66i/SHKU150J1Ig5M 1w4DYqQj7DEClpoNmpPZVJJbevp70/wDH1wFSJZXJmxV9yOpMtrNZXwB60KANP2f MJDF+iDLIkv8vRPYQJEmuV4PMcJQs88X91eEb67jChX1ntMiiDAFSM6t2cRyfVG0 la4Ujk/p/u+Kr43wbhQITOKXZpWCtI8gjp7wTuZc+EDIhmufd5uiQ2VyTZaMkPkV xuX9871Y8VHGxCkAmhHPODbp3Wd4VUP2ewOYnTRYR2IIRpa4gNNLUa+MSdrL/sU= =2ub7
-----END PGP SIGNATURE-----

#5 lore raw

Start with Linaro publishing it. It can always be moved to another venue if someone dislikes Linaro having maintainership.

g.

Quoted 42 lines · Michael Casadevall

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Ian Campbell
Quoted 1 line · Christoffer Dall

However, that may be a pain to update

Very much, and there would be nothing worse than having multiple divergent copies of the spec.

Quoted 9 lines
Quoted 3 lines

so the preferred method could be to host it in either its current form (clear-text) or publish some versioned PDF somewhere and simply point to it from the compliant software pieces.

I think that would be best.

I'm at a loss to suggest a suitable neutral home though I'm afraid.

I agree with formal PDF (or TeX/plain text) releases + versioning; something I can print out and hit people with always works great for spec compliance.

On the topic of hosting, if Linaro itself isn't neutral enough, what about under the Linux Foundation? They already host a bunch of standards like the FHS.
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTOo2JAAoJEGKVRgSEnX1Qu+gH/ja+aqOqc04gbpFvuarHtzeM nLtJ1ie4JKOJTVqqQz+lgPhx+r3H9PrMFZnGvzs8H6GYSaU66i/SHKU150J1Ig5M 1w4DYqQj7DEClpoNmpPZVJJbevp70/wDH1wFSJZXJmxV9yOpMtrNZXwB60KANP2f MJDF+iDLIkv8vRPYQJEmuV4PMcJQs88X91eEb67jChX1ntMiiDAFSM6t2cRyfVG0 la4Ujk/p/u+Kr43wbhQITOKXZpWCtI8gjp7wTuZc+EDIhmufd5uiQ2VyTZaMkPkV xuX9871Y8VHGxCkAmhHPODbp3Wd4VUP2ewOYnTRYR2IIRpa4gNNLUa+MSdrL/sU= =2ub7
-----END PGP SIGNATURE-----

#6 lore raw
In reply to Michael Casadevall

Start with Linaro publishing it. It can always be moved to another venue if someone dislikes Linaro having maintainership.

g.

Quoted 42 lines · Michael Casadevall

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Ian Campbell
Quoted 1 line · Christoffer Dall

However, that may be a pain to update

Very much, and there would be nothing worse than having multiple divergent copies of the spec.

Quoted 9 lines
Quoted 3 lines

so the preferred method could be to host it in either its current form (clear-text) or publish some versioned PDF somewhere and simply point to it from the compliant software pieces.

I think that would be best.

I'm at a loss to suggest a suitable neutral home though I'm afraid.

I agree with formal PDF (or TeX/plain text) releases + versioning; something I can print out and hit people with always works great for spec compliance.

On the topic of hosting, if Linaro itself isn't neutral enough, what about under the Linux Foundation? They already host a bunch of standards like the FHS.
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTOo2JAAoJEGKVRgSEnX1Qu+gH/ja+aqOqc04gbpFvuarHtzeM nLtJ1ie4JKOJTVqqQz+lgPhx+r3H9PrMFZnGvzs8H6GYSaU66i/SHKU150J1Ig5M 1w4DYqQj7DEClpoNmpPZVJJbevp70/wDH1wFSJZXJmxV9yOpMtrNZXwB60KANP2f MJDF+iDLIkv8vRPYQJEmuV4PMcJQs88X91eEb67jChX1ntMiiDAFSM6t2cRyfVG0 la4Ujk/p/u+Kr43wbhQITOKXZpWCtI8gjp7wTuZc+EDIhmufd5uiQ2VyTZaMkPkV xuX9871Y8VHGxCkAmhHPODbp3Wd4VUP2ewOYnTRYR2IIRpa4gNNLUa+MSdrL/sU= =2ub7
-----END PGP SIGNATURE-----

#7 lore raw
In reply to Ian Campbell

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 6 lines · Ian Campbell
Quoted 1 line · Christoffer Dall

However, that may be a pain to update

Very much, and there would be nothing worse than having multiple divergent copies of the spec.

Quoted 9 lines
Quoted 3 lines

so the preferred method could be to host it in either its current form (clear-text) or publish some versioned PDF somewhere and simply point to it from the compliant software pieces.

I think that would be best.

I'm at a loss to suggest a suitable neutral home though I'm afraid.

I agree with formal PDF (or TeX/plain text) releases + versioning; something I can print out and hit people with always works great for spec compliance.

On the topic of hosting, if Linaro itself isn't neutral enough, what about under the Linux Foundation? They already host a bunch of standards like the FHS.
Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.14 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJTOo2JAAoJEGKVRgSEnX1Qu+gH/ja+aqOqc04gbpFvuarHtzeM nLtJ1ie4JKOJTVqqQz+lgPhx+r3H9PrMFZnGvzs8H6GYSaU66i/SHKU150J1Ig5M 1w4DYqQj7DEClpoNmpPZVJJbevp70/wDH1wFSJZXJmxV9yOpMtrNZXwB60KANP2f MJDF+iDLIkv8vRPYQJEmuV4PMcJQs88X91eEb67jChX1ntMiiDAFSM6t2cRyfVG0 la4Ujk/p/u+Kr43wbhQITOKXZpWCtI8gjp7wTuZc+EDIhmufd5uiQ2VyTZaMkPkV xuX9871Y8VHGxCkAmhHPODbp3Wd4VUP2ewOYnTRYR2IIRpa4gNNLUa+MSdrL/sU= =2ub7
-----END PGP SIGNATURE-----

#8 lore raw
In reply to Christoffer Dall
Quoted 1 line · Christoffer Dall

However, that may be a pain to update

Very much, and there would be nothing worse than having multiple divergent copies of the spec.

Quoted 4 lines

so the preferred method could be
to host it in either its current form (clear-text) or publish some versioned PDF somewhere and simply point to it from the compliant software pieces.

I think that would be best.

I'm at a loss to suggest a suitable neutral home though I'm afraid.

Ian.

#9 lore raw
In reply to Olof Johansson
Quoted 5 lines · Olof Johansson
Quoted 2 lines · Christoffer Dall

ARM VM System Specification
===========================

Quoted 7 lines

[not quoting the whole spec here]

This looks very sane to me, and aligns very well with non-virtualized images.

For what it's worth, even though it's not a patch:

Thanks, appreciate it.

Quoted 4 lines

What's the plan on how to lock this in? Where's this document going to live? In the kernel sources under Documentation/, or external?

There were talks during LCA14 about publishing it as a Linaro white-paper, but I would like it to be hosted by the open-source projects that relate to it, for example the Linux kernel under Documentaiton/ to represent both the guest and KVM side, and the Xen sources too.

However, that may be a pain to update so the preferred method could be to host it in either its current form (clear-text) or publish some versioned PDF somewhere and simply point to it from the compliant software pieces.

Suggestions or input welcome.

-Christoffer

#10 lore raw
In reply to Christoffer Dall
Quoted 2 lines · Christoffer Dall

ARM VM System Specification
===========================

[not quoting the whole spec here]

This looks very sane to me, and aligns very well with non-virtualized images.

For what it's worth, even though it's not a patch:

What's the plan on how to lock this in? Where's this document going to live? In the kernel sources under Documentation/, or external?

-Olof

#11 lore raw
In reply to Christoffer Dall
Quoted 3 lines · Christoffer Dall

ARM VM System Specification
===========================

I didn't receive a lot of comments on this one, I take this to mean that most people are happy with the content. If not, now is the time to speak up, otherwise we'll be taking steps to try and publish this slightly more formally.

Thanks,
-Christoffer

#12 lore raw
Quoted 9 lines · Christoffer Dall
Quoted 3 lines · Christoffer Dall

ARM VM System Specification
===========================

I didn't receive a lot of comments on this one, I take this to mean that most people are happy with the content. If not, now is the time to speak up, otherwise we'll be taking steps to try and publish this slightly more formally.

Yes, I'm happy with it.

g.

#13 lore raw
In reply to Christoffer Dall
Quoted 9 lines · Christoffer Dall
Quoted 3 lines · Christoffer Dall

ARM VM System Specification
===========================

I didn't receive a lot of comments on this one, I take this to mean that most people are happy with the content. If not, now is the time to speak up, otherwise we'll be taking steps to try and publish this slightly more formally.

Yes, I'm happy with it.

g.

#14 lore raw
In reply to Christoffer Dall
Quoted 3 lines · Christoffer Dall

ARM VM System Specification
===========================

I didn't receive a lot of comments on this one, I take this to mean that most people are happy with the content. If not, now is the time to speak up, otherwise we'll be taking steps to try and publish this slightly more formally.

Thanks,
-Christoffer

#15 lore raw
In reply to Christoffer Dall
Quoted 10 lines · Christoffer Dall

ARM VM System Specification
===========================

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.

Quoted 6 lines

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].

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Suggested wording:

RTC: The platform should provide a real time clock, based on an emulated pl031 or mc146818.

and in the guest-support section later:

The guest OS must include support for pl031 and mc146818 RTC.

(QEMU is going to provide a PL031, because that's the standard ARM primecell device for this and it's what's in the vexpress. kvmtool looks like it's going to provide mc146818, because that's the standard x86 RTC and kvmtool happens to already emulate that.)

thanks
-- PMM

#16 lore raw
Quoted 15 lines · Peter Maydell
Quoted 14 lines · Christoffer Dall

ARM VM System Specification
===========================

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.

Quoted 7 lines
Quoted 2 lines

The ARM virtual timer and counter should be available to the VM as per the ARM Generic Timers specification in the ARM ARM [1].

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Isn't that already done transitively via the requirement to provide a UEFI environment?

I thought the RTC was exposed via UEFI Runtime Service, in which case it's mostly a hypervisor internal issue how time is provided to the (hypervisor provided) UEFI implementation, the guest OS just uses the runtime services interfaces.

Given that do we also need to standardise on a guest OS visible clock device too? I'm not sure if we do or not, but if yes then I have a couple of comments on the suggested wording (you can probably guess what they are going to be...):

Quoted 4 lines

Suggested wording:

RTC: The platform should provide a real time clock, based on an emulated pl031 or mc146818.

We would need to include the Xen PV wallclock here too.

Quoted 3 lines

and in the guest-support section later:

The guest OS must include support for pl031 and mc146818 RTC.

and here.

Ian.

#17 lore raw
In reply to Peter Maydell
Quoted 15 lines · Peter Maydell
Quoted 14 lines · Christoffer Dall

ARM VM System Specification
===========================

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.

Quoted 7 lines
Quoted 2 lines

The ARM virtual timer and counter should be available to the VM as per the ARM Generic Timers specification in the ARM ARM [1].

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Isn't that already done transitively via the requirement to provide a UEFI environment?

I thought the RTC was exposed via UEFI Runtime Service, in which case it's mostly a hypervisor internal issue how time is provided to the (hypervisor provided) UEFI implementation, the guest OS just uses the runtime services interfaces.

Given that do we also need to standardise on a guest OS visible clock device too? I'm not sure if we do or not, but if yes then I have a couple of comments on the suggested wording (you can probably guess what they are going to be...):

Quoted 4 lines

Suggested wording:

RTC: The platform should provide a real time clock, based on an emulated pl031 or mc146818.

We would need to include the Xen PV wallclock here too.

Quoted 3 lines

and in the guest-support section later:

The guest OS must include support for pl031 and mc146818 RTC.

and here.

Ian.

maintainer
#18 lore raw
In reply to Peter Maydell

Il 10/06/2014 16:42, Peter Maydell ha scritto:

Quoted 7 lines

The guest OS must include support for pl031 and mc146818 RTC.

(QEMU is going to provide a PL031, because that's the standard ARM primecell device for this and it's what's in the vexpress. kvmtool looks like it's going to provide mc146818, because that's the standard x86 RTC and kvmtool happens to already emulate that.)

Why can't kvmtool add pl031 support? mc146818 is quite complicated to emulate efficiently (without waking up once a second or more).

Paolo

maintainer
#19 lore raw
In reply to Peter Maydell

Il 10/06/2014 16:42, Peter Maydell ha scritto:

Quoted 7 lines

The guest OS must include support for pl031 and mc146818 RTC.

(QEMU is going to provide a PL031, because that's the standard ARM primecell device for this and it's what's in the vexpress. kvmtool looks like it's going to provide mc146818, because that's the standard x86 RTC and kvmtool happens to already emulate that.)

Why can't kvmtool add pl031 support? mc146818 is quite complicated to emulate efficiently (without waking up once a second or more).

Paolo

#20 lore raw
In reply to Peter Maydell

Hi Peter,

Quoted 15 lines · Peter Maydell
Quoted 14 lines · Christoffer Dall

ARM VM System Specification
===========================

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.

Quoted 7 lines
Quoted 2 lines

The ARM virtual timer and counter should be available to the VM as per the ARM Generic Timers specification in the ARM ARM [1].

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

Thanks,
Christopher

Signature · 3 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
#21 lore raw
Quoted 8 lines · Christopher Covington
Quoted 4 lines · Peter Maydell

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

It's also handy if you're booting Linux directly without UEFI, since it means you can actually have a /dev/rtc0 (and QEMU's implementation at least will correctly give you the time based on the host's RTC).

thanks
-- PMM

maintainer
#22 lore raw

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 7 lines · Christopher Covington
Quoted 6 lines · Peter Maydell
Quoted 4 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Quoted 8 lines
Quoted 2 lines

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

So I agree that the RTC is required in UEFI.

Paolo

maintainer
#23 lore raw

Il 10/06/2014 20:56, Paolo Bonzini ha scritto:

Quoted 17 lines

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 7 lines · Christopher Covington
Quoted 6 lines · Peter Maydell
Quoted 4 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Quoted 8 lines
Quoted 2 lines

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 8 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

So I agree that the RTC is required in UEFI.

... that said, just like I thought was the case for the serial console, do we need to specify the exact hardware models?

We can just say that the VM can expect UEFI boot and runtime services to work. This includes variable services, time services, the serial console protocols and more. It's up to the implementation to provide enough devices to support the firmware, and it's out of this spec's scope to specify the firmware's implementation.

Paolo

maintainer
#24 lore raw
In reply to Paolo Bonzini

Il 10/06/2014 20:56, Paolo Bonzini ha scritto:

Quoted 17 lines

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 7 lines · Christopher Covington
Quoted 6 lines · Peter Maydell
Quoted 4 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Quoted 8 lines
Quoted 2 lines

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 8 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

So I agree that the RTC is required in UEFI.

... that said, just like I thought was the case for the serial console, do we need to specify the exact hardware models?

We can just say that the VM can expect UEFI boot and runtime services to work. This includes variable services, time services, the serial console protocols and more. It's up to the implementation to provide enough devices to support the firmware, and it's out of this spec's scope to specify the firmware's implementation.

Paolo

maintainer
#25 lore raw
In reply to Paolo Bonzini

Il 10/06/2014 20:56, Paolo Bonzini ha scritto:

Quoted 17 lines

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 7 lines · Christopher Covington
Quoted 6 lines · Peter Maydell
Quoted 4 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Quoted 8 lines
Quoted 2 lines

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 8 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

So I agree that the RTC is required in UEFI.

... that said, just like I thought was the case for the serial console, do we need to specify the exact hardware models?

We can just say that the VM can expect UEFI boot and runtime services to work. This includes variable services, time services, the serial console protocols and more. It's up to the implementation to provide enough devices to support the firmware, and it's out of this spec's scope to specify the firmware's implementation.

I think even the serial devices should be removed.

Paolo

#26 lore raw
Quoted 30 lines · Paolo Bonzini

Il 10/06/2014 20:56, Paolo Bonzini ha scritto:

Quoted 17 lines

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 7 lines · Christopher Covington
Quoted 6 lines · Peter Maydell
Quoted 4 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Quoted 8 lines
Quoted 2 lines

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 8 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

So I agree that the RTC is required in UEFI.

... that said, just like I thought was the case for the serial console, do we need to specify the exact hardware models?

Quoted 9 lines

We can just say that the VM can expect UEFI boot and runtime services to work. This includes variable services, time services, the serial console protocols and more. It's up to the implementation to provide enough devices to support the firmware, and it's out of this spec's scope to specify the firmware's implementation.

I think even the serial devices should be removed.

The problem is that the most common user problem with ARM VMs are that they boot the thing, and then get no output. So we wanted some way to make sure we know that the kernel should be able to print to a console.

UEFI does provide DBG2 output, but that's only during boot time service (so I'm told), and we need to mandate something that will work when the kernel boots.

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

-Christoffer

maintainer
#27 lore raw

Il 11/06/2014 08:54, Christoffer Dall ha scritto:

Quoted 7 lines

The problem is that the most common user problem with ARM VMs are that they boot the thing, and then get no output. So we wanted some way to make sure we know that the kernel should be able to print to a console.

UEFI does provide DBG2 output, but that's only during boot time service (so I'm told), and we need to mandate something that will work when the kernel boots.

Doh, indeed the console is not part of run-time services (so it's not even available for earlyprintk).

Quoted 3 lines

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

The RTC is not needed for ordinary operation of the kernel and, in the current kernel, the EFI RTC driver is only used for IA64. However, it seems to be platform independent. I'll give it a shot (on x86, since that's the only architecture for which I know how to get UEFI firmware).

Paolo

#28 lore raw
Quoted 9 lines · On Wednesday 11 June 2014 10:16:03 Paolo Bonzini wrote:
Quoted 4 lines

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

The RTC is not needed for ordinary operation of the kernel and, in the current kernel, the EFI RTC driver is only used for IA64. However, it seems to be platform independent. I'll give it a shot (on x86, since that's the only architecture for which I know how to get UEFI firmware).

Using the EFI RTC seems appropriate for ARM, as it's a reasonable abstraction that should work with any hypervisor. I suspect the only reason we don't use it on x86 is that we know which RTC hardware we have and the kernel comes with a mandatory driver already.

Arnd

#29 lore raw
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · On Wednesday 11 June 2014 10:16:03 Paolo Bonzini wrote:
Quoted 4 lines

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

The RTC is not needed for ordinary operation of the kernel and, in the current kernel, the EFI RTC driver is only used for IA64. However, it seems to be platform independent. I'll give it a shot (on x86, since that's the only architecture for which I know how to get UEFI firmware).

Quoted 4 lines

Using the EFI RTC seems appropriate for ARM, as it's a reasonable abstraction that should work with any hypervisor. I suspect the only reason we don't use it on x86 is that we know which RTC hardware we have and the kernel comes with a mandatory driver already.

(sorry for delay in responding to this thread)

Indeed. We should use the EFI RTC driver in general, rather than push for many individual RTC drivers on aarch64 systems that are EFI enabled. Within Red Hat, we currently have EFI Runtime Services live in many of our labs and are using the EFI RTC. This is the way forward.

Jon.

#30 lore raw
Quoted 17 lines · Jon Masters
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · On Wednesday 11 June 2014 10:16:03 Paolo Bonzini wrote:
Quoted 4 lines

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

The RTC is not needed for ordinary operation of the kernel and, in the current kernel, the EFI RTC driver is only used for IA64. However, it seems to be platform independent. I'll give it a shot (on x86, since that's the only architecture for which I know how to get UEFI firmware).

Quoted 4 lines

Using the EFI RTC seems appropriate for ARM, as it's a reasonable abstraction that should work with any hypervisor. I suspect the only reason we don't use it on x86 is that we know which RTC hardware we have and the kernel comes with a mandatory driver already.

Quoted 8 lines

(sorry for delay in responding to this thread)

Indeed. We should use the EFI RTC driver in general, rather than push for many individual RTC drivers on aarch64 systems that are EFI enabled. Within Red Hat, we currently have EFI Runtime Services live in many of our labs and are using the EFI RTC. This is the way forward.

Seems like we should stick a note in there about being UEFI compatible requires an RTC. We went this far before Peter raised the issue with noone else realizing it, so it seems like a good idea to me.

-Christoffer

#31 lore raw
Quoted 3 lines · Christoffer Dall

Seems like we should stick a note in there about being UEFI compatible requires an RTC. We went this far before Peter raised the issue with noone else realizing it, so it seems like a good idea to me.

How about:
=====
Guest OSes in the VM image should rely on the UEFI RTC API for real time clock services. (To provide that API, the VM system will likely need to implement some real time clock device, but the details of these are a private implementation issue between it and its associated UEFI implementation.)
=====

?

thanks
-- PMM

#32 lore raw
Quoted 5 lines · Peter Maydell
Quoted 3 lines · Christoffer Dall

Seems like we should stick a note in there about being UEFI compatible requires an RTC. We went this far before Peter raised the issue with noone else realizing it, so it seems like a good idea to me.

Quoted 7 lines

How about:
=====
Guest OSes in the VM image should rely on the UEFI RTC API for real time clock services. (To provide that API, the VM system will likely need to implement some real time clock device, but the details of these are a private implementation issue between it and its associated UEFI implementation.)

I don't see why we need to add the text within brackets: it is out of scope for this document.

#33 lore raw
Quoted 11 lines · Stefano Stabellini
Quoted 7 lines · Peter Maydell

How about:
=====
Guest OSes in the VM image should rely on the UEFI RTC API for real time clock services. (To provide that API, the VM system will likely need to implement some real time clock device, but the details of these are a private implementation issue between it and its associated UEFI implementation.)

I don't see why we need to add the text within brackets: it is out of scope for this document.

The intention is to be an informative note, not normative text (I'm happy if we want to format the text to make that clearer, with some sort of NOTE: markup). I'd like VM implementors reading this spec to make the correct decisions even if they don't happen to know inside-out the details of the UEFI specification and what exactly UEFI demands of the hardware, and I think it's worth adding the occasional clarifying sentence even if it doesn't strictly speaking add any extra rules to the specification.

thanks
-- PMM

#34 lore raw
Quoted 14 lines · Peter Maydell
Quoted 11 lines · Stefano Stabellini
Quoted 7 lines · Peter Maydell

How about:
=====
Guest OSes in the VM image should rely on the UEFI RTC API for real time clock services. (To provide that API, the VM system will likely need to implement some real time clock device, but the details of these are a private implementation issue between it and its associated UEFI implementation.)

I don't see why we need to add the text within brackets: it is out of scope for this document.

Quoted 10 lines

The intention is to be an informative note, not normative text (I'm happy if we want to format the text to make that clearer, with some sort of NOTE: markup). I'd like VM implementors reading this spec to make the correct decisions even if they don't happen to know inside-out the details of the UEFI specification and what exactly UEFI demands of the hardware, and I think it's worth adding the occasional clarifying sentence even if it doesn't strictly speaking add any extra rules to the specification.

That's also the approach we've taken so far elsewhere in the document, so I think it's useful.

-Christoffer

#35 lore raw
In reply to Peter Maydell
Quoted 14 lines · Peter Maydell
Quoted 11 lines · Stefano Stabellini
Quoted 7 lines · Peter Maydell

How about:
=====
Guest OSes in the VM image should rely on the UEFI RTC API for real time clock services. (To provide that API, the VM system will likely need to implement some real time clock device, but the details of these are a private implementation issue between it and its associated UEFI implementation.)

I don't see why we need to add the text within brackets: it is out of scope for this document.

Quoted 10 lines

The intention is to be an informative note, not normative text (I'm happy if we want to format the text to make that clearer, with some sort of NOTE: markup). I'd like VM implementors reading this spec to make the correct decisions even if they don't happen to know inside-out the details of the UEFI specification and what exactly UEFI demands of the hardware, and I think it's worth adding the occasional clarifying sentence even if it doesn't strictly speaking add any extra rules to the specification.

That's also the approach we've taken so far elsewhere in the document, so I think it's useful.

-Christoffer

#36 lore raw
In reply to Stefano Stabellini
Quoted 11 lines · Stefano Stabellini
Quoted 7 lines · Peter Maydell

How about:
=====
Guest OSes in the VM image should rely on the UEFI RTC API for real time clock services. (To provide that API, the VM system will likely need to implement some real time clock device, but the details of these are a private implementation issue between it and its associated UEFI implementation.)

I don't see why we need to add the text within brackets: it is out of scope for this document.

The intention is to be an informative note, not normative text (I'm happy if we want to format the text to make that clearer, with some sort of NOTE: markup). I'd like VM implementors reading this spec to make the correct decisions even if they don't happen to know inside-out the details of the UEFI specification and what exactly UEFI demands of the hardware, and I think it's worth adding the occasional clarifying sentence even if it doesn't strictly speaking add any extra rules to the specification.

thanks
-- PMM

#37 lore raw
In reply to Peter Maydell
Quoted 5 lines · Peter Maydell
Quoted 3 lines · Christoffer Dall

Seems like we should stick a note in there about being UEFI compatible requires an RTC. We went this far before Peter raised the issue with noone else realizing it, so it seems like a good idea to me.

Quoted 7 lines

How about:
=====
Guest OSes in the VM image should rely on the UEFI RTC API for real time clock services. (To provide that API, the VM system will likely need to implement some real time clock device, but the details of these are a private implementation issue between it and its associated UEFI implementation.)

I don't see why we need to add the text within brackets: it is out of scope for this document.

#38 lore raw
In reply to Christoffer Dall
Quoted 3 lines · Christoffer Dall

Seems like we should stick a note in there about being UEFI compatible requires an RTC. We went this far before Peter raised the issue with noone else realizing it, so it seems like a good idea to me.

How about:
=====
Guest OSes in the VM image should rely on the UEFI RTC API for real time clock services. (To provide that API, the VM system will likely need to implement some real time clock device, but the details of these are a private implementation issue between it and its associated UEFI implementation.)
=====

?

thanks
-- PMM

#39 lore raw
In reply to Jon Masters
Quoted 17 lines · Jon Masters
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · On Wednesday 11 June 2014 10:16:03 Paolo Bonzini wrote:
Quoted 4 lines

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

The RTC is not needed for ordinary operation of the kernel and, in the current kernel, the EFI RTC driver is only used for IA64. However, it seems to be platform independent. I'll give it a shot (on x86, since that's the only architecture for which I know how to get UEFI firmware).

Quoted 4 lines

Using the EFI RTC seems appropriate for ARM, as it's a reasonable abstraction that should work with any hypervisor. I suspect the only reason we don't use it on x86 is that we know which RTC hardware we have and the kernel comes with a mandatory driver already.

Quoted 8 lines

(sorry for delay in responding to this thread)

Indeed. We should use the EFI RTC driver in general, rather than push for many individual RTC drivers on aarch64 systems that are EFI enabled. Within Red Hat, we currently have EFI Runtime Services live in many of our labs and are using the EFI RTC. This is the way forward.

Seems like we should stick a note in there about being UEFI compatible requires an RTC. We went this far before Peter raised the issue with noone else realizing it, so it seems like a good idea to me.

-Christoffer

#40 lore raw
In reply to Arnd Bergmann
Quoted 11 lines · Arnd Bergmann
Quoted 9 lines · On Wednesday 11 June 2014 10:16:03 Paolo Bonzini wrote:
Quoted 4 lines

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

The RTC is not needed for ordinary operation of the kernel and, in the current kernel, the EFI RTC driver is only used for IA64. However, it seems to be platform independent. I'll give it a shot (on x86, since that's the only architecture for which I know how to get UEFI firmware).

Quoted 4 lines

Using the EFI RTC seems appropriate for ARM, as it's a reasonable abstraction that should work with any hypervisor. I suspect the only reason we don't use it on x86 is that we know which RTC hardware we have and the kernel comes with a mandatory driver already.

(sorry for delay in responding to this thread)

Indeed. We should use the EFI RTC driver in general, rather than push for many individual RTC drivers on aarch64 systems that are EFI enabled. Within Red Hat, we currently have EFI Runtime Services live in many of our labs and are using the EFI RTC. This is the way forward.

Jon.

#41 lore raw
In reply to Paolo Bonzini
Quoted 9 lines · On Wednesday 11 June 2014 10:16:03 Paolo Bonzini wrote:
Quoted 4 lines

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

The RTC is not needed for ordinary operation of the kernel and, in the current kernel, the EFI RTC driver is only used for IA64. However, it seems to be platform independent. I'll give it a shot (on x86, since that's the only architecture for which I know how to get UEFI firmware).

Using the EFI RTC seems appropriate for ARM, as it's a reasonable abstraction that should work with any hypervisor. I suspect the only reason we don't use it on x86 is that we know which RTC hardware we have and the kernel comes with a mandatory driver already.

Arnd

maintainer
#42 lore raw
In reply to Christoffer Dall

Il 11/06/2014 08:54, Christoffer Dall ha scritto:

Quoted 7 lines

The problem is that the most common user problem with ARM VMs are that they boot the thing, and then get no output. So we wanted some way to make sure we know that the kernel should be able to print to a console.

UEFI does provide DBG2 output, but that's only during boot time service (so I'm told), and we need to mandate something that will work when the kernel boots.

Doh, indeed the console is not part of run-time services (so it's not even available for earlyprintk).

Quoted 3 lines

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

The RTC is not needed for ordinary operation of the kernel and, in the current kernel, the EFI RTC driver is only used for IA64. However, it seems to be platform independent. I'll give it a shot (on x86, since that's the only architecture for which I know how to get UEFI firmware).

Paolo

#43 lore raw
In reply to Paolo Bonzini
Quoted 30 lines · Paolo Bonzini

Il 10/06/2014 20:56, Paolo Bonzini ha scritto:

Quoted 17 lines

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 7 lines · Christopher Covington
Quoted 6 lines · Peter Maydell
Quoted 4 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Quoted 8 lines
Quoted 2 lines

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 8 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

So I agree that the RTC is required in UEFI.

... that said, just like I thought was the case for the serial console, do we need to specify the exact hardware models?

Quoted 9 lines

We can just say that the VM can expect UEFI boot and runtime services to work. This includes variable services, time services, the serial console protocols and more. It's up to the implementation to provide enough devices to support the firmware, and it's out of this spec's scope to specify the firmware's implementation.

I think even the serial devices should be removed.

The problem is that the most common user problem with ARM VMs are that they boot the thing, and then get no output. So we wanted some way to make sure we know that the kernel should be able to print to a console.

UEFI does provide DBG2 output, but that's only during boot time service (so I'm told), and we need to mandate something that will work when the kernel boots.

If kernels actually do use the UEFI runtime services and have no need for direct access to an RTC when runing in a UEFI compliant system, then I agree with not specifying the hardware details.

-Christoffer

maintainer
#44 lore raw
In reply to Paolo Bonzini

Il 10/06/2014 20:56, Paolo Bonzini ha scritto:

Quoted 17 lines

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 7 lines · Christopher Covington
Quoted 6 lines · Peter Maydell
Quoted 4 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Quoted 8 lines
Quoted 2 lines

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 8 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

So I agree that the RTC is required in UEFI.

... that said, just like I thought was the case for the serial console, do we need to specify the exact hardware models?

We can just say that the VM can expect UEFI boot and runtime services to work. This includes variable services, time services, the serial console protocols and more. It's up to the implementation to provide enough devices to support the firmware, and it's out of this spec's scope to specify the firmware's implementation.

I think even the serial devices should be removed.

Paolo

#45 lore raw
In reply to Paolo Bonzini
Quoted 23 lines · Paolo Bonzini

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 14 lines · Christopher Covington
Quoted 11 lines · Peter Maydell
Quoted 5 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

Quoted 5 lines

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 6 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

In practical terms, yes the VM needs to provide an RTC interface, but I don't think it needs to appear in this spec, even if the kernel accesses it directly. Portable images should use the UEFI service.

g.

#46 lore raw
Quoted 31 lines · On Wednesday 11 June 2014 12:33:30 Grant Likely wrote:
Quoted 23 lines · Paolo Bonzini

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 14 lines · Christopher Covington
Quoted 11 lines · Peter Maydell
Quoted 5 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

Quoted 5 lines

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 6 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

Quoted 3 lines

In practical terms, yes the VM needs to provide an RTC interface, but I don't think it needs to appear in this spec, even if the kernel accesses it directly. Portable images should use the UEFI service.

It sounds like it should be in the spec then, if we want people building portable images to include the efi-rtc driver.

Arnd

#47 lore raw
Quoted 32 lines · Arnd Bergmann
Quoted 31 lines · On Wednesday 11 June 2014 12:33:30 Grant Likely wrote:
Quoted 29 lines · Paolo Bonzini

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 14 lines · Christopher Covington
Quoted 11 lines · Peter Maydell
Quoted 5 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

Quoted 5 lines

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

Quoted 6 lines
Quoted 3 lines

In practical terms, yes the VM needs to provide an RTC interface, but I don't think it needs to appear in this spec, even if the kernel accesses it directly. Portable images should use the UEFI service.

It sounds like it should be in the spec then, if we want people building portable images to include the efi-rtc driver.

Fair enough.

g.

#48 lore raw
In reply to Arnd Bergmann
Quoted 32 lines · Arnd Bergmann
Quoted 31 lines · On Wednesday 11 June 2014 12:33:30 Grant Likely wrote:
Quoted 29 lines · Paolo Bonzini

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 14 lines · Christopher Covington
Quoted 11 lines · Peter Maydell
Quoted 5 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

Quoted 5 lines

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

Quoted 6 lines
Quoted 3 lines

In practical terms, yes the VM needs to provide an RTC interface, but I don't think it needs to appear in this spec, even if the kernel accesses it directly. Portable images should use the UEFI service.

It sounds like it should be in the spec then, if we want people building portable images to include the efi-rtc driver.

Fair enough.

g.

#49 lore raw
In reply to Grant Likely
Quoted 31 lines · On Wednesday 11 June 2014 12:33:30 Grant Likely wrote:
Quoted 23 lines · Paolo Bonzini

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 14 lines · Christopher Covington
Quoted 11 lines · Peter Maydell
Quoted 5 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

Quoted 5 lines

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 6 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

Quoted 3 lines

In practical terms, yes the VM needs to provide an RTC interface, but I don't think it needs to appear in this spec, even if the kernel accesses it directly. Portable images should use the UEFI service.

It sounds like it should be in the spec then, if we want people building portable images to include the efi-rtc driver.

Arnd

#50 lore raw
In reply to Grant Likely
Quoted 3 lines · Grant Likely

In practical terms, yes the VM needs to provide an RTC interface, but I don't think it needs to appear in this spec, even if the kernel accesses it directly. Portable images should use the UEFI service.

I think it might helpful to include some implementation notes to the effect that the VM needs to provide certain things to the associated UEFI implementation but that these aren't part of the specification and the guest OS is expected to use the UEFI interfaces, just for the sake of clarity for people who aren't too familiar with what UEFI requires or provides.

thanks
-- PMM

#51 lore raw
In reply to Grant Likely
Quoted 3 lines · Grant Likely

In practical terms, yes the VM needs to provide an RTC interface, but I don't think it needs to appear in this spec, even if the kernel accesses it directly. Portable images should use the UEFI service.

I think it might helpful to include some implementation notes to the effect that the VM needs to provide certain things to the associated UEFI implementation but that these aren't part of the specification and the guest OS is expected to use the UEFI interfaces, just for the sake of clarity for people who aren't too familiar with what UEFI requires or provides.

thanks
-- PMM

#52 lore raw
In reply to Paolo Bonzini
Quoted 23 lines · Paolo Bonzini

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 14 lines · Christopher Covington
Quoted 11 lines · Peter Maydell
Quoted 5 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

Quoted 5 lines

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

Quoted 6 lines

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

In practical terms, yes the VM needs to provide an RTC interface, but I don't think it needs to appear in this spec, even if the kernel accesses it directly. Portable images should use the UEFI service.

g.

maintainer
#53 lore raw
In reply to Peter Maydell

Il 10/06/2014 20:08, Peter Maydell ha scritto:

Quoted 7 lines · Christopher Covington
Quoted 6 lines · Peter Maydell
Quoted 4 lines

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Quoted 8 lines
Quoted 2 lines

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

The real-time clock provides four UEFI runtime services (GetTime, SetTime, GetWakeupTime, SetWakeupTime). The spec says that you can return EFI_DEVICE_ERROR from GetTime/SetTime if "the time could not be retrieved/set due to a hardware error", but I don't think this is enough to make these two optional. By comparison, GetWakeupTime/SetWakeupTime can also return EFI_UNSUPPORTED.

So I agree that the RTC is required in UEFI.

Paolo

#54 lore raw
In reply to Christopher Covington
Quoted 8 lines · Christopher Covington
Quoted 4 lines · Peter Maydell

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

So my naive view was that an RTC actually had to have support for dealing with real (wall) clock time, ie knowing it's 2014 and not 1970. The generic timers are just timers. Or am I wrong and UEFI doesn't really require that?

It's also handy if you're booting Linux directly without UEFI, since it means you can actually have a /dev/rtc0 (and QEMU's implementation at least will correctly give you the time based on the host's RTC).

thanks
-- PMM

#55 lore raw
In reply to Peter Maydell

Hi Peter,

Quoted 15 lines · Peter Maydell
Quoted 14 lines · Christoffer Dall

ARM VM System Specification
===========================

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.

Quoted 7 lines
Quoted 2 lines

The ARM virtual timer and counter should be available to the VM as per the ARM Generic Timers specification in the ARM ARM [1].

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Pardon my ignorance, but what exactly disqualifies Generic Timer implementations from being used as Real Time Clocks?

Thanks,
Christopher

Signature · 3 lines
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
hosted by the Linux Foundation.
#56 lore raw
In reply to Christoffer Dall
Quoted 10 lines · Christoffer Dall

ARM VM System Specification
===========================

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.

Quoted 6 lines

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].

I just noticed that this doesn't mandate that the platform provides an RTC. As I understand it, the UEFI spec mandates that there's an RTC (could somebody more familiar with UEFI than me confirm/deny that?) so we should probably put one here.

Suggested wording:

RTC: The platform should provide a real time clock, based on an emulated pl031 or mc146818.

and in the guest-support section later:

The guest OS must include support for pl031 and mc146818 RTC.

(QEMU is going to provide a PL031, because that's the standard ARM primecell device for this and it's what's in the vexpress. kvmtool looks like it's going to provide mc146818, because that's the standard x86 RTC and kvmtool happens to already emulate that.)

thanks
-- PMM

#57 lore raw
In reply to Christoffer Dall

Hello all,

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project. I don't know if that's something that could be useful for your specification effort.

In OSv, creating and starting a VM to some level means starting an application.
That is, OSv should be a very thin bare bones guest server OS, which also acts as a kind of run-time library for an application to run. All the devices are assumed to be virtualized and heavily relying on virtio.

Therefore we see a higher need for quick VM launch than it might be for other use cases.

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low. Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

Thank you for your comments,

Claudio

Quoted 179 lines · Christoffer Dall

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.

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, 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 as specified in Section 3.3 (3.3 (Boot Option Variables Default Boot Behavior) and 3.4.1.1 (Removable Media Boot Behavior) in [6].

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 UEFI compliant in order to 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.

This document strongly recommends that VM implementations implement persistent variable storage for their UEFI implementation. Persistent variable storage shall be a property of a VM instance, but shall not be stored as part of a portable disk image. Portable disk images shall conform to the UEFI removable disk requirements from the UEFI spec and cannot rely on on a pre-configured UEFI environment.

The binary UEFI firmware implementation should not be distributed as part of the VM image, but is specific to the VM implementation.

Hardware Description
--------------------
The VM system must be UEFI compliant and therefore the UEFI system table will provide a means to access hardware description data.

The VM implementation must provide through its UEFI implementation:

a complete FDT which describes the entire VM system and will boot mainline kernels driven by device tree alone

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 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) or a bus-specific mechanism such as PCI.

If aarch64 physical CPUs implement support for the aarch32 execution state in EL1 and EL0 execution, it is recommended that the VM implementation supports booting the VM at EL1 in both aarch32 and aarch64 execution states.

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].

It is strongly recommended that the VM implementation provides 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.

For the VM image to be compliant with this spec, the following applies for the guest OS in the VM image:

The guest OS must include support for pl011 UART, virtio-console, and the Xen PV console.

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.

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.

Changes from previous versions of this RFC
------------------------------------------
Changes v1-v2:
- Clearly specify that the guest must support the pl011, virtio-console, and Xen PV console. (Note that it was discussed to mandate a pl011 during Linaro Connect Asia 2014, but that was under the impression that the SBSA specification was an output-only no-irq serial port, which is not the case. The only two benefits from mandating a specific serial type was to handle "console=ttyAMA0" kernel command line parameters and earlyprintk; Grant Likely has submitted patches to avoid the need for "console=" parameters, and Rob Herring has submitted patches for paravirtualized earlyprintk consoles.)
- Reference EFI specification for bootable paths.
- Remove discussion on ACPI boot methods and do not suggest ACPI support in VMs.
- Add specification about UEFI persistent variable storage and portability.

References
----------
[1]: The ARM Architecture Reference Manual, ARMv8, Issue A.b
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[2]: ARM Server Base System Architecture
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html

[3]: The ARM Generic Interrupt Controller Architecture Specifications v2.0
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[4]: http://www.secretlab.ca/archives/27

[5]: https://git.linaro.org/people/leif.lindholm/linux.git/blob/refs/heads/uefi-for-upstream:/Documentation/arm/uefi.txt

[6]: UEFI Specification 2.4 Revision A
http://www.uefi.org/sites/default/files/resources/2_4_Errata_A.pdf
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Signature · 13 lines
Claudio Fontana
Server Virtualization Architect
Huawei Technologies Duesseldorf GmbH
Riesstraße 25 - 80992 München

office: +49 89 158834 4135
mobile: +49 15253060158


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#58 lore raw
Quoted 6 lines · On Tuesday 10 June 2014 18:44:59 Claudio Fontana wrote:

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project.
By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low.
Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

My feeling is that it's out of scope for this specification. What you are doing is great, and you should keep doing it that way.

It does mean that your applications are aware of which hypervisor they are running on, and you have to manage them using OSv specific tools on the host.

The VM System Specification however is meant to provide a way to distribute a file system image for a virtual machine that can run on any compliant hypervisor using any compliant management tools. The reason it goes through all the boot loader steps is to make it much closer to a real system, so distros don't have to special-case this.

If you don't care about that, you can just install the tools on the host to manage your OSv application without a boot loader. In particular, you can support multiple targets on OSv: e.g. native Xen, native KVM, and portable standard hypervisor following the ARM VM System Spec.

Arnd

#59 lore raw
In reply to Claudio Fontana
Quoted 6 lines · On Tuesday 10 June 2014 18:44:59 Claudio Fontana wrote:

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project.
By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low.
Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

My feeling is that it's out of scope for this specification. What you are doing is great, and you should keep doing it that way.

It does mean that your applications are aware of which hypervisor they are running on, and you have to manage them using OSv specific tools on the host.

The VM System Specification however is meant to provide a way to distribute a file system image for a virtual machine that can run on any compliant hypervisor using any compliant management tools. The reason it goes through all the boot loader steps is to make it much closer to a real system, so distros don't have to special-case this.

If you don't care about that, you can just install the tools on the host to manage your OSv application without a boot loader. In particular, you can support multiple targets on OSv: e.g. native Xen, native KVM, and portable standard hypervisor following the ARM VM System Spec.

Arnd

#60 lore raw
In reply to Claudio Fontana

Although not in the ARM VM System Specification, Xen is certainly going to support a fast boot path without UEFI firmware. I guess KVM will too. You'll have to rely on hypervisor specific mechanisms to achieve it.

In fact I wouldn't worry about UEFI when you need ACPI, that is not in this specification. Moreover the only hypervisor supporting virtio on ARM is KVM as far as I know.

So it looks like you are already tying yourself to one hypervisor (KVM) and an out-of-spec standard (ACPI). The ARM VM System Specification is for people that intend to produce cross-hypervisor images.

Quoted 216 lines · Claudio Fontana

Hello all,

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project. I don't know if that's something that could be useful for your specification effort.

In OSv, creating and starting a VM to some level means starting an application.
That is, OSv should be a very thin bare bones guest server OS, which also acts as a kind of run-time library for an application to run. All the devices are assumed to be virtualized and heavily relying on virtio.

Therefore we see a higher need for quick VM launch than it might be for other use cases.

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low. Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

Thank you for your comments,

Claudio

Quoted 179 lines · Christoffer Dall

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.

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, 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 as specified in Section 3.3 (3.3 (Boot Option Variables Default Boot Behavior) and 3.4.1.1 (Removable Media Boot Behavior) in [6].

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 UEFI compliant in order to 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.

This document strongly recommends that VM implementations implement persistent variable storage for their UEFI implementation. Persistent variable storage shall be a property of a VM instance, but shall not be stored as part of a portable disk image. Portable disk images shall conform to the UEFI removable disk requirements from the UEFI spec and cannot rely on on a pre-configured UEFI environment.

The binary UEFI firmware implementation should not be distributed as part of the VM image, but is specific to the VM implementation.

Hardware Description
--------------------
The VM system must be UEFI compliant and therefore the UEFI system table will provide a means to access hardware description data.

The VM implementation must provide through its UEFI implementation:

a complete FDT which describes the entire VM system and will boot mainline kernels driven by device tree alone

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 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) or a bus-specific mechanism such as PCI.

If aarch64 physical CPUs implement support for the aarch32 execution state in EL1 and EL0 execution, it is recommended that the VM implementation supports booting the VM at EL1 in both aarch32 and aarch64 execution states.

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].

It is strongly recommended that the VM implementation provides 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.

For the VM image to be compliant with this spec, the following applies for the guest OS in the VM image:

The guest OS must include support for pl011 UART, virtio-console, and the Xen PV console.

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.

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.

Changes from previous versions of this RFC
------------------------------------------
Changes v1-v2:
- Clearly specify that the guest must support the pl011, virtio-console, and Xen PV console. (Note that it was discussed to mandate a pl011 during Linaro Connect Asia 2014, but that was under the impression that the SBSA specification was an output-only no-irq serial port, which is not the case. The only two benefits from mandating a specific serial type was to handle "console=ttyAMA0" kernel command line parameters and earlyprintk; Grant Likely has submitted patches to avoid the need for "console=" parameters, and Rob Herring has submitted patches for paravirtualized earlyprintk consoles.)
- Reference EFI specification for bootable paths.
- Remove discussion on ACPI boot methods and do not suggest ACPI support in VMs.
- Add specification about UEFI persistent variable storage and portability.

References
----------
[1]: The ARM Architecture Reference Manual, ARMv8, Issue A.b
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[2]: ARM Server Base System Architecture
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html

[3]: The ARM Generic Interrupt Controller Architecture Specifications v2.0
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[4]: http://www.secretlab.ca/archives/27

[5]: https://git.linaro.org/people/leif.lindholm/linux.git/blob/refs/heads/uefi-for-upstream:/Documentation/arm/uefi.txt

[6]: UEFI Specification 2.4 Revision A
http://www.uefi.org/sites/default/files/resources/2_4_Errata_A.pdf
_______________________________________________
kvmarm mailing list
kvmarm at lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Signature · 7 lines
Claudio Fontana
Server Virtualization Architect
Huawei Technologies Duesseldorf GmbH
Riesstra?e 25 - 80992 M?nchen

office: +49 89 158834 4135
mobile: +49 15253060158
#61 lore raw

Agree with what Stefano says, and I strongly recommend you reconsider your position on FDT vs. ACPI for ARM VMs, but it's completely up to you of course :)

-Christoffer

Quoted 230 lines · Stefano Stabellini

Although not in the ARM VM System Specification, Xen is certainly going to support a fast boot path without UEFI firmware. I guess KVM will too. You'll have to rely on hypervisor specific mechanisms to achieve it.

In fact I wouldn't worry about UEFI when you need ACPI, that is not in this specification. Moreover the only hypervisor supporting virtio on ARM is KVM as far as I know.

So it looks like you are already tying yourself to one hypervisor (KVM) and an out-of-spec standard (ACPI). The ARM VM System Specification is for people that intend to produce cross-hypervisor images.

Quoted 216 lines · Claudio Fontana

Hello all,

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project. I don't know if that's something that could be useful for your specification effort.

In OSv, creating and starting a VM to some level means starting an application.
That is, OSv should be a very thin bare bones guest server OS, which also acts as a kind of run-time library for an application to run. All the devices are assumed to be virtualized and heavily relying on virtio.

Therefore we see a higher need for quick VM launch than it might be for other use cases.

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low. Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

Thank you for your comments,

Claudio

Quoted 179 lines · Christoffer Dall

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.

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, 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 as specified in Section 3.3 (3.3 (Boot Option Variables Default Boot Behavior) and 3.4.1.1 (Removable Media Boot Behavior) in [6].

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 UEFI compliant in order to 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.

This document strongly recommends that VM implementations implement persistent variable storage for their UEFI implementation. Persistent variable storage shall be a property of a VM instance, but shall not be stored as part of a portable disk image. Portable disk images shall conform to the UEFI removable disk requirements from the UEFI spec and cannot rely on on a pre-configured UEFI environment.

The binary UEFI firmware implementation should not be distributed as part of the VM image, but is specific to the VM implementation.

Hardware Description
--------------------
The VM system must be UEFI compliant and therefore the UEFI system table will provide a means to access hardware description data.

The VM implementation must provide through its UEFI implementation:

a complete FDT which describes the entire VM system and will boot mainline kernels driven by device tree alone

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 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) or a bus-specific mechanism such as PCI.

If aarch64 physical CPUs implement support for the aarch32 execution state in EL1 and EL0 execution, it is recommended that the VM implementation supports booting the VM at EL1 in both aarch32 and aarch64 execution states.

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].

It is strongly recommended that the VM implementation provides 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.

For the VM image to be compliant with this spec, the following applies for the guest OS in the VM image:

The guest OS must include support for pl011 UART, virtio-console, and the Xen PV console.

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.

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.

Changes from previous versions of this RFC
------------------------------------------
Changes v1-v2:
- Clearly specify that the guest must support the pl011, virtio-console, and Xen PV console. (Note that it was discussed to mandate a pl011 during Linaro Connect Asia 2014, but that was under the impression that the SBSA specification was an output-only no-irq serial port, which is not the case. The only two benefits from mandating a specific serial type was to handle "console=ttyAMA0" kernel command line parameters and earlyprintk; Grant Likely has submitted patches to avoid the need for "console=" parameters, and Rob Herring has submitted patches for paravirtualized earlyprintk consoles.)
- Reference EFI specification for bootable paths.
- Remove discussion on ACPI boot methods and do not suggest ACPI support in VMs.
- Add specification about UEFI persistent variable storage and portability.

References
----------
[1]: The ARM Architecture Reference Manual, ARMv8, Issue A.b
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[2]: ARM Server Base System Architecture
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html

[3]: The ARM Generic Interrupt Controller Architecture Specifications v2.0
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[4]: http://www.secretlab.ca/archives/27

[5]: https://git.linaro.org/people/leif.lindholm/linux.git/blob/refs/heads/uefi-for-upstream:/Documentation/arm/uefi.txt

[6]: UEFI Specification 2.4 Revision A
http://www.uefi.org/sites/default/files/resources/2_4_Errata_A.pdf
_______________________________________________
kvmarm mailing list
kvmarm at lists.cs.columbia.edu
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Signature · 7 lines
Claudio Fontana
Server Virtualization Architect
Huawei Technologies Duesseldorf GmbH
Riesstra?e 25 - 80992 M?nchen

office: +49 89 158834 4135
mobile: +49 15253060158
#62 lore raw
Quoted 3 lines · Christoffer Dall

Agree with what Stefano says, and I strongly recommend you reconsider your position on FDT vs. ACPI for ARM VMs, but it's completely up to you of course :)

Not entirely. The plan right now is to only support ACPI when booting with UEFI. If they don't use UEFI, then ACPI will not be available. If OSv only supports ACPI, then it is forced to use the UEFI boot path.

g.

#63 lore raw
Quoted 7 lines · Grant Likely
Quoted 3 lines · Christoffer Dall

Agree with what Stefano says, and I strongly recommend you reconsider your position on FDT vs. ACPI for ARM VMs, but it's completely up to you of course :)

Not entirely.

of course it's up to them what they want to do.

Quoted 4 lines

The plan right now is to only support ACPI when booting with UEFI. If they don't use UEFI, then ACPI will not be available. If OSv only supports ACPI, then it is forced to use the UEFI boot path.

The plan right now is to not support ACPI in VMs at all, as per the last discussion at LCA14. If an when someone wants to add that, fine, but the spec mandates FDT describing the full system.

If OSv wants to hack a KVM implementation or provide a static ACPI blob coupled to OSv that happens to describe the KVM/ARM/QEMU system model, then they can do that. Crazy, it sounds to me, but as I said, up to the OSv guys.

-Christoffer

#64 lore raw
In reply to Grant Likely
Quoted 7 lines · Grant Likely
Quoted 3 lines · Christoffer Dall

Agree with what Stefano says, and I strongly recommend you reconsider your position on FDT vs. ACPI for ARM VMs, but it's completely up to you of course :)

Not entirely.

of course it's up to them what they want to do.

Quoted 4 lines

The plan right now is to only support ACPI when booting with UEFI. If they don't use UEFI, then ACPI will not be available. If OSv only supports ACPI, then it is forced to use the UEFI boot path.

The plan right now is to not support ACPI in VMs at all, as per the last discussion at LCA14. If an when someone wants to add that, fine, but the spec mandates FDT describing the full system.

If OSv wants to hack a KVM implementation or provide a static ACPI blob coupled to OSv that happens to describe the KVM/ARM/QEMU system model, then they can do that. Crazy, it sounds to me, but as I said, up to the OSv guys.

-Christoffer

#65 lore raw
In reply to Christoffer Dall
Quoted 3 lines · Christoffer Dall

Agree with what Stefano says, and I strongly recommend you reconsider your position on FDT vs. ACPI for ARM VMs, but it's completely up to you of course :)

Not entirely. The plan right now is to only support ACPI when booting with UEFI. If they don't use UEFI, then ACPI will not be available. If OSv only supports ACPI, then it is forced to use the UEFI boot path.

g.

#66 lore raw
In reply to Stefano Stabellini

Agree with what Stefano says, and I strongly recommend you reconsider your position on FDT vs. ACPI for ARM VMs, but it's completely up to you of course :)

-Christoffer

Quoted 230 lines · Stefano Stabellini

Although not in the ARM VM System Specification, Xen is certainly going to support a fast boot path without UEFI firmware. I guess KVM will too. You'll have to rely on hypervisor specific mechanisms to achieve it.

In fact I wouldn't worry about UEFI when you need ACPI, that is not in this specification. Moreover the only hypervisor supporting virtio on ARM is KVM as far as I know.

So it looks like you are already tying yourself to one hypervisor (KVM) and an out-of-spec standard (ACPI). The ARM VM System Specification is for people that intend to produce cross-hypervisor images.

Quoted 216 lines · Claudio Fontana

Hello all,

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project. I don't know if that's something that could be useful for your specification effort.

In OSv, creating and starting a VM to some level means starting an application.
That is, OSv should be a very thin bare bones guest server OS, which also acts as a kind of run-time library for an application to run. All the devices are assumed to be virtualized and heavily relying on virtio.

Therefore we see a higher need for quick VM launch than it might be for other use cases.

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low. Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

Thank you for your comments,

Claudio

Quoted 179 lines · Christoffer Dall

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.

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, 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 as specified in Section 3.3 (3.3 (Boot Option Variables Default Boot Behavior) and 3.4.1.1 (Removable Media Boot Behavior) in [6].

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 UEFI compliant in order to 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.

This document strongly recommends that VM implementations implement persistent variable storage for their UEFI implementation. Persistent variable storage shall be a property of a VM instance, but shall not be stored as part of a portable disk image. Portable disk images shall conform to the UEFI removable disk requirements from the UEFI spec and cannot rely on on a pre-configured UEFI environment.

The binary UEFI firmware implementation should not be distributed as part of the VM image, but is specific to the VM implementation.

Hardware Description
--------------------
The VM system must be UEFI compliant and therefore the UEFI system table will provide a means to access hardware description data.

The VM implementation must provide through its UEFI implementation:

a complete FDT which describes the entire VM system and will boot mainline kernels driven by device tree alone

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 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) or a bus-specific mechanism such as PCI.

If aarch64 physical CPUs implement support for the aarch32 execution state in EL1 and EL0 execution, it is recommended that the VM implementation supports booting the VM at EL1 in both aarch32 and aarch64 execution states.

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].

It is strongly recommended that the VM implementation provides 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.

For the VM image to be compliant with this spec, the following applies for the guest OS in the VM image:

The guest OS must include support for pl011 UART, virtio-console, and the Xen PV console.

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.

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.

Changes from previous versions of this RFC
------------------------------------------
Changes v1-v2:
- Clearly specify that the guest must support the pl011, virtio-console, and Xen PV console. (Note that it was discussed to mandate a pl011 during Linaro Connect Asia 2014, but that was under the impression that the SBSA specification was an output-only no-irq serial port, which is not the case. The only two benefits from mandating a specific serial type was to handle "console=ttyAMA0" kernel command line parameters and earlyprintk; Grant Likely has submitted patches to avoid the need for "console=" parameters, and Rob Herring has submitted patches for paravirtualized earlyprintk consoles.)
- Reference EFI specification for bootable paths.
- Remove discussion on ACPI boot methods and do not suggest ACPI support in VMs.
- Add specification about UEFI persistent variable storage and portability.

References
----------
[1]: The ARM Architecture Reference Manual, ARMv8, Issue A.b
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[2]: ARM Server Base System Architecture
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html

[3]: The ARM Generic Interrupt Controller Architecture Specifications v2.0
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[4]: http://www.secretlab.ca/archives/27

[5]: https://git.linaro.org/people/leif.lindholm/linux.git/blob/refs/heads/uefi-for-upstream:/Documentation/arm/uefi.txt

[6]: UEFI Specification 2.4 Revision A
http://www.uefi.org/sites/default/files/resources/2_4_Errata_A.pdf
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Signature · 7 lines
Claudio Fontana
Server Virtualization Architect
Huawei Technologies Duesseldorf GmbH
Riesstraße 25 - 80992 München

office: +49 89 158834 4135
mobile: +49 15253060158
#67 lore raw
In reply to Stefano Stabellini
Quoted 7 lines · On Wednesday 11 June 2014 10:50:04 Stefano Stabellini wrote:

Although not in the ARM VM System Specification, Xen is certainly going to support a fast boot path without UEFI firmware. I guess KVM will too. You'll have to rely on hypervisor specific mechanisms to achieve it.

In fact I wouldn't worry about UEFI when you need ACPI, that is not in this specification. Moreover the only hypervisor supporting virtio on ARM is KVM as far as I know.

Ah right, I missed the part about ACPI.

Quoted 6 lines
Quoted 6 lines

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

I wonder how you'd expect to find the ACPI data when there is no UEFI. It's not likely that any hypervisor would ship with an ACPI implementation that is independent of UEFI, because Linux (or any other full OS for that matter) would support that scenario. You could of course link OSv with an ACPI binary that is specific to KVM, but then I don't know why you wouldn't just hardcode the data in OSv directly.

Arnd

#68 lore raw
In reply to Stefano Stabellini
Quoted 7 lines · On Wednesday 11 June 2014 10:50:04 Stefano Stabellini wrote:

Although not in the ARM VM System Specification, Xen is certainly going to support a fast boot path without UEFI firmware. I guess KVM will too. You'll have to rely on hypervisor specific mechanisms to achieve it.

In fact I wouldn't worry about UEFI when you need ACPI, that is not in this specification. Moreover the only hypervisor supporting virtio on ARM is KVM as far as I know.

Ah right, I missed the part about ACPI.

Quoted 6 lines
Quoted 6 lines

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

I wonder how you'd expect to find the ACPI data when there is no UEFI. It's not likely that any hypervisor would ship with an ACPI implementation that is independent of UEFI, because Linux (or any other full OS for that matter) would support that scenario. You could of course link OSv with an ACPI binary that is specific to KVM, but then I don't know why you wouldn't just hardcode the data in OSv directly.

Arnd

#69 lore raw
In reply to Claudio Fontana

Although not in the ARM VM System Specification, Xen is certainly going to support a fast boot path without UEFI firmware. I guess KVM will too. You'll have to rely on hypervisor specific mechanisms to achieve it.

In fact I wouldn't worry about UEFI when you need ACPI, that is not in this specification. Moreover the only hypervisor supporting virtio on ARM is KVM as far as I know.

So it looks like you are already tying yourself to one hypervisor (KVM) and an out-of-spec standard (ACPI). The ARM VM System Specification is for people that intend to produce cross-hypervisor images.

Quoted 198 lines · Claudio Fontana

Hello all,

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project. I don't know if that's something that could be useful for your specification effort.

In OSv, creating and starting a VM to some level means starting an application.
That is, OSv should be a very thin bare bones guest server OS, which also acts as a kind of run-time library for an application to run. All the devices are assumed to be virtualized and heavily relying on virtio.

Therefore we see a higher need for quick VM launch than it might be for other use cases.

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low. Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

Thank you for your comments,

Claudio

Quoted 172 lines · Christoffer Dall

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.

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, 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 as specified in Section 3.3 (3.3 (Boot Option Variables Default Boot Behavior) and 3.4.1.1 (Removable Media Boot Behavior) in [6].

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 UEFI compliant in order to 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.

This document strongly recommends that VM implementations implement persistent variable storage for their UEFI implementation. Persistent variable storage shall be a property of a VM instance, but shall not be stored as part of a portable disk image. Portable disk images shall conform to the UEFI removable disk requirements from the UEFI spec and cannot rely on on a pre-configured UEFI environment.

The binary UEFI firmware implementation should not be distributed as part of the VM image, but is specific to the VM implementation.

Hardware Description
--------------------
The VM system must be UEFI compliant and therefore the UEFI system table will provide a means to access hardware description data.

The VM implementation must provide through its UEFI implementation:

a complete FDT which describes the entire VM system and will boot mainline kernels driven by device tree alone

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 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) or a bus-specific mechanism such as PCI.

If aarch64 physical CPUs implement support for the aarch32 execution state in EL1 and EL0 execution, it is recommended that the VM implementation supports booting the VM at EL1 in both aarch32 and aarch64 execution states.

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].

It is strongly recommended that the VM implementation provides 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.

For the VM image to be compliant with this spec, the following applies for the guest OS in the VM image:

The guest OS must include support for pl011 UART, virtio-console, and the Xen PV console.

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.

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.

Changes from previous versions of this RFC
------------------------------------------
Changes v1-v2:
- Clearly specify that the guest must support the pl011, virtio-console, and Xen PV console. (Note that it was discussed to mandate a pl011 during Linaro Connect Asia 2014, but that was under the impression that the SBSA specification was an output-only no-irq serial port, which is not the case. The only two benefits from mandating a specific serial type was to handle "console=ttyAMA0" kernel command line parameters and earlyprintk; Grant Likely has submitted patches to avoid the need for "console=" parameters, and Rob Herring has submitted patches for paravirtualized earlyprintk consoles.)
- Reference EFI specification for bootable paths.
- Remove discussion on ACPI boot methods and do not suggest ACPI support in VMs.
- Add specification about UEFI persistent variable storage and portability.

References
----------
[1]: The ARM Architecture Reference Manual, ARMv8, Issue A.b
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[2]: ARM Server Base System Architecture
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html

[3]: The ARM Generic Interrupt Controller Architecture Specifications v2.0
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[4]: http://www.secretlab.ca/archives/27

[5]: https://git.linaro.org/people/leif.lindholm/linux.git/blob/refs/heads/uefi-for-upstream:/Documentation/arm/uefi.txt

Quoted 18 lines
Quoted 7 lines

[6]: UEFI Specification 2.4 Revision A
http://www.uefi.org/sites/default/files/resources/2_4_Errata_A.pdf
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Signature · 7 lines
Claudio Fontana
Server Virtualization Architect
Huawei Technologies Duesseldorf GmbH
Riesstraße 25 - 80992 München

office: +49 89 158834 4135
mobile: +49 15253060158

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel

#70 lore raw
In reply to Claudio Fontana
Quoted 10 lines · Claudio Fontana

Hello all,

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project. I don't know if that's something that could be useful for your specification effort.

In OSv, creating and starting a VM to some level means starting an application.
That is, OSv should be a very thin bare bones guest server OS, which also acts as a kind of run-time library for an application to run. All the devices are assumed to be virtualized and heavily relying on virtio.

Quoted 5 lines

Therefore we see a higher need for quick VM launch than it might be for other use cases.

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

The purpose of this spec is for creating portable disk images. It is intended to support the virtual-machine-looks-just-like-a-real-machine model, and is intended to provide exactly the same interface to installers as to real machines.

It isn't really interesting for use cases like OSv or anyone who wants to start the kernel directly. You don't need UEFI in that case because the host has pre-knowledge of which kernel binary to load. In that regard this spec doesn't affect you.

Quoted 2 lines

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

This may be a problem for you then. The only time we're planning to support ACPI in a VM is when UEFI is used for booting. Even the first version of this spec specifies FDT, not ACPI. FDT support is there now in Xen and KVM, but there is nothing for ACPI on ARM VMs.

What is the objection to obtaining discovery information from FDT?

Quoted 2 lines

By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low. Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

No, we're not requiring a full firmware stack to boot. As described above, this is only for booting disk images.

g.

#71 lore raw
In reply to Claudio Fontana
Quoted 10 lines · Claudio Fontana

Hello all,

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project. I don't know if that's something that could be useful for your specification effort.

In OSv, creating and starting a VM to some level means starting an application.
That is, OSv should be a very thin bare bones guest server OS, which also acts as a kind of run-time library for an application to run. All the devices are assumed to be virtualized and heavily relying on virtio.

Quoted 5 lines

Therefore we see a higher need for quick VM launch than it might be for other use cases.

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

The purpose of this spec is for creating portable disk images. It is intended to support the virtual-machine-looks-just-like-a-real-machine model, and is intended to provide exactly the same interface to installers as to real machines.

It isn't really interesting for use cases like OSv or anyone who wants to start the kernel directly. You don't need UEFI in that case because the host has pre-knowledge of which kernel binary to load. In that regard this spec doesn't affect you.

Quoted 2 lines

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

This may be a problem for you then. The only time we're planning to support ACPI in a VM is when UEFI is used for booting. Even the first version of this spec specifies FDT, not ACPI. FDT support is there now in Xen and KVM, but there is nothing for ACPI on ARM VMs.

What is the objection to obtaining discovery information from FDT?

Quoted 2 lines

By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low. Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

No, we're not requiring a full firmware stack to boot. As described above, this is only for booting disk images.

g.

#72 lore raw
In reply to Christoffer Dall

Hello all,

I just wanted to share with you guys how we are using virtualization on ARM64 over here for the OSv project. I don't know if that's something that could be useful for your specification effort.

In OSv, creating and starting a VM to some level means starting an application.
That is, OSv should be a very thin bare bones guest server OS, which also acts as a kind of run-time library for an application to run. All the devices are assumed to be virtualized and heavily relying on virtio.

Therefore we see a higher need for quick VM launch than it might be for other use cases.

One aspect of this is that we currently start executing the image directly (no UEFI involved on the guest), and in some cases we might not need a full fledged file system at all,
as the communication can happen via virtio channels.

We do have a need for ACPI for discovery of information like gic addresses, timers, interrupts... (no interest on device trees, really), and of PCI-E.

By skipping steps like UEFI, grub, firmware load, etc we strive to keep our application launch time low. Is this going to create problems for us in the future if you start requiring every VM to boot using those instead?

Thank you for your comments,

Claudio

Quoted 179 lines · Christoffer Dall

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.

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, 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 as specified in Section 3.3 (3.3 (Boot Option Variables Default Boot Behavior) and 3.4.1.1 (Removable Media Boot Behavior) in [6].

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 UEFI compliant in order to 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.

This document strongly recommends that VM implementations implement persistent variable storage for their UEFI implementation. Persistent variable storage shall be a property of a VM instance, but shall not be stored as part of a portable disk image. Portable disk images shall conform to the UEFI removable disk requirements from the UEFI spec and cannot rely on on a pre-configured UEFI environment.

The binary UEFI firmware implementation should not be distributed as part of the VM image, but is specific to the VM implementation.

Hardware Description
--------------------
The VM system must be UEFI compliant and therefore the UEFI system table will provide a means to access hardware description data.

The VM implementation must provide through its UEFI implementation:

a complete FDT which describes the entire VM system and will boot mainline kernels driven by device tree alone

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 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) or a bus-specific mechanism such as PCI.

If aarch64 physical CPUs implement support for the aarch32 execution state in EL1 and EL0 execution, it is recommended that the VM implementation supports booting the VM at EL1 in both aarch32 and aarch64 execution states.

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].

It is strongly recommended that the VM implementation provides 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.

For the VM image to be compliant with this spec, the following applies for the guest OS in the VM image:

The guest OS must include support for pl011 UART, virtio-console, and the Xen PV console.

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.

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.

Changes from previous versions of this RFC
------------------------------------------
Changes v1-v2:
- Clearly specify that the guest must support the pl011, virtio-console, and Xen PV console. (Note that it was discussed to mandate a pl011 during Linaro Connect Asia 2014, but that was under the impression that the SBSA specification was an output-only no-irq serial port, which is not the case. The only two benefits from mandating a specific serial type was to handle "console=ttyAMA0" kernel command line parameters and earlyprintk; Grant Likely has submitted patches to avoid the need for "console=" parameters, and Rob Herring has submitted patches for paravirtualized earlyprintk consoles.)
- Reference EFI specification for bootable paths.
- Remove discussion on ACPI boot methods and do not suggest ACPI support in VMs.
- Add specification about UEFI persistent variable storage and portability.

References
----------
[1]: The ARM Architecture Reference Manual, ARMv8, Issue A.b
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[2]: ARM Server Base System Architecture
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html

[3]: The ARM Generic Interrupt Controller Architecture Specifications v2.0
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.ddi0487a.b/index.html

[4]: http://www.secretlab.ca/archives/27

[5]: https://git.linaro.org/people/leif.lindholm/linux.git/blob/refs/heads/uefi-for-upstream:/Documentation/arm/uefi.txt

[6]: UEFI Specification 2.4 Revision A
http://www.uefi.org/sites/default/files/resources/2_4_Errata_A.pdf
_______________________________________________
kvmarm mailing list
[email protected]
https://lists.cs.columbia.edu/mailman/listinfo/kvmarm

Signature · 13 lines
Claudio Fontana
Server Virtualization Architect
Huawei Technologies Duesseldorf GmbH
Riesstraße 25 - 80992 München

office: +49 89 158834 4135
mobile: +49 15253060158


_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xen.org/xen-devel