Add new board: Xen guest for ARM64
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v2 Latest posting 2/218 patches 0 repliesNew
- v2 posting 1/218 patches 0 repliesSuperseded
- v117 patches 0 repliesSuperseded
Changes in v2 from the cover letter
=================
1. Added test for new lib sscanf function
2. Fixed data cache maintenance process
3. Added more comments and explanations
4. Removed unnecessary code, which is not related to ARM64 architecture
5. Added board documentation
6. Coding style cleanup
7. Added MIT License
Patches in v2 posting 2/2 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/18 | Add MIT LicenseLicenses/ Licenses/ | +21 | 1 reply | |
| 2/18 | Kconfig: Introduce CONFIG_XENKconfig | +18 | 1 reply | |
| 3/18 | xen: Add essential and required interface headersinclude/ include/ include/ +11 more | +3242 | 1 reply | |
| 4/18 | board: Introduce xenguest_arm64 boardarch/ arch/ arch/ +9 more | +424 | 1 reply | |
| 5/18 | xen: Port Xen hypervisor related code from mini-osarch/ arch/ common/ +5 more | +393 | 1 reply | |
| 6/18 | xen: Port Xen event channel driver from mini-osdrivers/ drivers/ drivers/ +2 more | +242 | 1 reply | |
| 7/18 | serial: serial_xen: Add Xen PV serial driverarch/ board/ configs/ +4 more | +220 | 1 reply | |
| 8/18 | linux/compat.h: Add wait_event_timeout macroinclude/ | +54 | 1 reply | |
| 9/18 | lib: sscanf: add sscanf implementationinclude/ lib/ lib/ +3 more | +1011 | 4 replies | |
| 10/18 | xen: Port Xen bus driver from mini-osarch/ board/ drivers/ +4 more | +693 | 1 reply | |
| 11/18 | xen: Port Xen grant table driver from mini-osboard/ drivers/ drivers/ +3 more | +258 | 1 reply | |
| 12/18 | xen: pvblock: Add initial support for para-virtualized block drivercmd/ cmd/ cmd/ +12 more | +223 | 1 reply | |
| 13/18 | xen: pvblock: Enumerate virtual block devicesdrivers/ | +110 | 1 reply | |
| 14/18 | xen: pvblock: Read XenStore configuration and initializedrivers/ | +284 | 1 reply | |
| 15/18 | xen: pvblock: Implement front-back protocol and do IOdrivers/ drivers/ | +348 | 1 reply | |
| 16/18 | xen: pvblock: Print found devices indicesdrivers/ | +20 | 1 reply | |
| 17/18 | board: xen: De-initialize before jumping to Linuxboard/ drivers/ include/ | +22 | 1 reply | |
| 18/18 | doc: xen: Add Xen guest ARM64 board documentationdoc/ doc/ doc/ | +91 | 1 reply |
Reviews trailers per patch
5 of 18 patches have a Reviewed-by or Acked-by.
| Patch | Peng Fan | Simon Glass |
|---|---|---|
| 1/18 | ||
| 2/18 | ||
| 3/18 | A-b | |
| 4/18 | ||
| 5/18 | ||
| 6/18 | ||
| 7/18 | R-b | |
| 8/18 | ||
| 9/18 | ||
| 10/18 | ||
| 11/18 | ||
| 12/18 | ||
| 13/18 | R-b | |
| 14/18 | ||
| 15/18 | ||
| 16/18 | R-b | |
| 17/18 | R-b | |
| 18/18 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [RESEND PATCH v2 00/18] Add new board: Xen guest for ARM64
From: Anastasiia Lukianenko <[email protected]>
This work introduces Xen [1] guest ARM64 board support in U-Boot with para-virtualized (PV) [2] block and serial drivers: xenguest_arm64.
This board is to be run as a virtual Xen guest with U-boot as its primary bootloader. The rationale behind introducing this board is a better and simpler decoupling of the guest from the initial privileged domain which starts a guest?s virtual machine: there are cross dependencies between the guest OS and initial privileged domain (Domain-0) such as Domain-0 needs guest's kernel and may need its device tree to boot it. These dependencies interfere if the kernel or guest OS needs to be updated, thus having a unified bootloader in Domain-0 allows resolving this:
1. U-boot boot scripts, which are stored on the guest?s virtual disk, are guest specific, so any change in the guest?s configuration can be handled by the guest itself.
2. Guest OS? kernel can be updated if OS? needs that without any help from Domain-0.
3. Using the Device Tree Overlay mechanism it is possible to customize the device tree entries yet at bootloader stage inside the guest itself, so the base device tree provided by Xen can be customized.
Xen support for U-boot was implemented by introducing a new Xen guest ARM64 board and porting essential drivers from MiniOS [3] as well as some of the work previously done by NXP [4]:
1. PV block device front driver with XenStore based device enumeration, new UCLASS_PVBLOCK;
2. PV serial console device front driver;
3. Xen hypervisor support with minimal set of the essential headers adapted from Linux kernel;
4. grant table support;
5. event channel support, without IRQ support, but polling;
6. xenbus support;
7. dynamic RAM size as defined in the device tree instead of statically defined values;
8. position-independent pre-relocation code is used as we cannot statically define any start addresses at compile time which is up to Xen to choose at run-time;
9. new defconfig introduced: xenguest_arm64_defconfig.
Please note, that due to the fact that para-virtualized serial driver requires some of the Xen functionality available late not all the printouts are available at the very start including U-Boot banner, memory size etc.
All the above was tested with block driver related commands (info/part/read/write), FAT and ext4 operations work properly, the Linux kernel can start.
Thank you in advance,
Anastasiia Lukianenko,
Oleksandr Andrushchenko
Changes since v1:
=================
1. Added test for new lib sscanf function
2. Fixed data cache maintenance process
3. Added more comments and explanations
4. Removed unnecessary code, which is not related to ARM64 architecture
5. Added board documentation
6. Coding style cleanup
7. Added MIT License
Anastasiia Lukianenko (7):
Add MIT License
xen: pvblock: Add initial support for para-virtualized block driver
xen: pvblock: Enumerate virtual block devices
xen: pvblock: Read XenStore configuration and initialize
xen: pvblock: Implement front-back protocol and do IO
xen: pvblock: Print found devices indices
doc: xen: Add Xen guest ARM64 board documentation
Andrii Anisov (2):
board: Introduce xenguest_arm64 board
lib: sscanf: add sscanf implementation
Oleksandr Andrushchenko (7):
xen: Add essential and required interface headers
xen: Port Xen hypervizor related code from mini-os
xen: Port Xen event channel driver from mini-os linux/compat.h: Add wait_event_timeout macro
xen: Port Xen bus driver from mini-os
xen: Port Xen grant table driver from mini-os
board: xen: De-initialize before jumping to Linux
Peng Fan (2):
Kconfig: Introduce CONFIG_XEN
serial: serial_xen: Add Xen PV serial driver
Kconfig | 18 + Licenses/README | 1 + Licenses/mit.txt | 20 + arch/arm/Kconfig | 9 + arch/arm/cpu/armv8/Makefile | 1 + arch/arm/cpu/armv8/xen/Makefile | 6 + arch/arm/cpu/armv8/xen/hypercall.S | 79 ++ arch/arm/cpu/armv8/xen/lowlevel_init.S | 33 + arch/arm/include/asm/io.h | 4 + arch/arm/include/asm/xen.h | 7 + arch/arm/include/asm/xen/hypercall.h | 22 + arch/arm/include/asm/xen/system.h | 88 +++ board/xen/xenguest_arm64/Kconfig | 12 + board/xen/xenguest_arm64/Makefile | 5 + board/xen/xenguest_arm64/xenguest_arm64.c | 202 +++++ cmd/Kconfig | 7 + cmd/Makefile | 1 + cmd/pvblock.c | 30 + common/board_r.c | 27 + configs/xenguest_arm64_defconfig | 60 ++ disk/part.c | 4 + doc/board/index.rst | 1 + doc/board/xen/index.rst | 9 + doc/board/xen/xenguest_arm64.rst | 81 ++ drivers/Kconfig | 2 + drivers/Makefile | 1 + drivers/block/blk-uclass.c | 2 + drivers/serial/Kconfig | 7 + drivers/serial/Makefile | 1 + drivers/serial/serial_xen.c | 182 +++++ drivers/xen/Kconfig | 10 + drivers/xen/Makefile | 10 + drivers/xen/events.c | 199 +++++ drivers/xen/gnttab.c | 216 ++++++ drivers/xen/hypervisor.c | 252 +++++++ drivers/xen/pvblock.c | 867 ++++++++++++++++++++++ drivers/xen/xenbus.c | 557 ++++++++++++++ include/blk.h | 1 + include/configs/xenguest_arm64.h | 52 ++ include/dm/uclass-id.h | 1 + include/linux/compat.h | 54 ++ include/pvblock.h | 17 + include/vsprintf.h | 8 + include/xen.h | 24 + include/xen/arm/interface.h | 88 +++ include/xen/events.h | 42 ++ include/xen/gnttab.h | 24 + include/xen/hvm.h | 27 + include/xen/interface/event_channel.h | 279 +++++++ include/xen/interface/grant_table.h | 565 ++++++++++++++ include/xen/interface/hvm/hvm_op.h | 55 ++ include/xen/interface/hvm/params.h | 116 +++ include/xen/interface/io/blkif.h | 701 +++++++++++++++++ include/xen/interface/io/console.h | 39 + include/xen/interface/io/protocols.h | 28 + include/xen/interface/io/ring.h | 462 ++++++++++++ include/xen/interface/io/xenbus.h | 64 ++ include/xen/interface/io/xs_wire.h | 134 ++++ include/xen/interface/memory.h | 332 +++++++++ include/xen/interface/sched.h | 171 +++++ include/xen/interface/xen.h | 208 ++++++ include/xen/xenbus.h | 116 +++ lib/Kconfig | 4 + lib/Makefile | 1 + lib/sscanf.c | 823 ++++++++++++++++++++ test/lib/Makefile | 1 + test/lib/sscanf.c | 174 +++++ 67 files changed, 7644 insertions(+) create mode 100644 Licenses/mit.txt create mode 100644 arch/arm/cpu/armv8/xen/Makefile create mode 100644 arch/arm/cpu/armv8/xen/hypercall.S create mode 100644 arch/arm/cpu/armv8/xen/lowlevel_init.S create mode 100644 arch/arm/include/asm/xen.h create mode 100644 arch/arm/include/asm/xen/hypercall.h create mode 100644 arch/arm/include/asm/xen/system.h create mode 100644 board/xen/xenguest_arm64/Kconfig create mode 100644 board/xen/xenguest_arm64/Makefile create mode 100644 board/xen/xenguest_arm64/xenguest_arm64.c create mode 100644 cmd/pvblock.c create mode 100644 configs/xenguest_arm64_defconfig create mode 100644 doc/board/xen/index.rst create mode 100644 doc/board/xen/xenguest_arm64.rst create mode 100644 drivers/serial/serial_xen.c create mode 100644 drivers/xen/Kconfig create mode 100644 drivers/xen/Makefile create mode 100644 drivers/xen/events.c create mode 100644 drivers/xen/gnttab.c create mode 100644 drivers/xen/hypervisor.c create mode 100644 drivers/xen/pvblock.c create mode 100644 drivers/xen/xenbus.c create mode 100644 include/configs/xenguest_arm64.h create mode 100644 include/pvblock.h create mode 100644 include/xen.h create mode 100644 include/xen/arm/interface.h create mode 100644 include/xen/events.h create mode 100644 include/xen/gnttab.h create mode 100644 include/xen/hvm.h create mode 100644 include/xen/interface/event_channel.h create mode 100644 include/xen/interface/grant_table.h create mode 100644 include/xen/interface/hvm/hvm_op.h create mode 100644 include/xen/interface/hvm/params.h create mode 100644 include/xen/interface/io/blkif.h create mode 100644 include/xen/interface/io/console.h create mode 100644 include/xen/interface/io/protocols.h create mode 100644 include/xen/interface/io/ring.h create mode 100644 include/xen/interface/io/xenbus.h create mode 100644 include/xen/interface/io/xs_wire.h create mode 100644 include/xen/interface/memory.h create mode 100644 include/xen/interface/sched.h create mode 100644 include/xen/interface/xen.h create mode 100644 include/xen/xenbus.h create mode 100644 lib/sscanf.c create mode 100644 test/lib/sscanf.c
Signature · 1 line
2.17.1