SlideShare une entreprise Scribd logo
1  sur  51
Télécharger pour lire hors ligne
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

Contenu connexe

Tendances

ARM Architecture-based System Virtualization: Xen ARM open source software pr...
ARM Architecture-based System Virtualization: Xen ARM open source software pr...ARM Architecture-based System Virtualization: Xen ARM open source software pr...
ARM Architecture-based System Virtualization: Xen ARM open source software pr...
The Linux Foundation
 

Tendances (20)

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

Similaire à Project ACRN configuration scenarios and config tool

Kernel compilation
Kernel compilationKernel compilation
Kernel compilation
mcganesh
 
Tech X Virtualization Tips
Tech X Virtualization TipsTech X Virtualization Tips
Tech X Virtualization Tips
Youssef EL HADJ
 
How to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew SuarezHow to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew Suarez
Shakacon
 

Similaire à Project ACRN configuration scenarios and config tool (20)

Study on Android Emulator
Study on Android EmulatorStudy on Android Emulator
Study on Android Emulator
 
JUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinderJUDCon 2010 Boston : BoxGrinder
JUDCon 2010 Boston : BoxGrinder
 
Beagleboard xm-setup
Beagleboard xm-setupBeagleboard xm-setup
Beagleboard xm-setup
 
Introduction to docker
Introduction to dockerIntroduction to docker
Introduction to docker
 
Nano Server (ATD 11)
Nano Server (ATD 11)Nano Server (ATD 11)
Nano Server (ATD 11)
 
Device virtualization and management in xen
Device virtualization and management in xenDevice virtualization and management in xen
Device virtualization and management in xen
 
KVM tools and enterprise usage
KVM tools and enterprise usageKVM tools and enterprise usage
KVM tools and enterprise usage
 
Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署Drone CI/CD 自動化測試及部署
Drone CI/CD 自動化測試及部署
 
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage ServiceQuick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
Quick-Start Guide: Deploying Your Cloudian HyperStore Hybrid Storage Service
 
XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Data...
XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Data...XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Data...
XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Data...
 
Embedding Linux On The Encore Simputer
Embedding Linux On The Encore SimputerEmbedding Linux On The Encore Simputer
Embedding Linux On The Encore Simputer
 
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is bootedVmlinux: anatomy of bzimage and how x86 64 processor is booted
Vmlinux: anatomy of bzimage and how x86 64 processor is booted
 
Building
BuildingBuilding
Building
 
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
PCI Pass-through - FreeBSD VM on Hyper-V (MeetBSD California 2016)
 
The Unofficial VCAP / VCP VMware Study Guide
The Unofficial VCAP / VCP VMware Study GuideThe Unofficial VCAP / VCP VMware Study Guide
The Unofficial VCAP / VCP VMware Study Guide
 
Kernel compilation
Kernel compilationKernel compilation
Kernel compilation
 
Qemu device prototyping
Qemu device prototypingQemu device prototyping
Qemu device prototyping
 
U Boot or Universal Bootloader
U Boot or Universal BootloaderU Boot or Universal Bootloader
U Boot or Universal Bootloader
 
Tech X Virtualization Tips
Tech X Virtualization TipsTech X Virtualization Tips
Tech X Virtualization Tips
 
How to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew SuarezHow to Make Android's Bootable Recovery Work For You by Drew Suarez
How to Make Android's Bootable Recovery Work For You by Drew Suarez
 

Plus de Project ACRN (6)

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

Dernier

%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
chiefasafspells
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
masabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
masabamasaba
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 

Dernier (20)

%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
WSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security ProgramWSO2CON 2024 - How to Run a Security Program
WSO2CON 2024 - How to Run a Security Program
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
WSO2CON 2024 - Navigating API Complexity: REST, GraphQL, gRPC, Websocket, Web...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
Love witchcraft +27768521739 Binding love spell in Sandy Springs, GA |psychic...
 
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
Crypto Cloud Review - How To Earn Up To $500 Per DAY Of Bitcoin 100% On AutoP...
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Toronto Psychic Readings, Attraction spells,Brin...
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 

Project ACRN configuration scenarios and config tool

  • 1. ACRN Configuration: scenarios and config tool Victor Sun victor.sun@intel.com 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