Merge ~paelzer/ubuntu/+source/qemu:lp-1829380-vhost-1828288-amd-xenial into ubuntu/+source/qemu:ubuntu/xenial-devel

Proposed by Christian Ehrhardt 
Status: Rejected
Rejected by: Christian Ehrhardt 
Proposed branch: ~paelzer/ubuntu/+source/qemu:lp-1829380-vhost-1828288-amd-xenial
Merge into: ubuntu/+source/qemu:ubuntu/xenial-devel
Diff against target: 137 lines (+104/-2)
4 files modified
debian/changelog (+16/-0)
debian/patches/lp1823458/lp1829380.patch (+20/-0)
debian/patches/lp1828288/target-i386-Set-AMD-alias-bits-after-filtering-CPUID.patch (+64/-0)
debian/patches/series (+4/-2)
Reviewer Review Type Date Requested Status
Rafael David Tinoco (community) tested package and reviewed code. Approve
Dan Streetman (community) Approve
Canonical Server Pending
Christian Ehrhardt  Pending
git-ubuntu developers Pending
Review via email: mp+367971@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

PPA: https://launchpad.net/~ci-train-ppa-service/+archive/ubuntu/3729

Adding original Authors as reviewers -> Dan/Rafael

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

It seems 1:2.5+dfsg-5ubuntu10.39 wasn't imported correctly yet which makes this look odd in LP at the moment.
For now, if you clone the git branch you should get a better view I'd think.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I rebased to a new git fetch, now things look more reasonable

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

@Christian,

Just discovered that might be something else going on blocking my AMD QEMU test. This time I was able to boot my guest with versions 10.39 (-updates) and yours (ppa) - and I'm not able to boot nested KVM.

So, for my patch, only difference was esthetic since it did not show the unsupported CPUID features in libvirt qemu log. You may keep it in the SRU or remove, if you judge its not worth. The patch is small and already tested, might be good to keep it, just wanted you to know that it is not fixing boot issue in AMD, just the feature check.

Thanks

Rafael

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

@Rafael - thanks for the test - Lets fix the aesthetics now that things seem ready and prepared, but throw anything on the "other" issue blocking your boot into a new bug then please.

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

@Christian,

Finished testing nested AMD KVM (AMD FX(tm)-8350). Cosmic is okay, all the others are "broken" for nested KVM. I just discovered it seems to be a kernel issue since I installed 4.19 in Xenial (1st level) running on top of Debian Sid (4.19) and it was able to boot my nested KVM guest.

I might have to bisect kernel for this :\, maybe add this to server-next somehow ? (Unsure because of possible LTS openstack releases that might be affected by this).

Cheers o/

Revision history for this message
Dan Streetman (ddstreet) wrote :

Since this is the same code content as my pkg in the upload queue, I approve of the patch for lp #1829380, that i tested with:
https://launchpad.net/~ddstreet/+archive/ubuntu/lp1829380/+packages

I will defer to tinoco to approve his patch.

review: Approve
Revision history for this message
Rafael David Tinoco (rafaeldtinoco) wrote :

Thanks Dan!

Yep, It's good for me, since my AMD issue does not seem to have anything to do with previous QEMU version, or this one. If Christian is okay with my SRU being aesthetics... I can confirm package worked for me!!

Thanks a lot!

Revision history for this message
Rafael David Tinoco (rafaeldtinoco) :
review: Approve (tested package and reviewed code.)
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Thanks you two.
I have verified that the code in -unapproved by Dan is (other than changelog wording and patch naming) identical.
So we can leave that upload there as is without replacing it.

I'm currently wrestling with my test setup, once working I'll comment on the bugs as well.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Since this will be uploaded by ddstreet (in unapproved already) we can set this one to "rejected"

Unmerged commits

c2fd05a... by Christian Ehrhardt 

changelog: Fix issues with CPUID_EXT2_AMD_ALIASES allowing guests using cpu passthrough to boot. (LP: #1828288)

Signed-off-by: Christian Ehrhardt <email address hidden>

d09e09b... by Christian Ehrhardt 

Fix issues with CPUID_EXT2_AMD_ALIASES allowing guests using cpu passthrough to boot. (LP: #1828288)

Signed-off-by: Christian Ehrhardt <email address hidden>

0b310e6... by Christian Ehrhardt 

changelog: Re-enable patches for (LP: 1823458) with a fixup for the former regression added (LP: #1829380)

Signed-off-by: Christian Ehrhardt <email address hidden>

17f438f... by Christian Ehrhardt 

Re-enable patches for (LP: 1823458) with a fixup for the former regression added (LP: #1829380)

Signed-off-by: Christian Ehrhardt <email address hidden>

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
diff --git a/debian/changelog b/debian/changelog
index 5342ca8..edc5b6d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,19 @@
1qemu (1:2.5+dfsg-5ubuntu10.40) xenial; urgency=medium
2
3 [ Dan Streetman ]
4 * Re-enable patches for (LP: 1823458) with a fixup for the former
5 regression added (LP: #1829380).
6 - d/p/lp1823458/add-VirtIONet-vhost_stopped-flag-to-prevent-multiple.patch
7 - d/p/lp1823458/do-not-call-vhost_net_cleanup-on-running-net-from-ch.patch
8 - d/p/lp1823458/lp1829380.patch
9
10 [ Rafael David Tinoco ]
11 * d/p/lp1828288/target-i386-Set-AMD-alias-bits-after-filtering-CPUID.patch
12 - Fix issues with CPUID_EXT2_AMD_ALIASES allowing guests using
13 cpu passthrough to boot. (LP: #1828288)
14
15 -- Christian Ehrhardt <christian.ehrhardt@canonical.com> Tue, 28 May 2019 09:35:55 +0200
16
1qemu (1:2.5+dfsg-5ubuntu10.39) xenial-security; urgency=medium17qemu (1:2.5+dfsg-5ubuntu10.39) xenial-security; urgency=medium
218
3 * Disable patches from 1:2.5+dfsg-5ubuntu10.37 to prevent regression19 * Disable patches from 1:2.5+dfsg-5ubuntu10.37 to prevent regression
diff --git a/debian/patches/lp1823458/lp1829380.patch b/debian/patches/lp1823458/lp1829380.patch
4new file mode 10064420new file mode 100644
index 0000000..06b3f62
--- /dev/null
+++ b/debian/patches/lp1823458/lp1829380.patch
@@ -0,0 +1,20 @@
1From: Dan Streetman <ddstreet@canonical.com>
2Subject: Fix regression of failing qemu guest networking
3Bug-Ubuntu: https://launchpad.net/bugs/1829380
4
5This fixes the regression detailed in LP: #1829245
6
7The original patch that caused the regression is from LP: #1823458
8
9This fix will be uploaded to Xenial in LP: #1829380
10
11--- qemu-2.5+dfsg.orig/hw/net/virtio-net.c
12+++ qemu-2.5+dfsg/hw/net/virtio-net.c
13@@ -140,6 +140,7 @@ static void virtio_net_vhost_status(Virt
14 qemu_net_queue_purge(qnc->incoming_queue, qnc->peer);
15 }
16
17+ atomic_set(&n->vhost_stopped, 0);
18 n->vhost_started = 1;
19 r = vhost_net_start(vdev, n->nic->ncs, queues);
20 if (r < 0) {
diff --git a/debian/patches/lp1828288/target-i386-Set-AMD-alias-bits-after-filtering-CPUID.patch b/debian/patches/lp1828288/target-i386-Set-AMD-alias-bits-after-filtering-CPUID.patch
0new file mode 10064421new file mode 100644
index 0000000..bb74c77
--- /dev/null
+++ b/debian/patches/lp1828288/target-i386-Set-AMD-alias-bits-after-filtering-CPUID.patch
@@ -0,0 +1,64 @@
1Description: target-i386: Set AMD alias bits after filtering CPUID data
2
3QEMU complains about -cpu host on an AMD machine:
4 warning: host doesn't support requested feature: CPUID.80000001H:EDX [bit 0]
5For bits 0,1,3,4,5,6,7,8,9,12,13,14,15,16,17,23,24.
6
7KVM_GET_SUPPORTED_CPUID and and x86_cpu_get_migratable_flags()
8don't handle the AMD CPUID aliases bits, making
9x86_cpu_filter_features() print warnings and clear those CPUID
10bits incorrectly.
11
12To avoid hacking x86_cpu_get_migratable_flags() to handle
13CPUID_EXT2_AMD_ALIASES (just like the existing hack inside
14kvm_arch_get_supported_cpuid()), simply move the
15CPUID_EXT2_AMD_ALIASES code in x86_cpu_realizefn() after the
16x86_cpu_filter_features() call.
17
18This will probably make the CPUID_EXT2_AMD_ALIASES hack in
19kvm_arch_get_supported_cpuid() unnecessary, too. The hack will be
20removed in a follow-up patch after v2.6.0.
21
22Reported-by: Radim Krčmář <rkrcmar@redhat.com>
23Tested-by: Radim Krčmář <rkrcmar@redhat.com>
24Signed-off-by: Eduardo Habkost <ehabkost@redhat.com>
25---
26Author: Eduardo Habkost <ehabkost@redhat.com>
27Origin: upstream, commit: 9997cf7bdac056aeed246613639675c5a9f8fdc2
28Bug: http://lists.nongnu.org/archive/html/qemu-devel/2016-04/msg02597.html
29Bug-Ubuntu: https://launchpad.net/bugs/1828288
30Reviewed-By: Rafael David Tinoco <rafaeldtinoco@gmail.com>
31Last-Update: <2019-05-08>
32
33--- qemu-2.5+dfsg.orig/target-i386/cpu.c
34+++ qemu-2.5+dfsg/target-i386/cpu.c
35@@ -3156,6 +3156,14 @@ static void x86_cpu_realizefn(DeviceStat
36 env->cpuid_level = 7;
37 }
38
39+ if (x86_cpu_filter_features(cpu) && cpu->enforce_cpuid) {
40+ error_setg(&local_err,
41+ kvm_enabled() ?
42+ "Host doesn't support requested features" :
43+ "TCG doesn't support requested features");
44+ goto out;
45+ }
46+
47 /* On AMD CPUs, some CPUID[8000_0001].EDX bits must match the bits on
48 * CPUID[1].EDX.
49 */
50@@ -3166,14 +3174,6 @@ static void x86_cpu_realizefn(DeviceStat
51 }
52
53
54- if (x86_cpu_filter_features(cpu) && cpu->enforce_cpuid) {
55- error_setg(&local_err,
56- kvm_enabled() ?
57- "Host doesn't support requested features" :
58- "TCG doesn't support requested features");
59- goto out;
60- }
61-
62 #ifndef CONFIG_USER_ONLY
63 qemu_register_reset(x86_cpu_machine_reset_cb, cpu);
64
diff --git a/debian/patches/series b/debian/patches/series
index 4b12a37..0b7e586 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -278,8 +278,10 @@ lp1765364/0024-ppc-spapr_caps-Don-t-disable-cap_cfpc-on-POWER8-by-d.patch
278lp1765364/0025-missing-header.patch278lp1765364/0025-missing-header.patch
279CVE-2018-19489.patch279CVE-2018-19489.patch
280CVE-2019-6778.patch280CVE-2019-6778.patch
281#lp1823458/add-VirtIONet-vhost_stopped-flag-to-prevent-multiple.patch281lp1823458/add-VirtIONet-vhost_stopped-flag-to-prevent-multiple.patch
282#lp1823458/do-not-call-vhost_net_cleanup-on-running-net-from-ch.patch282lp1823458/do-not-call-vhost_net_cleanup-on-running-net-from-ch.patch
283lp1823458/lp1829380.patch
283ubuntu/enable-md-clear.patch284ubuntu/enable-md-clear.patch
284CVE-2018-20815.patch285CVE-2018-20815.patch
285CVE-2019-9824.patch286CVE-2019-9824.patch
287lp1828288/target-i386-Set-AMD-alias-bits-after-filtering-CPUID.patch

Subscribers

People subscribed via source and target branches