SlideShare a Scribd company logo
1 of 23
Download to read offline
SBSA UART Emulation in Xen on 64-bit ARM
Server Processor
Bhupinder Thakur
Principal Engineer
Qualcomm Datacenter Technologies
Xen Developer and Design Summit
July 11-13 2017, Budapest Hungary
▪ Working as a Linaro assignee from Qualcomm Datacenter
Technologies
▪ Working on VM spec compliance for ARM based servers
▪ First open source contribution
▪ SBSA UART emulation in Xen
About The Speaker
Challenges in implementing ARM as a new ISA
▪ ARM processors are built into a large variety of systems
▪ Feature requirements vary from chip to chip
▪ This variability in the architecture impacts the software system development
▪ x86 relies on PC standards
▪ Challenge: How to provide software portability across ARM
systems ?
Enabling ARM as a First Class Architecture
▪ SBSA (Server Base System Architecture)
▪ It defines minimum requirements from the hardware such as CPU, PCIe, IOMMU, UART, timers and
interrupt
▪ SBBR (Server Base Boot Requirements)
▪ Firmware must be UEFI/ACPI compliant
▪ UEFI for server booting
▪ ACPI for describing the hardware resources that are installed
▪ Any compliant software is guaranteed to run on any SBSA/SBBR compliant hardware
▪ The specifications can be downloaded from
▪ http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html
Challenges in Enabling VM System for ARM Processors
▪ SBSA/SBBR specs were defined for the physical systems
▪ Similar standardization was required for the virtual systems
▪ How should the VM bring up the guest OS ?
▪ How should the guest OS discover the devices ?
▪ What are mandatory peripherals to be supported by the hypervisor ?
▪ Linaro published a specification to standardize the requirements from the hypervisor/OS/firmware
▪ http://www.linaro.org/app/resources/WhitePaper/VMSystemSpecificationForARM-v2.0.pdf
▪ Virtual Firmware
▪ UEFI compliant virtual firmware
▪ UEFI binary must be executed as the first software by the VM which then executes the EFI
application
▪ VM Image Format
▪ The raw disk format must be partitioned with a GUID table
▪ The bootable software must reside in a EFI partition and must be an EFI application
▪ Hardware Description
▪ The virtual UEFI firmware must implement ACPI and DT tables
VM System Specification for ARM Processors
▪ Mandatory Hypervisor Peripherals
▪ SBSA UART
▪ Support for both GICv2 and GICv3 (Generic Interrupt Controller)
▪ Virtual timer and counter system register must be available to the VM
▪ Virtual bus that supports block and network devices hotplug
▪ The guest OS
▪ must include console driver for SBSA UART
▪ must include support for both GICv2 and GICv3
▪ strongly recommended to include support for block, network, console, balloon, virtio and Xen PV
drivers
VM System Specification for ARM Processors
SBSA UART
▪ A simple UART which offers basic facility for software bring up
▪ It is a subset of ARM PL011 UART
▪ Supports only a subset of registers to handle data, status and interrupts
▪ No support for features such as DMA, hardware flow control etc.
▪ It is defined in Appendix B of the SBSA specification
Benefits of Emulating SBSA UART in Xen
▪ Compliant with the VM specification
▪ The guest OS can access the console even if it does not include PV console driver
▪ Can be used for debugging if PV console is not working for some reason
Options Available for Emulating SBSA UART
▪ Emulating it in Dom0 using QEMU
▪ Emulating it in the Xen hypervisor
Challenges in Emulating SBSA UART in Xen
▪ Xen/ARM does not use QEMU
▪ Typically devices are not emulated in Xen/ARM (GIC is an exception)
Current Design for Emulating SBSA UART
App App
Kernel
DomU
XencosoleApp
Kernel
Dom0
EL0
EL1
EL2
SBSA UART Emulation Logic
▪ Emulate SBSA UART in the Xen
hypervisor
Current Design for Emulating SBSA UART
App App
Kernel
DomU
XencosoleApp
Kernel
Dom0
EL0
EL1
EL2
SBSA UART Emulation Logic
▪ Emulate SBSA UART in the Xen
hypervisor
▪ Reuse the PV console backend to
minimize the changes in Dom0
Current Design for Emulating SBSA UART
App App
Kernel
DomU
Xenco
sole
App
Kernel
Dom0
Xen
EL0
EL1
EL2
SBSA
UART
Emulation
Logic
▪ Emulate SBSA UART in the Xen
hypervisor
▪ Reuse the PV console backend to
minimize the changes in Dom0
▪ Future: Move emulation to Xen
non-privileged (EL0) mode
Xen
DomUDom0
User I/O
Events
IN
OUT
PV Console in Xen
Implemenation of SBSA UART Emulation in
Xen
DomUDom0
User I/O
MMIO Traps
IN ring buffer
OUT ring buffer
Device Tree
SBSA UART
emulation
IRQ
Events
DOMCTL
▪ Changes in the Xen hypervisor
▪ MMIO trap handling
▪ IRQ injection
▪ Event handling
Xen
Implementation of SBSA UART Emulation in
Xen
DomUDom0
User I/O
MMIO Traps
IN ring buffer
OUT ring buffer
Device Tree
SBSA UART
emulation
IRQ
Events
DOMCTL
▪ Changes in the toolstack
▪ New DOMCTL API to enable emulation in
Xen
▪ New SBSA UART node added in the
xenstore
▪ New SBSA UART node added to the
device tree
Xen
Implementation of SBSA UART Emulation in
Xen
Device Tree ▪ Changes in Xenconsole
▪ Multiple console support added
▪ New option “vuart” added in DomU.cfg
file to enable sbsa uart for a domain
▪ xl console command enhanced to allow
the user to connect to vuart
DomUDom0
User I/O
MMIO Traps
IN ring buffer
OUT ring buffer
SBSA UART
emulation
IRQ
Events
DOMCTL
Xen
Using SBSA UART
Sample DomU.cfg file
vuart = “sbsa_uart”
extra = “console=ttyAMA0 …”
Start the domain with SBSA UART enabled
xl create domU.cfg
Connect to SBSA UART
xl console –t vuart <domain name>
TBD Items
▪ SBSA UART support in UEFI firmware
▪ Currently UEFI firmware uses PV console for input/output
▪ Add support for SBSA UART
▪ How should the guest OS select the default console ?
▪ Currently PV console is the default console
▪ Add SBSA UART support in ACPI
Upstream Status
▪ The SBSA UART patch set is under review on the xendev mailing list
▪ It has gone through five revisions
▪ The changes have matured over these revisions
▪ Hopefully it should be included in 4.10
▪ The code is available @ https://git@git.linaro.org:/people/bhupinder.thakur/xen.git branch: vpl011_v5
Thank You!
Xenconsole Changes
Handle_ring_read()
DomU
Xen
PV Ring buffer
write and event
raised
PL011 ring buffer
write and event
raised
Buffer_append()PV buffer
SBSA UART
buffer
Handle_tty_write()
Write to PV
tty client
Handle_tty_read()
DomU
Xen
PV Ring buffer write and
event raised
SBSA UART Ring
buffer write and event
raised
Read from PV tty
client
Read from PV tty
client
PV console logs SBSA UART
console logs
console_create_ring()
console_create_tty()
create_console_log()
console_cleanup()
…
Write to
SBSA UART
tty client

More Related Content

What's hot

Process' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/LinuxProcess' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/Linux
Varun Mahajan
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
Linaro
 

What's hot (20)

Oracle E-Business Suite on Kubernetes Cluster
Oracle E-Business Suite on Kubernetes ClusterOracle E-Business Suite on Kubernetes Cluster
Oracle E-Business Suite on Kubernetes Cluster
 
Board Bringup
Board BringupBoard Bringup
Board Bringup
 
Process' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/LinuxProcess' Virtual Address Space in GNU/Linux
Process' Virtual Address Space in GNU/Linux
 
gcc and friends
gcc and friendsgcc and friends
gcc and friends
 
Pcie drivers basics
Pcie drivers basicsPcie drivers basics
Pcie drivers basics
 
BusyBox for Embedded Linux
BusyBox for Embedded LinuxBusyBox for Embedded Linux
BusyBox for Embedded Linux
 
Introduction to Linux
Introduction to LinuxIntroduction to Linux
Introduction to Linux
 
Linux Network Stack
Linux Network StackLinux Network Stack
Linux Network Stack
 
Linux device drivers
Linux device drivers Linux device drivers
Linux device drivers
 
Unified Extensible Firmware Interface (UEFI)
Unified Extensible Firmware Interface (UEFI)Unified Extensible Firmware Interface (UEFI)
Unified Extensible Firmware Interface (UEFI)
 
Linux dma engine
Linux dma engineLinux dma engine
Linux dma engine
 
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
LAS16-111: Easing Access to ARM TrustZone – OP-TEE and Raspberry Pi 3
 
Dpdk performance
Dpdk performanceDpdk performance
Dpdk performance
 
Choose the Right Container Storage for Kubernetes
Choose the Right Container Storage for KubernetesChoose the Right Container Storage for Kubernetes
Choose the Right Container Storage for Kubernetes
 
Linux Kernel Overview
Linux Kernel OverviewLinux Kernel Overview
Linux Kernel Overview
 
OVS v OVS-DPDK
OVS v OVS-DPDKOVS v OVS-DPDK
OVS v OVS-DPDK
 
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
HTML5 on the AGL demo platform with Chromium and WAM (AGL AMM March 2021)
 
Spi drivers
Spi driversSpi drivers
Spi drivers
 
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen HypervisorSafety-Certifying Open Source Software: The Case of the Xen Hypervisor
Safety-Certifying Open Source Software: The Case of the Xen Hypervisor
 
RISC-V Boot Process: One Step at a Time
RISC-V Boot Process: One Step at a TimeRISC-V Boot Process: One Step at a Time
RISC-V Boot Process: One Step at a Time
 

Similar to XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Datacenter Technologies, Inc.

Hacom%20pf sense%20quick start%20guide
Hacom%20pf sense%20quick start%20guideHacom%20pf sense%20quick start%20guide
Hacom%20pf sense%20quick start%20guide
HARRY CHAN PUTRA
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and Tricks
Amit Gatenyo
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready Program
Linaro
 
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Sachin Jaypatre
 

Similar to XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Datacenter Technologies, Inc. (20)

Hacom%20pf sense%20quick start%20guide
Hacom%20pf sense%20quick start%20guideHacom%20pf sense%20quick start%20guide
Hacom%20pf sense%20quick start%20guide
 
Introduction to Virtualization
Introduction to VirtualizationIntroduction to Virtualization
Introduction to Virtualization
 
Hyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and TricksHyper-V Best Practices & Tips and Tricks
Hyper-V Best Practices & Tips and Tricks
 
VMware vSphere 4.1 deep dive - part 1
VMware vSphere 4.1 deep dive - part 1VMware vSphere 4.1 deep dive - part 1
VMware vSphere 4.1 deep dive - part 1
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready Program
 
XS Boston 2008 VT-D PCI
XS Boston 2008 VT-D PCIXS Boston 2008 VT-D PCI
XS Boston 2008 VT-D PCI
 
Building PoC ready ODM Platforms with Arm SystemReady v5.2.pdf
Building PoC ready ODM Platforms with Arm SystemReady v5.2.pdfBuilding PoC ready ODM Platforms with Arm SystemReady v5.2.pdf
Building PoC ready ODM Platforms with Arm SystemReady v5.2.pdf
 
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
Zenoss core beta_installation_guide_r5.0.0b2_d99.14.253
 
OSDC 2014: Nat Morris - Open Network Install Environment
OSDC 2014: Nat Morris - Open Network Install EnvironmentOSDC 2014: Nat Morris - Open Network Install Environment
OSDC 2014: Nat Morris - Open Network Install Environment
 
Vsc 71-se-presentation-training
Vsc 71-se-presentation-trainingVsc 71-se-presentation-training
Vsc 71-se-presentation-training
 
Project ACRN Device Passthrough Introduction
Project ACRN Device Passthrough IntroductionProject ACRN Device Passthrough Introduction
Project ACRN Device Passthrough Introduction
 
Visão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
Visão geral do hardware do servidor System z e Linux on z - Concurso MainframeVisão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
Visão geral do hardware do servidor System z e Linux on z - Concurso Mainframe
 
Remotely Attacking System Firmware
Remotely Attacking System FirmwareRemotely Attacking System Firmware
Remotely Attacking System Firmware
 
ACRN vMeet-Up EU 2021 - installation and configuration introduction
ACRN vMeet-Up EU 2021 - installation and configuration introductionACRN vMeet-Up EU 2021 - installation and configuration introduction
ACRN vMeet-Up EU 2021 - installation and configuration introduction
 
Vortex86 Sx Linux How To
Vortex86 Sx Linux How ToVortex86 Sx Linux How To
Vortex86 Sx Linux How To
 
NFV Orchestration for Optimal Performance
NFV Orchestration for Optimal PerformanceNFV Orchestration for Optimal Performance
NFV Orchestration for Optimal Performance
 
vmware interview Q and a
vmware interview Q and avmware interview Q and a
vmware interview Q and a
 
The future of RISC-V Supervisor Binary Interface(SBI)
The future of RISC-V Supervisor Binary Interface(SBI)The future of RISC-V Supervisor Binary Interface(SBI)
The future of RISC-V Supervisor Binary Interface(SBI)
 
VMware Interview questions and answers
VMware Interview questions and answersVMware Interview questions and answers
VMware Interview questions and answers
 
Vmwareinterviewqa 100927111554-phpapp01
Vmwareinterviewqa 100927111554-phpapp01Vmwareinterviewqa 100927111554-phpapp01
Vmwareinterviewqa 100927111554-phpapp01
 

More from The Linux Foundation

More from The Linux Foundation (20)

ELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made SimpleELC2019: Static Partitioning Made Simple
ELC2019: Static Partitioning Made Simple
 
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
XPDDS19: How TrenchBoot is Enabling Measured Launch for Open-Source Platform ...
 
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
XPDDS19 Keynote: Xen in Automotive - Artem Mygaiev, Director, Technology Solu...
 
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
XPDDS19 Keynote: Xen Project Weather Report 2019 - Lars Kurth, Director of Op...
 
XPDDS19 Keynote: Unikraft Weather Report
XPDDS19 Keynote:  Unikraft Weather ReportXPDDS19 Keynote:  Unikraft Weather Report
XPDDS19 Keynote: Unikraft Weather Report
 
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
XPDDS19 Keynote: Secret-free Hypervisor: Now and Future - Wei Liu, Software E...
 
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, XilinxXPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
XPDDS19 Keynote: Xen Dom0-less - Stefano Stabellini, Principal Engineer, Xilinx
 
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
XPDDS19 Keynote: Patch Review for Non-maintainers - George Dunlap, Citrix Sys...
 
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, BitdefenderXPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
XPDDS19: Memories of a VM Funk - Mihai Donțu, Bitdefender
 
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...OSSJP/ALS19:  The Road to Safety Certification: Overcoming Community Challeng...
OSSJP/ALS19: The Road to Safety Certification: Overcoming Community Challeng...
 
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making... OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
OSSJP/ALS19: The Road to Safety Certification: How the Xen Project is Making...
 
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, CitrixXPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
XPDDS19: Speculative Sidechannels and Mitigations - Andrew Cooper, Citrix
 
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltdXPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
XPDDS19: Keeping Coherency on Arm: Reborn - Julien Grall, Arm ltd
 
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
XPDDS19: QEMU PV Backend 'qdevification'... What Does it Mean? - Paul Durrant...
 
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&DXPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
XPDDS19: Status of PCI Emulation in Xen - Roger Pau Monné, Citrix Systems R&D
 
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM SystemsXPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
XPDDS19: [ARM] OP-TEE Mediator in Xen - Volodymyr Babchuk, EPAM Systems
 
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
XPDDS19: Bringing Xen to the Masses: The Story of Building a Community-driven...
 
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
XPDDS19: Will Robots Automate Your Job Away? Streamlining Xen Project Contrib...
 
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
XPDDS19: Client Virtualization Toolstack in Go - Nick Rosbrook & Brendan Kerr...
 
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSEXPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
XPDDS19: Core Scheduling in Xen - Jürgen Groß, SUSE
 

Recently uploaded

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
panagenda
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 

Recently uploaded (20)

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..Understanding the FAA Part 107 License ..
Understanding the FAA Part 107 License ..
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 

XPDDS17: PL011 UART Emulation in Xen on ARM - Bhupinder Thakur, Qualcomm Datacenter Technologies, Inc.

  • 1. SBSA UART Emulation in Xen on 64-bit ARM Server Processor Bhupinder Thakur Principal Engineer Qualcomm Datacenter Technologies Xen Developer and Design Summit July 11-13 2017, Budapest Hungary
  • 2. ▪ Working as a Linaro assignee from Qualcomm Datacenter Technologies ▪ Working on VM spec compliance for ARM based servers ▪ First open source contribution ▪ SBSA UART emulation in Xen About The Speaker
  • 3. Challenges in implementing ARM as a new ISA ▪ ARM processors are built into a large variety of systems ▪ Feature requirements vary from chip to chip ▪ This variability in the architecture impacts the software system development ▪ x86 relies on PC standards ▪ Challenge: How to provide software portability across ARM systems ?
  • 4. Enabling ARM as a First Class Architecture ▪ SBSA (Server Base System Architecture) ▪ It defines minimum requirements from the hardware such as CPU, PCIe, IOMMU, UART, timers and interrupt ▪ SBBR (Server Base Boot Requirements) ▪ Firmware must be UEFI/ACPI compliant ▪ UEFI for server booting ▪ ACPI for describing the hardware resources that are installed ▪ Any compliant software is guaranteed to run on any SBSA/SBBR compliant hardware ▪ The specifications can be downloaded from ▪ http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.den0029/index.html
  • 5. Challenges in Enabling VM System for ARM Processors ▪ SBSA/SBBR specs were defined for the physical systems ▪ Similar standardization was required for the virtual systems ▪ How should the VM bring up the guest OS ? ▪ How should the guest OS discover the devices ? ▪ What are mandatory peripherals to be supported by the hypervisor ? ▪ Linaro published a specification to standardize the requirements from the hypervisor/OS/firmware ▪ http://www.linaro.org/app/resources/WhitePaper/VMSystemSpecificationForARM-v2.0.pdf
  • 6. ▪ Virtual Firmware ▪ UEFI compliant virtual firmware ▪ UEFI binary must be executed as the first software by the VM which then executes the EFI application ▪ VM Image Format ▪ The raw disk format must be partitioned with a GUID table ▪ The bootable software must reside in a EFI partition and must be an EFI application ▪ Hardware Description ▪ The virtual UEFI firmware must implement ACPI and DT tables VM System Specification for ARM Processors
  • 7. ▪ Mandatory Hypervisor Peripherals ▪ SBSA UART ▪ Support for both GICv2 and GICv3 (Generic Interrupt Controller) ▪ Virtual timer and counter system register must be available to the VM ▪ Virtual bus that supports block and network devices hotplug ▪ The guest OS ▪ must include console driver for SBSA UART ▪ must include support for both GICv2 and GICv3 ▪ strongly recommended to include support for block, network, console, balloon, virtio and Xen PV drivers VM System Specification for ARM Processors
  • 8. SBSA UART ▪ A simple UART which offers basic facility for software bring up ▪ It is a subset of ARM PL011 UART ▪ Supports only a subset of registers to handle data, status and interrupts ▪ No support for features such as DMA, hardware flow control etc. ▪ It is defined in Appendix B of the SBSA specification
  • 9. Benefits of Emulating SBSA UART in Xen ▪ Compliant with the VM specification ▪ The guest OS can access the console even if it does not include PV console driver ▪ Can be used for debugging if PV console is not working for some reason
  • 10. Options Available for Emulating SBSA UART ▪ Emulating it in Dom0 using QEMU ▪ Emulating it in the Xen hypervisor
  • 11. Challenges in Emulating SBSA UART in Xen ▪ Xen/ARM does not use QEMU ▪ Typically devices are not emulated in Xen/ARM (GIC is an exception)
  • 12. Current Design for Emulating SBSA UART App App Kernel DomU XencosoleApp Kernel Dom0 EL0 EL1 EL2 SBSA UART Emulation Logic ▪ Emulate SBSA UART in the Xen hypervisor
  • 13. Current Design for Emulating SBSA UART App App Kernel DomU XencosoleApp Kernel Dom0 EL0 EL1 EL2 SBSA UART Emulation Logic ▪ Emulate SBSA UART in the Xen hypervisor ▪ Reuse the PV console backend to minimize the changes in Dom0
  • 14. Current Design for Emulating SBSA UART App App Kernel DomU Xenco sole App Kernel Dom0 Xen EL0 EL1 EL2 SBSA UART Emulation Logic ▪ Emulate SBSA UART in the Xen hypervisor ▪ Reuse the PV console backend to minimize the changes in Dom0 ▪ Future: Move emulation to Xen non-privileged (EL0) mode
  • 16. Implemenation of SBSA UART Emulation in Xen DomUDom0 User I/O MMIO Traps IN ring buffer OUT ring buffer Device Tree SBSA UART emulation IRQ Events DOMCTL ▪ Changes in the Xen hypervisor ▪ MMIO trap handling ▪ IRQ injection ▪ Event handling Xen
  • 17. Implementation of SBSA UART Emulation in Xen DomUDom0 User I/O MMIO Traps IN ring buffer OUT ring buffer Device Tree SBSA UART emulation IRQ Events DOMCTL ▪ Changes in the toolstack ▪ New DOMCTL API to enable emulation in Xen ▪ New SBSA UART node added in the xenstore ▪ New SBSA UART node added to the device tree Xen
  • 18. Implementation of SBSA UART Emulation in Xen Device Tree ▪ Changes in Xenconsole ▪ Multiple console support added ▪ New option “vuart” added in DomU.cfg file to enable sbsa uart for a domain ▪ xl console command enhanced to allow the user to connect to vuart DomUDom0 User I/O MMIO Traps IN ring buffer OUT ring buffer SBSA UART emulation IRQ Events DOMCTL Xen
  • 19. Using SBSA UART Sample DomU.cfg file vuart = “sbsa_uart” extra = “console=ttyAMA0 …” Start the domain with SBSA UART enabled xl create domU.cfg Connect to SBSA UART xl console –t vuart <domain name>
  • 20. TBD Items ▪ SBSA UART support in UEFI firmware ▪ Currently UEFI firmware uses PV console for input/output ▪ Add support for SBSA UART ▪ How should the guest OS select the default console ? ▪ Currently PV console is the default console ▪ Add SBSA UART support in ACPI
  • 21. Upstream Status ▪ The SBSA UART patch set is under review on the xendev mailing list ▪ It has gone through five revisions ▪ The changes have matured over these revisions ▪ Hopefully it should be included in 4.10 ▪ The code is available @ https://git@git.linaro.org:/people/bhupinder.thakur/xen.git branch: vpl011_v5
  • 23. Xenconsole Changes Handle_ring_read() DomU Xen PV Ring buffer write and event raised PL011 ring buffer write and event raised Buffer_append()PV buffer SBSA UART buffer Handle_tty_write() Write to PV tty client Handle_tty_read() DomU Xen PV Ring buffer write and event raised SBSA UART Ring buffer write and event raised Read from PV tty client Read from PV tty client PV console logs SBSA UART console logs console_create_ring() console_create_tty() create_console_log() console_cleanup() … Write to SBSA UART tty client