Releases: mirage/mirage-xen
8.0.3
8.0.2
8.0.1
CHANGES:
- Improve performance and take the opportunity to resolve pending
processes which are only paused (withLwt.pause
) instead to
waiting a sleeping process (#49, @TheLortex, @dinosaure)
8.0.0
7.2.0
7.1.0
7.0.0
CHANGES:
- Disable formatting to allow CI to succeed (@hannesm, #34)
- Be able to compile & generate documentation even if
the package does not exists into the expecteddune
's workspace
(@TheLortex, @dinosaure, #37) - breaking change
mirage-xen
defines its ownOS
module:Xen_os
(@dinosaure, #38)
6.0.1
CHANGES:
- Fix OCaml documentation strings (#30 @hannesm)
- Add caml_get_wall_clock to retrieve the wall clock as int64 (#31 @hannesm)
- Don't require opam for the bindings compilation (#32 @sternenseemann)
- Remove checksum_stubs and alloc_pages_stubs (available in mirage-tcpip
and io-page), to keep in sync with mirage-solo5 (#33 @dinosaure, adapted
by @hannesm to mirage-xen)
v6.0.0
CHANGES:
Version 6.0.0 is a re-write of the MirageOS Xen platform stack, with the
overall goal of replacing Mini-OS and moving to a minimal, legacy-free codebase
which builds MirageOS unikernels as Xen PVHv2 domUs only. At the same time,
this change aligns the Xen backend with existing Solo5 backends as much as is
practical and replaces the OCaml runtime with that provided by
ocaml-freestanding.
This is a breaking change. MirageOS libraries and applications that make use of
Xen-specific APIs will need to be updated. See below for a list of the
interfaces that have changed.
Requirements changes:
- OCaml 4.08 or later and Dune 2.6 or later are required.
- Xen version 4.10 or later is required, as this is the earliest version which
provides production-quality and stable PVHv2 APIs. - Additionally, the custom Xen version 4.8 used by Qubes OS 4.0 is supported,
as this has enough of PVHv2 backported to it. - Only x86_64 hosts with HAP (EPT) are supported. Support for ARM32 has been
removed. Support for ARM64 may be added at a later date if there is interest.
Security posture improvements:
With the move to a Solo5 and ocaml-freestanding base MirageOS gains several
notable improvements to security posture for unikernels on Xen:
- Stack smashing protection is enabled unconditionally for all C code.
- W^X is enforced throughout, i.e.
.text
is read-execute,.rodata
is
read-only, non-executable and.data
, heap and stack are read-write and
non-executable. - The memory allocator used by the OCaml runtime is now dlmalloc (provided by
ocaml-freestanding), which is a big improvement over the Mini-OS malloc, and
incorporates features such as heap canaries.
Interface changes:
- The
Eventchn
andGeneration
modules, previously provided byxen-evtchn
have been folded intomirage-xen
asOS.Eventchn
andOS.Generation
respectively. Applications and libraries should replace any dependency on
xen-evtchn
with one onmirage-xen {>= "6.0.0"}
and use the corresponding
submodules inOS
directly. - The
OS.MM
module has been replaced with a newOS.Memory
module, with a
statistics interface modeled after stdlib'sGc
stat type. All units use the
system word size rather than pages, which were ill-defined. OS.Sched
has been removed. These interfaces (notably domain suspend/resume)
were present but never fully implemented in the old Xen stack. They are not
required for PVH domains or full-system suspend/resume and
applications/libraries should remove any calls to them.OS.Start_info
has been removed. These interfaces were specific to Xen PV,
and don't have a direct equivalent for PVH domains.OS.Xenctrl
has been removed. There are no known users of these interfaces,
which appear to be a left-over from earlier versions of the Xen stack.OS.Xen.virt_to_mfn
has been removed. This is a little-used low-level
vestige of Mini-OS, and in the Solo5-based virtual memory arrangement should
be replaced with the equivalent computation (addr >> 12
) in application
code directly.
Dependency changes:
- Now depends on
solo5-bindings-xen
(for the low-level VCPU initialisation
and startup) andocaml-freestanding
(for the OCaml runtime). It follows
that-freestanding
variants of existing packages such aszarith
andgmp
are used instead of-xen
variants. - The
io-page-xen
package is no longer used. Applications/libraries depending
on it should replace the dependency with one onio-page
. - As mentioned above, the
xen-evtchn
package is no longer used and
applications/libraries should replace their dependency with one on
mirage-xen {>= "6.0.0"}
.
C stubs changes:
alloc_pages_stubs.c
: added, provides stubs forIo_page
, as inmirage-solo5
.checksum_stubs.c
: added, provides stubs forTcpip
, as inmirage-solo5
.exit_stubs.c
: removed, equivalent provided byocaml-freestanding
.sched_stubs.c
: removed, no longer required.start_info_stubs.c
: removed, no longer required.xb_stubs.c
: removed, no users and no longer required.
Apart from the above, the majority of C stubs which are used by mirage-xen
have been renamed to follow the mirage_xen_XXX
rather than stub_XXX
convention.
The low-level C interfaces to Xen event channels (evtchn.c
) and grant tables
(gnttab.c
) have been re-written from scratch. Some additional interfaces have
been added to main.c
to replace functionality that was previously part of
start_info_stubs.c
(obtaining initial PV console and Xenstore ports and I/O
rings from Xen).
Due to issues with mixing PIC and non-PIC code when compiling the C stubs with
Dune, the build system has been adapted to use a foreign Makefile for
libmirage-xen_bindings.a
. This is the recommended method to use when building
libraries containing C code for use with MirageOS. See conversation in #23 for
details.
Relationship with the Solo5 Xen bindings:
For Xen, Solo5 only provides the initial PVH boot, VCPU setup/traps and C-side
PV console code. Some Mirage-internal private APIs are provided to allow
mirage-xen
to interact with the hypervisor -- this is fully explained in
Solo5 commit Solo5/solo5@f4b47d1 and follow-ups.