Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
7th WhiteRabbit Workshop - November 2012
Agenda

About Igalia
Virtual vs Real
Linux support and making of FMC TDC board
Testing, Virtual Hardware and WhiteRabbit
Technical details and demo

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Who is Igalia?

Free and open software company
50 hackers around the globe
Hacking in different areas
kernel
virtualization
graphics/rendering
compilers
distros
...

www.igalia.com

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Virtual vs Real

Using virtual HW is all about having the possibility to test
low level software, such as firmwares, HDL cores or
kernel/drivers, without real HW. It is not about replacing
real hardware at all.
The idea is analysing every test case on real hardware in
order to know if we can run it on virtual hardware. This
approach saves resources and time.

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Linux support and making of FMC TDC board

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
FMC TDC Linux support

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
FMC TDC Linux support

Time-To-Digital-Converter (TDC) board
Used for measuring the time of arrival of each incoming
pulse in order to save the timestamp into the memory,
ready to be read later

CERN/Igalia effort to support FMC-TDC board in Linux
drivers, user-space library and test cases developed

Integration with ZIO framework, use FMC bus and SPEC
drivers

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Making of FMC TDC Linux support

We face the typical issues when developing drivers for non
mature hardware
Hardware not available
Buggy firmwares delaying development
Is it a hardware or software bug? Where is it?
Flashing firmware, running tests... are time-intensive tasks
Hardware specification evolving along the project
...

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Making of FMC TDC Linux support
In order to minimize the previous issues we explored the
virtual way with the following results ...
No real hardware bottle-neck, parallel development
No buggy firmwares issues
Got a virtual baseline in order to test old and new
specifications/firmwares, bug identification really easy
Saved time in real flashing and testing approaches
Developed continuous integration and automatic testing
tooling for software (kernel, libraries, etc) on top of virtual
hardware
Got good-enough virtual models (buses, I/O spaces,
memory maps, etc) to cover goals.
Further emulation (VHDL, firmware, etc) possible but it
wasn’t required for this project
Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Testing, Virtual Hardware and WhiteRabbit

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Testing, Virtual Hardware and WhiteRabbit
Some thoughs ...
It is not possible catching all bugs in a complex system
A complex system based on hardware/software require
different, but integrated, testing approaches
Pragmatic testing is a must. Keep all possible testing in the
soft side. It is more affordable, fast and flexible
It doesn’t matter where the bug is (software or hardware).
If it appears in a critical system then it is a critical bug
In the long, continuous integration and automatic testing
is the way
Flexible and robust testing approach is key to get great
releases
At the end, final testing should always run in the real
system
Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Testing, Virtual Hardware and WhiteRabbit

Potential WhiteRabbits components to test
Tools and compilers (ARM, LM32)
Builroot
Barebox (bootloader)
IPL
Linux kernel and drivers (versions, configurations, etc)
User space applications (ptpd, hal, libs, etc)
VHDL and LM32 binaries

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Testing, Virtual Hardware and WhiteRabbit
Testing with Virtual Hardware would be possible on the
following components
No virtual Hardware required
Tools and compilers (ARM, LM32)
Builroot

Virtual Hardware required
Linux kernel and drivers code (similar FMC TDC approach)
LM32 binaries (real-time)
VHDL (behaviour)

Not explored
Barebox (bootloader)
IPL
User space applications (ptpd, hal, libs, etc)

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Technical details and demo

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Our work

Virtualized models
Industry Pack
TEWS TPCI-200.
GE IP-OCTAL-232.

FMC TDC
SPEC board (only needed bits)
FMC TDC board

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
FMC TDC board

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
FMC TDC board
It was needed to test error conditions on the driver
Generic stuff
The virtual board in being detected by the driver as a
genuine device.
Normal mode: no error injection.

DMA
DMA error: TDC_DMA_STAT_ERR and
TDC_DMA_STAT_ABORT.
DMA timeout.

Input pulses
Filter events with pulse width lower than 100 ns
(requirement).
Test different input pulse arrival rate.
Test timestamp threshold setup.
Test time threshold setup.

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
What was virtualized?

SPEC
PCI: (sub)Vendor ID, (sub)Device ID. No MSI support.
Memory Map: BAR addresses.

FMC TDC Firmware
Memory map: status and configuration registers, Event’s
circular buffer.
DMA core: memory map, registers.

Input pulse generation
Different parameters setup: input pulse arrival rate, pulse
width, etc.

Error injection
As it was previously mentioned.

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
How we did that

QEMU (http://wiki.qemu.org)
Open source machine emulator and virtualizer.

Buildbot (http://trac.buildbot.net/)
Continuous integration system designed to automate the
build/test cycle.
Python. Web interface to check the logs.

Our own testing suite
Based on Sam’s experience working with PTS in the past.
Needed more flexibility: different setups for the same test.
Developed in Python, as PTS.

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Testing suite design

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Testing suite design
Launch QEMU with some setups:
Choose memory size, virtual machine image, network, etc.
Snapshot mode.
Shared folders to interchange data.
No screen.
The kernel is pass as a parameter to QEMU -> Not using
the one in the virtual machine.
Timeout. If QEMU is still running after a given time,
something wrong happened.
Forward kernel logs to QEMU’s serial port. We can read
dmesg info from host.

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
The result (I)

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
The result (II)

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
The result (III)

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
The result (IV)

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Potential improvements

Improve the virtual model.
Do a more realistic model of the device.
Add VHDL virtualization.

QEMU configuration: use config files?
Buildbot: fix issues.
Testing suite
Add new features (hooks, etc).
Choose Red Hat’s autotest framework?

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Testing and HW Virtualization

Questions & Answers

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Testing and HW Virtualization

Thank you!

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
Links

http://www.ohwr.org/projects/spec
http://www.ohwr.org/projects/fmc-tdc
http://www.ohwr.org/projects/fmc-tdc-sw
http://blogs.igalia.com/berto/2012/10/03/
industrypack-qemu-and-linuxcon/
http://events.linuxfoundation.org/images/
stories/pdf/lceu2012_garcia.pdf

Testing and HW Virtualization

Javier Muñoz Mellid & Samuel Iglesias Gonsalvez

More Related Content

PDF
Kernel Recipes 2017 - Testing on device with LAVA - Olivier Crête
PDF
PowerDRC/LVS 2.2 released by POLYTEDA
PDF
Kernel Recipes 2013 - Kernel for your device
PDF
TRACK C: A new method for automatic generation of DRC and LVS runsets/ Dr. El...
PDF
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
PDF
The Docker ecosystem and the future of application deployment
PDF
P2P Container Image Distribution on IPFS With containerd and nerdctl
PDF
Virtunoid: Breaking out of KVM
Kernel Recipes 2017 - Testing on device with LAVA - Olivier Crête
PowerDRC/LVS 2.2 released by POLYTEDA
Kernel Recipes 2013 - Kernel for your device
TRACK C: A new method for automatic generation of DRC and LVS runsets/ Dr. El...
Kernel Recipes 2019 - Hunting and fixing bugs all over the Linux kernel
The Docker ecosystem and the future of application deployment
P2P Container Image Distribution on IPFS With containerd and nerdctl
Virtunoid: Breaking out of KVM

What's hot (20)

PDF
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
PDF
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm
PDF
Game Programming 05 - Development Tools
PDF
AdaCore Paris Tech Day 2016: Jerome Lambourg - Cross and BareBoard Team Insid...
PDF
Kernel Recipes 2019 - BPF at Facebook
PDF
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going
PDF
libreCMC : The Libre Embedded GNU/Linux Distro
PDF
Craftsmanship in Computational Work
PDF
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
PDF
An In-Depth Look Into Microcontrollers
 
PDF
Automotive Grade Linux and systemd
PDF
Taking Docker to Production: What You Need to Know and Decide
PDF
Kernel Recipes 2018 - A year of fixing Coverity issues all over the Linux ker...
PDF
Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...
PPTX
Imageprocss
PDF
S0333 gtc2012-gmac-programming-cuda
PDF
Kernel Recipes 2018 - 10 years of automated evolution in the Linux kernel - J...
PDF
Kernel Recipes 2019 - Driving the industry toward upstream first
PDF
GPU Virtualization on VMware's Hosted I/O Architecture
PPTX
Security research over Windows #defcon china
Kernel Recipes 2018 - KernelShark 1.0; What's new and what's coming - Steven ...
Kernel Recipes 2016 - Speeding up development by setting up a kernel build farm
Game Programming 05 - Development Tools
AdaCore Paris Tech Day 2016: Jerome Lambourg - Cross and BareBoard Team Insid...
Kernel Recipes 2019 - BPF at Facebook
Kernel Recipes 2016 - Kernel documentation: what we have and where it’s going
libreCMC : The Libre Embedded GNU/Linux Distro
Craftsmanship in Computational Work
BYOD Revisited: Build Your Own Device (Embedded Linux Conference 2014)
An In-Depth Look Into Microcontrollers
 
Automotive Grade Linux and systemd
Taking Docker to Production: What You Need to Know and Decide
Kernel Recipes 2018 - A year of fixing Coverity issues all over the Linux ker...
Kernel Recipes 2018 - Live (Kernel) Patching: status quo and status futurus -...
Imageprocss
S0333 gtc2012-gmac-programming-cuda
Kernel Recipes 2018 - 10 years of automated evolution in the Linux kernel - J...
Kernel Recipes 2019 - Driving the industry toward upstream first
GPU Virtualization on VMware's Hosted I/O Architecture
Security research over Windows #defcon china
Ad

Similar to Testing and HW Virtualization (7th White Rabbit Workshop) (20)

PDF
Os Selbak
PDF
Server Emulator and Virtualizer for Next-Generation Rack Servers
PPT
Virtualization Technology for Test Automation
PPT
Virtualization Technology for Test Automation
PDF
Driving and virtualizing control systems: the Open Source approach used in Wh...
PPT
Agnostic Device Drivers
PDF
Ap 06 4_10_simek
PDF
PDF
Develop Your Own Operating Systems using Cheap ARM Boards
PDF
All Virtual All The Time
KEY
Cis222 2
PDF
Experiences porting KVM to SmartOS
PDF
Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...
PDF
Driving and virtualizing control systems: the Open Source approach used in Wh...
DOCX
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
PDF
Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)
PDF
BKK16-400A LuvOS and ACPI Compliance Testing
PPT
Embedded System
PDF
ELC_NA-2015-AFT_for_CI-Igor.Stoppa
PDF
LAS16-403: GDB Linux Kernel Awareness
Os Selbak
Server Emulator and Virtualizer for Next-Generation Rack Servers
Virtualization Technology for Test Automation
Virtualization Technology for Test Automation
Driving and virtualizing control systems: the Open Source approach used in Wh...
Agnostic Device Drivers
Ap 06 4_10_simek
Develop Your Own Operating Systems using Cheap ARM Boards
All Virtual All The Time
Cis222 2
Experiences porting KVM to SmartOS
Joyent's Bryan Cantrill: Experiences Porting KVM to SmartOS at KVM Forum, Aug...
Driving and virtualizing control systems: the Open Source approach used in Wh...
Bsdtw17: ruslan bukin: free bsd/risc-v and device drivers
Developing and Testing Industrial Hardware With QEMU (LinuxCon Europe 2012)
BKK16-400A LuvOS and ACPI Compliance Testing
Embedded System
ELC_NA-2015-AFT_for_CI-Igor.Stoppa
LAS16-403: GDB Linux Kernel Awareness
Ad

More from Igalia (20)

PDF
Life of a Kernel Bug Fix
PDF
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
PDF
Advancing WebDriver BiDi support in WebKit
PDF
Jumping Over the Garden Wall - WPE WebKit on Android
PDF
Collective Funding, Governance and Prioritiation of Browser Engine Projects
PDF
Don't let your motivation go, save time with kworkflow
PDF
Solving the world’s (localization) problems
PDF
The Whippet Embeddable Garbage Collection Library
PDF
Nobody asks "How is JavaScript?"
PDF
Getting more juice out from your Raspberry Pi GPU
PDF
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
PDF
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
PDF
CSS :has() Unlimited Power
PDF
Device-Generated Commands in Vulkan
PDF
Current state of Lavapipe: Mesa's software renderer for Vulkan
PDF
Vulkan Video is Open: Application showcase
PDF
Scheme on WebAssembly: It is happening!
PDF
EBC - A new backend compiler for etnaviv
PDF
RISC-V LLVM State of the Union
PDF
Device-Generated Commands in Vulkan
Life of a Kernel Bug Fix
Unlocking the Full Potential of WPE to Build a Successful Embedded Product
Advancing WebDriver BiDi support in WebKit
Jumping Over the Garden Wall - WPE WebKit on Android
Collective Funding, Governance and Prioritiation of Browser Engine Projects
Don't let your motivation go, save time with kworkflow
Solving the world’s (localization) problems
The Whippet Embeddable Garbage Collection Library
Nobody asks "How is JavaScript?"
Getting more juice out from your Raspberry Pi GPU
WebRTC support in WebKitGTK and WPEWebKit with GStreamer: Status update
Demystifying Temporal: A Deep Dive into JavaScript New Temporal API
CSS :has() Unlimited Power
Device-Generated Commands in Vulkan
Current state of Lavapipe: Mesa's software renderer for Vulkan
Vulkan Video is Open: Application showcase
Scheme on WebAssembly: It is happening!
EBC - A new backend compiler for etnaviv
RISC-V LLVM State of the Union
Device-Generated Commands in Vulkan

Recently uploaded (20)

PPT
Geologic Time for studying geology for geologist
PDF
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
PPTX
Chapter 5: Probability Theory and Statistics
PDF
A proposed approach for plagiarism detection in Myanmar Unicode text
PDF
Zenith AI: Advanced Artificial Intelligence
PDF
Five Habits of High-Impact Board Members
PDF
Abstractive summarization using multilingual text-to-text transfer transforme...
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
A review of recent deep learning applications in wood surface defect identifi...
PPTX
Modernising the Digital Integration Hub
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PPTX
Benefits of Physical activity for teenagers.pptx
PPTX
Custom Battery Pack Design Considerations for Performance and Safety
DOCX
search engine optimization ppt fir known well about this
PPT
Module 1.ppt Iot fundamentals and Architecture
PDF
Developing a website for English-speaking practice to English as a foreign la...
PPTX
2018-HIPAA-Renewal-Training for executives
PDF
The influence of sentiment analysis in enhancing early warning system model f...
PDF
NewMind AI Weekly Chronicles – August ’25 Week III
PDF
UiPath Agentic Automation session 1: RPA to Agents
Geologic Time for studying geology for geologist
ENT215_Completing-a-large-scale-migration-and-modernization-with-AWS.pdf
Chapter 5: Probability Theory and Statistics
A proposed approach for plagiarism detection in Myanmar Unicode text
Zenith AI: Advanced Artificial Intelligence
Five Habits of High-Impact Board Members
Abstractive summarization using multilingual text-to-text transfer transforme...
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
A review of recent deep learning applications in wood surface defect identifi...
Modernising the Digital Integration Hub
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Benefits of Physical activity for teenagers.pptx
Custom Battery Pack Design Considerations for Performance and Safety
search engine optimization ppt fir known well about this
Module 1.ppt Iot fundamentals and Architecture
Developing a website for English-speaking practice to English as a foreign la...
2018-HIPAA-Renewal-Training for executives
The influence of sentiment analysis in enhancing early warning system model f...
NewMind AI Weekly Chronicles – August ’25 Week III
UiPath Agentic Automation session 1: RPA to Agents

Testing and HW Virtualization (7th White Rabbit Workshop)

  • 1. Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez 7th WhiteRabbit Workshop - November 2012
  • 2. Agenda About Igalia Virtual vs Real Linux support and making of FMC TDC board Testing, Virtual Hardware and WhiteRabbit Technical details and demo Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 3. Who is Igalia? Free and open software company 50 hackers around the globe Hacking in different areas kernel virtualization graphics/rendering compilers distros ... www.igalia.com Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 4. Virtual vs Real Using virtual HW is all about having the possibility to test low level software, such as firmwares, HDL cores or kernel/drivers, without real HW. It is not about replacing real hardware at all. The idea is analysing every test case on real hardware in order to know if we can run it on virtual hardware. This approach saves resources and time. Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 5. Linux support and making of FMC TDC board Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 6. FMC TDC Linux support Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 7. FMC TDC Linux support Time-To-Digital-Converter (TDC) board Used for measuring the time of arrival of each incoming pulse in order to save the timestamp into the memory, ready to be read later CERN/Igalia effort to support FMC-TDC board in Linux drivers, user-space library and test cases developed Integration with ZIO framework, use FMC bus and SPEC drivers Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 8. Making of FMC TDC Linux support We face the typical issues when developing drivers for non mature hardware Hardware not available Buggy firmwares delaying development Is it a hardware or software bug? Where is it? Flashing firmware, running tests... are time-intensive tasks Hardware specification evolving along the project ... Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 9. Making of FMC TDC Linux support In order to minimize the previous issues we explored the virtual way with the following results ... No real hardware bottle-neck, parallel development No buggy firmwares issues Got a virtual baseline in order to test old and new specifications/firmwares, bug identification really easy Saved time in real flashing and testing approaches Developed continuous integration and automatic testing tooling for software (kernel, libraries, etc) on top of virtual hardware Got good-enough virtual models (buses, I/O spaces, memory maps, etc) to cover goals. Further emulation (VHDL, firmware, etc) possible but it wasn’t required for this project Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 10. Testing, Virtual Hardware and WhiteRabbit Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 11. Testing, Virtual Hardware and WhiteRabbit Some thoughs ... It is not possible catching all bugs in a complex system A complex system based on hardware/software require different, but integrated, testing approaches Pragmatic testing is a must. Keep all possible testing in the soft side. It is more affordable, fast and flexible It doesn’t matter where the bug is (software or hardware). If it appears in a critical system then it is a critical bug In the long, continuous integration and automatic testing is the way Flexible and robust testing approach is key to get great releases At the end, final testing should always run in the real system Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 12. Testing, Virtual Hardware and WhiteRabbit Potential WhiteRabbits components to test Tools and compilers (ARM, LM32) Builroot Barebox (bootloader) IPL Linux kernel and drivers (versions, configurations, etc) User space applications (ptpd, hal, libs, etc) VHDL and LM32 binaries Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 13. Testing, Virtual Hardware and WhiteRabbit Testing with Virtual Hardware would be possible on the following components No virtual Hardware required Tools and compilers (ARM, LM32) Builroot Virtual Hardware required Linux kernel and drivers code (similar FMC TDC approach) LM32 binaries (real-time) VHDL (behaviour) Not explored Barebox (bootloader) IPL User space applications (ptpd, hal, libs, etc) Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 14. Technical details and demo Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 15. Our work Virtualized models Industry Pack TEWS TPCI-200. GE IP-OCTAL-232. FMC TDC SPEC board (only needed bits) FMC TDC board Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 16. FMC TDC board Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 17. FMC TDC board It was needed to test error conditions on the driver Generic stuff The virtual board in being detected by the driver as a genuine device. Normal mode: no error injection. DMA DMA error: TDC_DMA_STAT_ERR and TDC_DMA_STAT_ABORT. DMA timeout. Input pulses Filter events with pulse width lower than 100 ns (requirement). Test different input pulse arrival rate. Test timestamp threshold setup. Test time threshold setup. Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 18. What was virtualized? SPEC PCI: (sub)Vendor ID, (sub)Device ID. No MSI support. Memory Map: BAR addresses. FMC TDC Firmware Memory map: status and configuration registers, Event’s circular buffer. DMA core: memory map, registers. Input pulse generation Different parameters setup: input pulse arrival rate, pulse width, etc. Error injection As it was previously mentioned. Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 19. How we did that QEMU (http://wiki.qemu.org) Open source machine emulator and virtualizer. Buildbot (http://trac.buildbot.net/) Continuous integration system designed to automate the build/test cycle. Python. Web interface to check the logs. Our own testing suite Based on Sam’s experience working with PTS in the past. Needed more flexibility: different setups for the same test. Developed in Python, as PTS. Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 20. Testing suite design Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 21. Testing suite design Launch QEMU with some setups: Choose memory size, virtual machine image, network, etc. Snapshot mode. Shared folders to interchange data. No screen. The kernel is pass as a parameter to QEMU -> Not using the one in the virtual machine. Timeout. If QEMU is still running after a given time, something wrong happened. Forward kernel logs to QEMU’s serial port. We can read dmesg info from host. Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 22. The result (I) Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 23. The result (II) Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 24. The result (III) Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 25. The result (IV) Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 26. Potential improvements Improve the virtual model. Do a more realistic model of the device. Add VHDL virtualization. QEMU configuration: use config files? Buildbot: fix issues. Testing suite Add new features (hooks, etc). Choose Red Hat’s autotest framework? Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 27. Testing and HW Virtualization Questions & Answers Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez
  • 28. Testing and HW Virtualization Thank you! Testing and HW Virtualization Javier Muñoz Mellid & Samuel Iglesias Gonsalvez