Outreachy 2018 MayAugust
Introduction
QEMU will apply to Outreachy 2018 May-August if sponsorship can be secured. This page contains our ideas list and information for applicants and mentors.
Applicants: Please be aware that QEMU has not yet confirmed that it can take part in Outreachy this year. Please wait until there is confirmation. Thanks!
How to apply
- Read the Outreachy website first
- Choose a project idea from the list below. You must have the necessary technical skills for the idea you have chosen.
- Contact the mentor for your project idea to introduce yourself and discuss how you want to tackle the project.
- Choose a small task from the BiteSizedTasks page and submit a patch contribution. See Contribute/SubmitAPatch for guidelines on patch submission.
Find Us
- IRC: #qemu-outreachy on irc.oftc.net
For general questions about QEMU in Outreachy, please contact the following people:
- Stefan Hajnoczi (stefanha on IRC)
Project Ideas
This is the listing of suggested project ideas.
Separate process for UI
Summary: Run QEMU UI in a separate process
Normally, if QEMU is compiled with graphical window support, it displays output such as guest graphics, guest console, and the QEMU monitor in a window.
On the other hand, there are remote display viewers, such as remote-viewer that provide similar functionalities for user interactions and desktop integration. There is a duplication of effort to provide a good experience on the various OS & desktops over time.
With the SPICE protocol, there shouldn't be a performance hit, since the compression is disabled locally and the display process may use shared buffers/textures.
However, some functions are lacking, such as QEMU monitor interactions or console support. They can be provided thanks to SPICE "port" channel for example. Other mechanisms or solutions are possible (for example, quit QEMU when the display process exit by watching the child process). In other cases, virt-viewer provides a superior experience: clipboard sharing, usb hotplugging, kiosk mode, custom key bindings, shared folders, advanced display configuration, etc.
The goal of this summer of code is to provide a new -display backend to run a "QEMU UI" in a seperate process. It should try to provide as much functionality as the existing display backends.
For example, a -display spice backend that would run an enhanced remote-viewer as child process, with additional menu entries and terminal consoles providing a similar experience as -display gtk.
Links:
- https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/spice-port-fqdn.txt;hb=HEAD
- https://www.spice-space.org/
- https://virt-manager.org/
Details:
- Skill level: intermediate or advanced
- Language: C
- Mentors: marcandre.lureau@redhat.com, kraxel@redhat.com
- Suggested by: marcandre.lureau@redhat.com
virgl on Windows host
Summary: make virgl rendering work on Windows host
virgl enables accelerated 3d rendering in a VM. It requires Desktop GL on the host.
In theory, virgl should work on Windows with a capable host driver. This project aim at making virgl work well with various GPU on Windows. Since many Windows OpenGL drivers have bad behaviours, it would be worth to support ANGLE/opengles instead. This would require various modifications in virgl library. Additionally, it would be a good opportunity to ease the cross-compilation and packaging of qemu/virgl with msitools.
Links:
Details:
- Skill level: intermediate or advanced
- Language: C
- Mentors: marcandre.lureau@redhat.com, airlied@redhat.com
- Suggested by: marcandre.lureau@redhat.com
Vulkan-ize virgl
Summary: accelerated rendering of Vulkan APIs
virgl enables accelerated 3d rendering in a VM. It uses Desktop GL on host, and provides OpenGL/GLES in guest.
This project would aim at implementing Vulkan accelerated rendering. There are multiple ways of interpreting this idea. One interesting approach would be to support Vulkan in VM on a Vulkan-capable host, doing more passthrough.
Links:
Details:
- Skill level: advanced
- Language: C
- Mentors: airlied@redhat.com, marcandre.lureau@redhat.com
- Suggested by: marcandre.lureau@redhat.com
Multiple PCI domains for x86 PCI Express Machine (Q35)
Summary: Implement multiple PCI domains support for x86 machines.
Currently QEMU supports multiple PCIe Host Bridges in Q35 PCI Express chipset using the pxb-pcie device.
However all PCIe Host Bridges are part of the same PCI domain (0). This is a serious limitation since all of them have to share a range of 256 PCI buses, which leads to a hard limit on the number of PCI devices the Q35 machine can use.
The limitation comes from the fact the PCI Express topology limits one PCI Express device per PCI bus.
PCI devices have a set of registers referred to as ‘Configuration Space’ and PCI Express introduces Extended Configuration Space mechanism for devices (ECAM). Basically, the 'Configuration Space' registers are mapped to a memory location which can be accessed by software in order to setup the PCI devices.
Each PCI domain requires a different (ECAM) space, however QEMU implements only one.
The goal of this summer project is to improve Q35's PCIe Host bridges (pxb-pcie) in order to place them on their own PCI domain in order to remove the mentioned limitation.
Links:
- http://qemu-project.org/Features/Q35
- http://wiki.qemu-project.org/images/4/4e/Q35.pdf
- https://git.qemu.org/?p=qemu.git;a=blob_plain;f=docs/pcie_pci_bridge.txt
- http://git.qemu.org/?p=qemu.git;a=blob_plain;f=hw/pci-bridge/pci_expander_bridge.c
- http://wiki.qemu-project.org/images/f/f6/PCIvsPCIe.pdf
Details:
- Skill level: intermediate
- Language: C
- Mentor: marcel@redhat.com, marcel_a on IRC
- Suggested by: Marcel Apfelbaum <marcel@redhat.com>
PCI Express Root Port enhancements
Summary: Add PCI Express advanced features to QEMU's emulated PCI Express Root Ports
QEMU's PCI Express machine (Q35) emulates generic PCI Express Root Ports.
The PCI Express Root Port emulation today supports only a subset of PCI Express advanced capabilities, missing several ones that could add a lot of functionality and make it closer to real hardware.
The goal of this summer project is to improve the PCI Express Root Port implementation by:
- Exposing the Root Port as PCIe Gen3. This requires tweaking the PCIe Root Port configuration registers to report link capabilities advertising Gen3 speeds/widths.
- Supporting up to 256 PCI Devices. This requires implementing the Alternative Routing-ID Interpretation (ARI) capability for the PCI Express Root Port. A PCI function can be located in Configuration Space by a <bus,dev,func> tuple. The 'func' part is 3 bits wide, meaning a multi-function device can have up to 8 functions. Since PCI Express architecture dictates only one device per PCIe bus, ARI uses a <bus,func> address, this time 'func' using 8 bits resulting in 256 functions per PCI device.
- Securing PCI Express devices via the Access Control Services (ACS) mechanism. ACS can force Peer-to-Peer PCIe transactions to go up through the PCIe Root Complex. ACS can be thought of as a kind of gate-keeper - preventing unauthorized transactions from occurring. For example without ACS, several multi-function PCIe Root Ports belonging to the same slot cannot be used with the vIOMMU for nested virtualization since they can "talk" to each other bypassing it.
Links:
- http://qemu-project.org/Features/Q35
- http://wiki.qemu-project.org/images/4/4e/Q35.pdf
- http://git.qemu.org/?p=qemu.git;a=blob_plain;f=hw/pci-bridge/pcie_root_port.c
- http://wiki.qemu-project.org/images/f/f6/PCIvsPCIe.pdf
Details:
- Skill level: intermediate
- Language: C
- Mentor: marcel@redhat.com, marcel_a on IRC
- Suggested by: Marcel Apfelbaum <marcel@redhat.com>
micro:bit machine type
Summary: Add emulation support for the micro:bit board
The micro:bit is a small computer for educational use that is also suitable for embedded and Internet of Things (IoT) projects. It uses a 16 MHz ARM Cortex-M0 processor with 256 KB flash and 16 KB RAM. It features many I/O capabilities including a 5x5 LED display, 2 buttons, Bluetooth and Nordic Gazell radio communications, an accelerometer, a compass, temperature and light sensing, UART, and GPIO pins for external devices.
This project will add micro:bit emulation support to QEMU, allowing code written with the Python and Javascript Blocks editors to run on your computer. Baremetal code not written with the official editors, such as C/C++ code using the microbit-dal runtime, will also work since QEMU emulates a full system including CPU and hardware devices.
This project involves:
- Implementing ARM Cortex-M0 CPU support based on existing Cortex-M3 support in QEMU
- Implementing a micro:bit .hex ROM loader
- Implementing a "microbit" machine type
- Implementing at least the 5x5 LED display, buttons, and UART.
- Stubbing out other devices as needed for the runtime to start successfully.
The goal is to run "Hello World!" programs created with the Python and Javascript Blocks editors. If you have time it may be possible to implement additional hardware devices or a graphical user interface.
Previous experience with low-level systems software (firmware, bootloaders, kernels) and hardware (Arduino, PIC, microcontrollers) is recommended. Start by looking at the reference design schematic to understand how the micro:bit works.
Links:
Details:
- Skill level: advanced
- Language: C
- Mentors: Stefan Hajnoczi <stefanha@gmail.com> ('stefanha' on IRC), Jim Mussared <jim@groklearning.com>, Joel Stanley <joel@jms.id.au>
AMD Interrupt Remapping Support for Jailhouse hypervisor
Summary: Supplement existing AMD IOMMU code with interrupt remapping support.
Jailhouse currently supports IOMMU on AMD-based x86 systems, however it does so for memory transfers only. In order for the isolation to be complete, the analogous translation should be applied to interrupt messages as well. This technique is commonly known as interrupt remapping and it is provided by AMD IOMMU.
The goal of this project is to implement the missing bits in AMD IOMMU interrupt remapping support to bring it on par with Intel interrupt remapping support Jailhouse already has. This involves writing code for the hypervisor core and arch-specific parts as well as adding relevant options to the config file generator.
In order to succeed with this project, you must have a sufficiently recent (2015 or newer) AMD computer (PC or laptop) which you can use as a testbed. You should also check that:
- The APU is Kaveri-based or newer
- There is an IOMMU option in the UEFI setup tool and it's enabled
- A recent Linux distribution reports IOMMU support in dmesg
- And you can pass-through a PCI device such as a network or sound card to a guest running in the virt-manager.
You should also check that the mainboard has a serial port header as this helps debugging a lot.
Links:
- Jailhouse project, including setup in QEMU/KVM: https://github.com/siemens/jailhouse
- Jailhouse tutorial: https://events.linuxfoundation.org/sites/events/files/slides/ELCE2016-Jailhouse-Tutorial.pdf
- A strawman implementation on top of the old Jailhouse tree (can be used as a starting point): https://github.com/vsinitsyn/jailhouse/tree/amd-vi-ir
- AMD IOMMU specification: https://support.amd.com/TechDocs/48882_IOMMU.pdf
Details:
- Skill level: Advanced
- Language: C
- Mentor: Jan Kiszka <jan.kiszka@web.de>, Valentine Sinitsyn <valentine.sinitsyn@gmail.com>
Project idea template
=== TITLE === '''Summary:''' Short description of the project Detailed description of the project. '''Links:''' * Wiki links to relevant material * External links to mailing lists or web sites '''Details:''' * Skill level: beginner or intermediate or advanced * Language: C * Mentor: Email address and IRC nick * Suggested by: Person who suggested the idea
Information for mentors
Mentors are responsible for keeping in touch with their candidate and assessing the candidate's progress.
The mentor typically gives advice, reviews the candidate's code, and has regular communication with the candidate to ensure progress is being made.
Being a mentor is a significant time commitment, plan for 5 hours per week. Make sure you can make this commitment because backing out during the summer will affect the candidate's experience.
The mentor chooses their candidate by reviewing candidate application forms, giving out bite-sized tasks so applicants can submit a patch upstream, and conducting IRC interviews with candidates. Depending on the number of candidates, this can be time-consuming in itself. Choosing the right candidate is critical so that both the mentor and the candidate can have a successful experience.