[FFE] Merge qemu 2.0

Bug #1284793 reported by Serge Hallyn on 2014-02-25
This bug affects 6 people
Affects Status Importance Assigned to Milestone
qemu (Ubuntu)

Bug Description

Currently 14.04 has qemu 1.7.0+dfsg-3ubuntu4, which had 234 patches. Many of those are for enabling aarch64, most will be in 2.0.

Qemu 2.0 is scheduled to be released on April 4 (http://wiki.qemu.org/Planning/2.0). I will begin doing regular package building/testing before release. If that testing goes well, I would like 2.0 to be considered for a late pull into 14.04.

We will be supporting this package for 5 years; therefore I would prefer a 2.0 with very few patches on top, to a 1.7 with hundreds of patches, as a starting point.

Marc Deslauriers (mdeslaur) wrote :

FYI, From a security point of view, I would much rather support 2.0 than to support 1.7 with a zillion patches. Qemu is a package that does get a _lot_ of security updates, so being closer to a released version is preferable.

Stéphane Graber (stgraber) wrote :

So are you planning on uploading the upstream rc releases starting with rc0?

I wouldn't be too fond of just landing the final 2.0 to replace our 1.7 in early April, but if we switch to an upstream snapshot soon, then track their RCs that should leave us enough time to ensure our qemu is solid by release time.

For an LTS, having good upstream support and an easy way to backport fixes and security fixes is critical, so if we have a reasonable landing plan for qemu 2.0, I'll be happy to grant the FFe.

Quoting Stéphane Graber (<email address hidden>):
> So are you planning on uploading the upstream rc releases starting with
> rc0?

Absolutely. I intend to push a package based on tomorro's git to ppa,
for starters. I'll push the version based on rc0 to a ppa as well,
so that if it just doesn't look usable, we can still backtrack. If it
looks ok, then rc1 to archive should be ok.

Stéphane Graber (stgraber) wrote :

Sounds reasonable to me. Please make sure to announce your PPA on ubuntu-devel and other relevant mailing-lists to get as much feedback as early as possible.

FFe granted.

Changed in qemu (Ubuntu):
status: New → Triaged
Stéphane Graber (stgraber) wrote :

Please close this FFe bug with the final 2.0 upload. Keep in mind that our final freeze is scheduled for 10th of April, so make sure the final release is in before that.

Thiago Martins (martinx) wrote :

How can I install Qemu 2.0 on top of my Ubuntu 14.04 ?

Thiago Martins (martinx) wrote :

Never mind, I just added:

add-apt-repository ppa:ubuntu-virt/candidate

...to enable Qemu 2.0 for Trusty, I'll try it!


Thiago Martins (martinx) wrote :

I upgraded 5 Ubuntu 14.04 Hypervisors to Qemu 2.0, about 25 Virtual Machines up and running.

Qemu 2.0 It is working like a charm!

GizmoChicken (gizmochicken) wrote :

Good news, bad news.

First the good news:

I have a few VMs that run under KVM using Virt-Manager. ALL of those VMs are running great with Qemu 2.0.

The bad news:

I have one VM that runs under KVM with VGA passththrough using the VFIO option. That VM, including VGA passthrough, works flawlessly under Qemu 1.7, but it won't even start under Qemu 2.0.

Here's the error message that I get when I try to start that VM:

qemu-system-x86_64: /build/buildd/qemu-2.0~git-20140305.f55ea62/hw/pci/pcie.c:240: pcie_cap_slot_hotplug_common: Assertion `((pci_dev->devfn) & 0x07) == 0' failed.

Here are the startup commands that work flawlessly with Qemu 1.7, but that don't work with Qemu 2.0:

sudo vfio-bind 0000:03:00.0 0000:03:00.1 0000:00:12.0 0000:00:12.2 0000:00:16.0 0000:00:16.2 && \
sudo qemu-system-x86_64 \
-enable-kvm \
-M q35 \
-m 4096 \
-cpu host \
-daemonize \
-smp 4,sockets=1,cores=4,threads=1 \
-bios /usr/share/qemu/bios.bin \
-vga none \
-device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root \
-device vfio-pci,host=03:00.0,bus=root,addr=00.0,multifunction=on,x-vga=on \
-device vfio-pci,host=03:00.1,bus=root,addr=00.1 \
-device ahci,bus=pcie.0,id=ahci \
-drive file=/images/Win7img,id=disk,format=raw \
-device ide-hd,bus=ahci.0,drive=disk \
-device vfio-pci,host=00:12.0,bus=pcie.0 \
-device vfio-pci,host=00:12.2,bus=pcie.0 \
-device vfio-pci,host=00:16.0,bus=pcie.0 \
-device vfio-pci,host=00:16.2,bus=pcie.0 \

Any thoughts on why the above isn't working under qemu 2.0?

For more info about VFIO, have a look here: https://bbs.archlinux.org/viewtopic.php?id=162768

Serge Hallyn (serge-hallyn) wrote :


Unfortunately I don't have any machine I can try this on myself to
bisect, but my guess is that commit a66e657e is to blame. I am
building test packages with that commit reverted, and will post
them to http://people.canonical.com/~serge/qemu-20140306-1 when
they are ready. Please let me know if they fix the issue for

Serge Hallyn (serge-hallyn) wrote :

test debs are now up under
http://people.canonical.com/~serge/qemu-20140306-1/ .
I had to also revert one other commit 5e954943 to

GizmoChicken (gizmochicken) wrote :

Hi Serge,

I downloaded ALL of the test debs at http://people.canonical.com/~serge/qemu-20140306-1/ and then installed ALL of them using the "sudo dpkg -i *.deb" command. That's what you had in mind, right?

Anyway, the good news is that the provided test version of Qemu 2.0. seems to have fixed the problem that I previously reported with VFIO. That is, my VM now seems to be properly running under KVM with VGA passthrough using the VFIO option. Of course, I haven't thoroughly tested for other issues, but VFIO does seem to be working.

Will you be updating ppa:ubuntu-virt/candidate to include this fix any time soon? I'd much prefer installing subsequent updates using the ppa.


Serge Hallyn (serge-hallyn) wrote :

A better fix is at
I will push that patchset on top of a fresh git pull hopefully

GizmoChicken (gizmochicken) wrote :

Thanks Serge. Much appreciated! I'll test it later tonight or early tomorrow.

By the way, the patch that you mentioned is from Igor Mammedov, who is at RedHat. Alex Williamson, who is also at RedHat, plays a significant role in implementing VFIO in qemu and the linux kernel, so he might also be a good contact, if needed. Here's a link to his github profile: https://github.com/awilliam

GizmoChicken (gizmochicken) wrote :

Hi Serge,

Version 2.0~git-20140307.4c288ac-0ubuntu1 installed from ppa:ubuntu-virt/candidat seems to be working great with VFIO. Thanks!


Doug Smythies (dsmythies) wrote :

The update of yesterday fixes issues I was having with vmvga.

qemu-keymaps 2.0~git-20140317.2bda660-0ubuntu1 all QEMU keyboard maps
qemu-kvm 2.0~git-20140317.2bda660-0ubuntu1 amd64 QEMU Full virtualization on x86 hardware
qemu-system-common 2.0~git-20140317.2bda660-0ubuntu1 amd64 QEMU full system emulation binaries ...
qemu-system-x86 2.0~git-20140317.2bda660-0ubuntu1 amd64 QEMU full system emulation binaries ...
qemu-utils 2.0~git-20140317.2bda660-0ubuntu1 amd64 QEMU utilities

Serge Hallyn (serge-hallyn) wrote :

Thanks for the update.

GizmoChicken (gizmochicken) wrote :

VFIO was workng great with the last two (or three) QEMU 2.0 test version versions prior to 2.0~git-20140325.7b770c7-0ubuntu1. But with 2.0~git-20140325.7b770c7-0ubuntu1, I get a BSOD and an error stating that "The Bios in this system is not fully ACPI compliant" when attempting to start my Windows 7 guest using VFIO. Given that VFIO was working before the update, I'm guessing that the update is the cause.

Serge Hallyn (serge-hallyn) wrote :

How are you starting the VM? Could you try specifying -M pc-i440fx-1.7
or -M pc-i440fx-2.0 ? With the latest upload the default became
'trusty', which could cause windows to say "this is new hardware".

GizmoChicken (gizmochicken) wrote :

I attempted to start the VM using the commands listed in comment #9 above (with -M q35), which was working great until 2.0~git-20140325.7b770c7-0ubuntu1. I tried substituting -M pc-i440fx-2.0 for -M q35 (Is that what you had in mind?), but got the following error: "qemu-system-x86_64: -device ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root: Bus 'pcie.0' not found"

Oh, and I tried starting another Windows 7 VM using Virt-Manager (without VFIO or any any sort of passthrough), and that VM also crashed with a BSOD just after boot. That VM also had been running just fine with previous test versions of QEMU 2.0. So my system doesn't like something about this latest test version of QEMU.

Serge Hallyn (serge-hallyn) wrote :

It looks like this is https://bugs.launchpad.net/bugs/1297651

A patch should be coming soon to fix it. (In the meantime you
should be able to get the previous version's debs from the ppa
by hand; If that's a problem please let me know)

GizmoChicken (gizmochicken) wrote :

Yep, that seems to be it. I look forward to the patch.

GizmoChicken (gizmochicken) wrote :

My previously reported issue with BSODs seems to be fixed in 2.0~git-20140327.3768d50-0ubuntu1.

Serge Hallyn (serge-hallyn) wrote :

Excellent, I was hoping for that. Thanks for the update.

Serge Hallyn (serge-hallyn) wrote :

The 2.0 release was pushed to 14.04 archive tonight (and I failed to put this bug# in the changelog)

Changed in qemu (Ubuntu):
status: Triaged → Fix Released
GizmoChicken (gizmochicken) wrote :

Serge, thanks so much for your hard work to get qemu 2.0 into the repository. Much appreciated!

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers