Skip to content

[RFC][V2] aarch64: basic Xen support#842

Merged
nyh merged 10 commits intocloudius-systems:masterfrom
sa-kib:aarch64-xen-v2
Jan 24, 2017
Merged

[RFC][V2] aarch64: basic Xen support#842
nyh merged 10 commits intocloudius-systems:masterfrom
sa-kib:aarch64-xen-v2

Conversation

@sa-kib
Copy link
Copy Markdown
Contributor

@sa-kib sa-kib commented Jan 24, 2017

hi OSv developers,
Here let me present you with second version of patches to allow OSv kernel to be loaded
under Xen hypervisor on AARCH64 platform.

previous discussion is here:
https://groups.google.com/forum/#!topic/osv-dev/15G00wWkB-s

Changes since initial RFC version:

  • added comments clarifying preboot header
  • fixed typos in commit msgs
  • use is_xen() macro instead of bool is_xen_found flag
  • reworked patch to detect hypervisor at runtime and choose console accordingly

This is basic stuff, which allows to initialise kernel and see log messages.
No SMP support yet, no heavy PV drivers yet and no application can be run.

Verified on Renesas R-Car board [1] and on qemu-aarch64 (for not to break anything)

[1] http://elinux.org/R-Car/Boards/Salvator-X

sa-kib added 10 commits January 24, 2017 12:24
Add Linux-resembling header at the begining of image,
so that it can be recognized and loaded by Xen ARM64 image loader,
and probably some other loaders too.

Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Modify HYPERVISOR_console_write() interface to accept const *char as argument,
so it is compliant with console::console_driver::write() interface.
Xen does not mangle input buffer upon CONSOLEIO_write hypercall.

Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Reviewed-by: Nadav Har'El <nyh@scylladb.com>
__ASSEMBLY__ definition is used extensively throughout bsd/ tree so
make ASFLAGS compatible with its usage.

Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Reviewed-by: Nadav Har'El <nyh@scylladb.com>
Continue boot if PCI host not found in DTB, as not every platform provides it,
namely non-x86 Xen guests doesn't seem to support PV PCI yet.

Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Reviewed-by: Nadav Har'El <nyh@scylladb.com>
Start device range from 0x3000000 so that aarch64 Xen guest can map gic.
This seems to be lowest address required.

Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Reviewed-by: Nadav Har'El <nyh@scylladb.com>
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Reviewed-by: Nadav Har'El <nyh@scylladb.com>
Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Reviewed-by: Nadav Har'El <nyh@scylladb.com>
Primitive driver that uses HYPERVISOR_console_io hypercall to provide early console.

Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
Xen crafts and provides a DTB with special node by which we can know
which hypervisor we're using and load corresponding drivers.

is_xen() macro introduced for future use.

Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
In case Xen is detected use xenconsole driver for output, otherwise
fallback to pl011 for backwards compatibility.

Signed-off-by: Sergiy Kibrik <sergiy.kibrik@globallogic.com>
@nyh nyh merged commit 7f92a57 into cloudius-systems:master Jan 24, 2017
@sa-kib sa-kib deleted the aarch64-xen-v2 branch February 6, 2017 11:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants