SlideShare a Scribd company logo
1 of 21
Download to read offline
libvirt integration and testing for
enterprise KVM/ARM
Drew Jones, Eric Auger
Linaro Connect Budapest 2017 (BUD17)
2
Overview
• Enterprise guest requirements
• QEMU/KVM enterprise guest management
• libvirt
• A one slide introduction
• What’s new in libvirt for AArch64
• libvirt and virt tool example uses
• Describing a PCIe topology
• Managing PCIe device assignment
• Managing guest migration
• Virt stack verification
• Summary
3
Enterprise guest
4
Features of an enterprise guest
• AArch64 machine features
• Wide size range
memory, cores
disks, network adapters
• PCIe device support
• Firmware initiated boot
• Standardized
• Virtual machine features
• VirtIO
• Generic devices
• VM spec compliant
VirtIO
5
Additional guest requirements
• No unnecessary host exposure
• Generic CPU model for vCPUs
• Dynamic memory sizing
• Ballooning
• ACPI hotplug events
• vCPU hotplug
• ACPI hotplug events
• Device attach/detach support
• SCSI and PCIe hotplug
• High performance support
• PCIe device assignment – VFIO
• Host pinning: vNUMA and virtual CPU topology
6
● QEMU/KVM guest management
• QEMU interfaces are QEMU version dependent
• QMP access requires additional setup
• QEMU command line grows and grows…
qemu-system-aarch64 
-machine virt-2.9,accel=kvm,gic-version=3 
-cpu host,pmu=on -m 16384 -smp 48 
-drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on 
-drive file=/images/nvram/rhel_VARS.fd,if=pflash,format=raw,unit=1 
-display none -serial mon:stdio -no-user-config -nodefaults 
-device ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
-device ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 
-device ioh3420,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 
-device ioh3420,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 
-device virtio-scsi-pci,id=scsi0,bus=pci.3,addr=0x0 
-drive file=/images/rhel.qcow2,format=qcow2,if=none,id=drive-scsi0-0-0-0,cache=none 
-device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 
-netdev tap,id=hostnet0,script=no,downscript=no,ifname=tap0,vhost=on 
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:62:c8:20,bus=pci.2,addr=0x0 
-device virtio-balloon-pci,id=balloon0,bus=pci.1,addr=0x0
7
libvirt
8
libvirt provides a consistent API
Libvirt API
QEMU QEMU
Libvirt daemon
Node
virsh
virt-manager
OpenStack
libguestfs/
guestfish
virt-install
RPC
RHEV/oVIRT
More at https://libvirt.org/apps.html
9
libvirt 3.x: new AArch64 support
• New support
• Use virtio-pci by default for mach-virt guests
• PCIe placement
• virtio-gpu
• Auto GIC version selection
• Features for free (works like x86)
• vPMU enablement
• PCIe device assignment
• Migration for GICv3/ITS
10
PCIe placement
• PCIe-only (no legacy PCI)
• Complies with QEMU docs/pcie.txt
• Root bus (pcie.0) and PCIe root ports at top
• ioh3420 → generic root port
• Flat hierarchy preferred (but PCIe switches are available)
• Root ports or switch downstream ports necessary for hotplug
PCIe root port #0
pcie.0
PCIe root port #N
Downstream Port
Upstream Port
Downstream Port
PCIe Dev
PCIe Dev
11
PCIe placement: virt-manager
<controller type='pci' index='0' model='pcie-root'/>
-device ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 
-device ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 
-device ioh3420,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 
-device virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x0 
-netdev tap,fd=25,id=hostnet0,vhost=on,vhostfd=27 
-device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:8e:3a:57,bus=pci.1,addr=0x0
<controller type='pci' index='1' model='pcie-root-port'>
<model name='ioh3420'/>
<target chassis='1' port='0x8'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0'
multifunction='on'/>
</controller>
12
PCIe device assignment
• Minimum requirements: kernel 4.11, QEMU 2.8, libvirt 3.x
• virt-install: --host-device=pci_0005_90_00_0
• virsh: enumeration/dump, hot-plug/hot-unplug
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='5' bus='144' slot='0' function='0'/>
</source>
</hostdev>
virsh nodedev-list --cap pci
virsh nodedev-detach pci_0005_90_00_0 --driver vfio
virsh nodedev-reattach pci_0005_90_00_0
virsh attach-device guest hostdev.xml
13
Migration
• GICv3 migration support
• Minimum requirements: kernel 4.11, libvirt 3.x
• QEMU: patches posted for 2.9
• ITS migration support
• Patches posted
• Hosts need identical hardware
• Hosts do not need identical QEMU versions
• mach-virt is versioned
14
Migration with libvirt
• Tested with virsh and virt-manager
• Used libvirt managed shared storage pool
• virsh save / virsh restore
• virsh migrate
15
Virt stack verification
16
avocado / avocado-vt
• avocado is a test framework inspired by autotest
• Supports plugins
• avocado-vt is a plugin supporting QEMU/KVM/libvirt tests
• Can drive QEMU or libvirt / virt-tools
• Ported to AArch64
• Teaching it defaults that match AArch64 enterprise guest setups
• Has thousands of test cases: functional and performance
• E.g. guest install, boot, migrate
• Not all tests applicable to a given target
• Most libvirt based tests just work on AArch64
• Tests can be external testsuites (kvm-unit-tests)
17
Summary
18
Summary
• QEMU/KVM enterprise guests
have complicated setups
• Many useful tools have been
built on libvirt
• Automated virt stack
verification can target libvirt
• Automated virt stack
verification can benefit from
libvirt
libvirt provides common and
stable APIs
Most libvirt-based tools just
work when ported to
AArch64
avocado-vt
avocado-vt
19
References
• Libvirt and virt-tools
• https://libvirt.org
• https://www.virt-tools.org
• avocado-vt and kvm-unit-tests:
• https://avocado-vt.readthedocs.io/en/latest/Introduction.html
• https://www.linux-kvm.org/page/KVM-unit-tests
THANK YOU
21
kvm-unit-tests
• Simple guest kernel as a unit test
• Currently has support and tests for KVM’s emulation of
• gicv2/v3
• PMU
• PSCI
• Exits for QEMU PCI emulation
• WIP: gicv3 ITS
• WIP: nested virt
• WIP: instruction emulation regression tests
• Gaining contributors
• Contribute now and get a free baseball cap (no, not really...)

More Related Content

More from Linaro

It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Linaro
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteLinaro
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopLinaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineLinaro
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allLinaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorLinaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMULinaro
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MLinaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootLinaro
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...Linaro
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramLinaro
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNLinaro
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...Linaro
 
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...Linaro
 
HKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionHKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionLinaro
 

More from Linaro (20)

It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
HKG18-500K1 - Keynote: Dileep Bhandarkar - Emerging Computing Trends in the D...
 
HKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready ProgramHKG18-317 - Arm Server Ready Program
HKG18-317 - Arm Server Ready Program
 
HKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NNHKG18-312 - CMSIS-NN
HKG18-312 - CMSIS-NN
 
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
HKG18-301 - Dramatically Accelerate 96Board Software via an FPGA with Integra...
 
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
HKG18-300K2 - Keynote: Tomas Evensen - All Programmable SoCs? – Platforms to ...
 
HKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: IntroductionHKG18-212 - Trusted Firmware M: Introduction
HKG18-212 - Trusted Firmware M: Introduction
 

Recently uploaded

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 

Recently uploaded (20)

🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 

libvirt integration and testing for enterprise KVM/ARM - BUD17-213

  • 1. libvirt integration and testing for enterprise KVM/ARM Drew Jones, Eric Auger Linaro Connect Budapest 2017 (BUD17)
  • 2. 2 Overview • Enterprise guest requirements • QEMU/KVM enterprise guest management • libvirt • A one slide introduction • What’s new in libvirt for AArch64 • libvirt and virt tool example uses • Describing a PCIe topology • Managing PCIe device assignment • Managing guest migration • Virt stack verification • Summary
  • 4. 4 Features of an enterprise guest • AArch64 machine features • Wide size range memory, cores disks, network adapters • PCIe device support • Firmware initiated boot • Standardized • Virtual machine features • VirtIO • Generic devices • VM spec compliant VirtIO
  • 5. 5 Additional guest requirements • No unnecessary host exposure • Generic CPU model for vCPUs • Dynamic memory sizing • Ballooning • ACPI hotplug events • vCPU hotplug • ACPI hotplug events • Device attach/detach support • SCSI and PCIe hotplug • High performance support • PCIe device assignment – VFIO • Host pinning: vNUMA and virtual CPU topology
  • 6. 6 ● QEMU/KVM guest management • QEMU interfaces are QEMU version dependent • QMP access requires additional setup • QEMU command line grows and grows… qemu-system-aarch64 -machine virt-2.9,accel=kvm,gic-version=3 -cpu host,pmu=on -m 16384 -smp 48 -drive file=/usr/share/AAVMF/AAVMF_CODE.fd,if=pflash,format=raw,unit=0,readonly=on -drive file=/images/nvram/rhel_VARS.fd,if=pflash,format=raw,unit=1 -display none -serial mon:stdio -no-user-config -nodefaults -device ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 -device ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 -device ioh3420,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 -device ioh3420,port=0xb,chassis=4,id=pci.4,bus=pcie.0,addr=0x1.0x3 -device virtio-scsi-pci,id=scsi0,bus=pci.3,addr=0x0 -drive file=/images/rhel.qcow2,format=qcow2,if=none,id=drive-scsi0-0-0-0,cache=none -device scsi-hd,bus=scsi0.0,channel=0,scsi-id=0,lun=0,drive=drive-scsi0-0-0-0,id=scsi0-0-0-0,bootindex=1 -netdev tap,id=hostnet0,script=no,downscript=no,ifname=tap0,vhost=on -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:62:c8:20,bus=pci.2,addr=0x0 -device virtio-balloon-pci,id=balloon0,bus=pci.1,addr=0x0
  • 8. 8 libvirt provides a consistent API Libvirt API QEMU QEMU Libvirt daemon Node virsh virt-manager OpenStack libguestfs/ guestfish virt-install RPC RHEV/oVIRT More at https://libvirt.org/apps.html
  • 9. 9 libvirt 3.x: new AArch64 support • New support • Use virtio-pci by default for mach-virt guests • PCIe placement • virtio-gpu • Auto GIC version selection • Features for free (works like x86) • vPMU enablement • PCIe device assignment • Migration for GICv3/ITS
  • 10. 10 PCIe placement • PCIe-only (no legacy PCI) • Complies with QEMU docs/pcie.txt • Root bus (pcie.0) and PCIe root ports at top • ioh3420 → generic root port • Flat hierarchy preferred (but PCIe switches are available) • Root ports or switch downstream ports necessary for hotplug PCIe root port #0 pcie.0 PCIe root port #N Downstream Port Upstream Port Downstream Port PCIe Dev PCIe Dev
  • 11. 11 PCIe placement: virt-manager <controller type='pci' index='0' model='pcie-root'/> -device ioh3420,port=0x8,chassis=1,id=pci.1,bus=pcie.0,multifunction=on,addr=0x1 -device ioh3420,port=0x9,chassis=2,id=pci.2,bus=pcie.0,addr=0x1.0x1 -device ioh3420,port=0xa,chassis=3,id=pci.3,bus=pcie.0,addr=0x1.0x2 -device virtio-scsi-pci,id=scsi0,bus=pci.2,addr=0x0 -netdev tap,fd=25,id=hostnet0,vhost=on,vhostfd=27 -device virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:8e:3a:57,bus=pci.1,addr=0x0 <controller type='pci' index='1' model='pcie-root-port'> <model name='ioh3420'/> <target chassis='1' port='0x8'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x0' multifunction='on'/> </controller>
  • 12. 12 PCIe device assignment • Minimum requirements: kernel 4.11, QEMU 2.8, libvirt 3.x • virt-install: --host-device=pci_0005_90_00_0 • virsh: enumeration/dump, hot-plug/hot-unplug <hostdev mode='subsystem' type='pci' managed='yes'> <source> <address domain='5' bus='144' slot='0' function='0'/> </source> </hostdev> virsh nodedev-list --cap pci virsh nodedev-detach pci_0005_90_00_0 --driver vfio virsh nodedev-reattach pci_0005_90_00_0 virsh attach-device guest hostdev.xml
  • 13. 13 Migration • GICv3 migration support • Minimum requirements: kernel 4.11, libvirt 3.x • QEMU: patches posted for 2.9 • ITS migration support • Patches posted • Hosts need identical hardware • Hosts do not need identical QEMU versions • mach-virt is versioned
  • 14. 14 Migration with libvirt • Tested with virsh and virt-manager • Used libvirt managed shared storage pool • virsh save / virsh restore • virsh migrate
  • 16. 16 avocado / avocado-vt • avocado is a test framework inspired by autotest • Supports plugins • avocado-vt is a plugin supporting QEMU/KVM/libvirt tests • Can drive QEMU or libvirt / virt-tools • Ported to AArch64 • Teaching it defaults that match AArch64 enterprise guest setups • Has thousands of test cases: functional and performance • E.g. guest install, boot, migrate • Not all tests applicable to a given target • Most libvirt based tests just work on AArch64 • Tests can be external testsuites (kvm-unit-tests)
  • 18. 18 Summary • QEMU/KVM enterprise guests have complicated setups • Many useful tools have been built on libvirt • Automated virt stack verification can target libvirt • Automated virt stack verification can benefit from libvirt libvirt provides common and stable APIs Most libvirt-based tools just work when ported to AArch64 avocado-vt avocado-vt
  • 19. 19 References • Libvirt and virt-tools • https://libvirt.org • https://www.virt-tools.org • avocado-vt and kvm-unit-tests: • https://avocado-vt.readthedocs.io/en/latest/Introduction.html • https://www.linux-kvm.org/page/KVM-unit-tests
  • 21. 21 kvm-unit-tests • Simple guest kernel as a unit test • Currently has support and tests for KVM’s emulation of • gicv2/v3 • PMU • PSCI • Exits for QEMU PCI emulation • WIP: gicv3 ITS • WIP: nested virt • WIP: instruction emulation regression tests • Gaining contributors • Contribute now and get a free baseball cap (no, not really...)