SlideShare a Scribd company logo
ACRN Configuration: scenarios and config tool
Victor Sun
victor.sun@intel.com
3/18/2020
Table of Contents
PART 1: VM types and reference usage scenario
PART 2: Understand Configurations
PART 3: acrn-config preliminary
PART 4: Let’s start!
…………………….. page 3
…………………….. page 10
…………………….. page 23
…………………….. page 32
ACRN VM types
❑ Pre-launched VM
• Launched earlier by ACRN hypervisor
❑ Service OS VM
• Special pre-launched VM
• Launched by ACRN hypervisor
• Provide service for post-launched VM
❑ Post-launched VM
• Later launched by Service OS VM
ACRN usage scenarios
❑SDC
• classic usage for Software Defined Cockpit
❑ SDC2
• advanced usage for Software Defined Cockpit
❑ INDUSTRY
• classic usage for industry
❑ HYBRID
• advanced usage for industry
❑ LOGICAL_PARTITION
• classic usage for two isolated VMs
Currently ACRN support five reference working scenarios
*For more details in
https://projectacrn.github.io/latest/introduction/index.html?#usage-scenarios
Reference scenario1: SDC
• 1 SOS VM (VM0) with 1 Post-launched user VM (VM1)
Reference scenario2: SDC
• 1 SOS VM (VM0) with up to 3 Post-launched user VMs (VM1/2/3)
Reference scenario3: INDUSTRY
• 1 SOS VM (VM0) with up to 2 Post-launched user VMs (VM1/2)
• VM2 is Realtime capable
Reference scenario4: HYBRID
• 1 Pre-launched safety VM (VM0) with 1 SOS VM (VM1)
and 1 Post-launched user VM (VM2)
Reference scenario5: LOGICAL_PARTITION
• 1 Pre-launched safety VM (VM0) and 1 Pre-launched user VM (VM1)
Classify ACRN Configurations
❑ Hypervisor configurations
▪ configure main features/capabilities that supported by ACRN
hypervisor
❑ VM configurations
▪ Describe characteristic/attributes of EACH VM from usage scenario
perspective
❑ Board configurations
▪ provide hardware/board specific information that referenced by ACRN
hypervisor
Hypervisor Configurations - Coverage
• Basic configurations
❖ Board/scenario: make HV on specific board for specific working scenario
❖ Bootloader protocol/UEFI loader name/…
• Feature and Capabilities
❖ Scheduler setup/RDT/ACPI parser/Relocatable/…
• Capacities
❖ Give max boundary for static data structure set up required by FuSa like
MAX_xxx_NUM
❖ HV/SOS/UOS RAM size
• Configurations for debug
❖ Serial setting/log level/… etc.
Hypervisor Configurations - Format
Hypervisor configurations are in config.h format referenced by hypervisor
code, it is generated by Kconfig and not visible in current code base;
Hypervisor Configurations – menuconfig
VM Configurations - Coverage
• Basic configurations
❖ VM name
❖ Load type
❖ UUID
❖ VCPU settings
❖ Memory settings
❖ Guest OS settings
• Feature and Capabilities
❖ CLOS/RDT settings
❖ Guest flags
• Device settings
❖ UART settings
❖ Passthrough devices
❖ Virtio devices
VM Configurations – C code
For Pre-launched VM and SOS VM, all configurations are in *.c/h format
referenced by hypervisor
VM Configurations – launch script
For Post-launched VM, besides C code configurations most
configurations are in launch script file.
VM Configurations – C code Location
• VM configurations are scenario specific, it is located
in scenarios/$(SCENARIO)/ folder.
VM launch script Location
• The reference launch script for post-launched VM is
located in devicemodel/samples folder and need to
be copied to SOS rootfs.
Board Configurations - Coverage
• Native hardware info
❖ ACPI info
❖ CPU Number
❖ P/C state table
❖ native RDT resource info
❖ DMAR info
• Diff info for different VM configurations
❖ Rootdevice
❖ Guest Bootargs
❖ Customized RDT resource
❖ Pass through devices
• Diff info in hypervisor configurations
❖ HV start address
❖ Debug serial settings
Board Configurations - Location
• Native hardware info
❖ For pre-launched VM and SOS VM, all in *.c/*.h format under
hypervisor/arch/x86/$(BOARD)/ folder;
❖ For post-launched VM, it is in launch script;
• Diff info for different VM configurations
❖ For pre-launched VM and SOS VM, all in *.c/*.h format under
hypervisor/arch/x86/$(BOARD)/ folder;
❖ For post-launched VM, it is in launch script;
• Diff info in hypervisor configurations
❖ In defconfig file format at hypervisor/arch/x86/$(BOARD).config
Does this mean we need to
modify the source code to
configure the new board by
manual?
Of course developer could do so,
but for starters …
But now, we have acrn-config tool!
Configuration tool coverage
• Hypervisor configurations
❖ hypervisor/arch/x86/Kconfig
• VM configurations
❖ scenario-based: hypervisor/$(SCENARIO)/*.c(*.h)
❖ launch script-based: devicemodel/samples/*.sh
• Board configurations
❖ HV-based: hypervisor/arch/x86/configs/$(BOARD).config
❖ scenario-based: hypervisor/arch/x86/configs/$(BOARD)/*.c(*.h)
❖ launch script-based: devicemodel/samples/*.sh
Covered by menuconfig
Covered by acrn-config
acrn-config tool source code
acrn-hypervisor/misc/acrn-config/
Diagram of acrn-config Working Flow
Use the ACRN Configuration App
ACRN Configuration App: a web user interface application based on
Flask
▪ Imports board info for current reference
▪ Imports saved scenario/launch XML files for re-configuration
▪ Exports current configuration items and save to XML file
▪ 1-click to generate source code for board/scenario/launch
configurations
▪ Validates current configurations before file exporting or
source code generating
* source: acrn-hypervisor/misc/acrn-config/config_app/
* the app needs network to download some js/css
acrn-config xmls
acrn-hypervisor/misc/acrn-config/xmls/
Acrn configuration XMLs format
We use different root element to identify XML type:
Board XML:
❖ <acrn-config board="BOARD">
Scenario XML:
❖ <acrn-config board="BOARD" scenario="SCENARIO">
Launch XML:
❖ <acrn-config board="BOARD" scenario="SCENARIO"
uos_launcher="UOS_NUMBER">
Scenario/Launch XML rule
▪ Tag name will be shown as a configurable item. (eg. Loader_order/memory)
▪ The desc attribute of a tag will be used as remark for the configurable item.
▪ The configurable and readonly attributes are used to mark whether the items is
configurable for users.
▪ When there is no configurable="0" nor readonly="true", the item is configurable
from the web user Interface.
▪ When configurable="0" or readonly="true", the item is not configurable from the
web user interface.
▪ When configurable="0". the item does not appear on the interface.
Glimpse of scenario XML
Glimpse of acrn-config webUI
Let’s start!
1. be careful of your boot mode
• De-privilege boot mode – boot ACRN by efi application
❖ Only work on scenarios that SOS as VM0 (i.e. SDC/SDC2/INDUSTRY)
❖ Only work on platform with UEFI BIOS
❖ SOS cmdline is configured in acrn.conf file of EFI partition
• Direct boot – boot ACRN by GRUB
❖ work on all scenarios and platform with UEFI/ABL/SBL
❖ SOS cmdline should be configured in hypervisor source
2. get target board info
• Setup native Linux environment on target
❖Ubuntu 18.04+ or ClearLinux 30210+
❖Required tools: python3, cpuid, rdmsr, lspci, dmidecode
❖Add cmdline of “idle=nomwait intel_pstate=disable intel_idle.max_cstate=0”
• Copy folder of “acrn-hypervisor/misc/acrn-config/target”to
target
• Run “sudo python3 board_parser.py $(BOARD_NAME)” to
get your board.xml
• Board.xml includes physical platform info like
ACPI/memory/cpuinfo for acrn-config tool reference
3. make menuconfig
• Enter acrn-hypervisor/hypervisor folder and run
“make menuconfig”
• Configure board name, choose your scenario and
other items
• The configurations will be saved in
hypervisor/build/.config file for your reference
4. launch config app
• Install its requirements (one time setup):
$ cd ~/acrn-hypervisor/misc/acrn-config/config_app
$ sudo pip3 install -r requirements
• Launch app:
$ python3 app.py
Open a browser and navigate to the website http://127.0.0.1:5001/
automatically, or you may need to visit this website manually.
5. Import Board info
6. Switch to your board
7. select your scenario
8. Configure your scenario
• Important: Choose right rootfs/console/bootargs for VM0
9. Generate source
10.(optional)Export configurations to XML
11. Make hypervisor
$ cd ~/acrn-hypervisor
$ make all BOARD=xxxxx SCENARIO=yyyyy
12. Switch to launch setting
13. Switch to launch setting
14. generate launch script
15. Let’s rock!
• Deploy ACRN on your target board
• Copy launch script to SOS VM and run!
NOTES
• Current acrn code is buggy on some server platform
• acrn-config refinement is still ongoing
• Hypervisor serial config is important for debug!
• Please refer
https://projectacrn.github.io/latest/tutorials/acrn_config
uration_tool.html for more details
Staging change
• Remove git commit, it is meaningless if source in a
tarball;
• Define HV specific xml instead of Kconfig file to store
HV configurations;
• Do not overwrite current configuration code base, i.e.
generate target configuration to a specified folder
Thank you
Project ACRN configuration scenarios and config tool

More Related Content

What's hot (20)

PDF
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
Project ACRN
 
PDF
Project ACRN hypervisor introduction
Project ACRN
 
PDF
Project ACRN: SR-IOV implementation
Geoffroy Van Cutsem
 
PDF
ACRN Kata Container on ACRN
Project ACRN
 
PDF
Project ACRN USB mediator introduction
Project ACRN
 
PDF
ACRN vMeet-Up EU 2021 - Bridging Orchestrator and Hard Realtime Workload Cons...
Project ACRN
 
PDF
Project ACRN system debug
Project ACRN
 
PDF
ACRN vMeet-Up EU 2021 - Boot Process and Secure Boot
Project ACRN
 
PDF
Project ACRN Device Passthrough Introduction
Project ACRN
 
PDF
Project ACRN how to build a Yocto Project-based SOS
Project ACRN
 
PDF
ACRN vMeet-Up EU 2021 - Real Time Management and Performance Optimization
Project ACRN
 
PDF
Project ACRN GVT-d introduction and tutorial
Project ACRN
 
PDF
Project ACRN CPU sharing BVT scheduler in ACRN hypervisor
Project ACRN
 
PDF
Project ACRN Yocto Project meta-acrn layer introduction
Project ACRN
 
PDF
XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, A...
The Linux Foundation
 
PDF
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
The Linux Foundation
 
PDF
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
The Linux Foundation
 
PDF
LCA13: Xen on ARM
Linaro
 
PDF
ARM Architecture-based System Virtualization: Xen ARM open source software pr...
The Linux Foundation
 
PDF
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
The Linux Foundation
 
ACRN vMeet-Up EU 2021 - shared memory based inter-vm communication introduction
Project ACRN
 
Project ACRN hypervisor introduction
Project ACRN
 
Project ACRN: SR-IOV implementation
Geoffroy Van Cutsem
 
ACRN Kata Container on ACRN
Project ACRN
 
Project ACRN USB mediator introduction
Project ACRN
 
ACRN vMeet-Up EU 2021 - Bridging Orchestrator and Hard Realtime Workload Cons...
Project ACRN
 
Project ACRN system debug
Project ACRN
 
ACRN vMeet-Up EU 2021 - Boot Process and Secure Boot
Project ACRN
 
Project ACRN Device Passthrough Introduction
Project ACRN
 
Project ACRN how to build a Yocto Project-based SOS
Project ACRN
 
ACRN vMeet-Up EU 2021 - Real Time Management and Performance Optimization
Project ACRN
 
Project ACRN GVT-d introduction and tutorial
Project ACRN
 
Project ACRN CPU sharing BVT scheduler in ACRN hypervisor
Project ACRN
 
Project ACRN Yocto Project meta-acrn layer introduction
Project ACRN
 
XPDS16: AMD's virtualization memory encryption technology - Brijesh Singh, A...
The Linux Foundation
 
XPDDS18: The Evolution of Virtualization in the Arm Architecture - Julien Gra...
The Linux Foundation
 
Rootlinux17: Hypervisors on ARM - Overview and Design Choices by Julien Grall...
The Linux Foundation
 
LCA13: Xen on ARM
Linaro
 
ARM Architecture-based System Virtualization: Xen ARM open source software pr...
The Linux Foundation
 
ALSF13: Xen on ARM - Virtualization for the Automotive Industry - Stefano Sta...
The Linux Foundation
 

Similar to Project ACRN configuration scenarios and config tool (20)

PDF
Study on Android Emulator
Samael Wang
 
PDF
JUDCon 2010 Boston : BoxGrinder
marekgoldmann
 
PDF
Beagleboard xm-setup
Premjith Achemveettil
 
PPTX
Introduction to docker
Christophe Muller
 
PDF
Nano Server (ATD 11)
Tomica Kaniski
 
PDF
Device virtualization and management in xen
Lingfei Kong
 
PDF
KVM tools and enterprise usage
vincentvdk
 
PDF
Drone CI/CD 自動化測試及部署
Bo-Yi Wu
 
PDF
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Cloudian
 
PDF
XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Data...
The Linux Foundation
 
PPT
Embedding Linux On The Encore Simputer
Satpal Parmar
 
PDF
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Adrian Huang
 
PDF
Building
Satpal Parmar
 
PDF
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
iXsystems
 
PDF
The Unofficial VCAP / VCP VMware Study Guide
Veeam Software
 
ODP
Kernel compilation
mcganesh
 
PDF
Qemu device prototyping
Yan Vugenfirer
 
PPT
U Boot or Universal Bootloader
Satpal Parmar
 
PPT
Tech X Virtualization Tips
Youssef EL HADJ
 
PDF
How to Make Android's Bootable Recovery Work For You by Drew Suarez
Shakacon
 
Study on Android Emulator
Samael Wang
 
JUDCon 2010 Boston : BoxGrinder
marekgoldmann
 
Beagleboard xm-setup
Premjith Achemveettil
 
Introduction to docker
Christophe Muller
 
Nano Server (ATD 11)
Tomica Kaniski
 
Device virtualization and management in xen
Lingfei Kong
 
KVM tools and enterprise usage
vincentvdk
 
Drone CI/CD 自動化測試及部署
Bo-Yi Wu
 
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Cloudian
 
XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Data...
The Linux Foundation
 
Embedding Linux On The Encore Simputer
Satpal Parmar
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Adrian Huang
 
Building
Satpal Parmar
 
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
iXsystems
 
The Unofficial VCAP / VCP VMware Study Guide
Veeam Software
 
Kernel compilation
mcganesh
 
Qemu device prototyping
Yan Vugenfirer
 
U Boot or Universal Bootloader
Satpal Parmar
 
Tech X Virtualization Tips
Youssef EL HADJ
 
How to Make Android's Bootable Recovery Work For You by Drew Suarez
Shakacon
 
Ad

More from Project ACRN (6)

PDF
ACRN vMeet-Up EU 2021 - community and development model
Project ACRN
 
PDF
Project ACRN I2C mediator introduction
Project ACRN
 
PDF
Project ACRN SR-IOV on ACRN
Project ACRN
 
PDF
Project ACRN EtherCAT 101
Project ACRN
 
PDF
Project ACRN GPIO mediator introduction
Project ACRN
 
PDF
Project ACRN schedule framework introduction
Project ACRN
 
ACRN vMeet-Up EU 2021 - community and development model
Project ACRN
 
Project ACRN I2C mediator introduction
Project ACRN
 
Project ACRN SR-IOV on ACRN
Project ACRN
 
Project ACRN EtherCAT 101
Project ACRN
 
Project ACRN GPIO mediator introduction
Project ACRN
 
Project ACRN schedule framework introduction
Project ACRN
 
Ad

Recently uploaded (20)

PDF
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
PDF
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
PDF
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
PDF
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
PDF
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
PDF
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
PPTX
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
PDF
NSF Converter Simplified: From Complexity to Clarity
Johnsena Crook
 
PPTX
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
PDF
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
PPTX
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
PDF
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
PPTX
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
PDF
Simplify React app login with asgardeo-sdk
vaibhav289687
 
PDF
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
PPTX
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
PDF
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
PDF
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
PDF
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
PDF
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 
UITP Summit Meep Pitch may 2025 MaaS Rebooted
campoamor1
 
10 Salesforce Consulting Companies in Sydney.pdf
DianApps Technologies
 
MiniTool Power Data Recovery 8.8 With Crack New Latest 2025
bashirkhan333g
 
[Solution] Why Choose the VeryPDF DRM Protector Custom-Built Solution for You...
Lingwen1998
 
How to Hire AI Developers_ Step-by-Step Guide in 2025.pdf
DianApps Technologies
 
intro_to_cpp_namespace_robotics_corner.pdf
MohamedSaied877003
 
AEM User Group: India Chapter Kickoff Meeting
jennaf3
 
NSF Converter Simplified: From Complexity to Clarity
Johnsena Crook
 
iaas vs paas vs saas :choosing your cloud strategy
CloudlayaTechnology
 
Windows 10 Professional Preactivated.pdf
asghxhsagxjah
 
BB FlashBack Pro 5.61.0.4843 With Crack Free Download
cracked shares
 
Generic or Specific? Making sensible software design decisions
Bert Jan Schrijver
 
Get Started with Maestro: Agent, Robot, and Human in Action – Session 5 of 5
klpathrudu
 
Simplify React app login with asgardeo-sdk
vaibhav289687
 
ERP Consulting Services and Solutions by Contetra Pvt Ltd
jayjani123
 
Smart Doctor Appointment Booking option in odoo.pptx
AxisTechnolabs
 
AOMEI Partition Assistant Crack 10.8.2 + WinPE Free Downlaod New Version 2025
bashirkhan333g
 
Technical-Careers-Roadmap-in-Software-Market.pdf
Hussein Ali
 
Code and No-Code Journeys: The Maintenance Shortcut
Applitools
 
TheFutureIsDynamic-BoxLang witch Luis Majano.pdf
Ortus Solutions, Corp
 

Project ACRN configuration scenarios and config tool

  • 1. ACRN Configuration: scenarios and config tool Victor Sun [email protected] 3/18/2020
  • 2. Table of Contents PART 1: VM types and reference usage scenario PART 2: Understand Configurations PART 3: acrn-config preliminary PART 4: Let’s start! …………………….. page 3 …………………….. page 10 …………………….. page 23 …………………….. page 32
  • 3. ACRN VM types ❑ Pre-launched VM • Launched earlier by ACRN hypervisor ❑ Service OS VM • Special pre-launched VM • Launched by ACRN hypervisor • Provide service for post-launched VM ❑ Post-launched VM • Later launched by Service OS VM
  • 4. ACRN usage scenarios ❑SDC • classic usage for Software Defined Cockpit ❑ SDC2 • advanced usage for Software Defined Cockpit ❑ INDUSTRY • classic usage for industry ❑ HYBRID • advanced usage for industry ❑ LOGICAL_PARTITION • classic usage for two isolated VMs Currently ACRN support five reference working scenarios *For more details in https://projectacrn.github.io/latest/introduction/index.html?#usage-scenarios
  • 5. Reference scenario1: SDC • 1 SOS VM (VM0) with 1 Post-launched user VM (VM1)
  • 6. Reference scenario2: SDC • 1 SOS VM (VM0) with up to 3 Post-launched user VMs (VM1/2/3)
  • 7. Reference scenario3: INDUSTRY • 1 SOS VM (VM0) with up to 2 Post-launched user VMs (VM1/2) • VM2 is Realtime capable
  • 8. Reference scenario4: HYBRID • 1 Pre-launched safety VM (VM0) with 1 SOS VM (VM1) and 1 Post-launched user VM (VM2)
  • 9. Reference scenario5: LOGICAL_PARTITION • 1 Pre-launched safety VM (VM0) and 1 Pre-launched user VM (VM1)
  • 10. Classify ACRN Configurations ❑ Hypervisor configurations ▪ configure main features/capabilities that supported by ACRN hypervisor ❑ VM configurations ▪ Describe characteristic/attributes of EACH VM from usage scenario perspective ❑ Board configurations ▪ provide hardware/board specific information that referenced by ACRN hypervisor
  • 11. Hypervisor Configurations - Coverage • Basic configurations ❖ Board/scenario: make HV on specific board for specific working scenario ❖ Bootloader protocol/UEFI loader name/… • Feature and Capabilities ❖ Scheduler setup/RDT/ACPI parser/Relocatable/… • Capacities ❖ Give max boundary for static data structure set up required by FuSa like MAX_xxx_NUM ❖ HV/SOS/UOS RAM size • Configurations for debug ❖ Serial setting/log level/… etc.
  • 12. Hypervisor Configurations - Format Hypervisor configurations are in config.h format referenced by hypervisor code, it is generated by Kconfig and not visible in current code base;
  • 14. VM Configurations - Coverage • Basic configurations ❖ VM name ❖ Load type ❖ UUID ❖ VCPU settings ❖ Memory settings ❖ Guest OS settings • Feature and Capabilities ❖ CLOS/RDT settings ❖ Guest flags • Device settings ❖ UART settings ❖ Passthrough devices ❖ Virtio devices
  • 15. VM Configurations – C code For Pre-launched VM and SOS VM, all configurations are in *.c/h format referenced by hypervisor
  • 16. VM Configurations – launch script For Post-launched VM, besides C code configurations most configurations are in launch script file.
  • 17. VM Configurations – C code Location • VM configurations are scenario specific, it is located in scenarios/$(SCENARIO)/ folder.
  • 18. VM launch script Location • The reference launch script for post-launched VM is located in devicemodel/samples folder and need to be copied to SOS rootfs.
  • 19. Board Configurations - Coverage • Native hardware info ❖ ACPI info ❖ CPU Number ❖ P/C state table ❖ native RDT resource info ❖ DMAR info • Diff info for different VM configurations ❖ Rootdevice ❖ Guest Bootargs ❖ Customized RDT resource ❖ Pass through devices • Diff info in hypervisor configurations ❖ HV start address ❖ Debug serial settings
  • 20. Board Configurations - Location • Native hardware info ❖ For pre-launched VM and SOS VM, all in *.c/*.h format under hypervisor/arch/x86/$(BOARD)/ folder; ❖ For post-launched VM, it is in launch script; • Diff info for different VM configurations ❖ For pre-launched VM and SOS VM, all in *.c/*.h format under hypervisor/arch/x86/$(BOARD)/ folder; ❖ For post-launched VM, it is in launch script; • Diff info in hypervisor configurations ❖ In defconfig file format at hypervisor/arch/x86/$(BOARD).config
  • 21. Does this mean we need to modify the source code to configure the new board by manual? Of course developer could do so, but for starters …
  • 22. But now, we have acrn-config tool!
  • 23. Configuration tool coverage • Hypervisor configurations ❖ hypervisor/arch/x86/Kconfig • VM configurations ❖ scenario-based: hypervisor/$(SCENARIO)/*.c(*.h) ❖ launch script-based: devicemodel/samples/*.sh • Board configurations ❖ HV-based: hypervisor/arch/x86/configs/$(BOARD).config ❖ scenario-based: hypervisor/arch/x86/configs/$(BOARD)/*.c(*.h) ❖ launch script-based: devicemodel/samples/*.sh Covered by menuconfig Covered by acrn-config
  • 24. acrn-config tool source code acrn-hypervisor/misc/acrn-config/
  • 25. Diagram of acrn-config Working Flow
  • 26. Use the ACRN Configuration App ACRN Configuration App: a web user interface application based on Flask ▪ Imports board info for current reference ▪ Imports saved scenario/launch XML files for re-configuration ▪ Exports current configuration items and save to XML file ▪ 1-click to generate source code for board/scenario/launch configurations ▪ Validates current configurations before file exporting or source code generating * source: acrn-hypervisor/misc/acrn-config/config_app/ * the app needs network to download some js/css
  • 28. Acrn configuration XMLs format We use different root element to identify XML type: Board XML: ❖ <acrn-config board="BOARD"> Scenario XML: ❖ <acrn-config board="BOARD" scenario="SCENARIO"> Launch XML: ❖ <acrn-config board="BOARD" scenario="SCENARIO" uos_launcher="UOS_NUMBER">
  • 29. Scenario/Launch XML rule ▪ Tag name will be shown as a configurable item. (eg. Loader_order/memory) ▪ The desc attribute of a tag will be used as remark for the configurable item. ▪ The configurable and readonly attributes are used to mark whether the items is configurable for users. ▪ When there is no configurable="0" nor readonly="true", the item is configurable from the web user Interface. ▪ When configurable="0" or readonly="true", the item is not configurable from the web user interface. ▪ When configurable="0". the item does not appear on the interface.
  • 33. 1. be careful of your boot mode • De-privilege boot mode – boot ACRN by efi application ❖ Only work on scenarios that SOS as VM0 (i.e. SDC/SDC2/INDUSTRY) ❖ Only work on platform with UEFI BIOS ❖ SOS cmdline is configured in acrn.conf file of EFI partition • Direct boot – boot ACRN by GRUB ❖ work on all scenarios and platform with UEFI/ABL/SBL ❖ SOS cmdline should be configured in hypervisor source
  • 34. 2. get target board info • Setup native Linux environment on target ❖Ubuntu 18.04+ or ClearLinux 30210+ ❖Required tools: python3, cpuid, rdmsr, lspci, dmidecode ❖Add cmdline of “idle=nomwait intel_pstate=disable intel_idle.max_cstate=0” • Copy folder of “acrn-hypervisor/misc/acrn-config/target”to target • Run “sudo python3 board_parser.py $(BOARD_NAME)” to get your board.xml • Board.xml includes physical platform info like ACPI/memory/cpuinfo for acrn-config tool reference
  • 35. 3. make menuconfig • Enter acrn-hypervisor/hypervisor folder and run “make menuconfig” • Configure board name, choose your scenario and other items • The configurations will be saved in hypervisor/build/.config file for your reference
  • 36. 4. launch config app • Install its requirements (one time setup): $ cd ~/acrn-hypervisor/misc/acrn-config/config_app $ sudo pip3 install -r requirements • Launch app: $ python3 app.py Open a browser and navigate to the website http://127.0.0.1:5001/ automatically, or you may need to visit this website manually.
  • 38. 6. Switch to your board
  • 39. 7. select your scenario
  • 40. 8. Configure your scenario • Important: Choose right rootfs/console/bootargs for VM0
  • 43. 11. Make hypervisor $ cd ~/acrn-hypervisor $ make all BOARD=xxxxx SCENARIO=yyyyy
  • 44. 12. Switch to launch setting
  • 45. 13. Switch to launch setting
  • 47. 15. Let’s rock! • Deploy ACRN on your target board • Copy launch script to SOS VM and run!
  • 48. NOTES • Current acrn code is buggy on some server platform • acrn-config refinement is still ongoing • Hypervisor serial config is important for debug! • Please refer https://projectacrn.github.io/latest/tutorials/acrn_config uration_tool.html for more details
  • 49. Staging change • Remove git commit, it is meaningless if source in a tarball; • Define HV specific xml instead of Kconfig file to store HV configurations; • Do not overwrite current configuration code base, i.e. generate target configuration to a specified folder