PCI Passthrough in QEMU

We now have PCI passthrough support in QEMU upstream, this was one of the missing pieces needed to have a full featured QEMU device model. But there is still more work to do on it.

Why do we use QEMU?

We use QEMU in Xen to emulate a part of the hardware, in particular a disk, a network card and the graphic output. So a guest does not need to be modified in order to run under Xen. Even with a modified guest, QEMU can be used to handle the graphic output of the guest, or as a backend for a paravirtualized disk or network card.

A blog post a year ago mentions that we had Xen support in QEMU, this was the first part needed to run a Xen guest with QEMU upstream. Now, with the PCI passthrough support upstreamed, that one large piece of code closer to a full featured QEMU upstream.

What is PCI passthrough?

Also known as device assignment, PCI passthrough is here to assign a real PCI device to a guest, like a network card or a sound card. This give full and direct access to the PCI device from a fully virtualized guest.

To use it, take a look at our wiki: PCI passthrough with Xen 4.2 as there is no change compared to the traditional qemu-dm. You can take a look here as well: Xen PCI Passthrough for more general information about PCI passthrough.

How long does it take?

Nine months ago, the first “Request For Comment” set of patches have been sent to qemu-devel and since, not less than 13 revisions were necessary to clean up the code and have a better integration with the QEMU ecosystem. It has been hard to get review of those patches, especially the patches that touch to the generic part of QEMU. But thanks to Konrad Rzeszutek Wilk, Stefano Stabellini, Michael S. Tsirkin and Jan Kiszka for their reviews, now, the code is easier to read than it was in qemu-xen-traditional fork.

What’s next?

So the version 1.2 of QEMU will be released with Xen PCI passthrough support, and Xen 4.2 will support the assignment of a PCI device with QEMU upstream. But QEMU upstream, or qemu-xen as it is called in Xen tool stack, is not yet the default device model. There is still some issue to resolved and we are working on it. One feature that does not work yet is live migration due to the lake of dirty bit logging during migration. But that is another story. Once everything works with QEMU, we intend to change the default device model. This should happen with the Xen 4.3 release.

Read more

Xen Project Announces Performance and Security Advancements with Release of 4.19
Aug 05 2024

New release marks significant enhancements in performance, security, and versatility across various architectures.  SAN FRANCISCO – July 31st, 2024 – The Xen Project, an open source project under the Linux Foundation, is proud to announce the release of Xen Project 4.19. This release marks a significant milestone in enhancing performance, security,

Upcoming Closure of Xen Project Colo Facility
Jul 10 2024

Dear Xen Community, We regret to inform you that the Xen Project is currently experiencing unexpected changes due to the sudden shutdown of our colocated (colo) data center facility by Synoptek. This incident is beyond our control and will impact the continuity of OSSTest (the gating Xen Project CI loop)

Xen Summit Talks Now Live on YouTube!
Jun 18 2024

Hello Xen Community! We have some thrilling news to share with you all. The highly anticipated talks from this year’s Xen Summit are now live on YouTube! Whether you attended the summit in person or couldn’t make it this time, you can now access all the insightful presentations

Get ready for Xen Summit 2024!
May 24 2024

With less than 2 weeks to go, are you ready? The Xen Project is gearing up for a summit full of discussions, collaboration and innovation. If you haven’t already done so – get involved by submitting a design session topic. Don’t worry if you can’t attend in person,